Linux 4.14.190
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.14.190 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 4 - arch/arm64/kernel/debug-monitors.c | 4 - arch/parisc/include/asm/atomic.h | 2 arch/x86/kernel/apic/io_apic.c | 10 ++-- arch/x86/kernel/apic/msi.c | 16 ++++-- arch/x86/kernel/apic/vector.c | 1 arch/x86/math-emu/wm_sqrt.S | 2 arch/x86/platform/uv/uv_irq.c | 3 - arch/xtensa/kernel/setup.c | 3 - arch/xtensa/kernel/xtensa_ksyms.c | 4 - drivers/android/binder_alloc.c | 2 drivers/base/regmap/regmap.c | 2 drivers/dma/ioat/dma.c | 12 ++++ drivers/dma/ioat/dma.h | 2 drivers/dma/tegra210-adma.c | 5 +- drivers/gpio/gpio-arizona.c | 7 ++ drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c | 4 - drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 4 - drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 2 drivers/hid/hid-apple.c | 18 +++++++ drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c | 8 +++ drivers/hwmon/aspeed-pwm-tacho.c | 2 drivers/i2c/busses/i2c-rcar.c | 3 + drivers/infiniband/core/umem_odp.c | 3 - drivers/input/mouse/synaptics.c | 1 drivers/iommu/amd_iommu.c | 5 +- drivers/iommu/intel_irq_remapping.c | 2 drivers/net/bonding/bond_main.c | 10 ++-- drivers/net/bonding/bond_netlink.c | 3 - drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 5 +- drivers/net/ethernet/marvell/sky2.c | 2 drivers/net/ethernet/mellanox/mlxsw/core.c | 3 - drivers/net/ethernet/smsc/smc91x.c | 4 - drivers/net/hippi/rrunner.c | 2 drivers/net/phy/dp83640.c | 4 + drivers/net/usb/ax88172a.c | 1 drivers/net/wan/lapbether.c | 9 +++ drivers/net/wireless/ath/ath9k/hif_usb.c | 52 ++++++++++++++++----- drivers/net/wireless/ath/ath9k/hif_usb.h | 5 ++ drivers/pci/host/vmd.c | 5 +- drivers/pinctrl/pinctrl-amd.h | 2 drivers/scsi/scsi_transport_spi.c | 2 drivers/spi/spi-fsl-dspi.c | 4 + drivers/spi/spi-mt65xx.c | 15 +++--- drivers/staging/comedi/drivers/addi_apci_1032.c | 20 +++++--- drivers/staging/comedi/drivers/addi_apci_1500.c | 24 +++++++-- drivers/staging/comedi/drivers/addi_apci_1564.c | 20 +++++--- drivers/staging/comedi/drivers/ni_6527.c | 2 drivers/staging/wlan-ng/prism2usb.c | 16 ++++++ drivers/tty/serial/8250/8250_core.c | 2 drivers/tty/serial/8250/8250_exar.c | 12 ++++ drivers/tty/serial/8250/8250_mtk.c | 18 +++++++ drivers/tty/vt/vt.c | 29 +++++++---- drivers/usb/gadget/udc/gr_udc.c | 7 ++ drivers/usb/host/xhci-mtk-sch.c | 4 + drivers/usb/host/xhci-pci.c | 3 + drivers/video/fbdev/core/bitblit.c | 4 - drivers/video/fbdev/core/fbcon_ccw.c | 4 - drivers/video/fbdev/core/fbcon_cw.c | 4 - drivers/video/fbdev/core/fbcon_ud.c | 4 - fs/btrfs/backref.c | 1 fs/btrfs/extent_io.c | 3 - fs/btrfs/volumes.c | 8 +++ fs/cifs/inode.c | 10 ---- fs/nfs/direct.c | 13 +---- fs/nfs/file.c | 1 include/linux/io-mapping.h | 5 +- include/linux/mod_devicetable.h | 2 include/uapi/linux/input-event-codes.h | 3 - kernel/events/uprobes.c | 2 mm/memcontrol.c | 4 - net/mac80211/rx.c | 26 ++++++++++ net/netfilter/ipvs/ip_vs_sync.c | 12 +++- scripts/decode_stacktrace.sh | 4 - sound/core/info.c | 4 + sound/soc/codecs/rt5670.h | 2 76 files changed, 386 insertions(+), 146 deletions(-)
Arnd Bergmann (1):
x86: math-emu: Fix up 'cmp' insn for clang ias
Ben Skeggs (1):
drm/nouveau/i2c/g94-: increase NV_PMGR_DP_AUXCTL_TRANSACTREQ timeout
Boris Burkov (1):
btrfs: fix mount failure caused by race with umount
Chen-Yu Tsai (1):
drm: sun4i: hdmi: Fix inverted HPD result
Christophe JAILLET (1):
hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path
Chunfeng Yun (1):
usb: xhci-mtk: fix the failure of bandwidth allocation
Cong Wang (1):
bonding: check return value of register_netdevice() in bond_newlink()
Dinghao Liu (1):
dmaengine: tegra210-adma: Fix runtime PM imbalance on error
Evgeny Novikov (2):
hwmon: (aspeed-pwm-tacho) Avoid possible buffer overflow
usb: gadget: udc: gr_udc: fix memleak on error handling path in gr_ep_init()
Fangrui Song (1):
Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation
Federico Ricchiuto (1):
HID: i2c-hid: add Mediacom FlexBook edge13 to descriptor override
Filipe Manana (1):
btrfs: fix double free on ulist after backref resolution failure
Forest Crossman (1):
usb: xhci: Fix ASM2142/ASM3142 DMA addressing
George Kennedy (1):
ax88172a: fix ax88172a_unbind() failures
Greg Kroah-Hartman (1):
Linux 4.14.190
Hans de Goede (2):
ASoC: rt5670: Correct RT5670_LDO_SEL_MASK
HID: apple: Disable Fn-key key-re-mapping on clone keyboards
Hugh Dickins (1):
mm/memcg: fix refcount error while moving and swapping
Ian Abbott (4):
staging: comedi: addi_apci_1032: check INSN_CONFIG_DIGITAL_TRIG shift
staging: comedi: ni_6527: fix INSN_CONFIG_DIGITAL_TRIG support
staging: comedi: addi_apci_1500: check INSN_CONFIG_DIGITAL_TRIG shift
staging: comedi: addi_apci_1564: check INSN_CONFIG_DIGITAL_TRIG shift
Ilya Katsnelson (1):
Input: synaptics - enable InterTouch for ThinkPad X1E 1st gen
Jacky Hu (1):
pinctrl: amd: fix npins for uart0 in kerncz_groups
John David Anglin (1):
parisc: Add atomic64_set_release() define to avoid CPU soft lockups
Leonid Ravich (1):
dmaengine: ioat setting ioat timeout as module parameter
Liu Jian (1):
mlxsw: destroy workqueue when trap_register in mlxsw_emad_init
Marc Kleine-Budde (1):
regmap: dev_get_regmap_match(): fix string comparison
Mark O'Donovan (1):
ath9k: Fix regression with Atheros 9271
Markus Theil (1):
mac80211: allow rx of mesh eapol frames with default rx key
Matthew Howell (1):
serial: exar: Fix GPIO configuration for Sealevel cards based on XR17V35X
Max Filippov (2):
xtensa: fix __sync_fetch_and_{and,or}_4 declarations
xtensa: update *pos in cpuinfo_op.next
Merlijn Wajer (1):
Input: add SW_MACHINE_COVER
Michael J. Ruhl (1):
io-mapping: indicate mapping failure
Navid Emamdoost (2):
gpio: arizona: handle pm_runtime_get_sync failure case
gpio: arizona: put pm_runtime in case of failure
Oleg Nesterov (1):
uprobes: Change handle_swbp() to send SIGTRAP with si_code=SI_KERNEL, to fix GDB regression
Olga Kornievskaia (1):
SUNRPC reverting d03727b248d0 ("NFSv4 fix CLOSE not waiting for direct IO compeletion")
Pi-Hsun Shih (1):
scripts/decode_stacktrace: strip basepath from all paths
Qiujun Huang (1):
ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb
Robbie Ko (1):
btrfs: fix page leaks after failure to lock page for delalloc
Rustam Kovhaev (1):
staging: wlan-ng: properly check endpoint types
Serge Semin (1):
serial: 8250_mtk: Fix high-speed baud rates clamping
Sergey Organov (1):
net: dp83640: fix SIOCSHWTSTAMP to update the struct with actual configuration
Steve French (1):
Revert "cifs: Fix the target file was deleted when rename failed."
Taehee Yoo (1):
bonding: check error value of register_netdevice() immediately
Takashi Iwai (1):
ALSA: info: Drop WARN_ON() from buffer NULL sanity check
Tetsuo Handa (3):
binder: Don't use mmput() from shrinker function.
fbdev: Detect integer underflow at "struct fbcon_ops"->clear_margins.
vt: Reject zero-sized screen buffer size.
Thomas Gleixner (1):
irqdomain/treewide: Keep firmware node unconditionally allocated
Tom Rix (2):
scsi: scsi_transport_spi: Fix function pointer check
net: sky2: initialize return of gm_phy_read
Vasundhara Volam (1):
bnxt_en: Fix race when modifying pause settings.
Vladimir Oltean (1):
spi: spi-fsl-dspi: Exit the ISR with IRQ_NONE when it's not ours
Wang Hai (1):
net: smc91x: Fix possible memory leak in smc_drv_probe()
Will Deacon (1):
arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP
Wolfram Sang (1):
i2c: rcar: always clear ICSAR to avoid side effects
Xie He (1):
drivers/net/wan/lapbether: Fixed the value of hard_header_len
Yang Yingliang (2):
IB/umem: fix reference count leak in ib_umem_odp_get()
serial: 8250: fix null-ptr-deref in serial8250_start_tx()
guodeqing (1):
ipvs: fix the connection sync failed in some cases
leilk.liu (1):
spi: mediatek: use correct SPI_CFG2_REG MACRO
Greg Kroah-Hartman
maintainerMakefile +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 189 +SUBLEVEL = 190 EXTRAVERSION = NAME = Petit Gorille
@@ -482,7 +482,7 @@ ifeq ($(cc-name),clang) ifneq ($(CROSS_COMPILE),) CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) -CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR) +CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) endif ifneq ($(GCC_TOOLCHAIN),)
arch/arm64/kernel/debug-monitors.c +2 -2
@@ -389,14 +389,14 @@ void user_rewind_single_step(struct task_struct *task)* If single step is active for this thread, then set SPSR.SS * to 1 to avoid returning to the active-pending state. */ -if (test_ti_thread_flag (task_thread_info (task),TIF_SINGLESTEP )) +if (test_tsk_thread_flag (task,TIF_SINGLESTEP ))set_regs_spsr_ss (task_pt_regs (task)); }NOKPROBE_SYMBOL (user_rewind_single_step);void user_fastforward_single_step (struct task_struct *task) { -if (test_ti_thread_flag (task_thread_info (task),TIF_SINGLESTEP )) +if (test_tsk_thread_flag (task,TIF_SINGLESTEP ))clear_regs_spsr_ss (task_pt_regs (task)); }
arch/parisc/include/asm/atomic.h +2 -0
@@ -258,6 +258,8 @@ atomic64_set(atomic64_t *v, s64 i)_atomic_spin_unlock_irqrestore (v, flags); } +#define atomic64_set_release (v, i) atomic64_set((v), (i)) +static __inline__s64 atomic64_read (const atomic64_t *v) {
arch/x86/kernel/apic/io_apic.c +5 -5
@@ -2233,12 +2233,12 @@ static int mp_irqdomain_create(int ioapic) ip->irqdomain =irq_domain_create_linear (fn, hwirqs, cfg->ops, (void *)(long )ioapic); -/* Release fw handle if it was allocated above */ -if (!cfg->dev) -irq_domain_free_fwnode (fn); - -if (!ip->irqdomain) +if (!ip->irqdomain) { +/* Release fw handle if it was allocated above */ +if (!cfg->dev) +irq_domain_free_fwnode (fn);return -ENOMEM ; + } ip->irqdomain->parent = parent;
arch/x86/kernel/apic/msi.c +11 -5
@@ -149,10 +149,11 @@ void __init arch_init_msi_domain(struct irq_domain *parent) msi_default_domain =pci_msi_create_irq_domain (fn, &pci_msi_domain_info, parent); -irq_domain_free_fwnode (fn); } -if (!msi_default_domain) +if (!msi_default_domain) { +irq_domain_free_fwnode (fn);pr_warn ("failed to initialize irqdomain for MSI/MSI-x.\n" ); + } }#ifdef CONFIG_IRQ_REMAP
@@ -185,7 +186,8 @@ struct irq_domain *arch_create_remap_msi_irq_domain(struct irq_domain *parent,if (!fn)return NULL ; d =pci_msi_create_irq_domain (fn, &pci_msi_ir_domain_info, parent); -irq_domain_free_fwnode (fn); +if (!d) +irq_domain_free_fwnode (fn); return d; }#endif
@@ -248,7 +250,8 @@ static struct irq_domain *dmar_get_irq_domain(void)if (fn) { dmar_domain =msi_create_irq_domain (fn, &dmar_msi_domain_info, x86_vector_domain); -irq_domain_free_fwnode (fn); +if (!dmar_domain) +irq_domain_free_fwnode (fn); } out:mutex_unlock (&dmar_lock);
@@ -373,7 +376,10 @@ struct irq_domain *hpet_create_irq_domain(int hpet_id) } d =msi_create_irq_domain (fn, domain_info, parent); -irq_domain_free_fwnode (fn); +if (!d) { +irq_domain_free_fwnode (fn); +kfree (domain_info); + }return d; }
arch/x86/kernel/apic/vector.c +0 -1
@@ -457,7 +457,6 @@ int __init arch_early_irq_init(void) x86_vector_domain =irq_domain_create_tree (fn, &x86_vector_domain_ops,NULL );BUG_ON (x86_vector_domain ==NULL ); -irq_domain_free_fwnode (fn);irq_set_default_host (x86_vector_domain);arch_init_msi_domain (x86_vector_domain);
arch/x86/math-emu/wm_sqrt.S +1 -1
@@ -209,7 +209,7 @@ sqrt_stage_2_finish: #ifdef PARANOID /* It should be possible to get here only if the arg is ffff....ffff */ - cmp $0xffffffff,FPU_fsqrt_arg_1 + cmpl $0xffffffff,FPU_fsqrt_arg_1 jnz sqrt_stage_2_error #endif /* PARANOID */
arch/x86/platform/uv/uv_irq.c +2 -1
@@ -171,9 +171,10 @@ static struct irq_domain *uv_get_irq_domain(void) goto out; uv_domain =irq_domain_create_tree (fn, &uv_domain_ops,NULL ); -irq_domain_free_fwnode (fn);if (uv_domain) uv_domain->parent = x86_vector_domain; +else +irq_domain_free_fwnode (fn); out:mutex_unlock (&uv_lock);
arch/xtensa/kernel/setup.c +2 -1
@@ -711,7 +711,8 @@ c_start(struct seq_file *f, loff_t *pos)static void *c_next (struct seq_file *f,void *v,loff_t *pos) { -return NULL ; + ++*pos; +return c_start (f, pos); } static void
arch/xtensa/kernel/xtensa_ksyms.c +2 -2
@@ -82,13 +82,13 @@ void __xtensa_libgcc_window_spill(void) }EXPORT_SYMBOL (__xtensa_libgcc_window_spill); -unsigned long __sync_fetch_and_and_4 (unsigned long *p,unsigned long v) +unsigned int __sync_fetch_and_and_4 (volatile void *p,unsigned int v) {BUG (); }EXPORT_SYMBOL (__sync_fetch_and_and_4); -unsigned long __sync_fetch_and_or_4 (unsigned long *p,unsigned long v) +unsigned int __sync_fetch_and_or_4 (volatile void *p,unsigned int v) {BUG (); }
drivers/android/binder_alloc.c +1 -1
@@ -968,7 +968,7 @@ enum lru_status binder_alloc_free_page(struct list_head *item,trace_binder_unmap_user_end (alloc, index); }up_read (&mm->mmap_sem); -mmput (mm); +mmput_async (mm);trace_binder_unmap_kernel_start (alloc, index);
drivers/base/regmap/regmap.c +1 -1
@@ -1242,7 +1242,7 @@ static int dev_get_regmap_match(struct device *dev, void *res, void *data)/* If the user didn't specify a name match any */ if (data) -return (*r)->name == data; +return !strcmp ((*r)->name, data);else return 1 ; }
drivers/dma/ioat/dma.c +12 -0
@@ -38,6 +38,18 @@#include "../dmaengine.h" +int completion_timeout =200 ; +module_param (completion_timeout, int,0644 ); +MODULE_PARM_DESC (completion_timeout, +"set ioat completion timeout [msec] (default 200 [msec])" ); +int idle_timeout =2000 ; +module_param (idle_timeout, int,0644 ); +MODULE_PARM_DESC (idle_timeout, +"set ioat idel timeout [msec] (default 2000 [msec])" ); + +#define IDLE_TIMEOUT msecs_to_jiffies(idle_timeout) +#define COMPLETION_TIMEOUT msecs_to_jiffies(completion_timeout) +static char *chanerr_str[] = {"DMA Transfer Source Address Error" ,"DMA Transfer Destination Address Error" ,
drivers/dma/ioat/dma.h +0 -2
@@ -111,8 +111,6 @@ struct ioatdma_chan {#define IOAT_RUN 5#define IOAT_CHAN_ACTIVE 6struct timer_list timer; -#define COMPLETION_TIMEOUT msecs_to_jiffies(100) -#define IDLE_TIMEOUT msecs_to_jiffies(2000)#define RESET_DELAY msecs_to_jiffies(100)struct ioatdma_device *ioat_dma;dma_addr_t completion_dma;
drivers/dma/tegra210-adma.c +4 -1
@@ -583,6 +583,7 @@ static int tegra_adma_alloc_chan_resources(struct dma_chan *dc) ret =pm_runtime_get_sync (tdc2dev (tdc));if (ret <0 ) { +pm_runtime_put_noidle (tdc2dev (tdc));free_irq (tdc->irq, tdc);return ret; }
@@ -764,8 +765,10 @@ static int tegra_adma_probe(struct platform_device *pdev)pm_runtime_enable (&pdev->dev); ret =pm_runtime_get_sync (&pdev->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (&pdev->dev); goto rpm_disable; + } ret =tegra_adma_init (tdma);if (ret)
drivers/gpio/gpio-arizona.c +6 -1
@@ -69,6 +69,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset) ret =pm_runtime_get_sync (chip->parent);if (ret <0 ) {dev_err (chip->parent,"Failed to resume: %d\n" , ret); +pm_runtime_put_autosuspend (chip->parent);return ret; }
@@ -77,12 +78,15 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)if (ret <0 ) {dev_err (chip->parent,"Failed to drop cache: %d\n" , ret); +pm_runtime_put_autosuspend (chip->parent);return ret; } ret =regmap_read (arizona->regmap, reg, &val); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_autosuspend (chip->parent);return ret; + }pm_runtime_mark_last_busy (chip->parent);pm_runtime_put_autosuspend (chip->parent);
@@ -111,6 +115,7 @@ static int arizona_gpio_direction_out(struct gpio_chip *chip, ret =pm_runtime_get_sync (chip->parent);if (ret <0 ) {dev_err (chip->parent,"Failed to resume: %d\n" , ret); +pm_runtime_put (chip->parent);return ret; } }
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c +2 -2
@@ -118,10 +118,10 @@ g94_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry,if (retries)udelay (400 ); -/* transaction request, wait up to 1ms for it to complete */ +/* transaction request, wait up to 2ms for it to complete */ nvkm_wr32 (device,0x00e4e4 + base,0x00010000 | ctrl); - timeout =1000 ; + timeout =2000 ; do { ctrl = nvkm_rd32(device, 0x00e4e4 + base); udelay(1);
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c +2 -2
@@ -118,10 +118,10 @@ gm200_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry,if (retries)udelay (400 ); -/* transaction request, wait up to 1ms for it to complete */ +/* transaction request, wait up to 2ms for it to complete */ nvkm_wr32 (device,0x00d954 + base,0x00010000 | ctrl); - timeout =1000 ; + timeout =2000 ; do { ctrl = nvkm_rd32(device, 0x00d954 + base); udelay(1);
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +1 -1
@@ -215,7 +215,7 @@ sun4i_hdmi_connector_detect(struct drm_connector *connector, bool force)unsigned long reg; reg =readl (hdmi->base +SUN4I_HDMI_HPD_REG ); -if (reg &SUN4I_HDMI_HPD_HIGH ) { +if (!(reg &SUN4I_HDMI_HPD_HIGH )) {cec_phys_addr_invalidate (hdmi->cec_adap);return connector_status_disconnected; }
drivers/hid/hid-apple.c +18 -0
@@ -57,6 +57,7 @@ MODULE_PARM_DESC(swap_opt_cmd, "Swap the Option (\"Alt\") and Command (\"Flag\")struct apple_sc {unsigned long quirks;unsigned int fn_on; +unsigned int fn_found; DECLARE_BITMAP(pressed_numlock, KEY_CNT); };
@@ -342,12 +343,15 @@ static int apple_input_mapping(struct hid_device *hdev, struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, unsigned long **bit, int *max) { + struct apple_sc *asc = hid_get_drvdata(hdev); +if (usage->hid == (HID_UP_CUSTOM |0x0003 ) || usage->hid == (HID_UP_MSVENDOR |0x0003 ) || usage->hid == (HID_UP_HPVENDOR2 |0x0003 )) {/* The fn key on Apple USB keyboards */ set_bit (EV_REP , hi->input->evbit);hid_map_usage_clear (hi, usage, bit, max,EV_KEY ,KEY_FN ); + asc->fn_found = true;apple_setup_input (hi->input);return 1 ; }
@@ -374,6 +378,19 @@ static int apple_input_mapped(struct hid_device *hdev, struct hid_input *hi,return 0 ; } +static int apple_input_configured (struct hid_device *hdev, +struct hid_input *hidinput) +{ +struct apple_sc *asc =hid_get_drvdata (hdev); + +if ((asc->quirks &APPLE_HAS_FN ) && !asc->fn_found) { +hid_info (hdev,"Fn key not found (Apple Wireless Keyboard clone?), disabling Fn key handling\n" ); + asc->quirks =0 ; + } + +return 0 ; +} +static int apple_probe (struct hid_device *hdev,const struct hid_device_id *id) {
@@ -588,6 +605,7 @@ static struct hid_driver apple_driver = { .event = apple_event, .input_mapping = apple_input_mapping, .input_mapped = apple_input_mapped, + .input_configured = apple_input_configured, };module_hid_driver (apple_driver);
drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c +8 -0
@@ -373,6 +373,14 @@ static const struct dmi_system_id i2c_hid_dmi_desc_override_table[] = { }, .driver_data = (void *)&sipodev_desc }, + { + .ident = "Mediacom FlexBook edge 13", + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"MEDIACOM" ), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "FlexBook_edge13-M-FBE13"), + }, + .driver_data = (void *)&sipodev_desc + }, { .ident ="Odys Winbook 13" , .matches = {
drivers/hwmon/aspeed-pwm-tacho.c +2 -0
@@ -878,6 +878,8 @@ static int aspeed_create_fan(struct device *dev, ret =of_property_read_u32 (child,"reg" , &pwm_port);if (ret)return ret; +if (pwm_port >=ARRAY_SIZE (pwm_port_params)) +return -EINVAL ;aspeed_create_pwm_port (priv, (u8 )pwm_port); ret =of_property_count_u8_elems (child,"cooling-levels" );
drivers/i2c/busses/i2c-rcar.c +3 -0
@@ -817,6 +817,7 @@ static int rcar_unreg_slave(struct i2c_client *slave)/* disable irqs and ensure none is running before clearing ptr */ rcar_i2c_write (priv,ICSIER ,0 );rcar_i2c_write (priv,ICSCR ,0 ); +rcar_i2c_write (priv,ICSAR ,0 );/* Gen2: must be 0 if not using slave */ synchronize_irq (priv->irq); priv->slave =NULL ;
@@ -914,6 +915,8 @@ static int rcar_i2c_probe(struct platform_device *pdev)if (ret <0 ) goto out_pm_put; +rcar_i2c_write (priv,ICSAR ,0 );/* Gen2: must be 0 if not using slave */ +if (priv->devtype ==I2C_RCAR_GEN3 ) { priv->rstc =devm_reset_control_get_exclusive (&pdev->dev,NULL );if (!IS_ERR (priv->rstc)) {
drivers/infiniband/core/umem_odp.c +2 -1
@@ -306,7 +306,8 @@ int ib_umem_odp_get(struct ib_ucontext *context, struct ib_umem *umem, vma =find_vma (mm,ib_umem_start (umem));if (!vma || !is_vm_hugetlb_page (vma)) {up_read (&mm->mmap_sem); -return -EINVAL ; + ret_val = -EINVAL ; + goto out_mm; } h =hstate_vma (vma); umem->page_shift =huge_page_shift (h);
drivers/input/mouse/synaptics.c +1 -0
@@ -182,6 +182,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0093" ,/* T480 */ "LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ +"LEN0099" ,/* X1 Extreme 1st */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ "LEN2044", /* L470 */
drivers/iommu/amd_iommu.c +3 -2
@@ -4394,9 +4394,10 @@ int amd_iommu_create_irq_domain(struct amd_iommu *iommu)if (!fn)return -ENOMEM ; iommu->ir_domain =irq_domain_create_tree (fn, &amd_ir_domain_ops, iommu); -irq_domain_free_fwnode (fn); -if (!iommu->ir_domain) +if (!iommu->ir_domain) { +irq_domain_free_fwnode (fn);return -ENOMEM ; + } iommu->ir_domain->parent =arch_get_ir_parent_domain (); iommu->msi_domain = arch_create_remap_msi_irq_domain(iommu->ir_domain,
drivers/iommu/intel_irq_remapping.c +1 -1
@@ -536,8 +536,8 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)0 ,INTR_REMAP_TABLE_ENTRIES , fn, &intel_ir_domain_ops, iommu); -irq_domain_free_fwnode (fn);if (!iommu->ir_domain) { +irq_domain_free_fwnode (fn);pr_err ("IR%d: failed to allocate irqdomain\n" , iommu->seq_id); goto out_free_bitmap; }
drivers/net/bonding/bond_main.c +7 -3
@@ -4773,15 +4773,19 @@ int bond_create(struct net *net, const char *name) bond_dev->rtnl_link_ops = &bond_link_ops; res =register_netdevice (bond_dev); +if (res <0 ) { +free_netdev (bond_dev); +rtnl_unlock (); + +return res; + }netif_carrier_off (bond_dev);bond_work_init_all (bond);rtnl_unlock (); -if (res <0 ) -free_netdev (bond_dev); -return res; +return 0 ; }static int __net_init bond_net_init (struct net *net)
drivers/net/bonding/bond_netlink.c +1 -2
@@ -451,11 +451,10 @@ static int bond_newlink(struct net *src_net, struct net_device *bond_dev,return err; err =register_netdevice (bond_dev); - -netif_carrier_off (bond_dev);if (!err) {struct bonding *bond =netdev_priv (bond_dev); +netif_carrier_off (bond_dev);bond_work_init_all (bond); }
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +4 -1
@@ -1287,8 +1287,11 @@ static int bnxt_set_pauseparam(struct net_device *dev,if (epause->tx_pause) link_info->req_flow_ctrl |=BNXT_LINK_PAUSE_TX ; -if (netif_running (dev)) +if (netif_running (dev)) { +mutex_lock (&bp->link_lock); rc =bnxt_hwrm_set_pause (bp); +mutex_unlock (&bp->link_lock); + }return rc; }
drivers/net/ethernet/marvell/sky2.c +1 -1
@@ -215,7 +215,7 @@ static int __gm_phy_read(struct sky2_hw *hw, unsigned port, u16 reg, u16 *val)static inline u16 gm_phy_read (struct sky2_hw *hw,unsigned port,u16 reg) { -u16 v; +u16 v =0 ;__gm_phy_read (hw, port, reg, &v);return v; }
drivers/net/ethernet/mellanox/mlxsw/core.c +2 -1
@@ -619,7 +619,7 @@ static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core) err =mlxsw_core_trap_register (mlxsw_core, &mlxsw_emad_rx_listener, mlxsw_core);if (err) -return err; + goto err_trap_register; err = mlxsw_core->driver->basic_trap_groups_set (mlxsw_core);if (err)
@@ -631,6 +631,7 @@ static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core) err_emad_trap_set:mlxsw_core_trap_unregister (mlxsw_core, &mlxsw_emad_rx_listener, mlxsw_core); +err_trap_register:destroy_workqueue (mlxsw_core->emad_wq);return err; }
drivers/net/ethernet/smsc/smc91x.c +2 -2
@@ -2294,7 +2294,7 @@ static int smc_drv_probe(struct platform_device *pdev) ret =try_toggle_control_gpio (&pdev->dev, &lp->power_gpio,"power" ,0 ,0 ,100 );if (ret) -return ret; + goto out_free_netdev;/* * Optional reset GPIO configured? Minimum 100 ns reset needed
@@ -2303,7 +2303,7 @@ static int smc_drv_probe(struct platform_device *pdev) ret =try_toggle_control_gpio (&pdev->dev, &lp->reset_gpio,"reset" ,0 ,0 ,100 );if (ret) -return ret; + goto out_free_netdev;/* * Need to wait for optional EEPROM to load, max 750 us according
drivers/net/hippi/rrunner.c +1 -1
@@ -1250,7 +1250,7 @@ static int rr_open(struct net_device *dev) rrpriv->info =NULL ; }if (rrpriv->rx_ctrl) { -pci_free_consistent (pdev,sizeof (struct ring_ctrl ), +pci_free_consistent (pdev,256 *sizeof (struct ring_ctrl ), rrpriv->rx_ctrl, rrpriv->rx_ctrl_dma); rrpriv->rx_ctrl =NULL ; }
drivers/net/phy/dp83640.c +4 -0
@@ -1339,6 +1339,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) dp83640->hwts_rx_en =1 ; dp83640->layer =PTP_CLASS_L4 ; dp83640->version =PTP_CLASS_V1 ; + cfg.rx_filter =HWTSTAMP_FILTER_PTP_V1_L4_EVENT ;break ;case HWTSTAMP_FILTER_PTP_V2_L4_EVENT :case HWTSTAMP_FILTER_PTP_V2_L4_SYNC :
@@ -1346,6 +1347,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) dp83640->hwts_rx_en =1 ; dp83640->layer =PTP_CLASS_L4 ; dp83640->version =PTP_CLASS_V2 ; + cfg.rx_filter =HWTSTAMP_FILTER_PTP_V2_L4_EVENT ;break ;case HWTSTAMP_FILTER_PTP_V2_L2_EVENT :case HWTSTAMP_FILTER_PTP_V2_L2_SYNC :
@@ -1353,6 +1355,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) dp83640->hwts_rx_en =1 ; dp83640->layer =PTP_CLASS_L2 ; dp83640->version =PTP_CLASS_V2 ; + cfg.rx_filter =HWTSTAMP_FILTER_PTP_V2_L2_EVENT ;break ;case HWTSTAMP_FILTER_PTP_V2_EVENT :case HWTSTAMP_FILTER_PTP_V2_SYNC :
@@ -1360,6 +1363,7 @@ static int dp83640_hwtstamp(struct phy_device *phydev, struct ifreq *ifr) dp83640->hwts_rx_en =1 ; dp83640->layer =PTP_CLASS_L4 |PTP_CLASS_L2 ; dp83640->version =PTP_CLASS_V2 ; + cfg.rx_filter =HWTSTAMP_FILTER_PTP_V2_EVENT ;break ;default :return -ERANGE ;
drivers/net/usb/ax88172a.c +1 -0
@@ -210,6 +210,7 @@ static int ax88172a_bind(struct usbnet *dev, struct usb_interface *intf) ret =asix_read_cmd (dev,AX_CMD_READ_NODE_ID ,0 ,0 ,ETH_ALEN , buf,0 );if (ret <ETH_ALEN ) {netdev_err (dev->net,"Failed to read MAC address: %d\n" , ret); + ret = -EIO ; goto free; }memcpy (dev->net->dev_addr, buf,ETH_ALEN );
drivers/net/wan/lapbether.c +8 -1
@@ -308,7 +308,6 @@ static void lapbeth_setup(struct net_device *dev) dev->netdev_ops = &lapbeth_netdev_ops; dev->needs_free_netdev = true; dev->type =ARPHRD_X25 ; - dev->hard_header_len =3 ; dev->mtu =1000 ; dev->addr_len =0 ; }
@@ -329,6 +328,14 @@ static int lapbeth_new_device(struct net_device *dev)if (!ndev) goto out; +/* When transmitting data: +* first this driver removes a pseudo header of 1 byte, +* then the lapb module prepends an LAPB header of at most 3 bytes, +* then this driver prepends a length field of 2 bytes, +* then the underlying Ethernet device prepends its own header. +*/ + ndev->hard_header_len =-1 +3 +2 + dev->hard_header_len; + lapbeth =netdev_priv (ndev); lapbeth->axdev = ndev;
drivers/net/wireless/ath/ath9k/hif_usb.c +40 -12
149 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/hif_usb.h +5 -0
@@ -86,6 +86,11 @@ struct tx_buf {struct list_head list; }; +struct rx_buf { +struct sk_buff *skb; +struct hif_device_usb *hif_dev; +}; +#define HIF_USB_TX_STOP BIT(0)#define HIF_USB_TX_FLUSH BIT(1)
drivers/pci/host/vmd.c +3 -2
@@ -638,9 +638,10 @@ static int vmd_enable_domain(struct vmd_dev *vmd) vmd->irq_domain =pci_msi_create_irq_domain (fn, &vmd_msi_domain_info, x86_vector_domain); -irq_domain_free_fwnode (fn); -if (!vmd->irq_domain) +if (!vmd->irq_domain) { +irq_domain_free_fwnode (fn);return -ENODEV ; + }pci_add_resource (&resources, &vmd->resources[0 ]);pci_add_resource (&resources, &vmd->resources[1 ]);
drivers/pinctrl/pinctrl-amd.h +1 -1
@@ -252,7 +252,7 @@ static const struct amd_pingroup kerncz_groups[] = { { .name = "uart0", .pins = uart0_pins, - .npins = 9, + .npins = 5, }, { .name = "uart1",
drivers/scsi/scsi_transport_spi.c +1 -1
@@ -349,7 +349,7 @@ store_spi_transport_##field(struct device *dev, \struct spi_transport_attrs *tp \ = (struct spi_transport_attrs *)&starget->starget_data; \ \ - if (i->f->set_##field) \ + if (!i->f->set_##field) \ return -EINVAL; \ val = simple_strtoul(buf, NULL, 0); \ if (val > tp->max_##field) \
drivers/spi/spi-fsl-dspi.c +3 -1
@@ -886,9 +886,11 @@ static irqreturn_t dspi_interrupt(int irq, void *dev_id) trans_mode); } } + +return IRQ_HANDLED ; } -return IRQ_HANDLED ; +return IRQ_NONE ; }static const struct of_device_id fsl_dspi_dt_ids[] = {
drivers/spi/spi-mt65xx.c +8 -7
@@ -41,7 +41,6 @@#define SPI_CFG0_SCK_LOW_OFFSET 8#define SPI_CFG0_CS_HOLD_OFFSET 16#define SPI_CFG0_CS_SETUP_OFFSET 24 -#define SPI_ADJUST_CFG0_SCK_LOW_OFFSET 16#define SPI_ADJUST_CFG0_CS_HOLD_OFFSET 0#define SPI_ADJUST_CFG0_CS_SETUP_OFFSET 16
@@ -53,6 +52,8 @@#define SPI_CFG1_CS_IDLE_MASK 0xff#define SPI_CFG1_PACKET_LOOP_MASK 0xff00#define SPI_CFG1_PACKET_LENGTH_MASK 0x3ff0000 +#define SPI_CFG2_SCK_HIGH_OFFSET 0 +#define SPI_CFG2_SCK_LOW_OFFSET 16#define SPI_CMD_ACT BIT(0)#define SPI_CMD_RESUME BIT(1)
@@ -259,7 +260,7 @@ static void mtk_spi_set_cs(struct spi_device *spi, bool enable)static void mtk_spi_prepare_transfer (struct spi_master *master,struct spi_transfer *xfer) { -u32 spi_clk_hz, div, sck_time, cs_time, reg_val =0 ; +u32 spi_clk_hz, div, sck_time, cs_time, reg_val;struct mtk_spi *mdata =spi_master_get_devdata (master); spi_clk_hz =clk_get_rate (mdata->spi_clk);
@@ -272,18 +273,18 @@ static void mtk_spi_prepare_transfer(struct spi_master *master, cs_time = sck_time *2 ;if (mdata->dev_comp->enhance_timing) { + reg_val = (((sck_time -1 ) &0xffff ) + <<SPI_CFG2_SCK_HIGH_OFFSET ); reg_val |= (((sck_time -1 ) &0xffff ) - <<SPI_CFG0_SCK_HIGH_OFFSET ); - reg_val |= (((sck_time -1 ) &0xffff ) - <<SPI_ADJUST_CFG0_SCK_LOW_OFFSET ); + <<SPI_CFG2_SCK_LOW_OFFSET );writel (reg_val, mdata->base +SPI_CFG2_REG ); - reg_val |= (((cs_time -1 ) &0xffff ) + reg_val = (((cs_time -1 ) &0xffff ) <<SPI_ADJUST_CFG0_CS_HOLD_OFFSET ); reg_val |= (((cs_time -1 ) &0xffff ) <<SPI_ADJUST_CFG0_CS_SETUP_OFFSET );writel (reg_val, mdata->base +SPI_CFG0_REG ); }else { - reg_val |= (((sck_time -1 ) &0xff ) + reg_val = (((sck_time -1 ) &0xff ) <<SPI_CFG0_SCK_HIGH_OFFSET ); reg_val |= (((sck_time -1 ) &0xff ) <<SPI_CFG0_SCK_LOW_OFFSET ); reg_val |= (((cs_time -1 ) &0xff ) <<SPI_CFG0_CS_HOLD_OFFSET );
drivers/staging/comedi/drivers/addi_apci_1032.c +14 -6
@@ -115,14 +115,22 @@ static int apci1032_cos_insn_config(struct comedi_device *dev, unsigned int *data) {struct apci1032_private *devpriv = dev->private; -unsigned int shift, oldmask; +unsigned int shift, oldmask, himask, lomask;switch (data[0 ]) {case INSN_CONFIG_DIGITAL_TRIG :if (data[1 ] !=0 )return -EINVAL ; shift = data[3 ]; - oldmask = (1U << shift) -1 ; +if (shift <32 ) { + oldmask = (1U << shift) -1 ; + himask = data[4 ] << shift; + lomask = data[5 ] << shift; + }else { + oldmask =0xffffffffu ; + himask =0 ; + lomask =0 ; + }switch (data[2 ]) {case COMEDI_DIGITAL_TRIG_DISABLE : devpriv->ctrl =0 ;
@@ -145,8 +153,8 @@ static int apci1032_cos_insn_config(struct comedi_device *dev, devpriv->mode2 &= oldmask; }/* configure specified channels */ - devpriv->mode1 |= data[4 ] << shift; - devpriv->mode2 |= data[5 ] << shift; + devpriv->mode1 |= himask; + devpriv->mode2 |= lomask;break ;case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS : if (devpriv->ctrl != (APCI1032_CTRL_INT_ENA |
@@ -163,8 +171,8 @@ static int apci1032_cos_insn_config(struct comedi_device *dev, devpriv->mode2 &= oldmask; }/* configure specified channels */ - devpriv->mode1 |= data[4 ] << shift; - devpriv->mode2 |= data[5 ] << shift; + devpriv->mode1 |= himask; + devpriv->mode2 |= lomask;break ;default :return -EINVAL ;
drivers/staging/comedi/drivers/addi_apci_1500.c +19 -5
@@ -461,13 +461,14 @@ static int apci1500_di_cfg_trig(struct comedi_device *dev,struct apci1500_private *devpriv = dev->private;unsigned int trig = data[1 ];unsigned int shift = data[3 ]; -unsigned int hi_mask = data[4 ] << shift; -unsigned int lo_mask = data[5 ] << shift; -unsigned int chan_mask = hi_mask | lo_mask; -unsigned int old_mask = (1 << shift) -1 ; +unsigned int hi_mask; +unsigned int lo_mask; +unsigned int chan_mask; +unsigned int old_mask;unsigned int pm;unsigned int pt;unsigned int pp; +unsigned int invalid_chan;if (trig >1 ) { dev_dbg(dev->class_dev,
@@ -475,7 +476,20 @@ static int apci1500_di_cfg_trig(struct comedi_device *dev,return -EINVAL ; } -if (chan_mask >0xffff ) { +if (shift <=16 ) { + hi_mask = data[4 ] << shift; + lo_mask = data[5 ] << shift; + old_mask = (1U << shift) -1 ; + invalid_chan = (data[4 ] | data[5 ]) >> (16 - shift); + }else { + hi_mask =0 ; + lo_mask =0 ; + old_mask =0xffff ; + invalid_chan = data[4 ] | data[5 ]; + } + chan_mask = hi_mask | lo_mask; + +if (invalid_chan) {dev_dbg (dev->class_dev,"invalid digital trigger channel\n" );return -EINVAL ; }
drivers/staging/comedi/drivers/addi_apci_1564.c +14 -6
@@ -340,14 +340,22 @@ static int apci1564_cos_insn_config(struct comedi_device *dev, unsigned int *data) {struct apci1564_private *devpriv = dev->private; -unsigned int shift, oldmask; +unsigned int shift, oldmask, himask, lomask;switch (data[0 ]) {case INSN_CONFIG_DIGITAL_TRIG :if (data[1 ] !=0 )return -EINVAL ; shift = data[3 ]; - oldmask = (1U << shift) -1 ; +if (shift <32 ) { + oldmask = (1U << shift) -1 ; + himask = data[4 ] << shift; + lomask = data[5 ] << shift; + }else { + oldmask =0xffffffffu ; + himask =0 ; + lomask =0 ; + }switch (data[2 ]) {case COMEDI_DIGITAL_TRIG_DISABLE : devpriv->ctrl =0 ;
@@ -371,8 +379,8 @@ static int apci1564_cos_insn_config(struct comedi_device *dev, devpriv->mode2 &= oldmask; }/* configure specified channels */ - devpriv->mode1 |= data[4 ] << shift; - devpriv->mode2 |= data[5 ] << shift; + devpriv->mode1 |= himask; + devpriv->mode2 |= lomask;break ;case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS : if (devpriv->ctrl != (APCI1564_DI_IRQ_ENA |
@@ -389,8 +397,8 @@ static int apci1564_cos_insn_config(struct comedi_device *dev, devpriv->mode2 &= oldmask; }/* configure specified channels */ - devpriv->mode1 |= data[4 ] << shift; - devpriv->mode2 |= data[5 ] << shift; + devpriv->mode1 |= himask; + devpriv->mode2 |= lomask;break ;default :return -EINVAL ;
drivers/staging/comedi/drivers/ni_6527.c +1 -1
@@ -341,7 +341,7 @@ static int ni6527_intr_insn_config(struct comedi_device *dev,case COMEDI_DIGITAL_TRIG_ENABLE_EDGES :/* check shift amount */ shift = data[3 ]; -if (shift >= s->n_chan) { +if (shift >=32 ) { mask =0 ; rising =0 ; falling =0 ;
drivers/staging/wlan-ng/prism2usb.c +15 -1
@@ -61,11 +61,25 @@ static int prism2sta_probe_usb(struct usb_interface *interface, const struct usb_device_id *id) {struct usb_device *dev; - +const struct usb_endpoint_descriptor *epd; +const struct usb_host_interface *iface_desc = interface->cur_altsetting;struct wlandevice *wlandev =NULL ;struct hfa384x *hw =NULL ;int result =0 ; +if (iface_desc->desc.bNumEndpoints !=2 ) { + result = -ENODEV ; + goto failed; + } + + result = -EINVAL ; + epd = &iface_desc->endpoint[1 ].desc; +if (!usb_endpoint_is_bulk_in (epd)) + goto failed; + epd = &iface_desc->endpoint[2 ].desc; +if (!usb_endpoint_is_bulk_out (epd)) + goto failed; + dev =interface_to_usbdev (interface); wlandev =create_wlan ();if (!wlandev) {
drivers/tty/serial/8250/8250_core.c +1 -1
@@ -534,6 +534,7 @@ static void __init serial8250_isa_init_ports(void)*/ up->mcr_mask = ~ALPHA_KLUDGE_MCR ; up->mcr_force =ALPHA_KLUDGE_MCR ; +serial8250_set_defaults (up); }/* chain base port ops to support Remote Supervisor Adapter */
@@ -557,7 +558,6 @@ static void __init serial8250_isa_init_ports(void) port->membase = old_serial_port[i].iomem_base; port->iotype = old_serial_port[i].io_type; port->regshift = old_serial_port[i].iomem_reg_shift; -serial8250_set_defaults (up); port->irqflags |= irqflag;if (serial8250_isa_config !=NULL )
drivers/tty/serial/8250/8250_exar.c +11 -1
@@ -229,7 +229,17 @@ static void setup_gpio(struct pci_dev *pcidev, u8 __iomem *p)* devices will export them as GPIOs, so we pre-configure them safely * as inputs. */ -u8 dir = pcidev->vendor ==PCI_VENDOR_ID_EXAR ?0xff :0x00 ; + +u8 dir =0x00 ; + +if ((pcidev->vendor ==PCI_VENDOR_ID_EXAR ) && + (pcidev->subsystem_vendor !=PCI_VENDOR_ID_SEALEVEL )) { +// Configure GPIO as inputs for Commtech adapters + dir =0xff ; + }else { +// Configure GPIO as outputs for SeaLevel adapters + dir =0x00 ; + }writeb (0x00 , p +UART_EXAR_MPIOINT_7_0 );writeb (0x00 , p +UART_EXAR_MPIOLVL_7_0 );
drivers/tty/serial/8250/8250_mtk.c +18 -0
@@ -45,8 +45,21 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios,unsigned long flags;unsigned int baud, quot; +/* +* Store the requested baud rate before calling the generic 8250 +* set_termios method. Standard 8250 port expects bauds to be +* no higher than (uartclk / 16) so the baud will be clamped if it +* gets out of that bound. Mediatek 8250 port supports speed +* higher than that, therefore we'll get original baud rate back +* after calling the generic set_termios method and recalculate +* the speed later in this method. +*/ + baud =tty_termios_baud_rate (termios); +serial8250_do_set_termios (port, termios, old); +tty_termios_encode_baud_rate (termios, baud, baud); +/* * Mediatek UARTs use an extra highspeed register (UART_MTK_HIGHS) *
@@ -85,6 +98,11 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios,*/ spin_lock_irqsave (&port->lock, flags); +/* +* Update the per-port timeout. +*/ +uart_update_timeout (port, termios->c_cflag, baud); +/* set DLAB we have cval saved in up->lcr from the call to the core */ serial_port_out (port,UART_LCR , up->lcr |UART_LCR_DLAB );serial_dl_write (up, quot);
drivers/tty/vt/vt.c +18 -11
@@ -762,10 +762,19 @@ static const struct tty_port_operations vc_port_ops = { .destruct = vc_port_destruct, }; +/* +* Change # of rows and columns (0 means unchanged/the size of fg_console) +* [this is to be used together with some user program +* like resize that changes the hardware videomode] +*/ +#define VC_MAXCOL (32767) +#define VC_MAXROW (32767) +int vc_allocate (unsigned int currcons)/* return 0 on success */ {struct vt_notifier_param param;struct vc_data *vc; +int err;WARN_CONSOLE_UNLOCKED ();
@@ -795,6 +804,11 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */if (!*vc->vc_uni_pagedir_loc)con_set_default_unimap (vc); + err = -EINVAL ; +if (vc->vc_cols >VC_MAXCOL || vc->vc_rows >VC_MAXROW || + vc->vc_screenbuf_size >KMALLOC_MAX_SIZE || !vc->vc_screenbuf_size) + goto err_free; + err = -ENOMEM ; vc->vc_screenbuf =kzalloc (vc->vc_screenbuf_size,GFP_KERNEL );if (!vc->vc_screenbuf) goto err_free;
@@ -812,7 +826,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */ err_free:kfree (vc); vc_cons[currcons].d =NULL ; -return -ENOMEM ; +return err; } static inline int resize_screen(struct vc_data *vc, int width, int height,
@@ -827,14 +841,6 @@ static inline int resize_screen(struct vc_data *vc, int width, int height,return err; } -/* -* Change # of rows and columns (0 means unchanged/the size of fg_console) -* [this is to be used together with some user program -* like resize that changes the hardware videomode] -*/ -#define VC_RESIZE_MAXCOL (32767) -#define VC_RESIZE_MAXROW (32767) -/** * vc_do_resize - resizing method for the tty * @tty: tty being resized
@@ -869,7 +875,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc, user = vc->vc_resize_user; vc->vc_resize_user =0 ; -if (cols >VC_RESIZE_MAXCOL || lines >VC_RESIZE_MAXROW ) +if (cols >VC_MAXCOL || lines >VC_MAXROW )return -EINVAL ; new_cols = (cols ? cols : vc->vc_cols);
@@ -880,7 +886,7 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,if (new_cols == vc->vc_cols && new_rows == vc->vc_rows)return 0 ; -if (new_screen_size >KMALLOC_MAX_SIZE ) +if (new_screen_size >KMALLOC_MAX_SIZE || !new_screen_size)return -EINVAL ; newscreen =kzalloc (new_screen_size,GFP_USER );if (!newscreen)
@@ -3031,6 +3037,7 @@ static int __init con_init(void)INIT_WORK (&vc_cons[currcons].SAK_work, vc_SAK);tty_port_init (&vc->port);visual_init (vc, currcons,1 ); +/* Assuming vc->vc_{cols,rows,screenbuf_size} are sane here. */ vc->vc_screenbuf =kzalloc (vc->vc_screenbuf_size,GFP_NOWAIT );vc_init (vc, vc->vc_rows, vc->vc_cols, currcons || !vc->vc_sw->con_save_screen);
drivers/usb/gadget/udc/gr_udc.c +5 -2
@@ -2000,9 +2000,12 @@ static int gr_ep_init(struct gr_udc *dev, int num, int is_in, u32 maxplimit)if (num ==0 ) { _req =gr_alloc_request (&ep->ep,GFP_ATOMIC ); +if (!_req) +return -ENOMEM ; + buf =devm_kzalloc (dev->dev,PAGE_SIZE ,GFP_DMA |GFP_ATOMIC ); -if (!_req || !buf) { -/* possible _req freed by gr_probe via gr_remove */ +if (!buf) { +gr_free_request (&ep->ep, _req);return -ENOMEM ; }
drivers/usb/host/xhci-mtk-sch.c +4 -0
@@ -284,6 +284,10 @@ static bool need_bw_sch(struct usb_host_endpoint *ep,if (is_fs_or_ls (speed) && !has_tt)return false; +/* skip endpoint with zero maxpkt */ +if (usb_endpoint_maxp (&ep->desc) ==0 ) +return false; +return true; }
drivers/usb/host/xhci-pci.c +3 -0
@@ -235,6 +235,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && pdev->device ==0x1142 ) xhci->quirks |=XHCI_TRUST_TX_LENGTH ; +if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && + pdev->device ==0x2142 ) + xhci->quirks |=XHCI_NO_64BIT_SUPPORT ;if (pdev->vendor ==PCI_VENDOR_ID_ASMEDIA && pdev->device ==PCI_DEVICE_ID_ASMEDIA_1042A_XHCI )
drivers/video/fbdev/core/bitblit.c +2 -2
@@ -216,7 +216,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, region.color = color; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dx = info->var.xoffset + rs; region.dy =0 ; region.width = rw;
@@ -224,7 +224,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dx = info->var.xoffset; region.dy = info->var.yoffset + bs; region.width = rs;
drivers/video/fbdev/core/fbcon_ccw.c +2 -2
@@ -201,7 +201,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, region.color = color; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dx =0 ; region.dy = info->var.yoffset; region.height = rw;
@@ -209,7 +209,7 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dx = info->var.xoffset + bs; region.dy =0 ; region.height = info->var.yres_virtual;
drivers/video/fbdev/core/fbcon_cw.c +2 -2
@@ -184,7 +184,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, region.color = color; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dx =0 ; region.dy = info->var.yoffset + rs; region.height = rw;
@@ -192,7 +192,7 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dx = info->var.xoffset; region.dy = info->var.yoffset; region.height = info->var.yres;
drivers/video/fbdev/core/fbcon_ud.c +2 -2
@@ -231,7 +231,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, region.color = color; region.rop =ROP_COPY ; -if (rw && !bottom_only) { +if ((int ) rw >0 && !bottom_only) { region.dy =0 ; region.dx = info->var.xoffset; region.width = rw;
@@ -239,7 +239,7 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info, info->fbops->fb_fillrect (info, ®ion); } -if (bh) { +if ((int ) bh >0 ) { region.dy = info->var.yoffset; region.dx = info->var.xoffset; region.height = bh;
fs/btrfs/backref.c +1 -0
@@ -1420,6 +1420,7 @@ static int btrfs_find_all_roots_safe(struct btrfs_trans_handle *trans,if (ret <0 && ret != -ENOENT ) {ulist_free (tmp);ulist_free (*roots); + *roots =NULL ;return ret; } node =ulist_next (tmp, &uiter);
fs/btrfs/extent_io.c +2 -1
@@ -1721,7 +1721,8 @@ static int __process_pages_contig(struct address_space *mapping,if (!PageDirty (pages[i]) || pages[i]->mapping != mapping) {unlock_page (pages[i]); -put_page (pages[i]); +for (; i < ret; i++) +put_page (pages[i]); err = -EAGAIN ; goto out; }
fs/btrfs/volumes.c +8 -0
@@ -6901,6 +6901,14 @@ int btrfs_read_chunk_tree(struct btrfs_fs_info *fs_info)mutex_lock (&uuid_mutex);mutex_lock (&fs_info->chunk_mutex); +/* +* It is possible for mount and umount to race in such a way that +* we execute this code path, but open_fs_devices failed to clear +* total_rw_bytes. We certainly want it cleared before reading the +* device items, so clear it here. +*/ + fs_info->fs_devices->total_rw_bytes =0 ; +/* * Read all device items, and then all the chunk items. All * device items are found before any chunk item (their object id
fs/cifs/inode.c +2 -8
@@ -1778,7 +1778,6 @@ cifs_rename2(struct inode *source_dir, struct dentry *source_dentry,FILE_UNIX_BASIC_INFO *info_buf_target;unsigned int xid;int rc, tmprc; -bool new_target =d_really_is_negative (target_dentry);if (flags & ~RENAME_NOREPLACE )return -EINVAL ;
@@ -1855,13 +1854,8 @@ cifs_rename2(struct inode *source_dir, struct dentry *source_dentry,*/ unlink_target: -/* -* If the target dentry was created during the rename, try -* unlinking it if it's not negative -*/ -if (new_target && -d_really_is_positive (target_dentry) && - (rc == -EACCES || rc == -EEXIST )) { +/* Try unlinking the target dentry if it's not negative */ +if (d_really_is_positive (target_dentry) && (rc == -EACCES || rc == -EEXIST )) {if (d_is_dir (target_dentry)) tmprc =cifs_rmdir (target_dir, target_dentry);else
fs/nfs/direct.c +4 -9
@@ -396,6 +396,8 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq) {struct inode *inode = dreq->inode; +inode_dio_end (inode); +if (dreq->iocb) {long res = (long ) dreq->error;if (dreq->count !=0 ) {
@@ -407,10 +409,7 @@ static void nfs_direct_complete(struct nfs_direct_req *dreq)complete (&dreq->completion); -igrab (inode);nfs_direct_req_release (dreq); -inode_dio_end (inode); -iput (inode); }static void nfs_direct_read_completion (struct nfs_pgio_header *hdr)
@@ -540,10 +539,8 @@ static ssize_t nfs_direct_read_schedule_iovec(struct nfs_direct_req *dreq,* generic layer handle the completion. */ if (requested_bytes ==0 ) { -igrab (inode); -nfs_direct_req_release (dreq);inode_dio_end (inode); -iput (inode); +nfs_direct_req_release (dreq);return result <0 ? result : -EIO ; }
@@ -960,10 +957,8 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,* generic layer handle the completion. */ if (requested_bytes ==0 ) { -igrab (inode); -nfs_direct_req_release (dreq);inode_dio_end (inode); -iput (inode); +nfs_direct_req_release (dreq);return result <0 ? result : -EIO ; }
fs/nfs/file.c +0 -1
@@ -82,7 +82,6 @@ nfs_file_release(struct inode *inode, struct file *filp)dprintk ("NFS: release(%pD2)\n" , filp);nfs_inc_stats (inode,NFSIOS_VFSRELEASE ); -inode_dio_wait (inode);nfs_file_clear_open_context (filp);return 0 ; }
include/linux/io-mapping.h +4 -1
@@ -120,9 +120,12 @@ io_mapping_init_wc(struct io_mapping *iomap, resource_size_t base, unsigned long size) { + iomap->iomem =ioremap_wc (base, size); +if (!iomap->iomem) +return NULL ; + iomap->base = base; iomap->size = size; - iomap->iomem =ioremap_wc (base, size);#if defined(pgprot_noncached_wc)/* archs can't agree on a name ... */ iomap->prot =pgprot_noncached_wc (PAGE_KERNEL );#elif defined(pgprot_writecombine)
include/linux/mod_devicetable.h +1 -1
@@ -293,7 +293,7 @@ struct pcmcia_device_id {#define INPUT_DEVICE_ID_LED_MAX 0x0f#define INPUT_DEVICE_ID_SND_MAX 0x07#define INPUT_DEVICE_ID_FF_MAX 0x7f -#define INPUT_DEVICE_ID_SW_MAX 0x0f +#define INPUT_DEVICE_ID_SW_MAX 0x10#define INPUT_DEVICE_ID_PROP_MAX 0x1f#define INPUT_DEVICE_ID_MATCH_BUS 1
include/uapi/linux/input-event-codes.h +2 -1
@@ -793,7 +793,8 @@#define SW_LINEIN_INSERT 0x0d/* set = inserted */ #define SW_MUTE_DEVICE 0x0e/* set = device disabled */ #define SW_PEN_INSERTED 0x0f/* set = pen inserted */ -#define SW_MAX 0x0f +#define SW_MACHINE_COVER 0x10/* set = cover closed */ +#define SW_MAX 0x10#define SW_CNT (SW_MAX+1)/*
kernel/events/uprobes.c +1 -1
@@ -1893,7 +1893,7 @@ static void handle_swbp(struct pt_regs *regs)if (!uprobe) {if (is_swbp >0 ) {/* No matching uprobe; signal SIGTRAP. */ -send_sig (SIGTRAP , current,0 ); +force_sig (SIGTRAP , current); }else {/* * Either we raced with uprobe_unregister() or we can't
mm/memcontrol.c +2 -2
@@ -4883,7 +4883,6 @@ static void __mem_cgroup_clear_mc(void)if (!mem_cgroup_is_root (mc.to))page_counter_uncharge (&mc.to->memory, mc.moved_swap); -mem_cgroup_id_get_many (mc.to, mc.moved_swap);css_put_many (&mc.to->css, mc.moved_swap); mc.moved_swap =0 ;
@@ -5074,7 +5073,8 @@ static int mem_cgroup_move_charge_pte_range(pmd_t *pmd, ent = target.ent;if (!mem_cgroup_move_swap_account (ent, mc.from, mc.to)) { mc.precharge--; -/* we fixup refcnts and charges later. */ +mem_cgroup_id_get_many (mc.to,1 ); +/* we fixup other refcnts and charges later. */ mc.moved_swap++; }break ;
net/mac80211/rx.c +26 -0
@@ -2120,6 +2120,7 @@ static int ieee80211_802_1x_port_control(struct ieee80211_rx_data *rx)static int ieee80211_drop_unencrypted (struct ieee80211_rx_data *rx,__le16 fc) { +struct ieee80211_hdr *hdr = (void *)rx->skb->data;struct sk_buff *skb = rx->skb;struct ieee80211_rx_status *status =IEEE80211_SKB_RXCB (skb);
@@ -2130,6 +2131,31 @@ static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)if (status->flag &RX_FLAG_DECRYPTED )return 0 ; +/* check mesh EAPOL frames first */ +if (unlikely (rx->sta &&ieee80211_vif_is_mesh (&rx->sdata->vif) && +ieee80211_is_data (fc))) { +struct ieee80211s_hdr *mesh_hdr; +u16 hdr_len =ieee80211_hdrlen (fc); +u16 ethertype_offset; +__be16 ethertype; + +if (!ether_addr_equal (hdr->addr1, rx->sdata->vif.addr)) + goto drop_check; + +/* make sure fixed part of mesh header is there, also checks skb len */ +if (!pskb_may_pull (rx->skb, hdr_len +6 )) + goto drop_check; + + mesh_hdr = (struct ieee80211s_hdr *)(skb->data + hdr_len); + ethertype_offset = hdr_len +ieee80211_get_mesh_hdrlen (mesh_hdr) + +sizeof (rfc1042_header); + +if (skb_copy_bits (rx->skb, ethertype_offset, ðertype,2 ) ==0 && + ethertype == rx->sdata->control_port_protocol) +return 0 ; + } + +drop_check:/* Drop unencrypted frames if key is set. */ if (unlikely(!ieee80211_has_protected(fc) && !ieee80211_is_any_nullfunc(fc) &&
net/netfilter/ipvs/ip_vs_sync.c +8 -4
@@ -1726,6 +1726,8 @@ static int sync_thread_backup(void *data) {struct ip_vs_sync_thread_data *tinfo = data;struct netns_ipvs *ipvs = tinfo->ipvs; +struct sock *sk = tinfo->sock->sk; +struct udp_sock *up =udp_sk (sk);int len; pr_info("sync thread started: state = BACKUP, mcast_ifn = %s, "
@@ -1733,12 +1735,14 @@ static int sync_thread_backup(void *data) ipvs->bcfg.mcast_ifn, ipvs->bcfg.syncid, tinfo->id);while (!kthread_should_stop ()) { -wait_event_interruptible (*sk_sleep (tinfo->sock->sk), - !skb_queue_empty (&tinfo->sock->sk->sk_receive_queue) - ||kthread_should_stop ()); +wait_event_interruptible (*sk_sleep (sk), + !skb_queue_empty_lockless (&sk->sk_receive_queue) || + !skb_queue_empty_lockless (&up->reader_queue) || +kthread_should_stop ());/* do we have data now? */ -while (!skb_queue_empty (&(tinfo->sock->sk->sk_receive_queue))) { +while (!skb_queue_empty_lockless (&sk->sk_receive_queue) || + !skb_queue_empty_lockless (&up->reader_queue)) { len =ip_vs_receive (tinfo->sock, tinfo->buf, ipvs->bcfg.sync_maxlen);if (len <=0 ) {
scripts/decode_stacktrace.sh +2 -2
@@ -77,8 +77,8 @@ parse_symbol() { return fi - # Strip out the base of the path - code=${code#$basepath/} + # Strip out the base of the path on each line + code=$(while read -r line; do echo "${line#$basepath/}"; done <<< "$code") # In the case of inlines, move everything to same line code=${code//$'\n'/' '}
sound/core/info.c +3 -1
@@ -634,7 +634,9 @@ int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) {int c =-1 ; -if (snd_BUG_ON (!buffer || !buffer->buffer)) +if (snd_BUG_ON (!buffer)) +return 1 ; +if (!buffer->buffer)return 1 ;if (len <=0 || buffer->stop || buffer->error)return 1 ;
sound/soc/codecs/rt5670.h +1 -1
@@ -760,7 +760,7 @@#define RT5670_PWR_VREF2_BIT 4#define RT5670_PWR_FV2 (0x1 << 3)#define RT5670_PWR_FV2_BIT 3 -#define RT5670_LDO_SEL_MASK (0x3) +#define RT5670_LDO_SEL_MASK (0x7)#define RT5670_LDO_SEL_SFT 0/* Power Management for Analog 2 (0x64) */