Merge 4.9.195 into android-4.9-q
Changes in 4.9.195 Revert "Bluetooth: validate BLE connection interval updates" IB/core: Add an unbound WQ type to the new CQ API HID: prodikeys: Fix general protection fault during probe HID: logitech: Fix general protection fault caused by Logitech driver HID: hidraw: Fix invalid read in hidraw_ioctl mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword() crypto: talitos - fix missing break in switch statement media: tvp5150: fix switch exit in set control handler ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt() ALSA: hda - Add laptop imic fixup for ASUS M9V laptop objtool: Clobber user CFLAGS variable mac80211: Print text for disassociation reason mac80211: handle deauthentication/disassociation from TDLS peer power: supply: sysfs: ratelimit property read error message locking/lockdep: Add debug_locks check in __lock_downgrade() irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices f2fs: check all the data segments against all node ones Revert "f2fs: avoid out-of-range memory access" f2fs: fix to do sanity check on segment bitmap of LFS curseg drm: Flush output polling on shutdown xfs: don't crash on null attr fork xfs_bmapi_read Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices arcnet: provide a buffer big enough to actually receive packets cdc_ncm: fix divide-by-zero caused by invalid wMaxPacketSize macsec: drop skb sk before calling gro_cells_receive net/phy: fix DP83865 10 Mbps HDX loopback disable function net: qrtr: Stop rx_worker before freeing node openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC ppp: Fix memory leak in ppp_write sch_netem: fix a divide by zero in tabledist() skge: fix checksum byte order usbnet: ignore endpoints with invalid wMaxPacketSize usbnet: sanity checking of packet sizes and device mtu mISDN: enforce CAP_NET_RAW for raw sockets appletalk: enforce CAP_NET_RAW for raw sockets ax25: enforce CAP_NET_RAW for raw sockets ieee802154: enforce CAP_NET_RAW for raw sockets nfc: enforce CAP_NET_RAW for raw sockets ALSA: hda: Flush interrupts on disabling regulator: lm363x: Fix off-by-one n_voltages for lm3632 ldo_vpos/ldo_vneg ASoC: sgtl5000: Fix charge pump source assignment dmaengine: bcm2835: Print error in case setting DMA mask fails leds: leds-lp5562 allow firmware files up to the maximum length media: dib0700: fix link error for dibx000_i2c_set_speed media: exynos4-is: fix leaked of_node references media: hdpvr: Add device num check and handling sched/fair: Fix imbalance due to CPU affinity sched/core: Fix CPU controller for !RT_GROUP_SCHED x86/reboot: Always use NMI fallback when shutdown via reboot vector IPI fails x86/apic: Soft disable APIC before initializing it ALSA: hda - Show the fatal CORB/RIRB error more clearly ALSA: i2c: ak4xxx-adda: Fix a possible null pointer dereference in build_adc_controls() media: iguanair: add sanity checks base: soc: Export soc_device_register/unregister APIs ALSA: usb-audio: Skip bSynchAddress endpoint check if it is invalid ia64:unwind: fix double free for mod->arch.init_unw_table EDAC/altera: Use the proper type for the IRQ status bits md: don't call spare_active in md_reap_sync_thread if all member devices can't work md: don't set In_sync if array is frozen efi: cper: print AER info of PCIe fatal error media: gspca: zero usb_buf on error dmaengine: iop-adma: use correct printk format strings media: omap3isp: Don't set streaming state on random subdevs net: lpc-enet: fix printk format strings ARM: dts: imx7d: cl-som-imx7: make ethernet work again media: radio/si470x: kill urb on error media: hdpvr: add terminating 0 at end of string media: dvb-core: fix a memory leak bug PM / devfreq: passive: Use non-devm notifiers PM / devfreq: exynos-bus: Correct clock enable sequence media: saa7146: add cleanup in hexium_attach() media: cpia2_usb: fix memory leaks media: saa7134: fix terminology around saa7134_i2c_eeprom_md7134_gate() media: ov9650: add a sanity check ACPI / CPPC: do not require the _PSD method arm64: kpti: ensure patched kernel text is fetched from PoU nvmet: fix data units read and written counters in SMART log iommu/amd: Silence warnings under memory pressure libtraceevent: Change users plugin directory ARM: dts: exynos: Mark LDO10 as always-on on Peach Pit/Pi Chromebooks ACPI: custom_method: fix memory leaks ACPI / PCI: fix acpi_pci_irq_enable() memory leak hwmon: (acpi_power_meter) Change log level for 'unsafe software power cap' md/raid1: fail run raid1 array when active disk less than one dmaengine: ti: edma: Do not reset reserved paRAM slots kprobes: Prohibit probing on BUG() and WARN() address s390/crypto: xts-aes-s390 fix extra run-time crypto self tests finding ASoC: dmaengine: Make the pcm->name equal to pcm->id if the name is not set mmc: sdhci: Fix incorrect switch to HS mode libertas: Add missing sentinel at end of if_usb.c fw_table e1000e: add workaround for possible stalled packet drm/amd/powerplay/smu7: enforce minimal VBITimeout (v2) media: ttusb-dec: Fix info-leak in ttusb_dec_send_command() ALSA: hda/realtek - Blacklist PC beep for Lenovo ThinkCentre M73/93 btrfs: extent-tree: Make sure we only allocate extents from block groups with the same type media: omap3isp: Set device on omap3isp subdevs PM / devfreq: passive: fix compiler warning ALSA: firewire-tascam: handle error code when getting current source of clock ALSA: firewire-tascam: check intermediate state of clock status and retry IB/hfi1: Define variables as unsigned long to fix KASAN warning printk: remove games with previous record flags printk: Do not lose last line in kmsg buffer dump fuse: fix missing unlock_page in fuse_writepage() parisc: Disable HP HSC-PCI Cards to prevent kernel crash KVM: x86: always stop emulation on page fault KVM: x86: set ctxt->have_exception in x86_decode_insn() KVM: x86: Manually calculate reserved bits when loading PDPTRS media: sn9c20x: Add MSI MS-1039 laptop to flip_dmi_table ASoC: Intel: NHLT: Fix debug print format ASoC: Intel: Fix use of potentially uninitialized variable ARM: zynq: Use memcpy_toio instead of memcpy on smp bring-up alarmtimer: Use EOPNOTSUPP instead of ENOTSUPP regulator: Defer init completion for a while after late_initcall memcg, kmem: do not fail __GFP_NOFAIL charges ovl: filter of trusted xattr results in audit Btrfs: fix use-after-free when using the tree modification log btrfs: Relinquish CPUs in btrfs_compare_trees md/raid6: Set R5_ReadError when there is read failure on parity disk cfg80211: Purge frame registrations on iftype change /dev/mem: Bail out upon SIGKILL. ext4: fix warning inside ext4_convert_unwritten_extents_endio ext4: fix punch hole for inline_data file systems quota: fix wrong condition in is_quota_modification() hwrng: core - don't wait on add_early_randomness() i2c: riic: Clear NACK in tend isr CIFS: fix max ea value size CIFS: Fix oplock handling for SMB 2.1+ protocols btrfs: qgroup: Drop quota_root and fs_info parameters from update_qgroup_status_item Btrfs: fix race setting up and completing qgroup rescan workers Linux 4.9.195 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 194
|
||||
SUBLEVEL = 195
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -427,6 +427,7 @@
|
||||
regulator-name = "vdd_ldo10";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
|
||||
@@ -427,6 +427,7 @@
|
||||
regulator-name = "vdd_ldo10";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
regulator-always-on;
|
||||
regulator-state-mem {
|
||||
regulator-off-in-suspend;
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<&clks IMX7D_ENET1_TIME_ROOT_CLK>;
|
||||
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
|
||||
assigned-clock-rates = <0>, <100000000>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <ðphy0>;
|
||||
fsl,magic-packet;
|
||||
status = "okay";
|
||||
@@ -69,7 +69,7 @@
|
||||
<&clks IMX7D_ENET2_TIME_ROOT_CLK>;
|
||||
assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
|
||||
assigned-clock-rates = <0>, <100000000>;
|
||||
phy-mode = "rgmii";
|
||||
phy-mode = "rgmii-id";
|
||||
phy-handle = <ðphy1>;
|
||||
fsl,magic-packet;
|
||||
status = "okay";
|
||||
|
||||
@@ -65,7 +65,7 @@ int zynq_cpun_start(u32 address, int cpu)
|
||||
* 0x4: Jump by mov instruction
|
||||
* 0x8: Jumping address
|
||||
*/
|
||||
memcpy((__force void *)zero, &zynq_secondary_trampoline,
|
||||
memcpy_toio(zero, &zynq_secondary_trampoline,
|
||||
trampoline_size);
|
||||
writel(address, zero + trampoline_size);
|
||||
|
||||
|
||||
@@ -270,6 +270,15 @@ skip_pgd:
|
||||
msr sctlr_el1, x18
|
||||
isb
|
||||
|
||||
/*
|
||||
* Invalidate the local I-cache so that any instructions fetched
|
||||
* speculatively from the PoC are discarded, since they may have
|
||||
* been dynamically patched at the PoU.
|
||||
*/
|
||||
ic iallu
|
||||
dsb nsh
|
||||
isb
|
||||
|
||||
/* Set the flag to zero to indicate that we're all done */
|
||||
str wzr, [flag_ptr]
|
||||
ret
|
||||
|
||||
@@ -912,8 +912,12 @@ module_finalize (const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mo
|
||||
void
|
||||
module_arch_cleanup (struct module *mod)
|
||||
{
|
||||
if (mod->arch.init_unw_table)
|
||||
if (mod->arch.init_unw_table) {
|
||||
unw_remove_unwind_table(mod->arch.init_unw_table);
|
||||
if (mod->arch.core_unw_table)
|
||||
mod->arch.init_unw_table = NULL;
|
||||
}
|
||||
if (mod->arch.core_unw_table) {
|
||||
unw_remove_unwind_table(mod->arch.core_unw_table);
|
||||
mod->arch.core_unw_table = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -572,6 +572,9 @@ static int xts_aes_encrypt(struct blkcipher_desc *desc,
|
||||
struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
|
||||
if (!nbytes)
|
||||
return -EINVAL;
|
||||
|
||||
if (unlikely(!xts_ctx->fc))
|
||||
return xts_fallback_encrypt(desc, dst, src, nbytes);
|
||||
|
||||
@@ -586,6 +589,9 @@ static int xts_aes_decrypt(struct blkcipher_desc *desc,
|
||||
struct s390_xts_ctx *xts_ctx = crypto_blkcipher_ctx(desc->tfm);
|
||||
struct blkcipher_walk walk;
|
||||
|
||||
if (!nbytes)
|
||||
return -EINVAL;
|
||||
|
||||
if (unlikely(!xts_ctx->fc))
|
||||
return xts_fallback_decrypt(desc, dst, src, nbytes);
|
||||
|
||||
|
||||
@@ -1303,6 +1303,14 @@ void setup_local_APIC(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If this comes from kexec/kcrash the APIC might be enabled in
|
||||
* SPIV. Soft disable it before doing further initialization.
|
||||
*/
|
||||
value = apic_read(APIC_SPIV);
|
||||
value &= ~APIC_SPIV_APIC_ENABLED;
|
||||
apic_write(APIC_SPIV, value);
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
/* Pound the ESR really hard over the head with a big hammer - mbligh */
|
||||
if (lapic_is_integrated() && apic->disable_esr) {
|
||||
|
||||
@@ -181,6 +181,12 @@ asmlinkage __visible void smp_reboot_interrupt(void)
|
||||
irq_exit();
|
||||
}
|
||||
|
||||
static int register_stop_handler(void)
|
||||
{
|
||||
return register_nmi_handler(NMI_LOCAL, smp_stop_nmi_callback,
|
||||
NMI_FLAG_FIRST, "smp_stop");
|
||||
}
|
||||
|
||||
static void native_stop_other_cpus(int wait)
|
||||
{
|
||||
unsigned long flags;
|
||||
@@ -214,39 +220,41 @@ static void native_stop_other_cpus(int wait)
|
||||
apic->send_IPI_allbutself(REBOOT_VECTOR);
|
||||
|
||||
/*
|
||||
* Don't wait longer than a second if the caller
|
||||
* didn't ask us to wait.
|
||||
* Don't wait longer than a second for IPI completion. The
|
||||
* wait request is not checked here because that would
|
||||
* prevent an NMI shutdown attempt in case that not all
|
||||
* CPUs reach shutdown state.
|
||||
*/
|
||||
timeout = USEC_PER_SEC;
|
||||
while (num_online_cpus() > 1 && (wait || timeout--))
|
||||
while (num_online_cpus() > 1 && timeout--)
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
|
||||
/* if the REBOOT_VECTOR didn't work, try with the NMI */
|
||||
if ((num_online_cpus() > 1) && (!smp_no_nmi_ipi)) {
|
||||
if (register_nmi_handler(NMI_LOCAL, smp_stop_nmi_callback,
|
||||
NMI_FLAG_FIRST, "smp_stop"))
|
||||
/* Note: we ignore failures here */
|
||||
/* Hope the REBOOT_IRQ is good enough */
|
||||
goto finish;
|
||||
|
||||
/* sync above data before sending IRQ */
|
||||
wmb();
|
||||
|
||||
pr_emerg("Shutting down cpus with NMI\n");
|
||||
|
||||
apic->send_IPI_allbutself(NMI_VECTOR);
|
||||
|
||||
if (num_online_cpus() > 1) {
|
||||
/*
|
||||
* Don't wait longer than a 10 ms if the caller
|
||||
* didn't ask us to wait.
|
||||
* If NMI IPI is enabled, try to register the stop handler
|
||||
* and send the IPI. In any case try to wait for the other
|
||||
* CPUs to stop.
|
||||
*/
|
||||
if (!smp_no_nmi_ipi && !register_stop_handler()) {
|
||||
/* Sync above data before sending IRQ */
|
||||
wmb();
|
||||
|
||||
pr_emerg("Shutting down cpus with NMI\n");
|
||||
|
||||
apic->send_IPI_allbutself(NMI_VECTOR);
|
||||
}
|
||||
/*
|
||||
* Don't wait longer than 10 ms if the caller didn't
|
||||
* reqeust it. If wait is true, the machine hangs here if
|
||||
* one or more CPUs do not reach shutdown state.
|
||||
*/
|
||||
timeout = USEC_PER_MSEC * 10;
|
||||
while (num_online_cpus() > 1 && (wait || timeout--))
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
finish:
|
||||
local_irq_save(flags);
|
||||
disable_local_APIC();
|
||||
mcheck_cpu_clear(this_cpu_ptr(&cpu_info));
|
||||
|
||||
@@ -5257,6 +5257,8 @@ done_prefixes:
|
||||
ctxt->memopp->addr.mem.ea + ctxt->_eip);
|
||||
|
||||
done:
|
||||
if (rc == X86EMUL_PROPAGATE_FAULT)
|
||||
ctxt->have_exception = true;
|
||||
return (rc != X86EMUL_CONTINUE) ? EMULATION_FAILED : EMULATION_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -535,8 +535,14 @@ static int kvm_read_nested_guest_page(struct kvm_vcpu *vcpu, gfn_t gfn,
|
||||
data, offset, len, access);
|
||||
}
|
||||
|
||||
static inline u64 pdptr_rsvd_bits(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return rsvd_bits(cpuid_maxphyaddr(vcpu), 63) | rsvd_bits(5, 8) |
|
||||
rsvd_bits(1, 2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the pae pdptrs. Return true is they are all valid.
|
||||
* Load the pae pdptrs. Return 1 if they are all valid, 0 otherwise.
|
||||
*/
|
||||
int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3)
|
||||
{
|
||||
@@ -555,8 +561,7 @@ int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3)
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(pdpte); ++i) {
|
||||
if ((pdpte[i] & PT_PRESENT_MASK) &&
|
||||
(pdpte[i] &
|
||||
vcpu->arch.mmu.guest_rsvd_check.rsvd_bits_mask[0][2])) {
|
||||
(pdpte[i] & pdptr_rsvd_bits(vcpu))) {
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
@@ -5764,8 +5769,16 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,
|
||||
if (reexecute_instruction(vcpu, cr2, write_fault_to_spt,
|
||||
emulation_type))
|
||||
return EMULATE_DONE;
|
||||
if (ctxt->have_exception && inject_emulated_exception(vcpu))
|
||||
if (ctxt->have_exception) {
|
||||
/*
|
||||
* #UD should result in just EMULATION_FAILED, and trap-like
|
||||
* exception should not be encountered during decode.
|
||||
*/
|
||||
WARN_ON_ONCE(ctxt->exception.vector == UD_VECTOR ||
|
||||
exception_type(ctxt->exception.vector) == EXCPT_TRAP);
|
||||
inject_emulated_exception(vcpu);
|
||||
return EMULATE_DONE;
|
||||
}
|
||||
if (emulation_type & EMULTYPE_SKIP)
|
||||
return EMULATE_FAIL;
|
||||
return handle_emulation_failure(vcpu);
|
||||
|
||||
@@ -360,8 +360,10 @@ static int acpi_get_psd(struct cpc_desc *cpc_ptr, acpi_handle handle)
|
||||
union acpi_object *psd = NULL;
|
||||
struct acpi_psd_package *pdomain;
|
||||
|
||||
status = acpi_evaluate_object_typed(handle, "_PSD", NULL, &buffer,
|
||||
ACPI_TYPE_PACKAGE);
|
||||
status = acpi_evaluate_object_typed(handle, "_PSD", NULL,
|
||||
&buffer, ACPI_TYPE_PACKAGE);
|
||||
if (status == AE_NOT_FOUND) /* _PSD is optional */
|
||||
return 0;
|
||||
if (ACPI_FAILURE(status))
|
||||
return -ENODEV;
|
||||
|
||||
|
||||
@@ -48,8 +48,10 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
|
||||
if ((*ppos > max_size) ||
|
||||
(*ppos + count > max_size) ||
|
||||
(*ppos + count < count) ||
|
||||
(count > uncopied_bytes))
|
||||
(count > uncopied_bytes)) {
|
||||
kfree(buf);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (copy_from_user(buf + (*ppos), user_buf, count)) {
|
||||
kfree(buf);
|
||||
@@ -69,6 +71,7 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
|
||||
add_taint(TAINT_OVERRIDDEN_ACPI_TABLE, LOCKDEP_NOW_UNRELIABLE);
|
||||
}
|
||||
|
||||
kfree(buf);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
@@ -462,8 +462,10 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
|
||||
* No IRQ known to the ACPI subsystem - maybe the BIOS /
|
||||
* driver reported one, then use it. Exit in any case.
|
||||
*/
|
||||
if (!acpi_pci_irq_valid(dev, pin))
|
||||
if (!acpi_pci_irq_valid(dev, pin)) {
|
||||
kfree(entry);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (acpi_isa_register_gsi(dev))
|
||||
dev_warn(&dev->dev, "PCI INT %c: no GSI\n",
|
||||
|
||||
@@ -145,6 +145,7 @@ out2:
|
||||
out1:
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(soc_device_register);
|
||||
|
||||
/* Ensure soc_dev->attr is freed prior to calling soc_device_unregister. */
|
||||
void soc_device_unregister(struct soc_device *soc_dev)
|
||||
@@ -153,6 +154,7 @@ void soc_device_unregister(struct soc_device *soc_dev)
|
||||
|
||||
device_unregister(&soc_dev->dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(soc_device_unregister);
|
||||
|
||||
static int __init soc_bus_register(void)
|
||||
{
|
||||
|
||||
@@ -362,6 +362,9 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
/* Additional Realtek 8822BE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0b05, 0x185c), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Additional Realtek 8822CE Bluetooth devices */
|
||||
{ USB_DEVICE(0x04ca, 0x4005), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Silicon Wave based devices */
|
||||
{ USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE },
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ static void add_early_randomness(struct hwrng *rng)
|
||||
size_t size = min_t(size_t, 16, rng_buffer_size());
|
||||
|
||||
mutex_lock(&reading_mutex);
|
||||
bytes_read = rng_get_data(rng, rng_buffer, size, 1);
|
||||
bytes_read = rng_get_data(rng, rng_buffer, size, 0);
|
||||
mutex_unlock(&reading_mutex);
|
||||
if (bytes_read > 0)
|
||||
add_device_randomness(rng_buffer, bytes_read);
|
||||
|
||||
@@ -96,6 +96,13 @@ void __weak unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline bool should_stop_iteration(void)
|
||||
{
|
||||
if (need_resched())
|
||||
cond_resched();
|
||||
return fatal_signal_pending(current);
|
||||
}
|
||||
|
||||
/*
|
||||
* This funcion reads the *physical* memory. The f_pos points directly to the
|
||||
* memory location.
|
||||
@@ -162,6 +169,8 @@ static ssize_t read_mem(struct file *file, char __user *buf,
|
||||
p += sz;
|
||||
count -= sz;
|
||||
read += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
|
||||
*ppos += read;
|
||||
@@ -233,6 +242,8 @@ static ssize_t write_mem(struct file *file, const char __user *buf,
|
||||
p += sz;
|
||||
count -= sz;
|
||||
written += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
|
||||
*ppos += written;
|
||||
@@ -446,6 +457,10 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
|
||||
read += sz;
|
||||
low_count -= sz;
|
||||
count -= sz;
|
||||
if (should_stop_iteration()) {
|
||||
count = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,6 +485,8 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
|
||||
buf += sz;
|
||||
read += sz;
|
||||
p += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
free_page((unsigned long)kbuf);
|
||||
}
|
||||
@@ -522,6 +539,8 @@ static ssize_t do_write_kmem(unsigned long p, const char __user *buf,
|
||||
p += sz;
|
||||
count -= sz;
|
||||
written += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
|
||||
*ppos += written;
|
||||
@@ -573,6 +592,8 @@ static ssize_t write_kmem(struct file *file, const char __user *buf,
|
||||
buf += sz;
|
||||
virtr += sz;
|
||||
p += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
free_page((unsigned long)kbuf);
|
||||
}
|
||||
|
||||
@@ -3043,6 +3043,7 @@ static int talitos_remove(struct platform_device *ofdev)
|
||||
break;
|
||||
case CRYPTO_ALG_TYPE_AEAD:
|
||||
crypto_unregister_aead(&t_alg->algt.alg.aead);
|
||||
break;
|
||||
case CRYPTO_ALG_TYPE_AHASH:
|
||||
crypto_unregister_ahash(&t_alg->algt.alg.hash);
|
||||
break;
|
||||
|
||||
@@ -198,11 +198,10 @@ static void exynos_bus_exit(struct device *dev)
|
||||
if (ret < 0)
|
||||
dev_warn(dev, "failed to disable the devfreq-event devices\n");
|
||||
|
||||
if (bus->regulator)
|
||||
regulator_disable(bus->regulator);
|
||||
|
||||
dev_pm_opp_of_remove_table(dev);
|
||||
clk_disable_unprepare(bus->clk);
|
||||
if (bus->regulator)
|
||||
regulator_disable(bus->regulator);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -391,6 +390,7 @@ static int exynos_bus_probe(struct platform_device *pdev)
|
||||
struct exynos_bus *bus;
|
||||
int ret, max_state;
|
||||
unsigned long min_freq, max_freq;
|
||||
bool passive = false;
|
||||
|
||||
if (!np) {
|
||||
dev_err(dev, "failed to find devicetree node\n");
|
||||
@@ -404,27 +404,27 @@ static int exynos_bus_probe(struct platform_device *pdev)
|
||||
bus->dev = &pdev->dev;
|
||||
platform_set_drvdata(pdev, bus);
|
||||
|
||||
/* Parse the device-tree to get the resource information */
|
||||
ret = exynos_bus_parse_of(np, bus);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL);
|
||||
if (!profile) {
|
||||
ret = -ENOMEM;
|
||||
goto err;
|
||||
}
|
||||
if (!profile)
|
||||
return -ENOMEM;
|
||||
|
||||
node = of_parse_phandle(dev->of_node, "devfreq", 0);
|
||||
if (node) {
|
||||
of_node_put(node);
|
||||
goto passive;
|
||||
passive = true;
|
||||
} else {
|
||||
ret = exynos_bus_parent_parse_of(np, bus);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Parse the device-tree to get the resource information */
|
||||
ret = exynos_bus_parse_of(np, bus);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
goto err_reg;
|
||||
|
||||
if (passive)
|
||||
goto passive;
|
||||
|
||||
/* Initialize the struct profile and governor data for parent device */
|
||||
profile->polling_ms = 50;
|
||||
@@ -514,6 +514,9 @@ out:
|
||||
err:
|
||||
dev_pm_opp_of_remove_table(dev);
|
||||
clk_disable_unprepare(bus->clk);
|
||||
err_reg:
|
||||
if (!passive)
|
||||
regulator_disable(bus->regulator);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -152,7 +152,6 @@ static int devfreq_passive_notifier_call(struct notifier_block *nb,
|
||||
static int devfreq_passive_event_handler(struct devfreq *devfreq,
|
||||
unsigned int event, void *data)
|
||||
{
|
||||
struct device *dev = devfreq->dev.parent;
|
||||
struct devfreq_passive_data *p_data
|
||||
= (struct devfreq_passive_data *)devfreq->data;
|
||||
struct devfreq *parent = (struct devfreq *)p_data->parent;
|
||||
@@ -168,12 +167,12 @@ static int devfreq_passive_event_handler(struct devfreq *devfreq,
|
||||
p_data->this = devfreq;
|
||||
|
||||
nb->notifier_call = devfreq_passive_notifier_call;
|
||||
ret = devm_devfreq_register_notifier(dev, parent, nb,
|
||||
ret = devfreq_register_notifier(parent, nb,
|
||||
DEVFREQ_TRANSITION_NOTIFIER);
|
||||
break;
|
||||
case DEVFREQ_GOV_STOP:
|
||||
devm_devfreq_unregister_notifier(dev, parent, nb,
|
||||
DEVFREQ_TRANSITION_NOTIFIER);
|
||||
WARN_ON(devfreq_unregister_notifier(parent, nb,
|
||||
DEVFREQ_TRANSITION_NOTIFIER));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -891,8 +891,10 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
|
||||
pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
|
||||
|
||||
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (rc)
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev, "Unable to set DMA mask\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
od = devm_kzalloc(&pdev->dev, sizeof(*od), GFP_KERNEL);
|
||||
if (!od)
|
||||
|
||||
@@ -2268,9 +2268,6 @@ static int edma_probe(struct platform_device *pdev)
|
||||
|
||||
ecc->default_queue = info->default_queue;
|
||||
|
||||
for (i = 0; i < ecc->num_slots; i++)
|
||||
edma_write_slot(ecc, i, &dummy_paramset);
|
||||
|
||||
if (info->rsv) {
|
||||
/* Set the reserved slots in inuse list */
|
||||
rsv_slots = info->rsv->rsv_slots;
|
||||
@@ -2283,6 +2280,12 @@ static int edma_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ecc->num_slots; i++) {
|
||||
/* Reset only unused - not reserved - paRAM slots */
|
||||
if (!test_bit(i, ecc->slot_inuse))
|
||||
edma_write_slot(ecc, i, &dummy_paramset);
|
||||
}
|
||||
|
||||
/* Clear the xbar mapped channels in unused list */
|
||||
xbar_chans = info->xbar_chans;
|
||||
if (xbar_chans) {
|
||||
|
||||
@@ -125,9 +125,9 @@ static void __iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan)
|
||||
list_for_each_entry_safe(iter, _iter, &iop_chan->chain,
|
||||
chain_node) {
|
||||
pr_debug("\tcookie: %d slot: %d busy: %d "
|
||||
"this_desc: %#x next_desc: %#x ack: %d\n",
|
||||
"this_desc: %#x next_desc: %#llx ack: %d\n",
|
||||
iter->async_tx.cookie, iter->idx, busy,
|
||||
iter->async_tx.phys, iop_desc_get_next_desc(iter),
|
||||
iter->async_tx.phys, (u64)iop_desc_get_next_desc(iter),
|
||||
async_tx_test_ack(&iter->async_tx));
|
||||
prefetch(_iter);
|
||||
prefetch(&_iter->async_tx);
|
||||
@@ -315,9 +315,9 @@ retry:
|
||||
int i;
|
||||
dev_dbg(iop_chan->device->common.dev,
|
||||
"allocated slot: %d "
|
||||
"(desc %p phys: %#x) slots_per_op %d\n",
|
||||
"(desc %p phys: %#llx) slots_per_op %d\n",
|
||||
iter->idx, iter->hw_desc,
|
||||
iter->async_tx.phys, slots_per_op);
|
||||
(u64)iter->async_tx.phys, slots_per_op);
|
||||
|
||||
/* pre-ack all but the last descriptor */
|
||||
if (num_slots != slots_per_op)
|
||||
@@ -525,7 +525,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest,
|
||||
return NULL;
|
||||
BUG_ON(len > IOP_ADMA_MAX_BYTE_COUNT);
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev, "%s len: %u\n",
|
||||
dev_dbg(iop_chan->device->common.dev, "%s len: %zu\n",
|
||||
__func__, len);
|
||||
|
||||
spin_lock_bh(&iop_chan->lock);
|
||||
@@ -558,7 +558,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest,
|
||||
BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT);
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev,
|
||||
"%s src_cnt: %d len: %u flags: %lx\n",
|
||||
"%s src_cnt: %d len: %zu flags: %lx\n",
|
||||
__func__, src_cnt, len, flags);
|
||||
|
||||
spin_lock_bh(&iop_chan->lock);
|
||||
@@ -591,7 +591,7 @@ iop_adma_prep_dma_xor_val(struct dma_chan *chan, dma_addr_t *dma_src,
|
||||
if (unlikely(!len))
|
||||
return NULL;
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n",
|
||||
dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n",
|
||||
__func__, src_cnt, len);
|
||||
|
||||
spin_lock_bh(&iop_chan->lock);
|
||||
@@ -629,7 +629,7 @@ iop_adma_prep_dma_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src,
|
||||
BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT);
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev,
|
||||
"%s src_cnt: %d len: %u flags: %lx\n",
|
||||
"%s src_cnt: %d len: %zu flags: %lx\n",
|
||||
__func__, src_cnt, len, flags);
|
||||
|
||||
if (dmaf_p_disabled_continue(flags))
|
||||
@@ -692,7 +692,7 @@ iop_adma_prep_dma_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
|
||||
return NULL;
|
||||
BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT);
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n",
|
||||
dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n",
|
||||
__func__, src_cnt, len);
|
||||
|
||||
spin_lock_bh(&iop_chan->lock);
|
||||
|
||||
@@ -1651,6 +1651,7 @@ static void altr_edac_a10_irq_handler(struct irq_desc *desc)
|
||||
struct altr_arria10_edac *edac = irq_desc_get_handler_data(desc);
|
||||
struct irq_chip *chip = irq_desc_get_chip(desc);
|
||||
int irq = irq_desc_get_irq(desc);
|
||||
unsigned long bits;
|
||||
|
||||
dberr = (irq == edac->db_irq) ? 1 : 0;
|
||||
sm_offset = dberr ? A10_SYSMGR_ECC_INTSTAT_DERR_OFST :
|
||||
@@ -1660,7 +1661,8 @@ static void altr_edac_a10_irq_handler(struct irq_desc *desc)
|
||||
|
||||
regmap_read(edac->ecc_mgr_map, sm_offset, &irq_status);
|
||||
|
||||
for_each_set_bit(bit, (unsigned long *)&irq_status, 32) {
|
||||
bits = irq_status;
|
||||
for_each_set_bit(bit, &bits, 32) {
|
||||
irq = irq_linear_revmap(edac->domain, dberr * 32 + bit);
|
||||
if (irq)
|
||||
generic_handle_irq(irq);
|
||||
|
||||
@@ -384,6 +384,21 @@ static void cper_print_pcie(const char *pfx, const struct cper_sec_pcie *pcie,
|
||||
printk(
|
||||
"%s""bridge: secondary_status: 0x%04x, control: 0x%04x\n",
|
||||
pfx, pcie->bridge.secondary_status, pcie->bridge.control);
|
||||
|
||||
/* Fatal errors call __ghes_panic() before AER handler prints this */
|
||||
if ((pcie->validation_bits & CPER_PCIE_VALID_AER_INFO) &&
|
||||
(gdata->error_severity & CPER_SEV_FATAL)) {
|
||||
struct aer_capability_regs *aer;
|
||||
|
||||
aer = (struct aer_capability_regs *)pcie->aer_info;
|
||||
printk("%saer_uncor_status: 0x%08x, aer_uncor_mask: 0x%08x\n",
|
||||
pfx, aer->uncor_status, aer->uncor_mask);
|
||||
printk("%saer_uncor_severity: 0x%08x\n",
|
||||
pfx, aer->uncor_severity);
|
||||
printk("%sTLP Header: %08x %08x %08x %08x\n", pfx,
|
||||
aer->header_log.dw0, aer->header_log.dw1,
|
||||
aer->header_log.dw2, aer->header_log.dw3);
|
||||
}
|
||||
}
|
||||
|
||||
static void cper_estatus_print_section(
|
||||
|
||||
@@ -3739,6 +3739,11 @@ int smu7_program_display_gap(struct pp_hwmgr *hwmgr)
|
||||
|
||||
data->frame_time_x2 = frame_time_in_us * 2 / 100;
|
||||
|
||||
if (data->frame_time_x2 < 280) {
|
||||
pr_debug("%s: enforce minimal VBITimeout: %d -> 280\n", __func__, data->frame_time_x2);
|
||||
data->frame_time_x2 = 280;
|
||||
}
|
||||
|
||||
display_gap2 = pre_vbi_time_in_us * (ref_clock / 100);
|
||||
|
||||
cgs_write_ind_register(hwmgr->device, CGS_IND_REG__SMC, ixCG_DISPLAY_GAP_CNTL2, display_gap2);
|
||||
|
||||
@@ -387,6 +387,9 @@ static void output_poll_execute(struct work_struct *work)
|
||||
enum drm_connector_status old_status;
|
||||
bool repoll = false, changed;
|
||||
|
||||
if (!dev->mode_config.poll_enabled)
|
||||
return;
|
||||
|
||||
/* Pick up any changes detected by the probe functions. */
|
||||
changed = dev->mode_config.delayed_event;
|
||||
dev->mode_config.delayed_event = false;
|
||||
@@ -550,7 +553,11 @@ EXPORT_SYMBOL(drm_kms_helper_poll_init);
|
||||
*/
|
||||
void drm_kms_helper_poll_fini(struct drm_device *dev)
|
||||
{
|
||||
drm_kms_helper_poll_disable(dev);
|
||||
if (!dev->mode_config.poll_enabled)
|
||||
return;
|
||||
|
||||
dev->mode_config.poll_enabled = false;
|
||||
cancel_delayed_work_sync(&dev->mode_config.output_poll_work);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_kms_helper_poll_fini);
|
||||
|
||||
|
||||
@@ -761,7 +761,7 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
|
||||
if (!buf) {
|
||||
ret = -ENOMEM;
|
||||
goto err_free;
|
||||
goto err_stop;
|
||||
}
|
||||
|
||||
ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(cbuf),
|
||||
@@ -793,9 +793,12 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
ret = lg4ff_init(hdev);
|
||||
|
||||
if (ret)
|
||||
goto err_free;
|
||||
goto err_stop;
|
||||
|
||||
return 0;
|
||||
|
||||
err_stop:
|
||||
hid_hw_stop(hdev);
|
||||
err_free:
|
||||
kfree(drv_data);
|
||||
return ret;
|
||||
@@ -806,8 +809,7 @@ static void lg_remove(struct hid_device *hdev)
|
||||
struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
|
||||
if (drv_data->quirks & LG_FF4)
|
||||
lg4ff_deinit(hdev);
|
||||
else
|
||||
hid_hw_stop(hdev);
|
||||
hid_hw_stop(hdev);
|
||||
kfree(drv_data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1485,7 +1485,6 @@ int lg4ff_deinit(struct hid_device *hid)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
hid_hw_stop(hid);
|
||||
drv_data->device_props = NULL;
|
||||
|
||||
kfree(entry);
|
||||
|
||||
@@ -556,10 +556,14 @@ static void pcmidi_setup_extra_keys(
|
||||
|
||||
static int pcmidi_set_operational(struct pcmidi_snd *pm)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (pm->ifnum != 1)
|
||||
return 0; /* only set up ONCE for interace 1 */
|
||||
|
||||
pcmidi_get_output_report(pm);
|
||||
rc = pcmidi_get_output_report(pm);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
pcmidi_submit_output_report(pm, 0xc1);
|
||||
return 0;
|
||||
}
|
||||
@@ -688,7 +692,11 @@ static int pcmidi_snd_initialise(struct pcmidi_snd *pm)
|
||||
spin_lock_init(&pm->rawmidi_in_lock);
|
||||
|
||||
init_sustain_timers(pm);
|
||||
pcmidi_set_operational(pm);
|
||||
err = pcmidi_set_operational(pm);
|
||||
if (err < 0) {
|
||||
pk_error("failed to find output report\n");
|
||||
goto fail_register;
|
||||
}
|
||||
|
||||
/* register it */
|
||||
err = snd_card_register(card);
|
||||
|
||||
@@ -378,7 +378,7 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd,
|
||||
|
||||
mutex_lock(&minors_lock);
|
||||
dev = hidraw_table[minor];
|
||||
if (!dev) {
|
||||
if (!dev || !dev->exist) {
|
||||
ret = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -693,8 +693,8 @@ static int setup_attrs(struct acpi_power_meter_resource *resource)
|
||||
|
||||
if (resource->caps.flags & POWER_METER_CAN_CAP) {
|
||||
if (!can_cap_in_hardware()) {
|
||||
dev_err(&resource->acpi_dev->dev,
|
||||
"Ignoring unsafe software power cap!\n");
|
||||
dev_warn(&resource->acpi_dev->dev,
|
||||
"Ignoring unsafe software power cap!\n");
|
||||
goto skip_unsafe_cap;
|
||||
}
|
||||
|
||||
|
||||
@@ -212,6 +212,7 @@ static irqreturn_t riic_tend_isr(int irq, void *data)
|
||||
if (readb(riic->base + RIIC_ICSR2) & ICSR2_NACKF) {
|
||||
/* We got a NACKIE */
|
||||
readb(riic->base + RIIC_ICDRR); /* dummy read */
|
||||
riic_clear_set_bit(riic, ICSR2_NACKF, 0, RIIC_ICSR2);
|
||||
riic->err = -ENXIO;
|
||||
} else if (riic->bytes_left) {
|
||||
return IRQ_NONE;
|
||||
|
||||
@@ -102,12 +102,12 @@ static void ib_cq_poll_work(struct work_struct *work)
|
||||
completed = __ib_process_cq(cq, IB_POLL_BUDGET_WORKQUEUE);
|
||||
if (completed >= IB_POLL_BUDGET_WORKQUEUE ||
|
||||
ib_req_notify_cq(cq, IB_POLL_FLAGS) > 0)
|
||||
queue_work(ib_comp_wq, &cq->work);
|
||||
queue_work(cq->comp_wq, &cq->work);
|
||||
}
|
||||
|
||||
static void ib_cq_completion_workqueue(struct ib_cq *cq, void *private)
|
||||
{
|
||||
queue_work(ib_comp_wq, &cq->work);
|
||||
queue_work(cq->comp_wq, &cq->work);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -159,9 +159,12 @@ struct ib_cq *ib_alloc_cq(struct ib_device *dev, void *private,
|
||||
ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
|
||||
break;
|
||||
case IB_POLL_WORKQUEUE:
|
||||
case IB_POLL_UNBOUND_WORKQUEUE:
|
||||
cq->comp_handler = ib_cq_completion_workqueue;
|
||||
INIT_WORK(&cq->work, ib_cq_poll_work);
|
||||
ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
|
||||
cq->comp_wq = (cq->poll_ctx == IB_POLL_WORKQUEUE) ?
|
||||
ib_comp_wq : ib_comp_unbound_wq;
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
@@ -196,6 +199,7 @@ void ib_free_cq(struct ib_cq *cq)
|
||||
irq_poll_disable(&cq->iop);
|
||||
break;
|
||||
case IB_POLL_WORKQUEUE:
|
||||
case IB_POLL_UNBOUND_WORKQUEUE:
|
||||
cancel_work_sync(&cq->work);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -59,6 +59,7 @@ struct ib_client_data {
|
||||
};
|
||||
|
||||
struct workqueue_struct *ib_comp_wq;
|
||||
struct workqueue_struct *ib_comp_unbound_wq;
|
||||
struct workqueue_struct *ib_wq;
|
||||
EXPORT_SYMBOL_GPL(ib_wq);
|
||||
|
||||
@@ -1005,10 +1006,19 @@ static int __init ib_core_init(void)
|
||||
goto err;
|
||||
}
|
||||
|
||||
ib_comp_unbound_wq =
|
||||
alloc_workqueue("ib-comp-unb-wq",
|
||||
WQ_UNBOUND | WQ_HIGHPRI | WQ_MEM_RECLAIM |
|
||||
WQ_SYSFS, WQ_UNBOUND_MAX_ACTIVE);
|
||||
if (!ib_comp_unbound_wq) {
|
||||
ret = -ENOMEM;
|
||||
goto err_comp;
|
||||
}
|
||||
|
||||
ret = class_register(&ib_class);
|
||||
if (ret) {
|
||||
pr_warn("Couldn't create InfiniBand device class\n");
|
||||
goto err_comp;
|
||||
goto err_comp_unbound;
|
||||
}
|
||||
|
||||
ret = ibnl_init();
|
||||
@@ -1055,6 +1065,8 @@ err_ibnl:
|
||||
ibnl_cleanup();
|
||||
err_sysfs:
|
||||
class_unregister(&ib_class);
|
||||
err_comp_unbound:
|
||||
destroy_workqueue(ib_comp_unbound_wq);
|
||||
err_comp:
|
||||
destroy_workqueue(ib_comp_wq);
|
||||
err:
|
||||
@@ -1071,6 +1083,7 @@ static void __exit ib_core_cleanup(void)
|
||||
addr_cleanup();
|
||||
ibnl_cleanup();
|
||||
class_unregister(&ib_class);
|
||||
destroy_workqueue(ib_comp_unbound_wq);
|
||||
destroy_workqueue(ib_comp_wq);
|
||||
/* Make sure that any pending umem accounting work is done. */
|
||||
destroy_workqueue(ib_wq);
|
||||
|
||||
@@ -3163,7 +3163,7 @@ static int ib_mad_port_open(struct ib_device *device,
|
||||
}
|
||||
|
||||
port_priv->cq = ib_alloc_cq(port_priv->device, port_priv, cq_size, 0,
|
||||
IB_POLL_WORKQUEUE);
|
||||
IB_POLL_UNBOUND_WORKQUEUE);
|
||||
if (IS_ERR(port_priv->cq)) {
|
||||
dev_err(&device->dev, "Couldn't create ib_mad CQ\n");
|
||||
ret = PTR_ERR(port_priv->cq);
|
||||
|
||||
@@ -2016,7 +2016,7 @@ struct opa_port_status_req {
|
||||
__be32 vl_select_mask;
|
||||
};
|
||||
|
||||
#define VL_MASK_ALL 0x000080ff
|
||||
#define VL_MASK_ALL 0x00000000000080ffUL
|
||||
|
||||
struct opa_port_status_rsp {
|
||||
__u8 port_num;
|
||||
@@ -2315,15 +2315,14 @@ static int pma_get_opa_classportinfo(struct opa_pma_mad *pmp,
|
||||
}
|
||||
|
||||
static void a0_portstatus(struct hfi1_pportdata *ppd,
|
||||
struct opa_port_status_rsp *rsp, u32 vl_select_mask)
|
||||
struct opa_port_status_rsp *rsp)
|
||||
{
|
||||
if (!is_bx(ppd->dd)) {
|
||||
unsigned long vl;
|
||||
u64 sum_vl_xmit_wait = 0;
|
||||
u32 vl_all_mask = VL_MASK_ALL;
|
||||
unsigned long vl_all_mask = VL_MASK_ALL;
|
||||
|
||||
for_each_set_bit(vl, (unsigned long *)&(vl_all_mask),
|
||||
8 * sizeof(vl_all_mask)) {
|
||||
for_each_set_bit(vl, &vl_all_mask, BITS_PER_LONG) {
|
||||
u64 tmp = sum_vl_xmit_wait +
|
||||
read_port_cntr(ppd, C_TX_WAIT_VL,
|
||||
idx_from_vl(vl));
|
||||
@@ -2347,12 +2346,12 @@ static int pma_get_opa_portstatus(struct opa_pma_mad *pmp,
|
||||
(struct opa_port_status_req *)pmp->data;
|
||||
struct hfi1_devdata *dd = dd_from_ibdev(ibdev);
|
||||
struct opa_port_status_rsp *rsp;
|
||||
u32 vl_select_mask = be32_to_cpu(req->vl_select_mask);
|
||||
unsigned long vl_select_mask = be32_to_cpu(req->vl_select_mask);
|
||||
unsigned long vl;
|
||||
size_t response_data_size;
|
||||
u32 nports = be32_to_cpu(pmp->mad_hdr.attr_mod) >> 24;
|
||||
u8 port_num = req->port_num;
|
||||
u8 num_vls = hweight32(vl_select_mask);
|
||||
u8 num_vls = hweight64(vl_select_mask);
|
||||
struct _vls_pctrs *vlinfo;
|
||||
struct hfi1_ibport *ibp = to_iport(ibdev, port);
|
||||
struct hfi1_pportdata *ppd = ppd_from_ibp(ibp);
|
||||
@@ -2386,7 +2385,7 @@ static int pma_get_opa_portstatus(struct opa_pma_mad *pmp,
|
||||
|
||||
hfi1_read_link_quality(dd, &rsp->link_quality_indicator);
|
||||
|
||||
rsp->vl_select_mask = cpu_to_be32(vl_select_mask);
|
||||
rsp->vl_select_mask = cpu_to_be32((u32)vl_select_mask);
|
||||
rsp->port_xmit_data = cpu_to_be64(read_dev_cntr(dd, C_DC_XMIT_FLITS,
|
||||
CNTR_INVALID_VL));
|
||||
rsp->port_rcv_data = cpu_to_be64(read_dev_cntr(dd, C_DC_RCV_FLITS,
|
||||
@@ -2449,8 +2448,7 @@ static int pma_get_opa_portstatus(struct opa_pma_mad *pmp,
|
||||
* So in the for_each_set_bit() loop below, we don't need
|
||||
* any additional checks for vl.
|
||||
*/
|
||||
for_each_set_bit(vl, (unsigned long *)&(vl_select_mask),
|
||||
8 * sizeof(vl_select_mask)) {
|
||||
for_each_set_bit(vl, &vl_select_mask, BITS_PER_LONG) {
|
||||
memset(vlinfo, 0, sizeof(*vlinfo));
|
||||
|
||||
tmp = read_dev_cntr(dd, C_DC_RX_FLIT_VL, idx_from_vl(vl));
|
||||
@@ -2487,7 +2485,7 @@ static int pma_get_opa_portstatus(struct opa_pma_mad *pmp,
|
||||
vfi++;
|
||||
}
|
||||
|
||||
a0_portstatus(ppd, rsp, vl_select_mask);
|
||||
a0_portstatus(ppd, rsp);
|
||||
|
||||
if (resp_len)
|
||||
*resp_len += response_data_size;
|
||||
@@ -2534,16 +2532,14 @@ static u64 get_error_counter_summary(struct ib_device *ibdev, u8 port,
|
||||
return error_counter_summary;
|
||||
}
|
||||
|
||||
static void a0_datacounters(struct hfi1_pportdata *ppd, struct _port_dctrs *rsp,
|
||||
u32 vl_select_mask)
|
||||
static void a0_datacounters(struct hfi1_pportdata *ppd, struct _port_dctrs *rsp)
|
||||
{
|
||||
if (!is_bx(ppd->dd)) {
|
||||
unsigned long vl;
|
||||
u64 sum_vl_xmit_wait = 0;
|
||||
u32 vl_all_mask = VL_MASK_ALL;
|
||||
unsigned long vl_all_mask = VL_MASK_ALL;
|
||||
|
||||
for_each_set_bit(vl, (unsigned long *)&(vl_all_mask),
|
||||
8 * sizeof(vl_all_mask)) {
|
||||
for_each_set_bit(vl, &vl_all_mask, BITS_PER_LONG) {
|
||||
u64 tmp = sum_vl_xmit_wait +
|
||||
read_port_cntr(ppd, C_TX_WAIT_VL,
|
||||
idx_from_vl(vl));
|
||||
@@ -2599,7 +2595,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
|
||||
u64 port_mask;
|
||||
u8 port_num;
|
||||
unsigned long vl;
|
||||
u32 vl_select_mask;
|
||||
unsigned long vl_select_mask;
|
||||
int vfi;
|
||||
|
||||
num_ports = be32_to_cpu(pmp->mad_hdr.attr_mod) >> 24;
|
||||
@@ -2668,8 +2664,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
|
||||
* So in the for_each_set_bit() loop below, we don't need
|
||||
* any additional checks for vl.
|
||||
*/
|
||||
for_each_set_bit(vl, (unsigned long *)&(vl_select_mask),
|
||||
8 * sizeof(req->vl_select_mask)) {
|
||||
for_each_set_bit(vl, &vl_select_mask, BITS_PER_LONG) {
|
||||
memset(vlinfo, 0, sizeof(*vlinfo));
|
||||
|
||||
rsp->vls[vfi].port_vl_xmit_data =
|
||||
@@ -2712,7 +2707,7 @@ static int pma_get_opa_datacounters(struct opa_pma_mad *pmp,
|
||||
vfi++;
|
||||
}
|
||||
|
||||
a0_datacounters(ppd, rsp, vl_select_mask);
|
||||
a0_datacounters(ppd, rsp);
|
||||
|
||||
if (resp_len)
|
||||
*resp_len += response_data_size;
|
||||
@@ -2807,7 +2802,7 @@ static int pma_get_opa_porterrors(struct opa_pma_mad *pmp,
|
||||
struct _vls_ectrs *vlinfo;
|
||||
unsigned long vl;
|
||||
u64 port_mask, tmp;
|
||||
u32 vl_select_mask;
|
||||
unsigned long vl_select_mask;
|
||||
int vfi;
|
||||
|
||||
req = (struct opa_port_error_counters64_msg *)pmp->data;
|
||||
@@ -2866,8 +2861,7 @@ static int pma_get_opa_porterrors(struct opa_pma_mad *pmp,
|
||||
vlinfo = &rsp->vls[0];
|
||||
vfi = 0;
|
||||
vl_select_mask = be32_to_cpu(req->vl_select_mask);
|
||||
for_each_set_bit(vl, (unsigned long *)&(vl_select_mask),
|
||||
8 * sizeof(req->vl_select_mask)) {
|
||||
for_each_set_bit(vl, &vl_select_mask, BITS_PER_LONG) {
|
||||
memset(vlinfo, 0, sizeof(*vlinfo));
|
||||
rsp->vls[vfi].port_vl_xmit_discards =
|
||||
cpu_to_be64(read_port_cntr(ppd, C_SW_XMIT_DSCD_VL,
|
||||
@@ -3077,7 +3071,7 @@ static int pma_set_opa_portstatus(struct opa_pma_mad *pmp,
|
||||
u32 nports = be32_to_cpu(pmp->mad_hdr.attr_mod) >> 24;
|
||||
u64 portn = be64_to_cpu(req->port_select_mask[3]);
|
||||
u32 counter_select = be32_to_cpu(req->counter_select_mask);
|
||||
u32 vl_select_mask = VL_MASK_ALL; /* clear all per-vl cnts */
|
||||
unsigned long vl_select_mask = VL_MASK_ALL; /* clear all per-vl cnts */
|
||||
unsigned long vl;
|
||||
|
||||
if ((nports != 1) || (portn != 1 << port)) {
|
||||
@@ -3169,8 +3163,7 @@ static int pma_set_opa_portstatus(struct opa_pma_mad *pmp,
|
||||
if (counter_select & CS_UNCORRECTABLE_ERRORS)
|
||||
write_dev_cntr(dd, C_DC_UNC_ERR, CNTR_INVALID_VL, 0);
|
||||
|
||||
for_each_set_bit(vl, (unsigned long *)&(vl_select_mask),
|
||||
8 * sizeof(vl_select_mask)) {
|
||||
for_each_set_bit(vl, &vl_select_mask, BITS_PER_LONG) {
|
||||
if (counter_select & CS_PORT_XMIT_DATA)
|
||||
write_port_cntr(ppd, C_TX_FLIT_VL, idx_from_vl(vl), 0);
|
||||
|
||||
|
||||
@@ -2595,7 +2595,9 @@ static int map_sg(struct device *dev, struct scatterlist *sglist,
|
||||
|
||||
bus_addr = address + s->dma_address + (j << PAGE_SHIFT);
|
||||
phys_addr = (sg_phys(s) & PAGE_MASK) + (j << PAGE_SHIFT);
|
||||
ret = iommu_map_page(domain, bus_addr, phys_addr, PAGE_SIZE, prot, GFP_ATOMIC);
|
||||
ret = iommu_map_page(domain, bus_addr, phys_addr,
|
||||
PAGE_SIZE, prot,
|
||||
GFP_ATOMIC | __GFP_NOWARN);
|
||||
if (ret)
|
||||
goto out_unmap;
|
||||
|
||||
|
||||
@@ -1519,14 +1519,13 @@ static void its_irq_domain_free(struct irq_domain *domain, unsigned int virq,
|
||||
struct its_device *its_dev = irq_data_get_irq_chip_data(d);
|
||||
int i;
|
||||
|
||||
bitmap_release_region(its_dev->event_map.lpi_map,
|
||||
its_get_event_id(irq_domain_get_irq_data(domain, virq)),
|
||||
get_count_order(nr_irqs));
|
||||
|
||||
for (i = 0; i < nr_irqs; i++) {
|
||||
struct irq_data *data = irq_domain_get_irq_data(domain,
|
||||
virq + i);
|
||||
u32 event = its_get_event_id(data);
|
||||
|
||||
/* Mark interrupt index as unused */
|
||||
clear_bit(event, its_dev->event_map.lpi_map);
|
||||
|
||||
/* Nuke the entry in the domain */
|
||||
irq_domain_reset_irq_data(data);
|
||||
}
|
||||
|
||||
@@ -766,6 +766,8 @@ base_sock_create(struct net *net, struct socket *sock, int protocol, int kern)
|
||||
|
||||
if (sock->type != SOCK_RAW)
|
||||
return -ESOCKTNOSUPPORT;
|
||||
if (!capable(CAP_NET_RAW))
|
||||
return -EPERM;
|
||||
|
||||
sk = sk_alloc(net, PF_ISDN, GFP_KERNEL, &mISDN_proto, kern);
|
||||
if (!sk)
|
||||
|
||||
@@ -263,7 +263,11 @@ static void lp5562_firmware_loaded(struct lp55xx_chip *chip)
|
||||
{
|
||||
const struct firmware *fw = chip->fw;
|
||||
|
||||
if (fw->size > LP5562_PROGRAM_LENGTH) {
|
||||
/*
|
||||
* the firmware is encoded in ascii hex character, with 2 chars
|
||||
* per byte
|
||||
*/
|
||||
if (fw->size > (LP5562_PROGRAM_LENGTH * 2)) {
|
||||
dev_err(&chip->cl->dev, "firmware data size overflow: %zu\n",
|
||||
fw->size);
|
||||
return;
|
||||
|
||||
@@ -1662,8 +1662,15 @@ static int super_1_validate(struct mddev *mddev, struct md_rdev *rdev)
|
||||
if (!(le32_to_cpu(sb->feature_map) &
|
||||
MD_FEATURE_RECOVERY_BITMAP))
|
||||
rdev->saved_raid_disk = -1;
|
||||
} else
|
||||
set_bit(In_sync, &rdev->flags);
|
||||
} else {
|
||||
/*
|
||||
* If the array is FROZEN, then the device can't
|
||||
* be in_sync with rest of array.
|
||||
*/
|
||||
if (!test_bit(MD_RECOVERY_FROZEN,
|
||||
&mddev->recovery))
|
||||
set_bit(In_sync, &rdev->flags);
|
||||
}
|
||||
rdev->raid_disk = role;
|
||||
break;
|
||||
}
|
||||
@@ -8573,7 +8580,8 @@ void md_reap_sync_thread(struct mddev *mddev)
|
||||
/* resync has finished, collect result */
|
||||
md_unregister_thread(&mddev->sync_thread);
|
||||
if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery) &&
|
||||
!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) {
|
||||
!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
|
||||
mddev->degraded != mddev->raid_disks) {
|
||||
/* success...*/
|
||||
/* activate any spares */
|
||||
if (mddev->pers->spare_active(mddev)) {
|
||||
|
||||
@@ -2960,6 +2960,13 @@ static int raid1_run(struct mddev *mddev)
|
||||
!test_bit(In_sync, &conf->mirrors[i].rdev->flags) ||
|
||||
test_bit(Faulty, &conf->mirrors[i].rdev->flags))
|
||||
mddev->degraded++;
|
||||
/*
|
||||
* RAID1 needs at least one disk in active
|
||||
*/
|
||||
if (conf->raid_disks - mddev->degraded < 1) {
|
||||
ret = -EINVAL;
|
||||
goto abort;
|
||||
}
|
||||
|
||||
if (conf->raid_disks - mddev->degraded == 1)
|
||||
mddev->recovery_cp = MaxSector;
|
||||
@@ -2994,8 +3001,12 @@ static int raid1_run(struct mddev *mddev)
|
||||
ret = md_integrity_register(mddev);
|
||||
if (ret) {
|
||||
md_unregister_thread(&mddev->thread);
|
||||
raid1_free(mddev, conf);
|
||||
goto abort;
|
||||
}
|
||||
return 0;
|
||||
|
||||
abort:
|
||||
raid1_free(mddev, conf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -2416,7 +2416,9 @@ static void raid5_end_read_request(struct bio * bi)
|
||||
&& !test_bit(R5_ReadNoMerge, &sh->dev[i].flags))
|
||||
retry = 1;
|
||||
if (retry)
|
||||
if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) {
|
||||
if (sh->qd_idx >= 0 && sh->pd_idx == i)
|
||||
set_bit(R5_ReadError, &sh->dev[i].flags);
|
||||
else if (test_bit(R5_ReadNoMerge, &sh->dev[i].flags)) {
|
||||
set_bit(R5_ReadError, &sh->dev[i].flags);
|
||||
clear_bit(R5_ReadNoMerge, &sh->dev[i].flags);
|
||||
} else
|
||||
|
||||
@@ -314,8 +314,10 @@ static int dvb_create_media_entity(struct dvb_device *dvbdev,
|
||||
if (npads) {
|
||||
dvbdev->pads = kcalloc(npads, sizeof(*dvbdev->pads),
|
||||
GFP_KERNEL);
|
||||
if (!dvbdev->pads)
|
||||
if (!dvbdev->pads) {
|
||||
kfree(dvbdev->entity);
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
|
||||
@@ -708,6 +708,11 @@ static int ov965x_set_gain(struct ov965x *ov965x, int auto_gain)
|
||||
for (m = 6; m >= 0; m--)
|
||||
if (gain >= (1 << m) * 16)
|
||||
break;
|
||||
|
||||
/* Sanity check: don't adjust the gain with a negative value */
|
||||
if (m < 0)
|
||||
return -EINVAL;
|
||||
|
||||
rgain = (gain - ((1 << m) * 16)) / (1 << m);
|
||||
rgain |= (((1 << m) - 1) << 4);
|
||||
|
||||
|
||||
@@ -824,7 +824,7 @@ static int tvp5150_s_ctrl(struct v4l2_ctrl *ctrl)
|
||||
return 0;
|
||||
case V4L2_CID_HUE:
|
||||
tvp5150_write(sd, TVP5150_HUE_CTL, ctrl->val);
|
||||
break;
|
||||
return 0;
|
||||
case V4L2_CID_TEST_PATTERN:
|
||||
decoder->enable = ctrl->val ? false : true;
|
||||
tvp5150_selmux(sd);
|
||||
|
||||
@@ -355,7 +355,11 @@ static struct i2c_client saa7134_client_template = {
|
||||
|
||||
/* ----------------------------------------------------------- */
|
||||
|
||||
/* On Medion 7134 reading EEPROM needs DVB-T demod i2c gate open */
|
||||
/*
|
||||
* On Medion 7134 reading the SAA7134 chip config EEPROM needs DVB-T
|
||||
* demod i2c gate closed due to an address clash between this EEPROM
|
||||
* and the demod one.
|
||||
*/
|
||||
static void saa7134_i2c_eeprom_md7134_gate(struct saa7134_dev *dev)
|
||||
{
|
||||
u8 subaddr = 0x7, dmdregval;
|
||||
@@ -372,14 +376,14 @@ static void saa7134_i2c_eeprom_md7134_gate(struct saa7134_dev *dev)
|
||||
|
||||
ret = i2c_transfer(&dev->i2c_adap, i2cgatemsg_r, 2);
|
||||
if ((ret == 2) && (dmdregval & 0x2)) {
|
||||
pr_debug("%s: DVB-T demod i2c gate was left closed\n",
|
||||
pr_debug("%s: DVB-T demod i2c gate was left open\n",
|
||||
dev->name);
|
||||
|
||||
data[0] = subaddr;
|
||||
data[1] = (dmdregval & ~0x2);
|
||||
if (i2c_transfer(&dev->i2c_adap, i2cgatemsg_w, 1) != 1)
|
||||
pr_err("%s: EEPROM i2c gate open failure\n",
|
||||
dev->name);
|
||||
pr_err("%s: EEPROM i2c gate close failure\n",
|
||||
dev->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -304,6 +304,9 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d
|
||||
ret = saa7146_register_device(&hexium->video_dev, dev, "hexium gemini", VFL_TYPE_GRABBER);
|
||||
if (ret < 0) {
|
||||
pr_err("cannot register capture v4l2 device. skipping.\n");
|
||||
saa7146_vv_release(dev);
|
||||
i2c_del_adapter(&hexium->i2c_adapter);
|
||||
kfree(hexium);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -819,6 +819,7 @@ static int fimc_is_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
|
||||
is->pmu_regs = of_iomap(node, 0);
|
||||
of_node_put(node);
|
||||
if (!is->pmu_regs)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -494,6 +494,7 @@ static int fimc_md_register_sensor_entities(struct fimc_md *fmd)
|
||||
continue;
|
||||
|
||||
ret = fimc_md_parse_port_node(fmd, port, index);
|
||||
of_node_put(port);
|
||||
if (ret < 0) {
|
||||
of_node_put(node);
|
||||
goto rpm_put;
|
||||
@@ -527,6 +528,7 @@ static int __of_get_csis_id(struct device_node *np)
|
||||
if (!np)
|
||||
return -EINVAL;
|
||||
of_property_read_u32(np, "reg", ®);
|
||||
of_node_put(np);
|
||||
return reg - FIMC_INPUT_MIPI_CSI2_0;
|
||||
}
|
||||
|
||||
|
||||
@@ -726,6 +726,10 @@ static int isp_pipeline_enable(struct isp_pipeline *pipe,
|
||||
s_stream, mode);
|
||||
pipe->do_propagation = true;
|
||||
}
|
||||
|
||||
/* Stop at the first external sub-device. */
|
||||
if (subdev->dev != isp->dev)
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -840,6 +844,10 @@ static int isp_pipeline_disable(struct isp_pipeline *pipe)
|
||||
&subdev->entity);
|
||||
failure = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
/* Stop at the first external sub-device. */
|
||||
if (subdev->dev != isp->dev)
|
||||
break;
|
||||
}
|
||||
|
||||
return failure;
|
||||
|
||||
@@ -2608,6 +2608,7 @@ int omap3isp_ccdc_register_entities(struct isp_ccdc_device *ccdc,
|
||||
int ret;
|
||||
|
||||
/* Register the subdev and video node. */
|
||||
ccdc->subdev.dev = vdev->mdev->dev;
|
||||
ret = v4l2_device_register_subdev(vdev, &ccdc->subdev);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
@@ -1030,6 +1030,7 @@ int omap3isp_ccp2_register_entities(struct isp_ccp2_device *ccp2,
|
||||
int ret;
|
||||
|
||||
/* Register the subdev and video nodes. */
|
||||
ccp2->subdev.dev = vdev->mdev->dev;
|
||||
ret = v4l2_device_register_subdev(vdev, &ccp2->subdev);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
@@ -1206,6 +1206,7 @@ int omap3isp_csi2_register_entities(struct isp_csi2_device *csi2,
|
||||
int ret;
|
||||
|
||||
/* Register the subdev and video nodes. */
|
||||
csi2->subdev.dev = vdev->mdev->dev;
|
||||
ret = v4l2_device_register_subdev(vdev, &csi2->subdev);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
@@ -2228,6 +2228,7 @@ int omap3isp_preview_register_entities(struct isp_prev_device *prev,
|
||||
int ret;
|
||||
|
||||
/* Register the subdev and video nodes. */
|
||||
prev->subdev.dev = vdev->mdev->dev;
|
||||
ret = v4l2_device_register_subdev(vdev, &prev->subdev);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
@@ -1684,6 +1684,7 @@ int omap3isp_resizer_register_entities(struct isp_res_device *res,
|
||||
int ret;
|
||||
|
||||
/* Register the subdev and video nodes. */
|
||||
res->subdev.dev = vdev->mdev->dev;
|
||||
ret = v4l2_device_register_subdev(vdev, &res->subdev);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
@@ -1010,6 +1010,8 @@ void omap3isp_stat_unregister_entities(struct ispstat *stat)
|
||||
int omap3isp_stat_register_entities(struct ispstat *stat,
|
||||
struct v4l2_device *vdev)
|
||||
{
|
||||
stat->subdev.dev = vdev->mdev->dev;
|
||||
|
||||
return v4l2_device_register_subdev(vdev, &stat->subdev);
|
||||
}
|
||||
|
||||
|
||||
@@ -742,7 +742,7 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
|
||||
/* start radio */
|
||||
retval = si470x_start_usb(radio);
|
||||
if (retval < 0)
|
||||
goto err_all;
|
||||
goto err_buf;
|
||||
|
||||
/* set initial frequency */
|
||||
si470x_set_freq(radio, 87.5 * FREQ_MUL); /* available in all regions */
|
||||
@@ -757,6 +757,8 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
|
||||
|
||||
return 0;
|
||||
err_all:
|
||||
usb_kill_urb(radio->int_in_urb);
|
||||
err_buf:
|
||||
kfree(radio->buffer);
|
||||
err_ctrl:
|
||||
v4l2_ctrl_handler_free(&radio->hdl);
|
||||
@@ -830,6 +832,7 @@ static void si470x_usb_driver_disconnect(struct usb_interface *intf)
|
||||
mutex_lock(&radio->lock);
|
||||
v4l2_device_disconnect(&radio->v4l2_dev);
|
||||
video_unregister_device(&radio->videodev);
|
||||
usb_kill_urb(radio->int_in_urb);
|
||||
usb_set_intfdata(intf, NULL);
|
||||
mutex_unlock(&radio->lock);
|
||||
v4l2_device_put(&radio->v4l2_dev);
|
||||
|
||||
@@ -430,6 +430,10 @@ static int iguanair_probe(struct usb_interface *intf,
|
||||
int ret, pipein, pipeout;
|
||||
struct usb_host_interface *idesc;
|
||||
|
||||
idesc = intf->altsetting;
|
||||
if (idesc->desc.bNumEndpoints < 2)
|
||||
return -ENODEV;
|
||||
|
||||
ir = kzalloc(sizeof(*ir), GFP_KERNEL);
|
||||
rc = rc_allocate_device();
|
||||
if (!ir || !rc) {
|
||||
@@ -444,18 +448,13 @@ static int iguanair_probe(struct usb_interface *intf,
|
||||
ir->urb_in = usb_alloc_urb(0, GFP_KERNEL);
|
||||
ir->urb_out = usb_alloc_urb(0, GFP_KERNEL);
|
||||
|
||||
if (!ir->buf_in || !ir->packet || !ir->urb_in || !ir->urb_out) {
|
||||
if (!ir->buf_in || !ir->packet || !ir->urb_in || !ir->urb_out ||
|
||||
!usb_endpoint_is_int_in(&idesc->endpoint[0].desc) ||
|
||||
!usb_endpoint_is_int_out(&idesc->endpoint[1].desc)) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
idesc = intf->altsetting;
|
||||
|
||||
if (idesc->desc.bNumEndpoints < 2) {
|
||||
ret = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
|
||||
ir->rc = rc;
|
||||
ir->dev = &intf->dev;
|
||||
ir->udev = udev;
|
||||
|
||||
@@ -690,6 +690,10 @@ static int submit_urbs(struct camera_data *cam)
|
||||
if (!urb) {
|
||||
for (j = 0; j < i; j++)
|
||||
usb_free_urb(cam->sbuf[j].urb);
|
||||
for (j = 0; j < NUM_SBUF; j++) {
|
||||
kfree(cam->sbuf[j].data);
|
||||
cam->sbuf[j].data = NULL;
|
||||
}
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
@@ -2438,9 +2438,13 @@ static int dib9090_tuner_attach(struct dvb_usb_adapter *adap)
|
||||
8, 0x0486,
|
||||
};
|
||||
|
||||
if (!IS_ENABLED(CONFIG_DVB_DIB9000))
|
||||
return -ENODEV;
|
||||
if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &dib9090_dib0090_config) == NULL)
|
||||
return -ENODEV;
|
||||
i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0);
|
||||
if (!i2c)
|
||||
return -ENODEV;
|
||||
if (dib01x0_pmu_update(i2c, data_dib190, 10) != 0)
|
||||
return -ENODEV;
|
||||
dib0700_set_i2c_speed(adap->dev, 1500);
|
||||
@@ -2516,10 +2520,14 @@ static int nim9090md_tuner_attach(struct dvb_usb_adapter *adap)
|
||||
0, 0x00ef,
|
||||
8, 0x0406,
|
||||
};
|
||||
if (!IS_ENABLED(CONFIG_DVB_DIB9000))
|
||||
return -ENODEV;
|
||||
i2c = dib9000_get_tuner_interface(adap->fe_adap[0].fe);
|
||||
if (dvb_attach(dib0090_fw_register, adap->fe_adap[0].fe, i2c, &nim9090md_dib0090_config[0]) == NULL)
|
||||
return -ENODEV;
|
||||
i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_1_2, 0);
|
||||
if (!i2c)
|
||||
return -ENODEV;
|
||||
if (dib01x0_pmu_update(i2c, data_dib190, 10) < 0)
|
||||
return -ENODEV;
|
||||
|
||||
|
||||
@@ -127,6 +127,11 @@ static void reg_r(struct gspca_dev *gspca_dev, u16 value, u16 index)
|
||||
if (ret < 0) {
|
||||
pr_err("reg_r err %d\n", ret);
|
||||
gspca_dev->usb_err = ret;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1584,6 +1584,11 @@ static void reg_r(struct gspca_dev *gspca_dev,
|
||||
if (ret < 0) {
|
||||
pr_err("reg_r err %d\n", ret);
|
||||
gspca_dev->usb_err = ret;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
|
||||
return;
|
||||
}
|
||||
if (len == 1)
|
||||
|
||||
@@ -2087,6 +2087,11 @@ static int reg_r(struct sd *sd, u16 index)
|
||||
} else {
|
||||
PERR("reg_r %02x failed %d\n", index, ret);
|
||||
sd->gspca_dev.usb_err = ret;
|
||||
/*
|
||||
* Make sure the result is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
gspca_dev->usb_buf[0] = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -2115,6 +2120,11 @@ static int reg_r8(struct sd *sd,
|
||||
} else {
|
||||
PERR("reg_r8 %02x failed %d\n", index, ret);
|
||||
sd->gspca_dev.usb_err = ret;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, 8);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -645,6 +645,11 @@ static u8 ov534_reg_read(struct gspca_dev *gspca_dev, u16 reg)
|
||||
if (ret < 0) {
|
||||
pr_err("read failed %d\n", ret);
|
||||
gspca_dev->usb_err = ret;
|
||||
/*
|
||||
* Make sure the result is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
gspca_dev->usb_buf[0] = 0;
|
||||
}
|
||||
return gspca_dev->usb_buf[0];
|
||||
}
|
||||
|
||||
@@ -1157,6 +1157,7 @@ static u8 reg_r(struct gspca_dev *gspca_dev, u16 reg)
|
||||
if (ret < 0) {
|
||||
pr_err("reg_r err %d\n", ret);
|
||||
gspca_dev->usb_err = ret;
|
||||
return 0;
|
||||
}
|
||||
return gspca_dev->usb_buf[0];
|
||||
}
|
||||
|
||||
@@ -115,6 +115,11 @@ static void se401_read_req(struct gspca_dev *gspca_dev, u16 req, int silent)
|
||||
pr_err("read req failed req %#04x error %d\n",
|
||||
req, err);
|
||||
gspca_dev->usb_err = err;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, READ_REQ_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +137,13 @@ static const struct dmi_system_id flip_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "0341")
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "MSI MS-1039",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "MICRO-STAR INT'L CO.,LTD."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "MS-1039"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "MSI MS-1632",
|
||||
.matches = {
|
||||
@@ -923,6 +930,11 @@ static void reg_r(struct gspca_dev *gspca_dev, u16 reg, u16 length)
|
||||
if (unlikely(result < 0 || result != length)) {
|
||||
pr_err("Read register %02x failed %d\n", reg, result);
|
||||
gspca_dev->usb_err = result;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -466,6 +466,11 @@ static void reg_r(struct gspca_dev *gspca_dev,
|
||||
dev_err(gspca_dev->v4l2_dev.dev,
|
||||
"Error reading register %02x: %d\n", value, res);
|
||||
gspca_dev->usb_err = res;
|
||||
/*
|
||||
* Make sure the result is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
gspca_dev->usb_buf[0] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1174,6 +1174,11 @@ static void reg_r(struct gspca_dev *gspca_dev,
|
||||
if (ret < 0) {
|
||||
pr_err("reg_r err %d\n", ret);
|
||||
gspca_dev->usb_err = ret;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,11 @@ static void reg_r(struct gspca_dev *gspca_dev,
|
||||
if (ret < 0) {
|
||||
pr_err("reg_r err %d\n", ret);
|
||||
gspca_dev->usb_err = ret;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -438,6 +438,11 @@ static void reg_r(struct gspca_dev *gspca_dev,
|
||||
if (ret < 0) {
|
||||
pr_err("reg_r %04x failed %d\n", value, ret);
|
||||
gspca_dev->usb_err = ret;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -268,6 +268,11 @@ static void reg_r(struct gspca_dev *gspca_dev,
|
||||
if (ret < 0) {
|
||||
pr_err("reg_r err %d\n", ret);
|
||||
gspca_dev->usb_err = ret;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2919,6 +2919,11 @@ static void reg_r_i(struct gspca_dev *gspca_dev,
|
||||
if (ret < 0) {
|
||||
pr_err("reg_r err %d\n", ret);
|
||||
gspca_dev->usb_err = ret;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(gspca_dev->usb_buf, 0, USB_BUF_SZ);
|
||||
}
|
||||
}
|
||||
static void reg_r(struct gspca_dev *gspca_dev,
|
||||
|
||||
@@ -147,6 +147,11 @@ static int w9968cf_read_sb(struct sd *sd)
|
||||
} else {
|
||||
pr_err("Read SB reg [01] failed\n");
|
||||
sd->gspca_dev.usb_err = ret;
|
||||
/*
|
||||
* Make sure the buffer is zeroed to avoid uninitialized
|
||||
* values.
|
||||
*/
|
||||
memset(sd->gspca_dev.usb_buf, 0, 2);
|
||||
}
|
||||
|
||||
udelay(W9968CF_I2C_BUS_DELAY);
|
||||
|
||||
@@ -143,6 +143,7 @@ static int device_authorization(struct hdpvr_device *dev)
|
||||
|
||||
dev->fw_ver = dev->usbc_buf[1];
|
||||
|
||||
dev->usbc_buf[46] = '\0';
|
||||
v4l2_info(&dev->v4l2_dev, "firmware version 0x%x dated %s\n",
|
||||
dev->fw_ver, &dev->usbc_buf[2]);
|
||||
|
||||
@@ -278,6 +279,7 @@ static int hdpvr_probe(struct usb_interface *interface,
|
||||
#endif
|
||||
size_t buffer_size;
|
||||
int i;
|
||||
int dev_num;
|
||||
int retval = -ENOMEM;
|
||||
|
||||
/* allocate memory for our device state and initialize it */
|
||||
@@ -382,8 +384,17 @@ static int hdpvr_probe(struct usb_interface *interface,
|
||||
}
|
||||
#endif
|
||||
|
||||
dev_num = atomic_inc_return(&dev_nr);
|
||||
if (dev_num >= HDPVR_MAX) {
|
||||
v4l2_err(&dev->v4l2_dev,
|
||||
"max device number reached, device register failed\n");
|
||||
atomic_dec(&dev_nr);
|
||||
retval = -ENODEV;
|
||||
goto reg_fail;
|
||||
}
|
||||
|
||||
retval = hdpvr_register_videodev(dev, &interface->dev,
|
||||
video_nr[atomic_inc_return(&dev_nr)]);
|
||||
video_nr[dev_num]);
|
||||
if (retval < 0) {
|
||||
v4l2_err(&dev->v4l2_dev, "registering videodev failed\n");
|
||||
goto reg_fail;
|
||||
|
||||
@@ -278,7 +278,7 @@ static int ttusb_dec_send_command(struct ttusb_dec *dec, const u8 command,
|
||||
|
||||
dprintk("%s\n", __func__);
|
||||
|
||||
b = kmalloc(COMMAND_PACKET_SIZE + 4, GFP_KERNEL);
|
||||
b = kzalloc(COMMAND_PACKET_SIZE + 4, GFP_KERNEL);
|
||||
if (!b)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -1557,7 +1557,9 @@ void sdhci_set_uhs_signaling(struct sdhci_host *host, unsigned timing)
|
||||
ctrl_2 |= SDHCI_CTRL_UHS_SDR104;
|
||||
else if (timing == MMC_TIMING_UHS_SDR12)
|
||||
ctrl_2 |= SDHCI_CTRL_UHS_SDR12;
|
||||
else if (timing == MMC_TIMING_UHS_SDR25)
|
||||
else if (timing == MMC_TIMING_SD_HS ||
|
||||
timing == MMC_TIMING_MMC_HS ||
|
||||
timing == MMC_TIMING_UHS_SDR25)
|
||||
ctrl_2 |= SDHCI_CTRL_UHS_SDR25;
|
||||
else if (timing == MMC_TIMING_UHS_SDR50)
|
||||
ctrl_2 |= SDHCI_CTRL_UHS_SDR50;
|
||||
|
||||
@@ -1624,29 +1624,35 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (time_after(jiffies, timeo) && !chip_ready(map, adr)){
|
||||
/*
|
||||
* We check "time_after" and "!chip_good" before checking
|
||||
* "chip_good" to avoid the failure due to scheduling.
|
||||
*/
|
||||
if (time_after(jiffies, timeo) && !chip_good(map, adr, datum)) {
|
||||
xip_enable(map, chip, adr);
|
||||
printk(KERN_WARNING "MTD %s(): software timeout\n", __func__);
|
||||
xip_disable(map, chip, adr);
|
||||
ret = -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
if (chip_ready(map, adr))
|
||||
if (chip_good(map, adr, datum))
|
||||
break;
|
||||
|
||||
/* Latency issues. Drop the lock, wait a while and retry */
|
||||
UDELAY(map, chip, adr, 1);
|
||||
}
|
||||
|
||||
/* Did we succeed? */
|
||||
if (!chip_good(map, adr, datum)) {
|
||||
if (ret) {
|
||||
/* reset on all failures. */
|
||||
map_write( map, CMD(0xF0), chip->start );
|
||||
/* FIXME - should have reset delay before continuing */
|
||||
|
||||
if (++retry_cnt <= MAX_RETRIES)
|
||||
if (++retry_cnt <= MAX_RETRIES) {
|
||||
ret = 0;
|
||||
goto retry;
|
||||
|
||||
ret = -EIO;
|
||||
}
|
||||
}
|
||||
xip_enable(map, chip, adr);
|
||||
op_done:
|
||||
|
||||
@@ -1009,31 +1009,34 @@ EXPORT_SYMBOL(arcnet_interrupt);
|
||||
static void arcnet_rx(struct net_device *dev, int bufnum)
|
||||
{
|
||||
struct arcnet_local *lp = netdev_priv(dev);
|
||||
struct archdr pkt;
|
||||
union {
|
||||
struct archdr pkt;
|
||||
char buf[512];
|
||||
} rxdata;
|
||||
struct arc_rfc1201 *soft;
|
||||
int length, ofs;
|
||||
|
||||
soft = &pkt.soft.rfc1201;
|
||||
soft = &rxdata.pkt.soft.rfc1201;
|
||||
|
||||
lp->hw.copy_from_card(dev, bufnum, 0, &pkt, ARC_HDR_SIZE);
|
||||
if (pkt.hard.offset[0]) {
|
||||
ofs = pkt.hard.offset[0];
|
||||
lp->hw.copy_from_card(dev, bufnum, 0, &rxdata.pkt, ARC_HDR_SIZE);
|
||||
if (rxdata.pkt.hard.offset[0]) {
|
||||
ofs = rxdata.pkt.hard.offset[0];
|
||||
length = 256 - ofs;
|
||||
} else {
|
||||
ofs = pkt.hard.offset[1];
|
||||
ofs = rxdata.pkt.hard.offset[1];
|
||||
length = 512 - ofs;
|
||||
}
|
||||
|
||||
/* get the full header, if possible */
|
||||
if (sizeof(pkt.soft) <= length) {
|
||||
lp->hw.copy_from_card(dev, bufnum, ofs, soft, sizeof(pkt.soft));
|
||||
if (sizeof(rxdata.pkt.soft) <= length) {
|
||||
lp->hw.copy_from_card(dev, bufnum, ofs, soft, sizeof(rxdata.pkt.soft));
|
||||
} else {
|
||||
memset(&pkt.soft, 0, sizeof(pkt.soft));
|
||||
memset(&rxdata.pkt.soft, 0, sizeof(rxdata.pkt.soft));
|
||||
lp->hw.copy_from_card(dev, bufnum, ofs, soft, length);
|
||||
}
|
||||
|
||||
arc_printk(D_DURING, dev, "Buffer #%d: received packet from %02Xh to %02Xh (%d+4 bytes)\n",
|
||||
bufnum, pkt.hard.source, pkt.hard.dest, length);
|
||||
bufnum, rxdata.pkt.hard.source, rxdata.pkt.hard.dest, length);
|
||||
|
||||
dev->stats.rx_packets++;
|
||||
dev->stats.rx_bytes += length + ARC_HDR_SIZE;
|
||||
@@ -1042,13 +1045,13 @@ static void arcnet_rx(struct net_device *dev, int bufnum)
|
||||
if (arc_proto_map[soft->proto]->is_ip) {
|
||||
if (BUGLVL(D_PROTO)) {
|
||||
struct ArcProto
|
||||
*oldp = arc_proto_map[lp->default_proto[pkt.hard.source]],
|
||||
*oldp = arc_proto_map[lp->default_proto[rxdata.pkt.hard.source]],
|
||||
*newp = arc_proto_map[soft->proto];
|
||||
|
||||
if (oldp != newp) {
|
||||
arc_printk(D_PROTO, dev,
|
||||
"got protocol %02Xh; encap for host %02Xh is now '%c' (was '%c')\n",
|
||||
soft->proto, pkt.hard.source,
|
||||
soft->proto, rxdata.pkt.hard.source,
|
||||
newp->suffix, oldp->suffix);
|
||||
}
|
||||
}
|
||||
@@ -1057,10 +1060,10 @@ static void arcnet_rx(struct net_device *dev, int bufnum)
|
||||
lp->default_proto[0] = soft->proto;
|
||||
|
||||
/* in striking contrast, the following isn't a hack. */
|
||||
lp->default_proto[pkt.hard.source] = soft->proto;
|
||||
lp->default_proto[rxdata.pkt.hard.source] = soft->proto;
|
||||
}
|
||||
/* call the protocol-specific receiver. */
|
||||
arc_proto_map[soft->proto]->rx(dev, bufnum, &pkt, length);
|
||||
arc_proto_map[soft->proto]->rx(dev, bufnum, &rxdata.pkt, length);
|
||||
}
|
||||
|
||||
static void null_rx(struct net_device *dev, int bufnum,
|
||||
|
||||
@@ -1447,6 +1447,16 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
|
||||
else
|
||||
phy_reg |= 0xFA;
|
||||
e1e_wphy_locked(hw, I217_PLL_CLOCK_GATE_REG, phy_reg);
|
||||
|
||||
if (speed == SPEED_1000) {
|
||||
hw->phy.ops.read_reg_locked(hw, HV_PM_CTRL,
|
||||
&phy_reg);
|
||||
|
||||
phy_reg |= HV_PM_CTRL_K1_CLK_REQ;
|
||||
|
||||
hw->phy.ops.write_reg_locked(hw, HV_PM_CTRL,
|
||||
phy_reg);
|
||||
}
|
||||
}
|
||||
hw->phy.ops.release(hw);
|
||||
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
|
||||
/* PHY Power Management Control */
|
||||
#define HV_PM_CTRL PHY_REG(770, 17)
|
||||
#define HV_PM_CTRL_PLL_STOP_IN_K1_GIGA 0x100
|
||||
#define HV_PM_CTRL_K1_CLK_REQ 0x200
|
||||
#define HV_PM_CTRL_K1_ENABLE 0x4000
|
||||
|
||||
#define I217_PLL_CLOCK_GATE_REG PHY_REG(772, 28)
|
||||
|
||||
@@ -3114,7 +3114,7 @@ static struct sk_buff *skge_rx_get(struct net_device *dev,
|
||||
skb_put(skb, len);
|
||||
|
||||
if (dev->features & NETIF_F_RXCSUM) {
|
||||
skb->csum = csum;
|
||||
skb->csum = le16_to_cpu(csum);
|
||||
skb->ip_summed = CHECKSUM_COMPLETE;
|
||||
}
|
||||
|
||||
|
||||
@@ -1374,13 +1374,14 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
|
||||
pldat->dma_buff_base_p = dma_handle;
|
||||
|
||||
netdev_dbg(ndev, "IO address space :%pR\n", res);
|
||||
netdev_dbg(ndev, "IO address size :%d\n", resource_size(res));
|
||||
netdev_dbg(ndev, "IO address size :%zd\n",
|
||||
(size_t)resource_size(res));
|
||||
netdev_dbg(ndev, "IO address (mapped) :0x%p\n",
|
||||
pldat->net_base);
|
||||
netdev_dbg(ndev, "IRQ number :%d\n", ndev->irq);
|
||||
netdev_dbg(ndev, "DMA buffer size :%d\n", pldat->dma_buff_size);
|
||||
netdev_dbg(ndev, "DMA buffer P address :0x%08x\n",
|
||||
pldat->dma_buff_base_p);
|
||||
netdev_dbg(ndev, "DMA buffer size :%zd\n", pldat->dma_buff_size);
|
||||
netdev_dbg(ndev, "DMA buffer P address :%pad\n",
|
||||
&pldat->dma_buff_base_p);
|
||||
netdev_dbg(ndev, "DMA buffer V address :0x%p\n",
|
||||
pldat->dma_buff_base_v);
|
||||
|
||||
@@ -1427,8 +1428,8 @@ static int lpc_eth_drv_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto err_out_unregister_netdev;
|
||||
|
||||
netdev_info(ndev, "LPC mac at 0x%08x irq %d\n",
|
||||
res->start, ndev->irq);
|
||||
netdev_info(ndev, "LPC mac at 0x%08lx irq %d\n",
|
||||
(unsigned long)res->start, ndev->irq);
|
||||
|
||||
phydev = ndev->phydev;
|
||||
|
||||
|
||||
@@ -1240,6 +1240,7 @@ deliver:
|
||||
macsec_rxsa_put(rx_sa);
|
||||
macsec_rxsc_put(rx_sc);
|
||||
|
||||
skb_orphan(skb);
|
||||
ret = gro_cells_receive(&macsec->gro_cells, skb);
|
||||
if (ret == NET_RX_SUCCESS)
|
||||
count_rx(dev, skb->len);
|
||||
|
||||
@@ -110,14 +110,17 @@ static void ns_giga_speed_fallback(struct phy_device *phydev, int mode)
|
||||
|
||||
static void ns_10_base_t_hdx_loopack(struct phy_device *phydev, int disable)
|
||||
{
|
||||
u16 lb_dis = BIT(1);
|
||||
|
||||
if (disable)
|
||||
ns_exp_write(phydev, 0x1c0, ns_exp_read(phydev, 0x1c0) | 1);
|
||||
ns_exp_write(phydev, 0x1c0,
|
||||
ns_exp_read(phydev, 0x1c0) | lb_dis);
|
||||
else
|
||||
ns_exp_write(phydev, 0x1c0,
|
||||
ns_exp_read(phydev, 0x1c0) & 0xfffe);
|
||||
ns_exp_read(phydev, 0x1c0) & ~lb_dis);
|
||||
|
||||
pr_debug("10BASE-T HDX loopback %s\n",
|
||||
(ns_exp_read(phydev, 0x1c0) & 0x0001) ? "off" : "on");
|
||||
(ns_exp_read(phydev, 0x1c0) & lb_dis) ? "off" : "on");
|
||||
}
|
||||
|
||||
static int ns_config_init(struct phy_device *phydev)
|
||||
|
||||
@@ -1432,6 +1432,8 @@ static void __ppp_xmit_process(struct ppp *ppp, struct sk_buff *skb)
|
||||
netif_wake_queue(ppp->dev);
|
||||
else
|
||||
netif_stop_queue(ppp->dev);
|
||||
} else {
|
||||
kfree_skb(skb);
|
||||
}
|
||||
ppp_xmit_unlock(ppp);
|
||||
}
|
||||
|
||||
@@ -679,8 +679,12 @@ cdc_ncm_find_endpoints(struct usbnet *dev, struct usb_interface *intf)
|
||||
u8 ep;
|
||||
|
||||
for (ep = 0; ep < intf->cur_altsetting->desc.bNumEndpoints; ep++) {
|
||||
|
||||
e = intf->cur_altsetting->endpoint + ep;
|
||||
|
||||
/* ignore endpoints which cannot transfer data */
|
||||
if (!usb_endpoint_maxp(&e->desc))
|
||||
continue;
|
||||
|
||||
switch (e->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
|
||||
case USB_ENDPOINT_XFER_INT:
|
||||
if (usb_endpoint_dir_in(&e->desc)) {
|
||||
|
||||
@@ -114,6 +114,11 @@ int usbnet_get_endpoints(struct usbnet *dev, struct usb_interface *intf)
|
||||
int intr = 0;
|
||||
|
||||
e = alt->endpoint + ep;
|
||||
|
||||
/* ignore endpoints which cannot transfer data */
|
||||
if (!usb_endpoint_maxp(&e->desc))
|
||||
continue;
|
||||
|
||||
switch (e->desc.bmAttributes) {
|
||||
case USB_ENDPOINT_XFER_INT:
|
||||
if (!usb_endpoint_dir_in(&e->desc))
|
||||
@@ -349,6 +354,8 @@ void usbnet_update_max_qlen(struct usbnet *dev)
|
||||
{
|
||||
enum usb_device_speed speed = dev->udev->speed;
|
||||
|
||||
if (!dev->rx_urb_size || !dev->hard_mtu)
|
||||
goto insanity;
|
||||
switch (speed) {
|
||||
case USB_SPEED_HIGH:
|
||||
dev->rx_qlen = MAX_QUEUE_MEMORY / dev->rx_urb_size;
|
||||
@@ -365,6 +372,7 @@ void usbnet_update_max_qlen(struct usbnet *dev)
|
||||
dev->tx_qlen = 5 * MAX_QUEUE_MEMORY / dev->hard_mtu;
|
||||
break;
|
||||
default:
|
||||
insanity:
|
||||
dev->rx_qlen = dev->tx_qlen = 4;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,8 @@ static const struct lbs_fw_table fw_table[] = {
|
||||
{ MODEL_8388, "libertas/usb8388_v5.bin", NULL },
|
||||
{ MODEL_8388, "libertas/usb8388.bin", NULL },
|
||||
{ MODEL_8388, "usb8388.bin", NULL },
|
||||
{ MODEL_8682, "libertas/usb8682.bin", NULL }
|
||||
{ MODEL_8682, "libertas/usb8682.bin", NULL },
|
||||
{ 0, NULL, NULL }
|
||||
};
|
||||
|
||||
static struct usb_device_id if_usb_table[] = {
|
||||
|
||||
@@ -47,9 +47,11 @@ static u16 nvmet_get_smart_log_nsid(struct nvmet_req *req,
|
||||
}
|
||||
|
||||
host_reads = part_stat_read(ns->bdev->bd_part, ios[READ]);
|
||||
data_units_read = part_stat_read(ns->bdev->bd_part, sectors[READ]);
|
||||
data_units_read = DIV_ROUND_UP(part_stat_read(ns->bdev->bd_part,
|
||||
sectors[READ]), 1000);
|
||||
host_writes = part_stat_read(ns->bdev->bd_part, ios[WRITE]);
|
||||
data_units_written = part_stat_read(ns->bdev->bd_part, sectors[WRITE]);
|
||||
data_units_written = DIV_ROUND_UP(part_stat_read(ns->bdev->bd_part,
|
||||
sectors[WRITE]), 1000);
|
||||
|
||||
put_unaligned_le64(host_reads, &slog->host_reads[0]);
|
||||
put_unaligned_le64(data_units_read, &slog->data_units_read[0]);
|
||||
@@ -75,11 +77,11 @@ static u16 nvmet_get_smart_log_all(struct nvmet_req *req,
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(ns, &ctrl->subsys->namespaces, dev_link) {
|
||||
host_reads += part_stat_read(ns->bdev->bd_part, ios[READ]);
|
||||
data_units_read +=
|
||||
part_stat_read(ns->bdev->bd_part, sectors[READ]);
|
||||
data_units_read += DIV_ROUND_UP(
|
||||
part_stat_read(ns->bdev->bd_part, sectors[READ]), 1000);
|
||||
host_writes += part_stat_read(ns->bdev->bd_part, ios[WRITE]);
|
||||
data_units_written +=
|
||||
part_stat_read(ns->bdev->bd_part, sectors[WRITE]);
|
||||
data_units_written += DIV_ROUND_UP(
|
||||
part_stat_read(ns->bdev->bd_part, sectors[WRITE]), 1000);
|
||||
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
@@ -160,6 +160,15 @@ struct dino_device
|
||||
(struct dino_device *)__pdata; })
|
||||
|
||||
|
||||
/* Check if PCI device is behind a Card-mode Dino. */
|
||||
static int pci_dev_is_behind_card_dino(struct pci_dev *dev)
|
||||
{
|
||||
struct dino_device *dino_dev;
|
||||
|
||||
dino_dev = DINO_DEV(parisc_walk_tree(dev->bus->bridge));
|
||||
return is_card_dino(&dino_dev->hba.dev->id);
|
||||
}
|
||||
|
||||
/*
|
||||
* Dino Configuration Space Accessor Functions
|
||||
*/
|
||||
@@ -442,6 +451,21 @@ static void quirk_cirrus_cardbus(struct pci_dev *dev)
|
||||
}
|
||||
DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6832, quirk_cirrus_cardbus );
|
||||
|
||||
#ifdef CONFIG_TULIP
|
||||
static void pci_fixup_tulip(struct pci_dev *dev)
|
||||
{
|
||||
if (!pci_dev_is_behind_card_dino(dev))
|
||||
return;
|
||||
if (!(pci_resource_flags(dev, 1) & IORESOURCE_MEM))
|
||||
return;
|
||||
pr_warn("%s: HP HSC-PCI Cards with card-mode Dino not yet supported.\n",
|
||||
pci_name(dev));
|
||||
/* Disable this card by zeroing the PCI resources */
|
||||
memset(&dev->resource[0], 0, sizeof(dev->resource[0]));
|
||||
memset(&dev->resource[1], 0, sizeof(dev->resource[1]));
|
||||
}
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_DEC, PCI_ANY_ID, pci_fixup_tulip);
|
||||
#endif /* CONFIG_TULIP */
|
||||
|
||||
static void __init
|
||||
dino_bios_init(void)
|
||||
|
||||
@@ -84,7 +84,8 @@ static ssize_t power_supply_show_property(struct device *dev,
|
||||
dev_dbg(dev, "driver has no data for `%s' property\n",
|
||||
attr->attr.name);
|
||||
else if (ret != -ENODEV && ret != -EAGAIN)
|
||||
dev_err(dev, "driver failed to report `%s' property: %zd\n",
|
||||
dev_err_ratelimited(dev,
|
||||
"driver failed to report `%s' property: %zd\n",
|
||||
attr->attr.name, ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4452,7 +4452,7 @@ static int __init regulator_init(void)
|
||||
/* init early to allow our consumers to complete system booting */
|
||||
core_initcall(regulator_init);
|
||||
|
||||
static int __init regulator_late_cleanup(struct device *dev, void *data)
|
||||
static int regulator_late_cleanup(struct device *dev, void *data)
|
||||
{
|
||||
struct regulator_dev *rdev = dev_to_rdev(dev);
|
||||
const struct regulator_ops *ops = rdev->desc->ops;
|
||||
@@ -4501,17 +4501,8 @@ unlock:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init regulator_init_complete(void)
|
||||
static void regulator_init_complete_work_function(struct work_struct *work)
|
||||
{
|
||||
/*
|
||||
* Since DT doesn't provide an idiomatic mechanism for
|
||||
* enabling full constraints and since it's much more natural
|
||||
* with DT to provide them just assume that a DT enabled
|
||||
* system has full constraints.
|
||||
*/
|
||||
if (of_have_populated_dt())
|
||||
has_full_constraints = true;
|
||||
|
||||
/*
|
||||
* Regulators may had failed to resolve their input supplies
|
||||
* when were registered, either because the input supply was
|
||||
@@ -4529,6 +4520,35 @@ static int __init regulator_init_complete(void)
|
||||
*/
|
||||
class_for_each_device(®ulator_class, NULL, NULL,
|
||||
regulator_late_cleanup);
|
||||
}
|
||||
|
||||
static DECLARE_DELAYED_WORK(regulator_init_complete_work,
|
||||
regulator_init_complete_work_function);
|
||||
|
||||
static int __init regulator_init_complete(void)
|
||||
{
|
||||
/*
|
||||
* Since DT doesn't provide an idiomatic mechanism for
|
||||
* enabling full constraints and since it's much more natural
|
||||
* with DT to provide them just assume that a DT enabled
|
||||
* system has full constraints.
|
||||
*/
|
||||
if (of_have_populated_dt())
|
||||
has_full_constraints = true;
|
||||
|
||||
/*
|
||||
* We punt completion for an arbitrary amount of time since
|
||||
* systems like distros will load many drivers from userspace
|
||||
* so consumers might not always be ready yet, this is
|
||||
* particularly an issue with laptops where this might bounce
|
||||
* the display off then on. Ideally we'd get a notification
|
||||
* from userspace when this happens but we don't so just wait
|
||||
* a bit and hope we waited long enough. It'd be better if
|
||||
* we'd only do this on systems that need it, and a kernel
|
||||
* command line option might be useful.
|
||||
*/
|
||||
schedule_delayed_work(®ulator_init_complete_work,
|
||||
msecs_to_jiffies(30000));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/* LM3632 */
|
||||
#define LM3632_BOOST_VSEL_MAX 0x26
|
||||
#define LM3632_LDO_VSEL_MAX 0x29
|
||||
#define LM3632_LDO_VSEL_MAX 0x28
|
||||
#define LM3632_VBOOST_MIN 4500000
|
||||
#define LM3632_VLDO_MIN 4000000
|
||||
|
||||
|
||||
@@ -1406,6 +1406,7 @@ get_old_root(struct btrfs_root *root, u64 time_seq)
|
||||
struct tree_mod_elem *tm;
|
||||
struct extent_buffer *eb = NULL;
|
||||
struct extent_buffer *eb_root;
|
||||
u64 eb_root_owner = 0;
|
||||
struct extent_buffer *old;
|
||||
struct tree_mod_root *old_root = NULL;
|
||||
u64 old_generation = 0;
|
||||
@@ -1439,6 +1440,7 @@ get_old_root(struct btrfs_root *root, u64 time_seq)
|
||||
free_extent_buffer(old);
|
||||
}
|
||||
} else if (old_root) {
|
||||
eb_root_owner = btrfs_header_owner(eb_root);
|
||||
btrfs_tree_read_unlock(eb_root);
|
||||
free_extent_buffer(eb_root);
|
||||
eb = alloc_dummy_extent_buffer(root->fs_info, logical,
|
||||
@@ -1457,7 +1459,7 @@ get_old_root(struct btrfs_root *root, u64 time_seq)
|
||||
if (old_root) {
|
||||
btrfs_set_header_bytenr(eb, eb->start);
|
||||
btrfs_set_header_backref_rev(eb, BTRFS_MIXED_BACKREF_REV);
|
||||
btrfs_set_header_owner(eb, btrfs_header_owner(eb_root));
|
||||
btrfs_set_header_owner(eb, eb_root_owner);
|
||||
btrfs_set_header_level(eb, old_root->level);
|
||||
btrfs_set_header_generation(eb, old_generation);
|
||||
}
|
||||
@@ -5465,6 +5467,7 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
|
||||
advance_left = advance_right = 0;
|
||||
|
||||
while (1) {
|
||||
cond_resched();
|
||||
if (advance_left && !left_end_reached) {
|
||||
ret = tree_advance(left_root, left_path, &left_level,
|
||||
left_root_level,
|
||||
|
||||
@@ -7571,6 +7571,14 @@ search:
|
||||
*/
|
||||
if ((flags & extra) && !(block_group->flags & extra))
|
||||
goto loop;
|
||||
|
||||
/*
|
||||
* This block group has different flags than we want.
|
||||
* It's possible that we have MIXED_GROUP flag but no
|
||||
* block group is mixed. Just skip such block group.
|
||||
*/
|
||||
btrfs_release_block_group(block_group, delalloc);
|
||||
continue;
|
||||
}
|
||||
|
||||
have_block_group:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user