Merge 4.9.269 into android-4.9-q
Changes in 4.9.269 net: usb: ax88179_178a: initialize local variables before use iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd() ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet USB: Add reset-resume quirk for WD19's Realtek Hub platform/x86: thinkpad_acpi: Correct thermal sensor allocation s390/disassembler: increase ebpf disasm buffer size ACPI: custom_method: fix potential use-after-free issue ACPI: custom_method: fix a possible memory leak arm64: dts: mt8173: fix property typo of 'phys' in dsi node ecryptfs: fix kernel panic with null dev_name mmc: core: Do a power cycle when the CMD11 fails mmc: core: Set read only for SD cards with permanent write protect bit btrfs: fix metadata extent leak after failure to create subvolume fbdev: zero-fill colormap in fbcmap.c staging: wimax/i2400m: fix byte-order issue usb: gadget: uvc: add bInterval checking for HS mode usb: dwc3: gadget: Ignore EP queue requests during bus reset usb: xhci: Fix port minor revision PCI: PM: Do not read power state in pci_enable_device_flags() x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS) spi: dln2: Fix reference leak to master spi: omap-100k: Fix reference leak to master intel_th: Consistency and off-by-one fix phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove() btrfs: convert logic BUG_ON()'s in replace_path to ASSERT()'s scsi: target: pscsi: Fix warning in pscsi_complete_cmd() media: ite-cir: check for receive overflow extcon: arizona: Fix some issues when HPDET IRQ fires after the jack has been unplugged media: media/saa7164: fix saa7164_encoder_register() memory leak bugs media: gspca/sq905.c: fix uninitialized variable power: supply: Use IRQF_ONESHOT scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats() scsi: scsi_dh_alua: Remove check for ASC 24h in alua_rtpg() media: em28xx: fix memory leak clk: socfpga: arria10: Fix memory leak of socfpga_clk on error return power: supply: generic-adc-battery: fix possible use-after-free in gab_remove() power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove() media: adv7604: fix possible use-after-free in adv76xx_remove() media: i2c: adv7511-v4l2: fix possible use-after-free in adv7511_remove() media: i2c: adv7842: fix possible use-after-free in adv7842_remove() media: dvb-usb: fix memory leak in dvb_usb_adapter_init media: gscpa/stv06xx: fix memory leak drm/msm/mdp5: Configure PP_SYNC_HEIGHT to double the vtotal drm/amdgpu: fix NULL pointer dereference scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response scsi: libfc: Fix a format specifier ALSA: emu8000: Fix a use after free in snd_emu8000_create_mixer ALSA: sb: Fix two use after free in snd_sb_qsound_build arm64/vdso: Discard .note.gnu.property sections in vDSO openvswitch: fix stack OOB read while fragmenting IPv4 packets NFSv4: Don't discard segments marked for return in _pnfs_return_layout() jffs2: Fix kasan slab-out-of-bounds problem powerpc/eeh: Fix EEH handling for hugepages in ioremap space. powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h jffs2: check the validity of dstlen in jffs2_zlib_compress() Revert337f13046f("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op") ftrace: Handle commands when closing set_ftrace_filter file ext4: fix check to prevent false positive report of incorrect used inodes ext4: fix error code in ext4_commit_super media: dvbdev: Fix memory leak in dvb_media_device_free() usb: gadget: dummy_hcd: fix gpf in gadget_setup usb: gadget: Fix double free of device descriptor pointers usb: gadget/function/f_fs string table fix for multiple languages dm persistent data: packed struct should have an aligned() attribute too dm space map common: fix division bug in sm_ll_find_free_block() dm rq: fix double free of blk_mq_tag_set in dev remove after table load fails Bluetooth: verify AMP hci_chan before amp_destroy hsr: use netdev_err() instead of WARN_ONCE() bluetooth: eliminate the potential race condition when removing the HCI controller net/nfc: fix use-after-free llcp_sock_bind/connect FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR misc: lis3lv02d: Fix false-positive WARN on various HP models misc: vmw_vmci: explicitly initialize vmci_notify_bm_set_msg struct misc: vmw_vmci: explicitly initialize vmci_datagram payload tracing: Treat recording comm for idle task as a success tracing: Use strlcpy() instead of strcpy() in __trace_find_cmdline() tracing: Map all PIDs to command lines tracing: Restructure trace_clock_global() to never block md-cluster: fix use-after-free issue when removing rdev md: factor out a mddev_find_locked helper from mddev_find md: md_open returns -EBUSY when entering racing area ipw2x00: potential buffer overflow in libipw_wx_set_encodeext() cfg80211: scan: drop entry from hidden_list on overflow drm/radeon: fix copy of uninitialized variable back to userspace ALSA: hda/realtek: Re-order ALC882 Acer quirk table entries ALSA: hda/realtek: Re-order ALC882 Sony quirk table entries ALSA: hda/realtek: Re-order ALC269 Sony quirk table entries ALSA: hda/realtek: Re-order ALC269 Lenovo quirk table entries ALSA: hda/realtek: Remove redundant entry for ALC861 Haier/Uniwill devices usb: gadget: pch_udc: Revertd3cb25a121completely memory: gpmc: fix out of bounds read and dereference on gpmc_cs[] ARM: dts: exynos: correct PMIC interrupt trigger level on SMDK5250 ARM: dts: exynos: correct PMIC interrupt trigger level on Snow serial: stm32: fix incorrect characters on console usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits() usb: gadget: pch_udc: Check if driver is present before calling ->setup() usb: gadget: pch_udc: Check for DMA mapping error crypto: qat - don't release uninitialized resources crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init fotg210-udc: Fix DMA on EP0 for length > max packet size fotg210-udc: Fix EP0 IN requests bigger than two packets fotg210-udc: Remove a dubious condition leading to fotg210_done fotg210-udc: Mask GRP2 interrupts we don't handle fotg210-udc: Don't DMA more than the buffer can take fotg210-udc: Complete OUT requests on short packets mtd: require write permissions for locking and badblock ioctls bus: qcom: Put child node before return crypto: qat - fix error path in adf_isr_resource_alloc() mtd: rawnand: gpmi: Fix a double free in gpmi_nand_init staging: rtl8192u: Fix potential infinite loop staging: greybus: uart: fix unprivileged TIOCCSERIAL crypto: qat - Fix a double free in adf_create_ring usb: gadget: r8a66597: Add missing null check on return from platform_get_resource USB: cdc-acm: fix unprivileged TIOCCSERIAL tty: actually undefine superseded ASYNC flags tty: fix return value for unsupported ioctls firmware: qcom-scm: Fix QCOM_SCM configuration x86/platform/uv: Fix !KEXEC build failure Drivers: hv: vmbus: Increase wait time for VMbus unload ttyprintk: Add TTY hangup callback. media: vivid: fix assignment of dev->fbuf_out_flags media: omap4iss: return error code when omap4iss_get() failed media: m88rs6000t: avoid potential out-of-bounds reads on arrays pata_arasan_cf: fix IRQ check pata_ipx4xx_cf: fix IRQ check sata_mv: add IRQ checks ata: libahci_platform: fix IRQ check scsi: fcoe: Fix mismatched fcoe_wwn_from_mac declaration media: dvb-usb-remote: fix dvb_usb_nec_rc_key_to_event type mismatch clk: uniphier: Fix potential infinite loop scsi: jazz_esp: Add IRQ check scsi: sun3x_esp: Add IRQ check scsi: sni_53c710: Add IRQ check HSI: core: fix resource leaks in hsi_add_client_from_dt() x86/events/amd/iommu: Fix sysfs type mismatch HID: plantronics: Workaround for double volume key presses perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars net: lapbether: Prevent racing when checking whether the netif is running powerpc/prom: Mark identical_pvr_fixup as __init ALSA: core: remove redundant spin_lock pair in snd_card_disconnect nfc: pn533: prevent potential memory corruption ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls liquidio: Fix unintented sign extension of a left shift of a u16 powerpc/perf: Fix PMU constraint check for EBB events powerpc: iommu: fix build when neither PCI or IBMVIO is set mac80211: bail out if cipher schemes are invalid mt7601u: fix always true expression net: thunderx: Fix unintentional sign extension issue i2c: cadence: add IRQ check i2c: emev2: add IRQ check i2c: jz4780: add IRQ check i2c: sh7760: add IRQ check MIPS: pci-legacy: stop using of_pci_range_to_resource powerpc/pseries: extract host bridge from pci_bus prior to bus removal i2c: sh7760: fix IRQ error path mwl8k: Fix a double Free in mwl8k_probe_hw vsock/vmci: log once the failed queue pair allocation RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails net: davinci_emac: Fix incorrect masking of tx and rx error channel ath9k: Fix error check in ath9k_hw_read_revisions() for PCI devices powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add') net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send net:nfc:digital: Fix a double free in digital_tg_recv_dep_req kfifo: fix ternary sign extension bugs Revert "net/sctp: fix race condition in sctp_destroy_sock" sctp: delay auto_asconf init until binding the first addr Revert "of/fdt: Make sure no-map does not remove already reserved regions" Revert "fdt: Properly handle "no-map" field in the memory region" fs: dlm: fix debugfs dump tipc: convert dest node's address to network order net: stmmac: Set FIFO sizes for ipq806x ALSA: hdsp: don't disable if not enabled ALSA: hdspm: don't disable if not enabled ALSA: rme9652: don't disable if not enabled Bluetooth: Set CONF_NOT_COMPLETE as l2cap_chan default Bluetooth: initialize skb_queue_head at l2cap_chan_create() ip6_vti: proper dev_{hold|put} in ndo_[un]init methods mac80211: clear the beacon's CRC after channel switch cuse: prevent clone selftests: Set CC to clang in lib.mk if LLVM is set kconfig: nconf: stop endless search loops sctp: Fix out-of-bounds warning in sctp_process_asconf_param() ASoC: rt286: Generalize support for ALC3263 codec samples/bpf: Fix broken tracex1 due to kprobe argument change powerpc/pseries: Stop calling printk in rtas_stop_self() wl3501_cs: Fix out-of-bounds warnings in wl3501_send_pkt wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join powerpc/iommu: Annotate nested lock for lockdep net: ethernet: mtk_eth_soc: fix RX VLAN offload ASoC: rt286: Make RT286_SET_GPIO_* readable and writable f2fs: fix a redundant call to f2fs_balance_fs if an error occurs PCI: Release OF node in pci_scan_device()'s error path ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook NFSv4.2: Always flush out writes in nfs42_proc_fallocate() NFS: Deal correctly with attribute generation counter overflow pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() NFSv4.2 fix handling of sr_eof in SEEK's reply sctp: fix a SCTP_MIB_CURRESTAB leak in sctp_sf_do_dupcook_b drm/radeon: Fix off-by-one power_state index heap overwrite khugepaged: fix wrong result value for trace_mm_collapse_huge_page_isolate() mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts() ksm: fix potential missing rmap_item for stable_node kernel: kexec_file: fix error return code of kexec_calculate_store_digests() ARC: entry: fix off-by-one error in syscall number validation powerpc/64s: Fix crashes when toggling entry flush barrier squashfs: fix divide error in calculate_skip() iio: proximity: pulsedlight: Fix rumtime PM imbalance on error usb: fotg210-hcd: Fix an error message ACPI: scan: Fix a memory leak in an error handling path usb: xhci: Increase timeout for HC halt usb: dwc2: Fix gadget DMA unmap direction usb: core: hub: fix race condition about TRSMRCY of resume KVM: x86: Cancel pvclock_gtod_work on module removal FDDI: defxx: Make MMIO the configuration default except for EISA MIPS: Reinstate platform `__div64_32' handler MIPS: Avoid DIVU in `__div64_32' is result would be zero MIPS: Avoid handcoded DIVU in `__div64_32' altogether thermal/core/fair share: Lock the thermal zone while looping over instances dm ioctl: fix out of bounds array access when no devices kobject_uevent: remove warning in init_uevent_argv() netfilter: conntrack: Make global sysctls readonly in non-init netns clk: exynos7: Mark aclk_fsys1_200 as critical x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes extcon: adc-jack: Fix incompatible pointer type warning kgdb: fix gcc-11 warning on indentation usb: sl811-hcd: improve misleading indentation cxgb4: Fix the -Wmisleading-indentation warning isdn: capi: fix mismatched prototypes ACPI / hotplug / PCI: Fix reference count leak in enable_slot() Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state um: Mark all kernel symbols as local ceph: fix fscache invalidation ALSA: hda: generic: change the DAC ctl name for LO+SPK or LO+HP lib: stackdepot: turn depot_lock spinlock to raw_spinlock sit: proper dev_{hold|put} in ndo_[un]init methods ip6_tunnel: sit: proper dev_{hold|put} in ndo_[un]init methods xhci: Do not use GFP_KERNEL in (potentially) atomic context ipv6: remove extra dev_hold() for fallback tunnels Linux 4.9.269 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ib994aef2c6746afa8dcbb237d8c0645ba2c6f7e1
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 268
|
||||
SUBLEVEL = 269
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ tracesys:
|
||||
|
||||
; Do the Sys Call as we normally would.
|
||||
; Validate the Sys Call number
|
||||
cmp r8, NR_syscalls
|
||||
cmp r8, NR_syscalls - 1
|
||||
mov.hi r0, -ENOSYS
|
||||
bhi tracesys_exit
|
||||
|
||||
@@ -252,7 +252,7 @@ ENTRY(EV_Trap)
|
||||
;============ Normal syscall case
|
||||
|
||||
; syscall num shd not exceed the total system calls avail
|
||||
cmp r8, NR_syscalls
|
||||
cmp r8, NR_syscalls - 1
|
||||
mov.hi r0, -ENOSYS
|
||||
bhi .Lret_from_system_call
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
compatible = "maxim,max77686";
|
||||
reg = <0x09>;
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <2 IRQ_TYPE_NONE>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&max77686_irq>;
|
||||
wakeup-source;
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
max77686: max77686@09 {
|
||||
compatible = "maxim,max77686";
|
||||
interrupt-parent = <&gpx3>;
|
||||
interrupts = <2 IRQ_TYPE_NONE>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&max77686_irq>;
|
||||
wakeup-source;
|
||||
|
||||
@@ -891,7 +891,7 @@ static void breakpoint_handler(unsigned long unknown, struct pt_regs *regs)
|
||||
info->trigger = addr;
|
||||
pr_debug("breakpoint fired: address = 0x%x\n", addr);
|
||||
perf_bp_event(bp, regs);
|
||||
if (!bp->overflow_handler)
|
||||
if (is_default_overflow_handler(bp))
|
||||
enable_single_step(bp, addr);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
@@ -914,7 +914,7 @@
|
||||
<&mmsys CLK_MM_DSI1_DIGITAL>,
|
||||
<&mipi_tx1>;
|
||||
clock-names = "engine", "digital", "hs";
|
||||
phy = <&mipi_tx1>;
|
||||
phys = <&mipi_tx1>;
|
||||
phy-names = "dphy";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
@@ -39,6 +39,13 @@ SECTIONS
|
||||
.gnu.version_d : { *(.gnu.version_d) }
|
||||
.gnu.version_r : { *(.gnu.version_r) }
|
||||
|
||||
/*
|
||||
* Discard .note.gnu.property sections which are unused and have
|
||||
* different alignment requirement from vDSO note sections.
|
||||
*/
|
||||
/DISCARD/ : {
|
||||
*(.note.GNU-stack .note.gnu.property)
|
||||
}
|
||||
.note : { *(.note.*) } :text :note
|
||||
|
||||
. = ALIGN(16);
|
||||
@@ -59,7 +66,6 @@ SECTIONS
|
||||
PROVIDE(end = .);
|
||||
|
||||
/DISCARD/ : {
|
||||
*(.note.GNU-stack)
|
||||
*(.data .data.* .gnu.linkonce.d.* .sdata*)
|
||||
*(.bss .sbss .dynbss .dynsbss)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2000, 2004 Maciej W. Rozycki
|
||||
* Copyright (C) 2000, 2004, 2021 Maciej W. Rozycki
|
||||
* Copyright (C) 2003, 07 Ralf Baechle (ralf@linux-mips.org)
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
@@ -9,25 +9,18 @@
|
||||
#ifndef __ASM_DIV64_H
|
||||
#define __ASM_DIV64_H
|
||||
|
||||
#include <asm-generic/div64.h>
|
||||
#include <asm/bitsperlong.h>
|
||||
|
||||
#if BITS_PER_LONG == 64
|
||||
|
||||
#include <linux/types.h>
|
||||
#if BITS_PER_LONG == 32
|
||||
|
||||
/*
|
||||
* No traps on overflows for any of these...
|
||||
*/
|
||||
|
||||
#define __div64_32(n, base) \
|
||||
({ \
|
||||
#define do_div64_32(res, high, low, base) ({ \
|
||||
unsigned long __cf, __tmp, __tmp2, __i; \
|
||||
unsigned long __quot32, __mod32; \
|
||||
unsigned long __high, __low; \
|
||||
unsigned long long __n; \
|
||||
\
|
||||
__high = *__n >> 32; \
|
||||
__low = __n; \
|
||||
__asm__( \
|
||||
" .set push \n" \
|
||||
" .set noat \n" \
|
||||
@@ -51,18 +44,48 @@
|
||||
" subu %0, %0, %z6 \n" \
|
||||
" addiu %2, %2, 1 \n" \
|
||||
"3: \n" \
|
||||
" bnez %4, 0b\n\t" \
|
||||
" srl %5, %1, 0x1f\n\t" \
|
||||
" bnez %4, 0b \n" \
|
||||
" srl %5, %1, 0x1f \n" \
|
||||
" .set pop" \
|
||||
: "=&r" (__mod32), "=&r" (__tmp), \
|
||||
"=&r" (__quot32), "=&r" (__cf), \
|
||||
"=&r" (__i), "=&r" (__tmp2) \
|
||||
: "Jr" (base), "0" (__high), "1" (__low)); \
|
||||
: "Jr" (base), "0" (high), "1" (low)); \
|
||||
\
|
||||
(__n) = __quot32; \
|
||||
(res) = __quot32; \
|
||||
__mod32; \
|
||||
})
|
||||
|
||||
#endif /* BITS_PER_LONG == 64 */
|
||||
#define __div64_32(n, base) ({ \
|
||||
unsigned long __upper, __low, __high, __radix; \
|
||||
unsigned long long __quot; \
|
||||
unsigned long long __div; \
|
||||
unsigned long __mod; \
|
||||
\
|
||||
__div = (*n); \
|
||||
__radix = (base); \
|
||||
\
|
||||
__high = __div >> 32; \
|
||||
__low = __div; \
|
||||
\
|
||||
if (__high < __radix) { \
|
||||
__upper = __high; \
|
||||
__high = 0; \
|
||||
} else { \
|
||||
__upper = __high % __radix; \
|
||||
__high /= __radix; \
|
||||
} \
|
||||
\
|
||||
__mod = do_div64_32(__low, __upper, __low, __radix); \
|
||||
\
|
||||
__quot = __high; \
|
||||
__quot = __quot << 32 | __low; \
|
||||
(*n) = __quot; \
|
||||
__mod; \
|
||||
})
|
||||
|
||||
#endif /* BITS_PER_LONG == 32 */
|
||||
|
||||
#include <asm-generic/div64.h>
|
||||
|
||||
#endif /* __ASM_DIV64_H */
|
||||
|
||||
@@ -158,8 +158,13 @@ void pci_load_of_ranges(struct pci_controller *hose, struct device_node *node)
|
||||
res = hose->mem_resource;
|
||||
break;
|
||||
}
|
||||
if (res != NULL)
|
||||
of_pci_range_to_resource(&range, node, res);
|
||||
if (res != NULL) {
|
||||
res->name = node->full_name;
|
||||
res->flags = range.flags;
|
||||
res->start = range.cpu_addr;
|
||||
res->end = range.cpu_addr + range.size - 1;
|
||||
res->parent = res->child = res->sibling = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -348,6 +348,7 @@ config PPC_EARLY_DEBUG_CPM_ADDR
|
||||
config FAIL_IOMMU
|
||||
bool "Fault-injection capability for IOMMU"
|
||||
depends on FAULT_INJECTION
|
||||
depends on PCI || IBMVIO
|
||||
help
|
||||
Provide fault-injection capability for IOMMU. Each device can
|
||||
be selectively enabled via the fail_iommu property.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef _ASM_POWERPC_ERRNO_H
|
||||
#define _ASM_POWERPC_ERRNO_H
|
||||
|
||||
#undef EDEADLOCK
|
||||
#include <asm-generic/errno.h>
|
||||
|
||||
#undef EDEADLOCK
|
||||
|
||||
@@ -366,14 +366,11 @@ static inline unsigned long eeh_token_to_phys(unsigned long token)
|
||||
pa = pte_pfn(*ptep);
|
||||
|
||||
/* On radix we can do hugepage mappings for io, so handle that */
|
||||
if (hugepage_shift) {
|
||||
pa <<= hugepage_shift;
|
||||
pa |= token & ((1ul << hugepage_shift) - 1);
|
||||
} else {
|
||||
pa <<= PAGE_SHIFT;
|
||||
pa |= token & (PAGE_SIZE - 1);
|
||||
}
|
||||
if (!hugepage_shift)
|
||||
hugepage_shift = PAGE_SHIFT;
|
||||
|
||||
pa <<= PAGE_SHIFT;
|
||||
pa |= token & ((1ul << hugepage_shift) - 1);
|
||||
return pa;
|
||||
}
|
||||
|
||||
|
||||
@@ -1021,7 +1021,7 @@ int iommu_take_ownership(struct iommu_table *tbl)
|
||||
|
||||
spin_lock_irqsave(&tbl->large_pool.lock, flags);
|
||||
for (i = 0; i < tbl->nr_pools; i++)
|
||||
spin_lock(&tbl->pools[i].lock);
|
||||
spin_lock_nest_lock(&tbl->pools[i].lock, &tbl->large_pool.lock);
|
||||
|
||||
if (tbl->it_offset == 0)
|
||||
clear_bit(0, tbl->it_map);
|
||||
@@ -1050,7 +1050,7 @@ void iommu_release_ownership(struct iommu_table *tbl)
|
||||
|
||||
spin_lock_irqsave(&tbl->large_pool.lock, flags);
|
||||
for (i = 0; i < tbl->nr_pools; i++)
|
||||
spin_lock(&tbl->pools[i].lock);
|
||||
spin_lock_nest_lock(&tbl->pools[i].lock, &tbl->large_pool.lock);
|
||||
|
||||
memset(tbl->it_map, 0, sz);
|
||||
|
||||
|
||||
@@ -262,7 +262,7 @@ static struct feature_property {
|
||||
};
|
||||
|
||||
#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
|
||||
static inline void identical_pvr_fixup(unsigned long node)
|
||||
static __init void identical_pvr_fixup(unsigned long node)
|
||||
{
|
||||
unsigned int pvr;
|
||||
const char *model = of_get_flat_dt_prop(node, "model", NULL);
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/stop_machine.h>
|
||||
#include <asm/cputable.h>
|
||||
#include <asm/code-patching.h>
|
||||
#include <asm/page.h>
|
||||
@@ -282,8 +283,9 @@ void do_uaccess_flush_fixups(enum l1d_flush_type types)
|
||||
: "unknown");
|
||||
}
|
||||
|
||||
void do_entry_flush_fixups(enum l1d_flush_type types)
|
||||
static int __do_entry_flush_fixups(void *data)
|
||||
{
|
||||
enum l1d_flush_type types = *(enum l1d_flush_type *)data;
|
||||
unsigned int instrs[3], *dest;
|
||||
long *start, *end;
|
||||
int i;
|
||||
@@ -334,6 +336,19 @@ void do_entry_flush_fixups(enum l1d_flush_type types)
|
||||
: "ori type" :
|
||||
(types & L1D_FLUSH_MTTRIG) ? "mttrig type"
|
||||
: "unknown");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void do_entry_flush_fixups(enum l1d_flush_type types)
|
||||
{
|
||||
/*
|
||||
* The call to the fallback flush can not be safely patched in/out while
|
||||
* other CPUs are executing it. So call __do_entry_flush_fixups() on one
|
||||
* CPU while all other CPUs spin in the stop machine core with interrupts
|
||||
* hard disabled.
|
||||
*/
|
||||
stop_machine(__do_entry_flush_fixups, &types, NULL);
|
||||
}
|
||||
|
||||
void do_rfi_flush_fixups(enum l1d_flush_type types)
|
||||
|
||||
@@ -139,8 +139,8 @@ ebb_bhrb:
|
||||
* EBB events are pinned & exclusive, so this should never actually
|
||||
* hit, but we leave it as a fallback in case.
|
||||
*/
|
||||
mask |= CNST_EBB_VAL(ebb);
|
||||
value |= CNST_EBB_MASK;
|
||||
mask |= CNST_EBB_MASK;
|
||||
value |= CNST_EBB_VAL(ebb);
|
||||
|
||||
*maskp = mask;
|
||||
*valp = value;
|
||||
|
||||
@@ -180,7 +180,7 @@ sram_code:
|
||||
udelay: /* r11 - tb_ticks_per_usec, r12 - usecs, overwrites r13 */
|
||||
mullw r12, r12, r11
|
||||
mftb r13 /* start */
|
||||
addi r12, r13, r12 /* end */
|
||||
add r12, r13, r12 /* end */
|
||||
1:
|
||||
mftb r13 /* current */
|
||||
cmp cr0, r13, r12
|
||||
|
||||
@@ -92,9 +92,6 @@ static void rtas_stop_self(void)
|
||||
|
||||
BUG_ON(rtas_stop_self_token == RTAS_UNKNOWN_SERVICE);
|
||||
|
||||
printk("cpu %u (hwid %u) Ready to die...\n",
|
||||
smp_processor_id(), hard_smp_processor_id());
|
||||
|
||||
rtas_call_unlocked(&args, rtas_stop_self_token, 0, 1, NULL);
|
||||
|
||||
panic("Alas, I survived.\n");
|
||||
|
||||
@@ -66,6 +66,7 @@ EXPORT_SYMBOL_GPL(init_phb_dynamic);
|
||||
int remove_phb_dynamic(struct pci_controller *phb)
|
||||
{
|
||||
struct pci_bus *b = phb->bus;
|
||||
struct pci_host_bridge *host_bridge = to_pci_host_bridge(b->bridge);
|
||||
struct resource *res;
|
||||
int rc, i;
|
||||
|
||||
@@ -92,7 +93,8 @@ int remove_phb_dynamic(struct pci_controller *phb)
|
||||
/* Remove the PCI bus and unregister the bridge device from sysfs */
|
||||
phb->bus = NULL;
|
||||
pci_remove_bus(b);
|
||||
device_unregister(b->bridge);
|
||||
host_bridge->bus = NULL;
|
||||
device_unregister(&host_bridge->dev);
|
||||
|
||||
/* Now release the IO resource */
|
||||
if (res->flags & IORESOURCE_IO)
|
||||
|
||||
@@ -2026,7 +2026,7 @@ void show_code(struct pt_regs *regs)
|
||||
|
||||
void print_fn_code(unsigned char *code, unsigned long len)
|
||||
{
|
||||
char buffer[64], *ptr;
|
||||
char buffer[128], *ptr;
|
||||
int opsize, i;
|
||||
|
||||
while (len) {
|
||||
|
||||
@@ -6,6 +6,12 @@ OUTPUT_ARCH(ELF_ARCH)
|
||||
ENTRY(_start)
|
||||
jiffies = jiffies_64;
|
||||
|
||||
VERSION {
|
||||
{
|
||||
local: *;
|
||||
};
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
PROVIDE (__executable_start = START);
|
||||
|
||||
@@ -6,6 +6,12 @@ OUTPUT_ARCH(ELF_ARCH)
|
||||
ENTRY(_start)
|
||||
jiffies = jiffies_64;
|
||||
|
||||
VERSION {
|
||||
{
|
||||
local: *;
|
||||
};
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
/* This must contain the right address - not quite the default ELF one.*/
|
||||
|
||||
@@ -494,6 +494,7 @@ config X86_UV
|
||||
depends on X86_EXTENDED_PLATFORM
|
||||
depends on NUMA
|
||||
depends on EFI
|
||||
depends on KEXEC_CORE
|
||||
depends on X86_X2APIC
|
||||
depends on PCI
|
||||
---help---
|
||||
|
||||
@@ -40,6 +40,7 @@ REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -ffreestanding
|
||||
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -fno-stack-protector)
|
||||
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), -Wno-address-of-packed-member)
|
||||
REALMODE_CFLAGS += $(call __cc-option, $(CC), $(REALMODE_CFLAGS), $(cc_stack_align4))
|
||||
REALMODE_CFLAGS += $(CLANG_FLAGS)
|
||||
export REALMODE_CFLAGS
|
||||
|
||||
# BITS is used as extension for files which are available in a 32 bit
|
||||
|
||||
@@ -80,12 +80,12 @@ static struct attribute_group amd_iommu_format_group = {
|
||||
* sysfs events attributes
|
||||
*---------------------------------------------*/
|
||||
struct amd_iommu_event_desc {
|
||||
struct kobj_attribute attr;
|
||||
struct device_attribute attr;
|
||||
const char *event;
|
||||
};
|
||||
|
||||
static ssize_t _iommu_event_show(struct kobject *kobj,
|
||||
struct kobj_attribute *attr, char *buf)
|
||||
static ssize_t _iommu_event_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct amd_iommu_event_desc *event =
|
||||
container_of(attr, struct amd_iommu_event_desc, attr);
|
||||
|
||||
@@ -6268,6 +6268,7 @@ void kvm_arch_exit(void)
|
||||
cpuhp_remove_state_nocalls(CPUHP_AP_X86_KVM_CLK_ONLINE);
|
||||
#ifdef CONFIG_X86_64
|
||||
pvclock_gtod_unregister_notifier(&pvclock_gtod_notifier);
|
||||
cancel_work_sync(&pvclock_gtod_work);
|
||||
#endif
|
||||
kvm_x86_ops = NULL;
|
||||
kvm_mmu_module_exit();
|
||||
|
||||
@@ -239,7 +239,7 @@ static void __wrmsr_safe_regs_on_cpu(void *info)
|
||||
rv->err = wrmsr_safe_regs(rv->regs);
|
||||
}
|
||||
|
||||
int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
|
||||
int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
|
||||
{
|
||||
int err;
|
||||
struct msr_regs_info rv;
|
||||
@@ -252,7 +252,7 @@ int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
|
||||
}
|
||||
EXPORT_SYMBOL(rdmsr_safe_regs_on_cpu);
|
||||
|
||||
int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs)
|
||||
int wrmsr_safe_regs_on_cpu(unsigned int cpu, u32 regs[8])
|
||||
{
|
||||
int err;
|
||||
struct msr_regs_info rv;
|
||||
|
||||
@@ -37,6 +37,8 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
|
||||
sizeof(struct acpi_table_header)))
|
||||
return -EFAULT;
|
||||
uncopied_bytes = max_size = table.length;
|
||||
/* make sure the buf is not allocated */
|
||||
kfree(buf);
|
||||
buf = kzalloc(max_size, GFP_KERNEL);
|
||||
if (!buf)
|
||||
return -ENOMEM;
|
||||
@@ -50,6 +52,7 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
|
||||
(*ppos + count < count) ||
|
||||
(count > uncopied_bytes)) {
|
||||
kfree(buf);
|
||||
buf = NULL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -71,7 +74,6 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
@@ -704,6 +704,7 @@ int acpi_device_add(struct acpi_device *device,
|
||||
|
||||
result = acpi_device_set_name(device, acpi_device_bus_id);
|
||||
if (result) {
|
||||
kfree_const(acpi_device_bus_id->bus_id);
|
||||
kfree(acpi_device_bus_id);
|
||||
goto err_unlock;
|
||||
}
|
||||
|
||||
@@ -518,11 +518,13 @@ int ahci_platform_init_host(struct platform_device *pdev,
|
||||
int i, irq, n_ports, rc;
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq <= 0) {
|
||||
if (irq < 0) {
|
||||
if (irq != -EPROBE_DEFER)
|
||||
dev_err(dev, "no irq\n");
|
||||
return irq;
|
||||
}
|
||||
if (!irq)
|
||||
return -EINVAL;
|
||||
|
||||
hpriv->irq = irq;
|
||||
|
||||
|
||||
@@ -819,12 +819,19 @@ static int arasan_cf_probe(struct platform_device *pdev)
|
||||
else
|
||||
quirk = CF_BROKEN_UDMA; /* as it is on spear1340 */
|
||||
|
||||
/* if irq is 0, support only PIO */
|
||||
acdev->irq = platform_get_irq(pdev, 0);
|
||||
if (acdev->irq)
|
||||
/*
|
||||
* If there's an error getting IRQ (or we do get IRQ0),
|
||||
* support only PIO
|
||||
*/
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret > 0) {
|
||||
acdev->irq = ret;
|
||||
irq_handler = arasan_cf_interrupt;
|
||||
else
|
||||
} else if (ret == -EPROBE_DEFER) {
|
||||
return ret;
|
||||
} else {
|
||||
quirk |= CF_BROKEN_MWDMA | CF_BROKEN_UDMA;
|
||||
}
|
||||
|
||||
acdev->pbase = res->start;
|
||||
acdev->vbase = devm_ioremap_nocache(&pdev->dev, res->start,
|
||||
|
||||
@@ -169,8 +169,12 @@ static int ixp4xx_pata_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq)
|
||||
if (irq > 0)
|
||||
irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
|
||||
else if (irq < 0)
|
||||
return irq;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
/* Setup expansion bus chip selects */
|
||||
*data->cs0_cfg = data->cs0_bits;
|
||||
|
||||
@@ -4112,6 +4112,10 @@ static int mv_platform_probe(struct platform_device *pdev)
|
||||
n_ports = mv_platform_data->n_ports;
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
}
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
if (!irq)
|
||||
return -EINVAL;
|
||||
|
||||
host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports);
|
||||
hpriv = devm_kzalloc(&pdev->dev, sizeof(*hpriv), GFP_KERNEL);
|
||||
|
||||
@@ -357,8 +357,10 @@ static int qcom_ebi2_probe(struct platform_device *pdev)
|
||||
|
||||
/* Figure out the chipselect */
|
||||
ret = of_property_read_u32(child, "reg", &csindex);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
of_node_put(child);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (csindex > 5) {
|
||||
dev_err(dev,
|
||||
|
||||
@@ -159,12 +159,23 @@ static int tpk_ioctl(struct tty_struct *tty,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* TTY operations hangup function.
|
||||
*/
|
||||
static void tpk_hangup(struct tty_struct *tty)
|
||||
{
|
||||
struct ttyprintk_port *tpkp = tty->driver_data;
|
||||
|
||||
tty_port_hangup(&tpkp->port);
|
||||
}
|
||||
|
||||
static const struct tty_operations ttyprintk_ops = {
|
||||
.open = tpk_open,
|
||||
.close = tpk_close,
|
||||
.write = tpk_write,
|
||||
.write_room = tpk_write_room,
|
||||
.ioctl = tpk_ioctl,
|
||||
.hangup = tpk_hangup,
|
||||
};
|
||||
|
||||
static const struct tty_port_operations null_ops = { };
|
||||
|
||||
@@ -541,8 +541,13 @@ static const struct samsung_gate_clock top1_gate_clks[] __initconst = {
|
||||
GATE(CLK_ACLK_FSYS0_200, "aclk_fsys0_200", "dout_aclk_fsys0_200",
|
||||
ENABLE_ACLK_TOP13, 28, CLK_SET_RATE_PARENT |
|
||||
CLK_IS_CRITICAL, 0),
|
||||
/*
|
||||
* This clock is required for the CMU_FSYS1 registers access, keep it
|
||||
* enabled permanently until proper runtime PM support is added.
|
||||
*/
|
||||
GATE(CLK_ACLK_FSYS1_200, "aclk_fsys1_200", "dout_aclk_fsys1_200",
|
||||
ENABLE_ACLK_TOP13, 24, CLK_SET_RATE_PARENT, 0),
|
||||
ENABLE_ACLK_TOP13, 24, CLK_SET_RATE_PARENT |
|
||||
CLK_IS_CRITICAL, 0),
|
||||
|
||||
GATE(CLK_SCLK_PHY_FSYS1_26M, "sclk_phy_fsys1_26m",
|
||||
"dout_sclk_phy_fsys1_26m", ENABLE_SCLK_TOP1_FSYS11,
|
||||
|
||||
@@ -157,6 +157,7 @@ static void __init __socfpga_gate_init(struct device_node *node,
|
||||
if (IS_ERR(socfpga_clk->sys_mgr_base_addr)) {
|
||||
pr_err("%s: failed to find altr,sys-mgr regmap!\n",
|
||||
__func__);
|
||||
kfree(socfpga_clk);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ static int uniphier_clk_mux_set_parent(struct clk_hw *hw, u8 index)
|
||||
static u8 uniphier_clk_mux_get_parent(struct clk_hw *hw)
|
||||
{
|
||||
struct uniphier_clk_mux *mux = to_uniphier_clk_mux(hw);
|
||||
int num_parents = clk_hw_get_num_parents(hw);
|
||||
unsigned int num_parents = clk_hw_get_num_parents(hw);
|
||||
int ret;
|
||||
unsigned int val;
|
||||
u8 i;
|
||||
unsigned int i;
|
||||
|
||||
ret = regmap_read(mux->regmap, mux->reg, &val);
|
||||
if (ret)
|
||||
|
||||
@@ -238,12 +238,12 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
if (ret)
|
||||
goto out_err_free_reg;
|
||||
|
||||
set_bit(ADF_STATUS_PF_RUNNING, &accel_dev->status);
|
||||
|
||||
ret = adf_dev_init(accel_dev);
|
||||
if (ret)
|
||||
goto out_err_dev_shutdown;
|
||||
|
||||
set_bit(ADF_STATUS_PF_RUNNING, &accel_dev->status);
|
||||
|
||||
ret = adf_dev_start(accel_dev);
|
||||
if (ret)
|
||||
goto out_err_dev_stop;
|
||||
|
||||
@@ -238,12 +238,12 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
if (ret)
|
||||
goto out_err_free_reg;
|
||||
|
||||
set_bit(ADF_STATUS_PF_RUNNING, &accel_dev->status);
|
||||
|
||||
ret = adf_dev_init(accel_dev);
|
||||
if (ret)
|
||||
goto out_err_dev_shutdown;
|
||||
|
||||
set_bit(ADF_STATUS_PF_RUNNING, &accel_dev->status);
|
||||
|
||||
ret = adf_dev_start(accel_dev);
|
||||
if (ret)
|
||||
goto out_err_dev_stop;
|
||||
|
||||
@@ -330,19 +330,32 @@ int adf_isr_resource_alloc(struct adf_accel_dev *accel_dev)
|
||||
|
||||
ret = adf_isr_alloc_msix_entry_table(accel_dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (adf_enable_msix(accel_dev))
|
||||
goto err_out;
|
||||
|
||||
if (adf_setup_bh(accel_dev))
|
||||
goto err_out;
|
||||
ret = adf_enable_msix(accel_dev);
|
||||
if (ret)
|
||||
goto err_free_msix_table;
|
||||
|
||||
if (adf_request_irqs(accel_dev))
|
||||
goto err_out;
|
||||
ret = adf_setup_bh(accel_dev);
|
||||
if (ret)
|
||||
goto err_disable_msix;
|
||||
|
||||
ret = adf_request_irqs(accel_dev);
|
||||
if (ret)
|
||||
goto err_cleanup_bh;
|
||||
|
||||
return 0;
|
||||
|
||||
err_cleanup_bh:
|
||||
adf_cleanup_bh(accel_dev);
|
||||
|
||||
err_disable_msix:
|
||||
adf_disable_msix(&accel_dev->accel_pci_dev);
|
||||
|
||||
err_free_msix_table:
|
||||
adf_isr_free_msix_entry_table(accel_dev);
|
||||
|
||||
err_out:
|
||||
adf_isr_resource_free(accel_dev);
|
||||
return -EFAULT;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(adf_isr_resource_alloc);
|
||||
|
||||
@@ -197,6 +197,7 @@ static int adf_init_ring(struct adf_etr_ring_data *ring)
|
||||
dev_err(&GET_DEV(accel_dev), "Ring address not aligned\n");
|
||||
dma_free_coherent(&GET_DEV(accel_dev), ring_size_bytes,
|
||||
ring->base_addr, ring->dma_addr);
|
||||
ring->base_addr = NULL;
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
|
||||
@@ -304,17 +304,26 @@ int adf_vf_isr_resource_alloc(struct adf_accel_dev *accel_dev)
|
||||
goto err_out;
|
||||
|
||||
if (adf_setup_pf2vf_bh(accel_dev))
|
||||
goto err_out;
|
||||
goto err_disable_msi;
|
||||
|
||||
if (adf_setup_bh(accel_dev))
|
||||
goto err_out;
|
||||
goto err_cleanup_pf2vf_bh;
|
||||
|
||||
if (adf_request_msi_irq(accel_dev))
|
||||
goto err_out;
|
||||
goto err_cleanup_bh;
|
||||
|
||||
return 0;
|
||||
|
||||
err_cleanup_bh:
|
||||
adf_cleanup_bh(accel_dev);
|
||||
|
||||
err_cleanup_pf2vf_bh:
|
||||
adf_cleanup_pf2vf_bh(accel_dev);
|
||||
|
||||
err_disable_msi:
|
||||
adf_disable_msi(accel_dev);
|
||||
|
||||
err_out:
|
||||
adf_vf_isr_resource_free(accel_dev);
|
||||
return -EFAULT;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(adf_vf_isr_resource_alloc);
|
||||
|
||||
@@ -238,12 +238,12 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
if (ret)
|
||||
goto out_err_free_reg;
|
||||
|
||||
set_bit(ADF_STATUS_PF_RUNNING, &accel_dev->status);
|
||||
|
||||
ret = adf_dev_init(accel_dev);
|
||||
if (ret)
|
||||
goto out_err_dev_shutdown;
|
||||
|
||||
set_bit(ADF_STATUS_PF_RUNNING, &accel_dev->status);
|
||||
|
||||
ret = adf_dev_start(accel_dev);
|
||||
if (ret)
|
||||
goto out_err_dev_stop;
|
||||
|
||||
@@ -601,7 +601,7 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data)
|
||||
struct arizona *arizona = info->arizona;
|
||||
int id_gpio = arizona->pdata.hpdet_id_gpio;
|
||||
unsigned int report = EXTCON_JACK_HEADPHONE;
|
||||
int ret, reading;
|
||||
int ret, reading, state;
|
||||
bool mic = false;
|
||||
|
||||
mutex_lock(&info->lock);
|
||||
@@ -614,12 +614,11 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data)
|
||||
}
|
||||
|
||||
/* If the cable was removed while measuring ignore the result */
|
||||
ret = extcon_get_state(info->edev, EXTCON_MECHANICAL);
|
||||
if (ret < 0) {
|
||||
dev_err(arizona->dev, "Failed to check cable state: %d\n",
|
||||
ret);
|
||||
state = extcon_get_state(info->edev, EXTCON_MECHANICAL);
|
||||
if (state < 0) {
|
||||
dev_err(arizona->dev, "Failed to check cable state: %d\n", state);
|
||||
goto out;
|
||||
} else if (!ret) {
|
||||
} else if (!state) {
|
||||
dev_dbg(arizona->dev, "Ignoring HPDET for removed cable\n");
|
||||
goto done;
|
||||
}
|
||||
@@ -672,7 +671,7 @@ done:
|
||||
ARIZONA_ACCDET_MODE_MASK, ARIZONA_ACCDET_MODE_MIC);
|
||||
|
||||
/* If we have a mic then reenable MICDET */
|
||||
if (mic || info->mic)
|
||||
if (state && (mic || info->mic))
|
||||
arizona_start_mic(info);
|
||||
|
||||
if (info->hpdet_active) {
|
||||
@@ -680,7 +679,9 @@ done:
|
||||
info->hpdet_active = false;
|
||||
}
|
||||
|
||||
info->hpdet_done = true;
|
||||
/* Do not set hp_det done when the cable has been unplugged */
|
||||
if (state)
|
||||
info->hpdet_done = true;
|
||||
|
||||
out:
|
||||
mutex_unlock(&info->lock);
|
||||
|
||||
@@ -194,6 +194,7 @@ config FW_CFG_SYSFS_CMDLINE
|
||||
config QCOM_SCM
|
||||
bool
|
||||
depends on ARM || ARM64
|
||||
depends on HAVE_ARM_SMCCC
|
||||
select RESET_CONTROLLER
|
||||
|
||||
config QCOM_SCM_32
|
||||
|
||||
@@ -652,7 +652,7 @@ static void amdgpu_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
|
||||
DMA_BIDIRECTIONAL : DMA_TO_DEVICE;
|
||||
|
||||
/* double check that we don't free the table twice */
|
||||
if (!ttm->sg->sgl)
|
||||
if (!ttm->sg || !ttm->sg->sgl)
|
||||
return;
|
||||
|
||||
/* free the sg table and pages again */
|
||||
|
||||
@@ -128,9 +128,17 @@ static int pingpong_tearcheck_setup(struct drm_encoder *encoder,
|
||||
| MDP5_PP_SYNC_CONFIG_VSYNC_IN_EN;
|
||||
cfg |= MDP5_PP_SYNC_CONFIG_VSYNC_COUNT(vclks_line);
|
||||
|
||||
/*
|
||||
* Tearcheck emits a blanking signal every vclks_line * vtotal * 2 ticks on
|
||||
* the vsync_clk equating to roughly half the desired panel refresh rate.
|
||||
* This is only necessary as stability fallback if interrupts from the
|
||||
* panel arrive too late or not at all, but is currently used by default
|
||||
* because these panel interrupts are not wired up yet.
|
||||
*/
|
||||
mdp5_write(mdp5_kms, REG_MDP5_PP_SYNC_CONFIG_VSYNC(pp_id), cfg);
|
||||
mdp5_write(mdp5_kms,
|
||||
REG_MDP5_PP_SYNC_CONFIG_HEIGHT(pp_id), 0xfff0);
|
||||
REG_MDP5_PP_SYNC_CONFIG_HEIGHT(pp_id), (2 * mode->vtotal));
|
||||
|
||||
mdp5_write(mdp5_kms,
|
||||
REG_MDP5_PP_VSYNC_INIT_VAL(pp_id), mode->vdisplay);
|
||||
mdp5_write(mdp5_kms, REG_MDP5_PP_RD_PTR_IRQ(pp_id), mode->vdisplay + 1);
|
||||
|
||||
@@ -2259,10 +2259,10 @@ static int radeon_atombios_parse_power_table_1_3(struct radeon_device *rdev)
|
||||
rdev->pm.default_power_state_index = state_index - 1;
|
||||
rdev->pm.power_state[state_index - 1].default_clock_mode =
|
||||
&rdev->pm.power_state[state_index - 1].clock_info[0];
|
||||
rdev->pm.power_state[state_index].flags &=
|
||||
rdev->pm.power_state[state_index - 1].flags &=
|
||||
~RADEON_PM_STATE_SINGLE_DISPLAY_ONLY;
|
||||
rdev->pm.power_state[state_index].misc = 0;
|
||||
rdev->pm.power_state[state_index].misc2 = 0;
|
||||
rdev->pm.power_state[state_index - 1].misc = 0;
|
||||
rdev->pm.power_state[state_index - 1].misc2 = 0;
|
||||
}
|
||||
return state_index;
|
||||
}
|
||||
|
||||
@@ -506,6 +506,7 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
|
||||
*value = rdev->config.si.backend_enable_mask;
|
||||
} else {
|
||||
DRM_DEBUG_KMS("BACKEND_ENABLED_MASK is si+ only!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
case RADEON_INFO_MAX_SCLK:
|
||||
|
||||
@@ -819,6 +819,7 @@
|
||||
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
|
||||
|
||||
#define USB_VENDOR_ID_PLANTRONICS 0x047f
|
||||
#define USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES 0xc056
|
||||
|
||||
#define USB_VENDOR_ID_PANASONIC 0x04da
|
||||
#define USB_DEVICE_ID_PANABOARD_UBT780 0x1044
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <linux/hid.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
#define PLT_HID_1_0_PAGE 0xffa00000
|
||||
#define PLT_HID_2_0_PAGE 0xffa20000
|
||||
@@ -39,6 +40,16 @@
|
||||
#define PLT_ALLOW_CONSUMER (field->application == HID_CP_CONSUMERCONTROL && \
|
||||
(usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER)
|
||||
|
||||
#define PLT_QUIRK_DOUBLE_VOLUME_KEYS BIT(0)
|
||||
|
||||
#define PLT_DOUBLE_KEY_TIMEOUT 5 /* ms */
|
||||
|
||||
struct plt_drv_data {
|
||||
unsigned long device_type;
|
||||
unsigned long last_volume_key_ts;
|
||||
u32 quirks;
|
||||
};
|
||||
|
||||
static int plantronics_input_mapping(struct hid_device *hdev,
|
||||
struct hid_input *hi,
|
||||
struct hid_field *field,
|
||||
@@ -46,7 +57,8 @@ static int plantronics_input_mapping(struct hid_device *hdev,
|
||||
unsigned long **bit, int *max)
|
||||
{
|
||||
unsigned short mapped_key;
|
||||
unsigned long plt_type = (unsigned long)hid_get_drvdata(hdev);
|
||||
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
|
||||
unsigned long plt_type = drv_data->device_type;
|
||||
|
||||
/* special case for PTT products */
|
||||
if (field->application == HID_GD_JOYSTICK)
|
||||
@@ -108,6 +120,30 @@ mapped:
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int plantronics_event(struct hid_device *hdev, struct hid_field *field,
|
||||
struct hid_usage *usage, __s32 value)
|
||||
{
|
||||
struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
|
||||
|
||||
if (drv_data->quirks & PLT_QUIRK_DOUBLE_VOLUME_KEYS) {
|
||||
unsigned long prev_ts, cur_ts;
|
||||
|
||||
/* Usages are filtered in plantronics_usages. */
|
||||
|
||||
if (!value) /* Handle key presses only. */
|
||||
return 0;
|
||||
|
||||
prev_ts = drv_data->last_volume_key_ts;
|
||||
cur_ts = jiffies;
|
||||
if (jiffies_to_msecs(cur_ts - prev_ts) <= PLT_DOUBLE_KEY_TIMEOUT)
|
||||
return 1; /* Ignore the repeated key. */
|
||||
|
||||
drv_data->last_volume_key_ts = cur_ts;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long plantronics_device_type(struct hid_device *hdev)
|
||||
{
|
||||
unsigned i, col_page;
|
||||
@@ -136,15 +172,24 @@ exit:
|
||||
static int plantronics_probe(struct hid_device *hdev,
|
||||
const struct hid_device_id *id)
|
||||
{
|
||||
struct plt_drv_data *drv_data;
|
||||
int ret;
|
||||
|
||||
drv_data = devm_kzalloc(&hdev->dev, sizeof(*drv_data), GFP_KERNEL);
|
||||
if (!drv_data)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = hid_parse(hdev);
|
||||
if (ret) {
|
||||
hid_err(hdev, "parse failed\n");
|
||||
goto err;
|
||||
}
|
||||
|
||||
hid_set_drvdata(hdev, (void *)plantronics_device_type(hdev));
|
||||
drv_data->device_type = plantronics_device_type(hdev);
|
||||
drv_data->quirks = id->driver_data;
|
||||
drv_data->last_volume_key_ts = jiffies - msecs_to_jiffies(PLT_DOUBLE_KEY_TIMEOUT);
|
||||
|
||||
hid_set_drvdata(hdev, drv_data);
|
||||
|
||||
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT |
|
||||
HID_CONNECT_HIDINPUT_FORCE | HID_CONNECT_HIDDEV_FORCE);
|
||||
@@ -156,15 +201,26 @@ err:
|
||||
}
|
||||
|
||||
static const struct hid_device_id plantronics_devices[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS,
|
||||
USB_DEVICE_ID_PLANTRONICS_BLACKWIRE_3220_SERIES),
|
||||
.driver_data = PLT_QUIRK_DOUBLE_VOLUME_KEYS },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PLANTRONICS, HID_ANY_ID) },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, plantronics_devices);
|
||||
|
||||
static const struct hid_usage_id plantronics_usages[] = {
|
||||
{ HID_CP_VOLUMEUP, EV_KEY, HID_ANY_ID },
|
||||
{ HID_CP_VOLUMEDOWN, EV_KEY, HID_ANY_ID },
|
||||
{ HID_TERMINATOR, HID_TERMINATOR, HID_TERMINATOR }
|
||||
};
|
||||
|
||||
static struct hid_driver plantronics_driver = {
|
||||
.name = "plantronics",
|
||||
.id_table = plantronics_devices,
|
||||
.usage_table = plantronics_usages,
|
||||
.input_mapping = plantronics_input_mapping,
|
||||
.event = plantronics_event,
|
||||
.probe = plantronics_probe,
|
||||
};
|
||||
module_hid_driver(plantronics_driver);
|
||||
|
||||
@@ -223,8 +223,6 @@ static void hsi_add_client_from_dt(struct hsi_port *port,
|
||||
if (err)
|
||||
goto err;
|
||||
|
||||
dev_set_name(&cl->device, "%s", name);
|
||||
|
||||
err = hsi_of_property_parse_mode(client, "hsi-mode", &mode);
|
||||
if (err) {
|
||||
err = hsi_of_property_parse_mode(client, "hsi-rx-mode",
|
||||
@@ -307,6 +305,7 @@ static void hsi_add_client_from_dt(struct hsi_port *port,
|
||||
cl->device.release = hsi_client_release;
|
||||
cl->device.of_node = client;
|
||||
|
||||
dev_set_name(&cl->device, "%s", name);
|
||||
if (device_register(&cl->device) < 0) {
|
||||
pr_err("hsi: failed to register client: %s\n", name);
|
||||
put_device(&cl->device);
|
||||
|
||||
@@ -675,6 +675,12 @@ static void init_vp_index(struct vmbus_channel *channel, u16 dev_type)
|
||||
channel->target_vp = hv_context.vp_index[cur_cpu];
|
||||
}
|
||||
|
||||
#define UNLOAD_DELAY_UNIT_MS 10 /* 10 milliseconds */
|
||||
#define UNLOAD_WAIT_MS (100*1000) /* 100 seconds */
|
||||
#define UNLOAD_WAIT_LOOPS (UNLOAD_WAIT_MS/UNLOAD_DELAY_UNIT_MS)
|
||||
#define UNLOAD_MSG_MS (5*1000) /* Every 5 seconds */
|
||||
#define UNLOAD_MSG_LOOPS (UNLOAD_MSG_MS/UNLOAD_DELAY_UNIT_MS)
|
||||
|
||||
static void vmbus_wait_for_unload(void)
|
||||
{
|
||||
int cpu;
|
||||
@@ -692,12 +698,17 @@ static void vmbus_wait_for_unload(void)
|
||||
* vmbus_connection.unload_event. If not, the last thing we can do is
|
||||
* read message pages for all CPUs directly.
|
||||
*
|
||||
* Wait no more than 10 seconds so that the panic path can't get
|
||||
* hung forever in case the response message isn't seen.
|
||||
* Wait up to 100 seconds since an Azure host must writeback any dirty
|
||||
* data in its disk cache before the VMbus UNLOAD request will
|
||||
* complete. This flushing has been empirically observed to take up
|
||||
* to 50 seconds in cases with a lot of dirty data, so allow additional
|
||||
* leeway and for inaccuracies in mdelay(). But eventually time out so
|
||||
* that the panic path can't get hung forever in case the response
|
||||
* message isn't seen.
|
||||
*/
|
||||
for (i = 0; i < 1000; i++) {
|
||||
for (i = 1; i <= UNLOAD_WAIT_LOOPS; i++) {
|
||||
if (completion_done(&vmbus_connection.unload_event))
|
||||
break;
|
||||
goto completed;
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
page_addr = hv_context.synic_message_page[cpu];
|
||||
@@ -717,9 +728,18 @@ static void vmbus_wait_for_unload(void)
|
||||
vmbus_signal_eom(msg, message_type);
|
||||
}
|
||||
|
||||
mdelay(10);
|
||||
}
|
||||
/*
|
||||
* Give a notice periodically so someone watching the
|
||||
* serial output won't think it is completely hung.
|
||||
*/
|
||||
if (!(i % UNLOAD_MSG_LOOPS))
|
||||
pr_notice("Waiting for VMBus UNLOAD to complete\n");
|
||||
|
||||
mdelay(UNLOAD_DELAY_UNIT_MS);
|
||||
}
|
||||
pr_err("Continuing even though VMBus UNLOAD did not complete\n");
|
||||
|
||||
completed:
|
||||
/*
|
||||
* We're crashing and already got the UNLOAD_RESPONSE, cleanup all
|
||||
* maybe-pending messages on all CPUs to be able to receive new
|
||||
|
||||
@@ -485,7 +485,7 @@ static void intel_th_gth_disable(struct intel_th_device *thdev,
|
||||
output->active = false;
|
||||
|
||||
for_each_set_bit(master, gth->output[output->port].master,
|
||||
TH_CONFIGURABLE_MASTERS) {
|
||||
TH_CONFIGURABLE_MASTERS + 1) {
|
||||
gth_master_set(gth, master, -1);
|
||||
}
|
||||
spin_unlock(>h->gth_lock);
|
||||
@@ -605,7 +605,7 @@ static void intel_th_gth_unassign(struct intel_th_device *thdev,
|
||||
othdev->output.port = -1;
|
||||
othdev->output.active = false;
|
||||
gth->output[port].output = NULL;
|
||||
for (master = 0; master <= TH_CONFIGURABLE_MASTERS; master++)
|
||||
for (master = 0; master < TH_CONFIGURABLE_MASTERS + 1; master++)
|
||||
if (gth->master[master] == port)
|
||||
gth->master[master] = -1;
|
||||
spin_unlock(>h->gth_lock);
|
||||
|
||||
@@ -908,7 +908,10 @@ static int cdns_i2c_probe(struct platform_device *pdev)
|
||||
if (IS_ERR(id->membase))
|
||||
return PTR_ERR(id->membase);
|
||||
|
||||
id->irq = platform_get_irq(pdev, 0);
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
id->irq = ret;
|
||||
|
||||
id->adap.owner = THIS_MODULE;
|
||||
id->adap.dev.of_node = pdev->dev.of_node;
|
||||
|
||||
@@ -398,7 +398,10 @@ static int em_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
em_i2c_reset(&priv->adap);
|
||||
|
||||
priv->irq = platform_get_irq(pdev, 0);
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret < 0)
|
||||
goto err_clk;
|
||||
priv->irq = ret;
|
||||
ret = devm_request_irq(&pdev->dev, priv->irq, em_i2c_irq_handler, 0,
|
||||
"em_i2c", priv);
|
||||
if (ret)
|
||||
|
||||
@@ -760,7 +760,10 @@ static int jz4780_i2c_probe(struct platform_device *pdev)
|
||||
|
||||
jz4780_i2c_writew(i2c, JZ4780_I2C_INTM, 0x0);
|
||||
|
||||
i2c->irq = platform_get_irq(pdev, 0);
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
i2c->irq = ret;
|
||||
ret = devm_request_irq(&pdev->dev, i2c->irq, jz4780_i2c_irq, 0,
|
||||
dev_name(&pdev->dev), i2c);
|
||||
if (ret)
|
||||
|
||||
@@ -471,7 +471,10 @@ static int sh7760_i2c_probe(struct platform_device *pdev)
|
||||
goto out2;
|
||||
}
|
||||
|
||||
id->irq = platform_get_irq(pdev, 0);
|
||||
ret = platform_get_irq(pdev, 0);
|
||||
if (ret < 0)
|
||||
goto out3;
|
||||
id->irq = ret;
|
||||
|
||||
id->adap.nr = pdev->id;
|
||||
id->adap.algo = &sh7760_i2c_algo;
|
||||
|
||||
@@ -166,6 +166,7 @@ static int lidar_get_measurement(struct lidar_data *data, u16 *reg)
|
||||
ret = lidar_write_control(data, LIDAR_REG_CONTROL_ACQUIRE);
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev, "cannot send start measurement command");
|
||||
pm_runtime_put_noidle(&client->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -399,12 +399,9 @@ static enum i40iw_status_code add_pble_pool(struct i40iw_sc_dev *dev,
|
||||
i40iw_debug(dev, I40IW_DEBUG_PBLE, "next_fpm_addr = %llx chunk_size[%u] = 0x%x\n",
|
||||
pble_rsrc->next_fpm_addr, chunk->size, chunk->size);
|
||||
pble_rsrc->unallocated_pble -= (chunk->size >> 3);
|
||||
list_add(&chunk->list, &pble_rsrc->pinfo.clist);
|
||||
sd_reg_val = (sd_entry_type == I40IW_SD_TYPE_PAGED) ?
|
||||
sd_entry->u.pd_table.pd_page_addr.pa : sd_entry->u.bp.addr.pa;
|
||||
if (sd_entry->valid)
|
||||
return 0;
|
||||
if (dev->is_pf) {
|
||||
if (dev->is_pf && !sd_entry->valid) {
|
||||
ret_code = i40iw_hmc_sd_one(dev, hmc_info->hmc_fn_id,
|
||||
sd_reg_val, idx->sd_idx,
|
||||
sd_entry->entry_type, true);
|
||||
@@ -415,6 +412,7 @@ static enum i40iw_status_code add_pble_pool(struct i40iw_sc_dev *dev,
|
||||
}
|
||||
|
||||
sd_entry->valid = true;
|
||||
list_add(&chunk->list, &pble_rsrc->pinfo.clist);
|
||||
return 0;
|
||||
error:
|
||||
kfree(chunk);
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/input/mt.h>
|
||||
#include <linux/input/touchscreen.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/irq.h>
|
||||
|
||||
#include <asm/unaligned.h>
|
||||
@@ -317,10 +318,8 @@ static int silead_ts_get_id(struct i2c_client *client)
|
||||
|
||||
error = i2c_smbus_read_i2c_block_data(client, SILEAD_REG_ID,
|
||||
sizeof(chip_id), (u8 *)&chip_id);
|
||||
if (error < 0) {
|
||||
dev_err(&client->dev, "Chip ID read error %d\n", error);
|
||||
if (error < 0)
|
||||
return error;
|
||||
}
|
||||
|
||||
data->chip_id = le32_to_cpu(chip_id);
|
||||
dev_info(&client->dev, "Silead chip ID: 0x%8X", data->chip_id);
|
||||
@@ -333,12 +332,49 @@ static int silead_ts_setup(struct i2c_client *client)
|
||||
int error;
|
||||
u32 status;
|
||||
|
||||
/*
|
||||
* Some buggy BIOS-es bring up the chip in a stuck state where it
|
||||
* blocks the I2C bus. The following steps are necessary to
|
||||
* unstuck the chip / bus:
|
||||
* 1. Turn off the Silead chip.
|
||||
* 2. Try to do an I2C transfer with the chip, this will fail in
|
||||
* response to which the I2C-bus-driver will call:
|
||||
* i2c_recover_bus() which will unstuck the I2C-bus. Note the
|
||||
* unstuck-ing of the I2C bus only works if we first drop the
|
||||
* chip off the bus by turning it off.
|
||||
* 3. Turn the chip back on.
|
||||
*
|
||||
* On the x86/ACPI systems were this problem is seen, step 1. and
|
||||
* 3. require making ACPI calls and dealing with ACPI Power
|
||||
* Resources. The workaround below runtime-suspends the chip to
|
||||
* turn it off, leaving it up to the ACPI subsystem to deal with
|
||||
* this.
|
||||
*/
|
||||
|
||||
if (device_property_read_bool(&client->dev,
|
||||
"silead,stuck-controller-bug")) {
|
||||
pm_runtime_set_active(&client->dev);
|
||||
pm_runtime_enable(&client->dev);
|
||||
pm_runtime_allow(&client->dev);
|
||||
|
||||
pm_runtime_suspend(&client->dev);
|
||||
|
||||
dev_warn(&client->dev, FW_BUG "Stuck I2C bus: please ignore the next 'controller timed out' error\n");
|
||||
silead_ts_get_id(client);
|
||||
|
||||
/* The forbid will also resume the device */
|
||||
pm_runtime_forbid(&client->dev);
|
||||
pm_runtime_disable(&client->dev);
|
||||
}
|
||||
|
||||
silead_ts_set_power(client, SILEAD_POWER_OFF);
|
||||
silead_ts_set_power(client, SILEAD_POWER_ON);
|
||||
|
||||
error = silead_ts_get_id(client);
|
||||
if (error)
|
||||
if (error) {
|
||||
dev_err(&client->dev, "Chip ID read error %d\n", error);
|
||||
return error;
|
||||
}
|
||||
|
||||
error = silead_ts_init(client);
|
||||
if (error)
|
||||
|
||||
@@ -845,7 +845,7 @@ EXPORT_SYMBOL(capi20_put_message);
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
u16 capi20_get_manufacturer(u32 contr, u8 *buf)
|
||||
u16 capi20_get_manufacturer(u32 contr, u8 buf[CAPI_MANUFACTURER_LEN])
|
||||
{
|
||||
struct capi_ctr *ctr;
|
||||
u16 ret;
|
||||
@@ -915,7 +915,7 @@ EXPORT_SYMBOL(capi20_get_version);
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
u16 capi20_get_serial(u32 contr, u8 *serial)
|
||||
u16 capi20_get_serial(u32 contr, u8 serial[CAPI_SERIAL_LEN])
|
||||
{
|
||||
struct capi_ctr *ctr;
|
||||
u16 ret;
|
||||
|
||||
@@ -524,7 +524,7 @@ static int list_devices(struct dm_ioctl *param, size_t param_size)
|
||||
* Grab our output buffer.
|
||||
*/
|
||||
nl = get_result_buffer(param, param_size, &len);
|
||||
if (len < needed) {
|
||||
if (len < needed || len < sizeof(nl->dev)) {
|
||||
param->flags |= DM_BUFFER_FULL_FLAG;
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -1009,6 +1009,7 @@ out_tag_set:
|
||||
blk_mq_free_tag_set(md->tag_set);
|
||||
out_kfree_tag_set:
|
||||
kfree(md->tag_set);
|
||||
md->tag_set = NULL;
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -1018,6 +1019,7 @@ void dm_mq_cleanup_mapped_device(struct mapped_device *md)
|
||||
if (md->tag_set) {
|
||||
blk_mq_free_tag_set(md->tag_set);
|
||||
kfree(md->tag_set);
|
||||
md->tag_set = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -508,6 +508,17 @@ void mddev_init(struct mddev *mddev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mddev_init);
|
||||
|
||||
static struct mddev *mddev_find_locked(dev_t unit)
|
||||
{
|
||||
struct mddev *mddev;
|
||||
|
||||
list_for_each_entry(mddev, &all_mddevs, all_mddevs)
|
||||
if (mddev->unit == unit)
|
||||
return mddev;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct mddev *mddev_find(dev_t unit)
|
||||
{
|
||||
struct mddev *mddev, *new = NULL;
|
||||
@@ -519,13 +530,13 @@ static struct mddev *mddev_find(dev_t unit)
|
||||
spin_lock(&all_mddevs_lock);
|
||||
|
||||
if (unit) {
|
||||
list_for_each_entry(mddev, &all_mddevs, all_mddevs)
|
||||
if (mddev->unit == unit) {
|
||||
mddev_get(mddev);
|
||||
spin_unlock(&all_mddevs_lock);
|
||||
kfree(new);
|
||||
return mddev;
|
||||
}
|
||||
mddev = mddev_find_locked(unit);
|
||||
if (mddev) {
|
||||
mddev_get(mddev);
|
||||
spin_unlock(&all_mddevs_lock);
|
||||
kfree(new);
|
||||
return mddev;
|
||||
}
|
||||
|
||||
if (new) {
|
||||
list_add(&new->all_mddevs, &all_mddevs);
|
||||
@@ -551,12 +562,7 @@ static struct mddev *mddev_find(dev_t unit)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
is_free = 1;
|
||||
list_for_each_entry(mddev, &all_mddevs, all_mddevs)
|
||||
if (mddev->unit == dev) {
|
||||
is_free = 0;
|
||||
break;
|
||||
}
|
||||
is_free = !mddev_find_locked(dev);
|
||||
}
|
||||
new->unit = dev;
|
||||
new->md_minor = MINOR(dev);
|
||||
@@ -7106,8 +7112,7 @@ static int md_open(struct block_device *bdev, fmode_t mode)
|
||||
/* Wait until bdev->bd_disk is definitely gone */
|
||||
if (work_pending(&mddev->del_work))
|
||||
flush_workqueue(md_misc_wq);
|
||||
/* Then retry the open from the top */
|
||||
return -ERESTARTSYS;
|
||||
return -EBUSY;
|
||||
}
|
||||
BUG_ON(mddev != bdev->bd_disk->private_data);
|
||||
|
||||
@@ -8462,11 +8467,11 @@ void md_check_recovery(struct mddev *mddev)
|
||||
}
|
||||
|
||||
if (mddev_is_clustered(mddev)) {
|
||||
struct md_rdev *rdev;
|
||||
struct md_rdev *rdev, *tmp;
|
||||
/* kick the device if another node issued a
|
||||
* remove disk.
|
||||
*/
|
||||
rdev_for_each(rdev, mddev) {
|
||||
rdev_for_each_safe(rdev, tmp, mddev) {
|
||||
if (test_and_clear_bit(ClusterRemove, &rdev->flags) &&
|
||||
rdev->raid_disk < 0)
|
||||
md_kick_rdev_from_array(rdev);
|
||||
@@ -8775,12 +8780,12 @@ err_wq:
|
||||
static void check_sb_changes(struct mddev *mddev, struct md_rdev *rdev)
|
||||
{
|
||||
struct mdp_superblock_1 *sb = page_address(rdev->sb_page);
|
||||
struct md_rdev *rdev2;
|
||||
struct md_rdev *rdev2, *tmp;
|
||||
int role, ret;
|
||||
char b[BDEVNAME_SIZE];
|
||||
|
||||
/* Check for change of roles in the active devices */
|
||||
rdev_for_each(rdev2, mddev) {
|
||||
rdev_for_each_safe(rdev2, tmp, mddev) {
|
||||
if (test_bit(Faulty, &rdev2->flags))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -34,12 +34,12 @@ struct node_header {
|
||||
__le32 max_entries;
|
||||
__le32 value_size;
|
||||
__le32 padding;
|
||||
} __packed;
|
||||
} __attribute__((packed, aligned(8)));
|
||||
|
||||
struct btree_node {
|
||||
struct node_header header;
|
||||
__le64 keys[0];
|
||||
} __packed;
|
||||
} __attribute__((packed, aligned(8)));
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -337,6 +337,8 @@ int sm_ll_find_free_block(struct ll_disk *ll, dm_block_t begin,
|
||||
*/
|
||||
begin = do_div(index_begin, ll->entries_per_block);
|
||||
end = do_div(end, ll->entries_per_block);
|
||||
if (end == 0)
|
||||
end = ll->entries_per_block;
|
||||
|
||||
for (i = index_begin; i < index_end; i++, begin = 0) {
|
||||
struct dm_block *blk;
|
||||
|
||||
@@ -33,7 +33,7 @@ struct disk_index_entry {
|
||||
__le64 blocknr;
|
||||
__le32 nr_free;
|
||||
__le32 none_free_before;
|
||||
} __packed;
|
||||
} __attribute__ ((packed, aligned(8)));
|
||||
|
||||
|
||||
#define MAX_METADATA_BITMAPS 255
|
||||
@@ -43,7 +43,7 @@ struct disk_metadata_index {
|
||||
__le64 blocknr;
|
||||
|
||||
struct disk_index_entry index[MAX_METADATA_BITMAPS];
|
||||
} __packed;
|
||||
} __attribute__ ((packed, aligned(8)));
|
||||
|
||||
struct ll_disk;
|
||||
|
||||
@@ -86,7 +86,7 @@ struct disk_sm_root {
|
||||
__le64 nr_allocated;
|
||||
__le64 bitmap_root;
|
||||
__le64 ref_count_root;
|
||||
} __packed;
|
||||
} __attribute__ ((packed, aligned(8)));
|
||||
|
||||
#define ENTRIES_PER_BYTE 4
|
||||
|
||||
@@ -94,7 +94,7 @@ struct disk_bitmap_header {
|
||||
__le32 csum;
|
||||
__le32 not_used;
|
||||
__le64 blocknr;
|
||||
} __packed;
|
||||
} __attribute__ ((packed, aligned(8)));
|
||||
|
||||
enum allocation_event {
|
||||
SM_NONE,
|
||||
|
||||
@@ -216,6 +216,7 @@ static void dvb_media_device_free(struct dvb_device *dvbdev)
|
||||
|
||||
if (dvbdev->adapter->conn) {
|
||||
media_device_unregister_entity(dvbdev->adapter->conn);
|
||||
kfree(dvbdev->adapter->conn);
|
||||
dvbdev->adapter->conn = NULL;
|
||||
kfree(dvbdev->adapter->conn_pads);
|
||||
dvbdev->adapter->conn_pads = NULL;
|
||||
|
||||
@@ -1976,7 +1976,7 @@ static int adv7511_remove(struct i2c_client *client)
|
||||
|
||||
adv7511_set_isr(sd, false);
|
||||
adv7511_init_setup(sd);
|
||||
cancel_delayed_work(&state->edid_handler);
|
||||
cancel_delayed_work_sync(&state->edid_handler);
|
||||
i2c_unregister_device(state->i2c_edid);
|
||||
if (state->i2c_cec)
|
||||
i2c_unregister_device(state->i2c_cec);
|
||||
|
||||
@@ -3541,7 +3541,7 @@ static int adv76xx_remove(struct i2c_client *client)
|
||||
io_write(sd, 0x6e, 0);
|
||||
io_write(sd, 0x73, 0);
|
||||
|
||||
cancel_delayed_work(&state->delayed_work_enable_hotplug);
|
||||
cancel_delayed_work_sync(&state->delayed_work_enable_hotplug);
|
||||
v4l2_async_unregister_subdev(sd);
|
||||
media_entity_cleanup(&sd->entity);
|
||||
adv76xx_unregister_clients(to_state(sd));
|
||||
|
||||
@@ -3598,7 +3598,7 @@ static int adv7842_remove(struct i2c_client *client)
|
||||
struct adv7842_state *state = to_state(sd);
|
||||
|
||||
adv7842_irq_enable(sd, false);
|
||||
cancel_delayed_work(&state->delayed_work_enable_hotplug);
|
||||
cancel_delayed_work_sync(&state->delayed_work_enable_hotplug);
|
||||
v4l2_device_unregister_subdev(sd);
|
||||
media_entity_cleanup(&sd->entity);
|
||||
adv7842_unregister_clients(sd);
|
||||
|
||||
@@ -1030,7 +1030,7 @@ int saa7164_encoder_register(struct saa7164_port *port)
|
||||
"(errno = %d), NO PCI configuration\n",
|
||||
__func__, result);
|
||||
result = -ENOMEM;
|
||||
goto failed;
|
||||
goto fail_pci;
|
||||
}
|
||||
|
||||
/* Establish encoder defaults here */
|
||||
@@ -1084,7 +1084,7 @@ int saa7164_encoder_register(struct saa7164_port *port)
|
||||
100000, ENCODER_DEF_BITRATE);
|
||||
if (hdl->error) {
|
||||
result = hdl->error;
|
||||
goto failed;
|
||||
goto fail_hdl;
|
||||
}
|
||||
|
||||
port->std = V4L2_STD_NTSC_M;
|
||||
@@ -1102,7 +1102,7 @@ int saa7164_encoder_register(struct saa7164_port *port)
|
||||
printk(KERN_INFO "%s: can't allocate mpeg device\n",
|
||||
dev->name);
|
||||
result = -ENOMEM;
|
||||
goto failed;
|
||||
goto fail_hdl;
|
||||
}
|
||||
|
||||
port->v4l_device->ctrl_handler = hdl;
|
||||
@@ -1113,10 +1113,7 @@ int saa7164_encoder_register(struct saa7164_port *port)
|
||||
if (result < 0) {
|
||||
printk(KERN_INFO "%s: can't register mpeg device\n",
|
||||
dev->name);
|
||||
/* TODO: We're going to leak here if we don't dealloc
|
||||
The buffers above. The unreg function can't deal wit it.
|
||||
*/
|
||||
goto failed;
|
||||
goto fail_reg;
|
||||
}
|
||||
|
||||
printk(KERN_INFO "%s: registered device video%d [mpeg]\n",
|
||||
@@ -1138,9 +1135,14 @@ int saa7164_encoder_register(struct saa7164_port *port)
|
||||
|
||||
saa7164_api_set_encoder(port);
|
||||
saa7164_api_get_encoder(port);
|
||||
return 0;
|
||||
|
||||
result = 0;
|
||||
failed:
|
||||
fail_reg:
|
||||
video_device_release(port->v4l_device);
|
||||
port->v4l_device = NULL;
|
||||
fail_hdl:
|
||||
v4l2_ctrl_handler_free(hdl);
|
||||
fail_pci:
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1003,7 +1003,7 @@ int vivid_vid_out_s_fbuf(struct file *file, void *fh,
|
||||
return -EINVAL;
|
||||
}
|
||||
dev->fbuf_out_flags &= ~(chroma_flags | alpha_flags);
|
||||
dev->fbuf_out_flags = a->flags & (chroma_flags | alpha_flags);
|
||||
dev->fbuf_out_flags |= a->flags & (chroma_flags | alpha_flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -292,8 +292,14 @@ static irqreturn_t ite_cir_isr(int irq, void *data)
|
||||
/* read the interrupt flags */
|
||||
iflags = dev->params.get_irq_causes(dev);
|
||||
|
||||
/* Check for RX overflow */
|
||||
if (iflags & ITE_IRQ_RX_FIFO_OVERRUN) {
|
||||
dev_warn(&dev->rdev->dev, "receive overflow\n");
|
||||
ir_raw_event_reset(dev->rdev);
|
||||
}
|
||||
|
||||
/* check for the receive interrupt */
|
||||
if (iflags & (ITE_IRQ_RX_FIFO | ITE_IRQ_RX_FIFO_OVERRUN)) {
|
||||
if (iflags & ITE_IRQ_RX_FIFO) {
|
||||
/* read the FIFO bytes */
|
||||
rx_bytes =
|
||||
dev->params.get_rx_bytes(dev, rx_buf,
|
||||
|
||||
@@ -534,7 +534,7 @@ static int m88rs6000t_get_rf_strength(struct dvb_frontend *fe, u16 *strength)
|
||||
PGA2_cri = PGA2_GC >> 2;
|
||||
PGA2_crf = PGA2_GC & 0x03;
|
||||
|
||||
for (i = 0; i <= RF_GC; i++)
|
||||
for (i = 0; i <= RF_GC && i < ARRAY_SIZE(RFGS); i++)
|
||||
RFG += RFGS[i];
|
||||
|
||||
if (RF_GC == 0)
|
||||
@@ -546,12 +546,12 @@ static int m88rs6000t_get_rf_strength(struct dvb_frontend *fe, u16 *strength)
|
||||
if (RF_GC == 3)
|
||||
RFG += 100;
|
||||
|
||||
for (i = 0; i <= IF_GC; i++)
|
||||
for (i = 0; i <= IF_GC && i < ARRAY_SIZE(IFGS); i++)
|
||||
IFG += IFGS[i];
|
||||
|
||||
TIAG = TIA_GC * TIA_GS;
|
||||
|
||||
for (i = 0; i <= BB_GC; i++)
|
||||
for (i = 0; i <= BB_GC && i < ARRAY_SIZE(BBGS); i++)
|
||||
BBG += BBGS[i];
|
||||
|
||||
PGA2G = PGA2_cri * PGA2_cri_GS + PGA2_crf * PGA2_crf_GS;
|
||||
|
||||
@@ -82,11 +82,17 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs)
|
||||
}
|
||||
}
|
||||
|
||||
if ((ret = dvb_usb_adapter_stream_init(adap)) ||
|
||||
(ret = dvb_usb_adapter_dvb_init(adap, adapter_nrs)) ||
|
||||
(ret = dvb_usb_adapter_frontend_init(adap))) {
|
||||
ret = dvb_usb_adapter_stream_init(adap);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = dvb_usb_adapter_dvb_init(adap, adapter_nrs);
|
||||
if (ret)
|
||||
goto dvb_init_err;
|
||||
|
||||
ret = dvb_usb_adapter_frontend_init(adap);
|
||||
if (ret)
|
||||
goto frontend_init_err;
|
||||
|
||||
/* use exclusive FE lock if there is multiple shared FEs */
|
||||
if (adap->fe_adap[1].fe)
|
||||
@@ -106,6 +112,12 @@ static int dvb_usb_adapter_init(struct dvb_usb_device *d, short *adapter_nrs)
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
frontend_init_err:
|
||||
dvb_usb_adapter_dvb_exit(adap);
|
||||
dvb_init_err:
|
||||
dvb_usb_adapter_stream_exit(adap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dvb_usb_adapter_exit(struct dvb_usb_device *d)
|
||||
|
||||
@@ -471,7 +471,8 @@ extern int dvb_usb_generic_rw(struct dvb_usb_device *, u8 *, u16, u8 *, u16,int)
|
||||
extern int dvb_usb_generic_write(struct dvb_usb_device *, u8 *, u16);
|
||||
|
||||
/* commonly used remote control parsing */
|
||||
extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[], u32 *, int *);
|
||||
int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d, u8 keybuf[5],
|
||||
u32 *event, int *state);
|
||||
|
||||
/* commonly used firmware download types and function */
|
||||
struct hexline {
|
||||
|
||||
@@ -1967,6 +1967,7 @@ ret:
|
||||
return result;
|
||||
|
||||
out_free:
|
||||
em28xx_uninit_usb_xfer(dev, EM28XX_DIGITAL_MODE);
|
||||
kfree(dvb);
|
||||
dev->dvb = NULL;
|
||||
goto ret;
|
||||
|
||||
@@ -2146,6 +2146,8 @@ out:
|
||||
#endif
|
||||
v4l2_ctrl_handler_free(gspca_dev->vdev.ctrl_handler);
|
||||
v4l2_device_unregister(&gspca_dev->v4l2_dev);
|
||||
if (sd_desc->probe_error)
|
||||
sd_desc->probe_error(gspca_dev);
|
||||
kfree(gspca_dev->usb_buf);
|
||||
kfree(gspca_dev);
|
||||
return ret;
|
||||
|
||||
@@ -101,6 +101,7 @@ struct sd_desc {
|
||||
cam_cf_op config; /* called on probe */
|
||||
cam_op init; /* called on probe and resume */
|
||||
cam_op init_controls; /* called on probe */
|
||||
cam_v_op probe_error; /* called if probe failed, do cleanup here */
|
||||
cam_op start; /* called on stream on after URBs creation */
|
||||
cam_pkt_op pkt_scan;
|
||||
/* optional operations */
|
||||
|
||||
@@ -172,7 +172,7 @@ static int
|
||||
sq905_read_data(struct gspca_dev *gspca_dev, u8 *data, int size, int need_lock)
|
||||
{
|
||||
int ret;
|
||||
int act_len;
|
||||
int act_len = 0;
|
||||
|
||||
gspca_dev->usb_buf[0] = '\0';
|
||||
if (need_lock)
|
||||
|
||||
@@ -541,12 +541,21 @@ static int sd_int_pkt_scan(struct gspca_dev *gspca_dev,
|
||||
static int stv06xx_config(struct gspca_dev *gspca_dev,
|
||||
const struct usb_device_id *id);
|
||||
|
||||
static void stv06xx_probe_error(struct gspca_dev *gspca_dev)
|
||||
{
|
||||
struct sd *sd = (struct sd *)gspca_dev;
|
||||
|
||||
kfree(sd->sensor_priv);
|
||||
sd->sensor_priv = NULL;
|
||||
}
|
||||
|
||||
/* sub-driver description */
|
||||
static const struct sd_desc sd_desc = {
|
||||
.name = MODULE_NAME,
|
||||
.config = stv06xx_config,
|
||||
.init = stv06xx_init,
|
||||
.init_controls = stv06xx_init_controls,
|
||||
.probe_error = stv06xx_probe_error,
|
||||
.start = stv06xx_start,
|
||||
.stopN = stv06xx_stopN,
|
||||
.pkt_scan = stv06xx_pkt_scan,
|
||||
|
||||
@@ -1028,8 +1028,8 @@ EXPORT_SYMBOL(gpmc_cs_request);
|
||||
|
||||
void gpmc_cs_free(int cs)
|
||||
{
|
||||
struct gpmc_cs_data *gpmc = &gpmc_cs[cs];
|
||||
struct resource *res = &gpmc->mem;
|
||||
struct gpmc_cs_data *gpmc;
|
||||
struct resource *res;
|
||||
|
||||
spin_lock(&gpmc_mem_lock);
|
||||
if (cs >= gpmc_cs_num || cs < 0 || !gpmc_cs_reserved(cs)) {
|
||||
@@ -1038,6 +1038,9 @@ void gpmc_cs_free(int cs)
|
||||
spin_unlock(&gpmc_mem_lock);
|
||||
return;
|
||||
}
|
||||
gpmc = &gpmc_cs[cs];
|
||||
res = &gpmc->mem;
|
||||
|
||||
gpmc_cs_disable_mem(cs);
|
||||
if (res->flags)
|
||||
release_resource(res);
|
||||
|
||||
@@ -105,19 +105,19 @@
|
||||
#include <linux/module.h>
|
||||
#include <asm/sections.h>
|
||||
|
||||
#define v1printk(a...) do { \
|
||||
if (verbose) \
|
||||
printk(KERN_INFO a); \
|
||||
} while (0)
|
||||
#define v2printk(a...) do { \
|
||||
if (verbose > 1) \
|
||||
printk(KERN_INFO a); \
|
||||
touch_nmi_watchdog(); \
|
||||
} while (0)
|
||||
#define eprintk(a...) do { \
|
||||
printk(KERN_ERR a); \
|
||||
WARN_ON(1); \
|
||||
} while (0)
|
||||
#define v1printk(a...) do { \
|
||||
if (verbose) \
|
||||
printk(KERN_INFO a); \
|
||||
} while (0)
|
||||
#define v2printk(a...) do { \
|
||||
if (verbose > 1) \
|
||||
printk(KERN_INFO a); \
|
||||
touch_nmi_watchdog(); \
|
||||
} while (0)
|
||||
#define eprintk(a...) do { \
|
||||
printk(KERN_ERR a); \
|
||||
WARN_ON(1); \
|
||||
} while (0)
|
||||
#define MAX_CONFIG_LEN 40
|
||||
|
||||
static struct kgdb_io kgdbts_io_ops;
|
||||
|
||||
@@ -220,7 +220,7 @@ static int lis3_3dc_rates[16] = {0, 1, 10, 25, 50, 100, 200, 400, 1600, 5000};
|
||||
static int lis3_3dlh_rates[4] = {50, 100, 400, 1000};
|
||||
|
||||
/* ODR is Output Data Rate */
|
||||
static int lis3lv02d_get_odr(struct lis3lv02d *lis3)
|
||||
static int lis3lv02d_get_odr_index(struct lis3lv02d *lis3)
|
||||
{
|
||||
u8 ctrl;
|
||||
int shift;
|
||||
@@ -228,15 +228,23 @@ static int lis3lv02d_get_odr(struct lis3lv02d *lis3)
|
||||
lis3->read(lis3, CTRL_REG1, &ctrl);
|
||||
ctrl &= lis3->odr_mask;
|
||||
shift = ffs(lis3->odr_mask) - 1;
|
||||
return lis3->odrs[(ctrl >> shift)];
|
||||
return (ctrl >> shift);
|
||||
}
|
||||
|
||||
static int lis3lv02d_get_pwron_wait(struct lis3lv02d *lis3)
|
||||
{
|
||||
int div = lis3lv02d_get_odr(lis3);
|
||||
int odr_idx = lis3lv02d_get_odr_index(lis3);
|
||||
int div = lis3->odrs[odr_idx];
|
||||
|
||||
if (WARN_ONCE(div == 0, "device returned spurious data"))
|
||||
if (div == 0) {
|
||||
if (odr_idx == 0) {
|
||||
/* Power-down mode, not sampling no need to sleep */
|
||||
return 0;
|
||||
}
|
||||
|
||||
dev_err(&lis3->pdev->dev, "Error unknown odrs-index: %d\n", odr_idx);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
/* LIS3 power on delay is quite long */
|
||||
msleep(lis3->pwron_delay / div);
|
||||
@@ -819,9 +827,12 @@ static ssize_t lis3lv02d_rate_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct lis3lv02d *lis3 = dev_get_drvdata(dev);
|
||||
int odr_idx;
|
||||
|
||||
lis3lv02d_sysfs_poweron(lis3);
|
||||
return sprintf(buf, "%d\n", lis3lv02d_get_odr(lis3));
|
||||
|
||||
odr_idx = lis3lv02d_get_odr_index(lis3);
|
||||
return sprintf(buf, "%d\n", lis3->odrs[odr_idx]);
|
||||
}
|
||||
|
||||
static ssize_t lis3lv02d_rate_set(struct device *dev,
|
||||
|
||||
@@ -334,7 +334,7 @@ int vmci_dbell_host_context_notify(u32 src_cid, struct vmci_handle handle)
|
||||
bool vmci_dbell_register_notification_bitmap(u32 bitmap_ppn)
|
||||
{
|
||||
int result;
|
||||
struct vmci_notify_bm_set_msg bitmap_set_msg;
|
||||
struct vmci_notify_bm_set_msg bitmap_set_msg = { };
|
||||
|
||||
bitmap_set_msg.hdr.dst = vmci_make_handle(VMCI_HYPERVISOR_CONTEXT_ID,
|
||||
VMCI_SET_NOTIFY_BITMAP);
|
||||
|
||||
@@ -172,7 +172,7 @@ static int vmci_check_host_caps(struct pci_dev *pdev)
|
||||
VMCI_UTIL_NUM_RESOURCES * sizeof(u32);
|
||||
struct vmci_datagram *check_msg;
|
||||
|
||||
check_msg = kmalloc(msg_size, GFP_KERNEL);
|
||||
check_msg = kzalloc(msg_size, GFP_KERNEL);
|
||||
if (!check_msg) {
|
||||
dev_err(&pdev->dev, "%s: Insufficient memory\n", __func__);
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1713,7 +1713,7 @@ int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, u32 ocr)
|
||||
|
||||
err = mmc_wait_for_cmd(host, &cmd, 0);
|
||||
if (err)
|
||||
return err;
|
||||
goto power_cycle;
|
||||
|
||||
if (!mmc_host_is_spi(host) && (cmd.resp[0] & R1_ERROR))
|
||||
return -EIO;
|
||||
|
||||
@@ -136,6 +136,9 @@ static int mmc_decode_csd(struct mmc_card *card)
|
||||
csd->erase_size = UNSTUFF_BITS(resp, 39, 7) + 1;
|
||||
csd->erase_size <<= csd->write_blkbits - 9;
|
||||
}
|
||||
|
||||
if (UNSTUFF_BITS(resp, 13, 1))
|
||||
mmc_card_set_readonly(card);
|
||||
break;
|
||||
case 1:
|
||||
/*
|
||||
@@ -170,6 +173,9 @@ static int mmc_decode_csd(struct mmc_card *card)
|
||||
csd->write_blkbits = 9;
|
||||
csd->write_partial = 0;
|
||||
csd->erase_size = 1;
|
||||
|
||||
if (UNSTUFF_BITS(resp, 13, 1))
|
||||
mmc_card_set_readonly(card);
|
||||
break;
|
||||
default:
|
||||
pr_err("%s: unrecognised CSD structure version %d\n",
|
||||
|
||||
@@ -689,16 +689,12 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
|
||||
case MEMGETINFO:
|
||||
case MEMREADOOB:
|
||||
case MEMREADOOB64:
|
||||
case MEMLOCK:
|
||||
case MEMUNLOCK:
|
||||
case MEMISLOCKED:
|
||||
case MEMGETOOBSEL:
|
||||
case MEMGETBADBLOCK:
|
||||
case MEMSETBADBLOCK:
|
||||
case OTPSELECT:
|
||||
case OTPGETREGIONCOUNT:
|
||||
case OTPGETREGIONINFO:
|
||||
case OTPLOCK:
|
||||
case ECCGETLAYOUT:
|
||||
case ECCGETSTATS:
|
||||
case MTDFILEMODE:
|
||||
@@ -709,9 +705,13 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
|
||||
/* "dangerous" commands */
|
||||
case MEMERASE:
|
||||
case MEMERASE64:
|
||||
case MEMLOCK:
|
||||
case MEMUNLOCK:
|
||||
case MEMSETBADBLOCK:
|
||||
case MEMWRITEOOB:
|
||||
case MEMWRITEOOB64:
|
||||
case MEMWRITE:
|
||||
case OTPLOCK:
|
||||
if (!(file->f_mode & FMODE_WRITE))
|
||||
return -EPERM;
|
||||
break;
|
||||
|
||||
@@ -2020,7 +2020,7 @@ static int gpmi_nand_init(struct gpmi_nand_data *this)
|
||||
this->bch_geometry.auxiliary_size = 128;
|
||||
ret = gpmi_alloc_dma_buffer(this);
|
||||
if (ret)
|
||||
goto err_out;
|
||||
return ret;
|
||||
|
||||
ret = nand_scan_ident(mtd, GPMI_IS_MX6(this) ? 2 : 1, NULL);
|
||||
if (ret)
|
||||
|
||||
@@ -526,7 +526,7 @@
|
||||
#define CN23XX_BAR1_INDEX_OFFSET 3
|
||||
|
||||
#define CN23XX_PEM_BAR1_INDEX_REG(port, idx) \
|
||||
(CN23XX_PEM_BAR1_INDEX_START + ((port) << CN23XX_PEM_OFFSET) + \
|
||||
(CN23XX_PEM_BAR1_INDEX_START + (((u64)port) << CN23XX_PEM_OFFSET) + \
|
||||
((idx) << CN23XX_BAR1_INDEX_OFFSET))
|
||||
|
||||
/*############################ DPI #########################*/
|
||||
|
||||
@@ -537,7 +537,7 @@ static void nicvf_rcv_queue_config(struct nicvf *nic, struct queue_set *qs,
|
||||
mbx.rq.msg = NIC_MBOX_MSG_RQ_CFG;
|
||||
mbx.rq.qs_num = qs->vnic_id;
|
||||
mbx.rq.rq_num = qidx;
|
||||
mbx.rq.cfg = (rq->caching << 26) | (rq->cq_qs << 19) |
|
||||
mbx.rq.cfg = ((u64)rq->caching << 26) | (rq->cq_qs << 19) |
|
||||
(rq->cq_idx << 16) | (rq->cont_rbdr_qs << 9) |
|
||||
(rq->cont_qs_rbdr_idx << 8) |
|
||||
(rq->start_rbdr_qs << 1) | (rq->start_qs_rbdr_idx);
|
||||
|
||||
@@ -2446,7 +2446,7 @@ do { \
|
||||
seq_printf(seq, "%-12s", s); \
|
||||
for (i = 0; i < n; ++i) \
|
||||
seq_printf(seq, " %16" fmt_spec, v); \
|
||||
seq_putc(seq, '\n'); \
|
||||
seq_putc(seq, '\n'); \
|
||||
} while (0)
|
||||
#define S(s, v) S3("s", s, v)
|
||||
#define T3(fmt_spec, s, v) S3(fmt_spec, s, tx[i].v)
|
||||
|
||||
@@ -964,7 +964,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,
|
||||
skb->protocol = eth_type_trans(skb, netdev);
|
||||
|
||||
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
|
||||
RX_DMA_VID(trxd.rxd3))
|
||||
(trxd.rxd2 & RX_DMA_VTAG))
|
||||
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
|
||||
RX_DMA_VID(trxd.rxd3));
|
||||
napi_gro_receive(napi, skb);
|
||||
|
||||
@@ -272,6 +272,7 @@
|
||||
#define RX_DMA_DONE BIT(31)
|
||||
#define RX_DMA_PLEN0(_x) (((_x) & 0x3fff) << 16)
|
||||
#define RX_DMA_GET_PLEN0(_x) (((_x) >> 16) & 0x3fff)
|
||||
#define RX_DMA_VTAG BIT(15)
|
||||
|
||||
/* QDMA descriptor rxd3 */
|
||||
#define RX_DMA_VID(_x) ((_x) & 0xfff)
|
||||
|
||||
@@ -1504,6 +1504,7 @@ int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q,
|
||||
{
|
||||
struct emac_tpd tpd;
|
||||
u32 prod_idx;
|
||||
int len;
|
||||
|
||||
memset(&tpd, 0, sizeof(tpd));
|
||||
|
||||
@@ -1523,9 +1524,10 @@ int emac_mac_tx_buf_send(struct emac_adapter *adpt, struct emac_tx_queue *tx_q,
|
||||
if (skb_network_offset(skb) != ETH_HLEN)
|
||||
TPD_TYP_SET(&tpd, 1);
|
||||
|
||||
len = skb->len;
|
||||
emac_tx_fill_tpd(adpt, tx_q, skb, &tpd);
|
||||
|
||||
netdev_sent_queue(adpt->netdev, skb->len);
|
||||
netdev_sent_queue(adpt->netdev, len);
|
||||
|
||||
/* Make sure the are enough free descriptors to hold one
|
||||
* maximum-sized SKB. We need one desc for each fragment,
|
||||
|
||||
@@ -363,6 +363,8 @@ static int ipq806x_gmac_probe(struct platform_device *pdev)
|
||||
plat_dat->bsp_priv = gmac;
|
||||
plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed;
|
||||
plat_dat->multicast_filter_bins = 0;
|
||||
plat_dat->tx_fifo_size = 8192;
|
||||
plat_dat->rx_fifo_size = 8192;
|
||||
|
||||
err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
|
||||
if (err)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user