Linux 3.10.39
Greg KH
maintainerI'm announcing the release of the 3.10.39 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/video4linux/gspca.txt | 1 Makefile | 2 arch/arm/boot/dts/armada-370-xp.dtsi | 1 arch/arm/boot/dts/exynos5250-arndale.dts | 1 arch/arm/include/asm/div64.h | 2 arch/arm/include/asm/futex.h | 6 - arch/arm/include/asm/io.h | 8 +- arch/arm/include/asm/pgtable-2level.h | 1 arch/arm/include/asm/unistd.h | 1 arch/arm/kernel/machine_kexec.c | 7 + arch/arm/mach-ebsa110/core.c | 2 arch/arm/mach-imx/mm-imx3.c | 2 arch/arm/mach-iop13xx/io.c | 2 arch/arm/mach-ixp4xx/common.c | 2 arch/arm/mach-msm/common.h | 2 arch/arm/mach-msm/io.c | 2 arch/arm/mach-omap2/irq.c | 8 ++ arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 4 - arch/arm/mach-omap2/pm.h | 2 arch/arm/mm/Kconfig | 3 arch/arm/mm/ioremap.c | 10 +- arch/arm/mm/mmu.c | 10 ++ arch/arm/mm/nommu.c | 6 - arch/arm/mm/proc-macros.S | 19 +---- arch/arm/mm/proc-v7-2level.S | 7 - arch/arm64/include/asm/pgtable.h | 8 +- arch/s390/include/asm/ccwdev.h | 2 arch/sh/kernel/dumpstack.c | 2 arch/x86/boot/compressed/eboot.c | 5 - arch/x86/boot/compressed/head_32.S | 14 ++- arch/x86/boot/compressed/head_64.S | 9 -- arch/x86/kernel/ftrace.c | 2 arch/x86/kernel/ldt.c | 11 +++ drivers/block/mtip32xx/mtip32xx.c | 1 drivers/iio/industrialio-buffer.c | 6 + drivers/infiniband/hw/ehca/ehca_cq.c | 1 drivers/infiniband/hw/ipath/ipath_diag.c | 66 ++++++------------ drivers/infiniband/hw/mthca/mthca_provider.c | 1 drivers/infiniband/hw/nes/nes_verbs.c | 2 drivers/infiniband/ulp/srpt/ib_srpt.c | 16 ++-- drivers/media/dvb-frontends/m88rs2000.c | 19 ++++- drivers/media/pci/saa7134/saa7134-cards.c | 4 - drivers/media/platform/omap3isp/isppreview.c | 9 ++ drivers/media/usb/em28xx/em28xx-dvb.c | 3 drivers/media/usb/gspca/sn9c20x.c | 1 drivers/media/usb/uvc/uvc_video.c | 20 +++++ drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 4 - drivers/mfd/88pm860x-core.c | 6 + drivers/mfd/max77686.c | 4 + drivers/mfd/max77693.c | 12 +++ drivers/mfd/max8925-i2c.c | 9 ++ drivers/mfd/max8997.c | 18 ++++ drivers/mfd/max8998.c | 4 + drivers/mfd/sec-core.c | 4 + drivers/mfd/tps65910.c | 4 - drivers/misc/mei/hw-me-regs.h | 5 + drivers/misc/mei/pci-me.c | 30 ++++++-- drivers/s390/char/con3215.c | 2 drivers/s390/char/con3270.c | 6 - drivers/s390/char/raw3270.c | 10 ++ drivers/s390/char/raw3270.h | 2 drivers/s390/cio/device.c | 3 drivers/scsi/arcmsr/arcmsr_hba.c | 7 - drivers/scsi/qla2xxx/qla_os.c | 6 - drivers/staging/rtl8712/rtl871x_recv.c | 13 +-- drivers/staging/serqt_usb2/serqt_usb2.c | 2 drivers/target/iscsi/iscsi_target.c | 4 - drivers/target/tcm_fc/tfc_sess.c | 1 drivers/tty/hvc/hvc_console.c | 6 + drivers/usb/core/driver.c | 94 +++++++++++++++----------- drivers/usb/core/hcd-pci.c | 2 drivers/usb/core/hub.c | 5 - drivers/usb/core/usb.h | 2 drivers/usb/dwc3/core.h | 6 - drivers/usb/gadget/tcm_usb_gadget.c | 2 drivers/usb/gadget/zero.c | 2 drivers/usb/host/xhci-pci.c | 15 +++- drivers/usb/host/xhci.c | 6 - drivers/usb/musb/musb_core.c | 5 - drivers/usb/phy/phy-ulpi.c | 2 drivers/usb/serial/pl2303.c | 3 drivers/usb/serial/pl2303.h | 5 + drivers/w1/w1_netlink.c | 25 +++--- fs/ext4/file.c | 2 fs/ext4/xattr.c | 23 +++++- fs/nfsd/nfs4callback.c | 4 - fs/nfsd/nfs4proc.c | 9 ++ fs/nfsd/nfs4state.c | 13 +-- fs/nfsd/nfs4xdr.c | 5 + fs/nfsd/nfsctl.c | 5 + fs/nfsd/vfs.c | 9 ++ fs/ocfs2/buffer_head_io.c | 2 fs/ocfs2/dlm/dlmrecovery.c | 29 +++++--- fs/reiserfs/dir.c | 6 + fs/xfs/xfs_da_btree.c | 2 include/linux/sunrpc/svcsock.h | 1 kernel/sysctl.c | 6 + mm/hugetlb.c | 1 mm/mlock.c | 2 mm/rmap.c | 14 +++ net/sunrpc/svcsock.c | 16 ++++ sound/pci/hda/patch_realtek.c | 8 +- sound/pci/ice1712/ice1712.c | 15 ++-- sound/soc/codecs/cs42l51.c | 9 +- sound/soc/codecs/cs42l52.c | 8 +- sound/soc/codecs/cs42l73.c | 6 - 106 files changed, 560 insertions(+), 284 deletions(-)
Aaron Sanders (1):
USB: pl2303: add ids for Hewlett-Packard HP POS pole displays
Alan Stern (2):
USB: fix crash during hotplug of PCI USB controller card
USB: unbind all interfaces before rebinding any
Alec Berg (1):
iio: querying buffer scan_mask should return 0/1
Andy Grover (1):
target/tcm_fc: Fix use-after-free of ft_tpg
Antti Palosaari (1):
media: em28xx: fix PCTV 290e LNA oops
Brian Austin (3):
ASoC: cs42l51: Fix SOC_DOUBLE_R_SX_TLV shift values for ADC, PCM, and Analog kcontrols
ASoC: cs42l52: Fix mask bits for SOC_VALUE_ENUM_SINGLE
ASoC: cs42l73: Fix mask bits for SOC_VALUE_ENUM_SINGLE
Catalin Marinas (2):
arm64: Do not synchronise I and D caches for special ptes
arm64: Make DMA coherent and strongly ordered mappings not executable
Christopher Covington (1):
ARM: 8007/1: Remove extraneous kcmp syscall ignore
Dan Carpenter (2):
SCSI: qla2xxx: fix error handling of qla2x00_mem_alloc()
SCSI: arcmsr: upper 32 of dma address lost
David Cohen (1):
usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PM
David Fries (1):
w1: fix w1_send_slave dropping a slave id
Dennis Dalessandro (1):
IB/ipath: Fix potential buffer overrun in sending diag packet routine
Felipe Balbi (1):
usb: musb: avoid NULL pointer dereference
Felipe Franciosi (1):
mtip32xx: Set queue bounce limit
Florian Vaussard (1):
media: omap3isp: preview: Fix the crop margins
Greg Kroah-Hartman (1):
Linux 3.10.39
H. Peter Anvin (1):
x86-64, modify_ldt: Ban 16-bit segments on 64-bit kernels
Hans Verkuil (2):
media: v4l2-compat-ioctl32: fix wrong VIDIOC_SUBDEV_G/S_EDID32 support
media: saa7134: fix WARN_ON during resume
Himangi Saraogi (1):
staging:serqt_usb2: Fix sparse warning restricted __le16 degrades to integer
Huang Rui (1):
usb: dwc3: fix wrong bit mask in dwc3_event_devt
Igor Gnatenko (1):
xhci: extend quirk for Renesas cards
J. Bruce Fields (5):
nfsd4: session needs room for following op to error out
nfsd4: buffer-length check for SUPPATTR_EXCLCREAT
nfsd4: fix test_stateid error reply encoding
nfsd: notify_change needs elevated write count
nfsd4: fix setclientid encode size
Jan Kara (1):
ext4: fix jbd2 warning under heavy xattr load
Jeff Layton (1):
nfsd: set timeparms.to_maxval in setup_callback_client
Jeff Mahoney (1):
reiserfs: fix race in readdir
Junxiao Bi (2):
ocfs2: dlm: fix lock migration crash
ocfs2: dlm: fix recovery hung
Kailang Yang (1):
ALSA: hda/realtek - Add support of ALC288 codec
Kees Cook (1):
usb: gadget: tcm_usb_gadget: stop format strings
Kinglong Mee (1):
NFSD: Traverse unconfirmed client through hash-table
Krzysztof Kozlowski (9):
mfd: sec-core: Fix possible NULL pointer dereference when i2c_new_dummy error
mfd: 88pm860x: Fix possible NULL pointer dereference on i2c_new_dummy error
mfd: 88pm860x: Fix I2C device resource leak on regmap init fail
mfd: max77686: Fix possible NULL pointer dereference on i2c_new_dummy error
mfd: max77693: Fix possible NULL pointer dereference on i2c_new_dummy error
mfd: max8925: Fix possible NULL pointer dereference on i2c_new_dummy error
mfd: max8998: Fix possible NULL pointer dereference on i2c_new_dummy error
mfd: max8997: Fix possible NULL pointer dereference on i2c_new_dummy error
mfd: tps65910: Fix possible invalid pointer dereference on regmap_add_irq_chip fail
Larry Finger (1):
staging: r8712u: Fix case where ethtype was never obtained and always be checked against 0
Laura Abbott (1):
ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions
Liu Hua (2):
ARM: 8030/1: ARM : kdump : add arch_crash_save_vmcoreinfo
hung_task: check the value of "sysctl_hung_task_timeout_sec"
Malcolm Priestley (2):
media: m88rs2000: prevent frontend crash on continuous transponder scans
media: m88rs2000: add caps FE_CAN_INVERSION_AUTO
Mark Tinguely (1):
xfs: fix directory hash ordering bug
Mathias Nyman (1):
xhci: Prevent runtime pm from autosuspending during initialization
Matt Fleming (2):
x86/efi: Correct EFI boot stub use of code32_start
sh: fix format string bug in stack tracer
Michal Simek (1):
usb: phy: Add ulpi IDs for SMSC USB3320 and TI TUSB1210
Mike Marciniszyn (1):
ib_srpt: Use correct ib_sg_dma primitives
Mizuma, Masayoshi (1):
mm: hugetlb: fix softlockup when a large number of hugepages are freed.
Nicholas Bellinger (1):
iscsi-target: Fix ERL=2 ASYNC_EVENT connection pointer bug
Nishanth Menon (1):
ARM: OMAP4: Fix definition of IS_PM44XX_ERRATUM
Oleksij Rempel (1):
media: uvcvideo: Do not use usb_set_interface on bulk EP
Paul Gortmaker (1):
hvc: ensure hvc_init is only ever called once in hvc_console.c
Petr Mladek (1):
ftrace/x86: One more missing sync after fixup of function modification failure
Roger Quadros (2):
ARM: OMAP3: hwmod data: Correct clock domains for USB modules
usb: gadget: zero: Fix SuperSpeed enumeration for alternate setting 1
Sebastian Ott (1):
s390/cio: fix driver callback initialization for ccw consoles
Stanislav Kinsbursky (1):
nfsd: check passed socket's net matches NFSd superblock's one
Stefan Sørensen (1):
ARM: OMAP2+: INTC: Acknowledge stuck active interrupts
Takashi Iwai (2):
ALSA: ice1712: Fix boundary checks in PCM pointer ops
ALSA: hda - Fix silent speaker output due to mute LED fixup
Theodore Ts'o (1):
ext4: use i_size_read in ext4_unaligned_aio()
Thomas Petazzoni (1):
ARM: mvebu: ensure the mdio node has a clock reference on Armada 370/XP
Tomas Winkler (1):
mei: me: do not load the driver if the FW doesn't support MEI interface
Tomasz Figa (1):
ARM: dts: Keep G3D regulator always on for exynos5250-arndale
Vlastimil Babka (1):
mm: try_to_unmap_cluster() should lock_page() before mlocking
W. Trevor King (1):
ALSA: hda - Enable beep for ASUS 1015E
Will Deacon (1):
ARM: 7954/1: mm: remove remaining domain support from ARMv6
Wolfram Sang (1):
media: media: gspca: sn9c20x: add ID for Genius Look 1320 V2
Xiangyu Lu (1):
ARM: 8027/1: fix do_div() bug in big-endian systems
Yann Droneaud (3):
IB/nes: Return an error on ib_copy_from_udata() failure instead of NULL IB/mthca: Return an error on ib_copy_to_udata() failure IB/ehca: Returns an error on ib_copy_to_udata() failure
alex chen (1):
ocfs2: do not put bh when buffer_uptodate failed
Greg KH
maintainerDocumentation/video4linux/gspca.txt +1 -0
@@ -55,6 +55,7 @@ zc3xx 0458:700f Genius VideoCam Web V2 sonixj 0458:7025 Genius Eye 311Q sn9c20x 0458:7029 Genius Look 320s sonixj 0458:702e Genius Slim 310 NB +sn9c20x 0458:7045 Genius Look 1320 V2 sn9c20x 0458:704a Genius Slim 1320 sn9c20x 0458:704c Genius i-Look 1321 sn9c20x 045e:00f4 LifeCam VX-6000 (SN9C20x + OV9650)
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 38 +SUBLEVEL = 39 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm/boot/dts/armada-370-xp.dtsi +1 -0
@@ -92,6 +92,7 @@ #size-cells = <0>; compatible = "marvell,orion-mdio"; reg = <0x72004 0x4>; + clocks = <&gateclk 4>; }; ethernet@70000 {
arch/arm/boot/dts/exynos5250-arndale.dts +1 -0
@@ -263,6 +263,7 @@ regulator-name = "vdd_g3d"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <1000000>; + regulator-always-on; regulator-boot-on; op_mode = <1>; };
arch/arm/include/asm/div64.h +1 -1
@@ -156,7 +156,7 @@/* Select the best insn combination to perform the */ \/* actual __m * __n / (__p << 64) operation. */ \if (!__c) { \ - asm ("umull %Q0, %R0, %1, %Q2\n\t" \ + asm ("umull %Q0, %R0, %Q1, %Q2\n\t" \"mov %Q0, #0" \ :"=&r" (__res) \ : "r" (__m), "r" (__n) \
arch/arm/include/asm/futex.h +0 -6
@@ -3,11 +3,6 @@#ifdef __KERNEL__ -#if defined(CONFIG_CPU_USE_DOMAINS ) && defined(CONFIG_SMP ) -/* ARM doesn't provide unprivileged exclusive memory accessors */ -#include <asm-generic/futex.h> -#else -#include <linux/futex.h> #include <linux/uaccess.h> #include <asm/errno.h>
@@ -164,6 +159,5 @@ futex_atomic_op_inuser (int encoded_op, u32 __user *uaddr)return ret; } -#endif /* !(CPU_USE_DOMAINS && SMP) */ #endif /* __KERNEL__ */ #endif /* _ASM_ARM_FUTEX_H */
arch/arm/include/asm/io.h +4 -4
@@ -130,16 +130,16 @@ static inline u32 __raw_readl(const volatile void __iomem *addr)*/ extern void __iomem *__arm_ioremap_pfn_caller (unsigned long ,unsigned long ,size_t ,unsigned int ,void *); -extern void __iomem *__arm_ioremap_caller (unsigned long ,size_t ,unsigned int , +extern void __iomem *__arm_ioremap_caller (phys_addr_t ,size_t ,unsigned int ,void *);extern void __iomem *__arm_ioremap_pfn (unsigned long ,unsigned long ,size_t ,unsigned int ); -extern void __iomem *__arm_ioremap (unsigned long ,size_t ,unsigned int ); -extern void __iomem *__arm_ioremap_exec (unsigned long ,size_t ,bool cached); +extern void __iomem *__arm_ioremap (phys_addr_t ,size_t ,unsigned int ); +extern void __iomem *__arm_ioremap_exec (phys_addr_t ,size_t ,bool cached);extern void __iounmap (volatile void __iomem *addr);extern void __arm_iounmap (volatile void __iomem *addr); -extern void __iomem * (*arch_ioremap_caller)(unsigned long ,size_t , +extern void __iomem * (*arch_ioremap_caller)(phys_addr_t ,size_t ,unsigned int ,void *);extern void (*arch_iounmap)(volatile void __iomem *);
arch/arm/include/asm/pgtable-2level.h +1 -0
@@ -140,6 +140,7 @@#define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 0x0c) << 2)/* 1100 */ #define L_PTE_MT_DEV_WC (_AT(pteval_t, 0x09) << 2)/* 1001 */ #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2)/* 1011 */ +#define L_PTE_MT_VECTORS (_AT(pteval_t, 0x0f) << 2)/* 1111 */ #define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2)#ifndef __ASSEMBLY__
arch/arm/include/asm/unistd.h +0 -1
@@ -48,6 +48,5 @@*/ #define __IGNORE_fadvise64_64#define __IGNORE_migrate_pages -#define __IGNORE_kcmp#endif /* __ASM_ARM_UNISTD_H */
arch/arm/kernel/machine_kexec.c +7 -0
@@ -169,3 +169,10 @@ void machine_kexec(struct kimage *image)soft_restart (reboot_code_buffer_phys); } + +void arch_crash_save_vmcoreinfo (void ) +{ +#ifdef CONFIG_ARM_LPAE +VMCOREINFO_CONFIG (ARM_LPAE ); +#endif +}
arch/arm/mach-ebsa110/core.c +1 -1
@@ -116,7 +116,7 @@ static void __init ebsa110_map_io(void)iotable_init (ebsa110_io_desc,ARRAY_SIZE (ebsa110_io_desc)); } -static void __iomem *ebsa110_ioremap_caller (unsigned long cookie,size_t size, +static void __iomem *ebsa110_ioremap_caller (phys_addr_t cookie,size_t size,unsigned int flags,void *caller) {return (void __iomem *)cookie;
arch/arm/mach-imx/mm-imx3.c +1 -1
@@ -65,7 +65,7 @@ static void imx3_idle(void) : "=r" (reg)); } -static void __iomem *imx3_ioremap_caller (unsigned long phys_addr,size_t size, +static void __iomem *imx3_ioremap_caller (phys_addr_t phys_addr,size_t size,unsigned int mtype,void *caller) {if (mtype ==MT_DEVICE ) {
arch/arm/mach-iop13xx/io.c +1 -1
@@ -23,7 +23,7 @@#include "pci.h" -static void __iomem *__iop13xx_ioremap_caller (unsigned long cookie, +static void __iomem *__iop13xx_ioremap_caller (phys_addr_t cookie,size_t size,unsigned int mtype,void *caller) {void __iomem * retval;
arch/arm/mach-ixp4xx/common.c +1 -1
@@ -559,7 +559,7 @@ void ixp4xx_restart(char mode, const char *cmd)* fallback to the default. */ -static void __iomem *ixp4xx_ioremap_caller (unsigned long addr,size_t size, +static void __iomem *ixp4xx_ioremap_caller (phys_addr_t addr,size_t size,unsigned int mtype,void *caller) {if (!is_pci_memory (addr))
arch/arm/mach-msm/common.h +1 -1
@@ -23,7 +23,7 @@ extern void msm_map_msm8x60_io(void);extern void msm_map_msm8960_io (void );extern void msm_map_qsd8x50_io (void ); -extern void __iomem *__msm_ioremap_caller (unsigned long phys_addr,size_t size, +extern void __iomem *__msm_ioremap_caller (phys_addr_t phys_addr,size_t size,unsigned int mtype,void *caller);extern struct smp_operations msm_smp_ops;
arch/arm/mach-msm/io.c +1 -1
@@ -172,7 +172,7 @@ void __init msm_map_msm7x30_io(void) }#endif /* CONFIG_ARCH_MSM7X30 */ -void __iomem *__msm_ioremap_caller (unsigned long phys_addr,size_t size, +void __iomem *__msm_ioremap_caller (phys_addr_t phys_addr,size_t size,unsigned int mtype,void *caller) {if (mtype ==MT_DEVICE ) {
arch/arm/mach-omap2/irq.c +8 -0
@@ -222,6 +222,7 @@ void __init ti81xx_init_irq(void)static inline void omap_intc_handle_irq (void __iomem *base_addr,struct pt_regs *regs) {u32 irqnr; +int handled_irq =0 ; do { irqnr = readl_relaxed(base_addr + 0x98);
@@ -249,8 +250,15 @@ out:if (irqnr) { irqnr =irq_find_mapping (domain, irqnr);handle_IRQ (irqnr, regs); + handled_irq =1 ; } }while (irqnr); + +/* If an irq is masked or deasserted while active, we will +* keep ending up here with no irq handled. So remove it from +* the INTC with an ack.*/ +if (!handled_irq) +omap_ack_irq (NULL ); } asmlinkage void __exception_irq_entry omap2_intc_handle_irq(struct pt_regs *regs)
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +2 -2
@@ -1955,7 +1955,7 @@ static struct omap_hwmod_irq_info omap3xxx_usb_host_hs_irqs[] = {static struct omap_hwmod omap3xxx_usb_host_hs_hwmod = { .name ="usb_host_hs" , .class = &omap3xxx_usb_host_hs_hwmod_class, - .clkdm_name ="l3_init_clkdm" , + .clkdm_name ="usbhost_clkdm" , .mpu_irqs = omap3xxx_usb_host_hs_irqs, .main_clk ="usbhost_48m_fck" , .prcm = {
@@ -2040,7 +2040,7 @@ static struct omap_hwmod_irq_info omap3xxx_usb_tll_hs_irqs[] = {static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = { .name ="usb_tll_hs" , .class = &omap3xxx_usb_tll_hs_hwmod_class, - .clkdm_name ="l3_init_clkdm" , + .clkdm_name ="core_l4_clkdm" , .mpu_irqs = omap3xxx_usb_tll_hs_irqs, .main_clk ="usbtll_fck" , .prcm = {
arch/arm/mach-omap2/pm.h +1 -1
@@ -103,7 +103,7 @@ static inline void enable_omap3630_toggle_l2_on_restore(void) { }#define PM_OMAP4_ROM_SMP_BOOT_ERRATUM_GICD (1 << 0) -#if defined(CONFIG_ARCH_OMAP4 ) +#if defined(CONFIG_PM ) && defined(CONFIG_ARCH_OMAP4 )extern u16 pm44xx_errata;#define IS_PM44XX_ERRATUM (id) (pm44xx_errata & (id))#else
arch/arm/mm/Kconfig +1 -2
@@ -436,7 +436,6 @@ config CPU_32v5 config CPU_32v6 bool - select CPU_USE_DOMAINS if CPU_V6 && MMU select TLS_REG_EMUL if !CPU_32v6K && !MMU config CPU_32v6K
@@ -651,7 +650,7 @@ config ARM_VIRT_EXT config SWP_EMULATE bool "Emulate SWP/SWPB instructions" - depends on !CPU_USE_DOMAINS && CPU_V7 + depends on CPU_V7 default y if SMP select HAVE_PROC_CPU if PROC_FS help
arch/arm/mm/ioremap.c +5 -5
@@ -331,10 +331,10 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,return (void __iomem *) (offset + addr); } -void __iomem *__arm_ioremap_caller (unsigned long phys_addr,size_t size, +void __iomem *__arm_ioremap_caller (phys_addr_t phys_addr,size_t size,unsigned int mtype,void *caller) { -unsigned long last_addr; +phys_addr_t last_addr;unsigned long offset = phys_addr & ~PAGE_MASK ;unsigned long pfn =__phys_to_pfn (phys_addr);
@@ -367,12 +367,12 @@ __arm_ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, }EXPORT_SYMBOL (__arm_ioremap_pfn); -void __iomem * (*arch_ioremap_caller)(unsigned long ,size_t , +void __iomem * (*arch_ioremap_caller)(phys_addr_t ,size_t ,unsigned int ,void *) = __arm_ioremap_caller;void __iomem * -__arm_ioremap (unsigned long phys_addr,size_t size,unsigned int mtype) +__arm_ioremap (phys_addr_t phys_addr,size_t size,unsigned int mtype) {return arch_ioremap_caller (phys_addr, size, mtype,__builtin_return_address (0 ));
@@ -387,7 +387,7 @@ EXPORT_SYMBOL(__arm_ioremap);* CONFIG_GENERIC_ALLOCATOR for allocating external memory. */ void __iomem * -__arm_ioremap_exec (unsigned long phys_addr,size_t size,bool cached) +__arm_ioremap_exec (phys_addr_t phys_addr,size_t size,bool cached) {unsigned int mtype;
arch/arm/mm/mmu.c +10 -0
@@ -459,6 +459,16 @@ static void __init build_mem_type_table(void) hyp_device_pgprot = s2_device_pgprot = mem_types[MT_DEVICE ].prot_pte;/* +* We don't use domains on ARMv6 (since this causes problems with +* v6/v7 kernels), so we must use a separate memory type for user +* r/o, kernel r/w to map the vectors page. +*/ +#ifndef CONFIG_ARM_LPAE +if (cpu_arch == CPU_ARCH_ARMv6) + vecs_pgprot |=L_PTE_MT_VECTORS ; +#endif + +/* * ARMv6 and above have extended page tables. */ if (cpu_arch >= CPU_ARCH_ARMv6 && (cr &CR_XP )) {
arch/arm/mm/nommu.c +3 -3
@@ -87,16 +87,16 @@ void __iomem *__arm_ioremap_pfn_caller(unsigned long pfn, unsigned long offset,return __arm_ioremap_pfn (pfn, offset, size, mtype); } -void __iomem *__arm_ioremap (unsigned long phys_addr,size_t size, +void __iomem *__arm_ioremap (phys_addr_t phys_addr,size_t size,unsigned int mtype) {return (void __iomem *)phys_addr; }EXPORT_SYMBOL (__arm_ioremap); -void __iomem * (*arch_ioremap_caller)(unsigned long ,size_t ,unsigned int ,void *); +void __iomem * (*arch_ioremap_caller)(phys_addr_t ,size_t ,unsigned int ,void *); -void __iomem *__arm_ioremap_caller (unsigned long phys_addr,size_t size, +void __iomem *__arm_ioremap_caller (phys_addr_t phys_addr,size_t size,unsigned int mtype,void *caller) {return __arm_ioremap (phys_addr, size, mtype);
arch/arm/mm/proc-macros.S +6 -13
@@ -112,13 +112,9 @@ * 100x 1 0 1 r/o no acc * 10x0 1 0 1 r/o no acc * 1011 0 0 1 r/w no acc - * 110x 0 1 0 r/w r/o - * 11x0 0 1 0 r/w r/o - * 1111 0 1 1 r/w r/w - * - * If !CONFIG_CPU_USE_DOMAINS, the following permissions are changed: * 110x 1 1 1 r/o r/o * 11x0 1 1 1 r/o r/o + * 1111 0 1 1 r/w r/w */ .macro armv6_mt_table pfx \pfx\()_mt_table:
@@ -137,7 +133,7 @@ .long PTE_EXT_TEX(2) @ L_PTE_MT_DEV_NONSHARED .long 0x00 @ unused .long 0x00 @ unused - .long 0x00 @ unused + .long PTE_CACHEABLE | PTE_BUFFERABLE | PTE_EXT_APX @ L_PTE_MT_VECTORS .endm .macro armv6_set_pte_ext pfx
@@ -158,24 +154,21 @@ tst r1, #L_PTE_USER orrne r3, r3, #PTE_EXT_AP1 -#ifdef CONFIG_CPU_USE_DOMAINS - @ allow kernel read/write access to read-only user pages tstne r3, #PTE_EXT_APX - bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 -#endif + + @ user read-only -> kernel read-only + bicne r3, r3, #PTE_EXT_AP0 tst r1, #L_PTE_XN orrne r3, r3, #PTE_EXT_XN - orr r3, r3, r2 + eor r3, r3, r2 tst r1, #L_PTE_YOUNG tstne r1, #L_PTE_PRESENT moveq r3, #0 -#ifndef CONFIG_CPU_USE_DOMAINS tstne r1, #L_PTE_NONE movne r3, #0 -#endif str r3, [r0] mcr p15, 0, r0, c7, c10, 1 @ flush_pte
arch/arm/mm/proc-v7-2level.S +0 -7
@@ -90,21 +90,14 @@ ENTRY(cpu_v7_set_pte_ext) tst r1, #L_PTE_USER orrne r3, r3, #PTE_EXT_AP1 -#ifdef CONFIG_CPU_USE_DOMAINS - @ allow kernel read/write access to read-only user pages - tstne r3, #PTE_EXT_APX - bicne r3, r3, #PTE_EXT_APX | PTE_EXT_AP0 -#endif tst r1, #L_PTE_XN orrne r3, r3, #PTE_EXT_XN tst r1, #L_PTE_YOUNG tstne r1, #L_PTE_VALID -#ifndef CONFIG_CPU_USE_DOMAINS eorne r1, r1, #L_PTE_NONE tstne r1, #L_PTE_NONE -#endif moveq r3, #0 ARM( str r3, [r0, #2048]! )
arch/arm64/include/asm/pgtable.h +4 -4
@@ -161,7 +161,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pte) { if (pte_valid_user(pte)) { - if (pte_exec(pte)) +if (!pte_special (pte) &&pte_exec (pte))__sync_icache_dcache (pte, addr);if (!pte_dirty (pte)) pte =pte_wrprotect (pte);
@@ -182,11 +182,11 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,* Mark the prot value as uncacheable and unbufferable. */ #define pgprot_noncached (prot) \ - __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE)) + __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_DEVICE_nGnRnE) | PTE_PXN | PTE_UXN)#define pgprot_writecombine (prot) \ - __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC)) + __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)#define pgprot_dmacoherent (prot) \ - __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC)) + __pgprot_modify(prot, PTE_ATTRINDX_MASK, PTE_ATTRINDX(MT_NORMAL_NC) | PTE_PXN | PTE_UXN)#define __HAVE_PHYS_MEM_ACCESS_PROTstruct file ; extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
arch/s390/include/asm/ccwdev.h +1 -1
@@ -219,7 +219,7 @@ extern void ccw_device_get_id(struct ccw_device *, struct ccw_dev_id *);#define to_ccwdev (n) container_of(n, struct ccw_device, dev)#define to_ccwdrv (n) container_of(n, struct ccw_driver, driver) -extern struct ccw_device *ccw_device_probe_console (void ); +extern struct ccw_device *ccw_device_probe_console (struct ccw_driver *);extern void ccw_device_wait_idle (struct ccw_device *);extern int ccw_device_force_console (struct ccw_device *);
arch/sh/kernel/dumpstack.c +1 -1
@@ -115,7 +115,7 @@ static int print_trace_stack(void *data, char *name)*/ static void print_trace_address (void *data,unsigned long addr,int reliable) { -printk (data); +printk ("%s" , (char *)data);printk_address (addr, reliable); }
arch/x86/boot/compressed/eboot.c +3 -2
@@ -865,6 +865,9 @@ fail:* Because the x86 boot code expects to be passed a boot_params we * need to create one ourselves (usually the bootloader would create * one for us). +* +* The caller is responsible for filling out ->code32_start in the +* returned boot_params. */ struct boot_params *make_boot_params (void *handle,efi_system_table_t *_table) {
@@ -921,8 +924,6 @@ struct boot_params *make_boot_params(void *handle, efi_system_table_t *_table) hdr->vid_mode =0xffff ; hdr->boot_flag =0xAA55 ; - hdr->code32_start = (__u64 )(unsigned long )image->image_base; - hdr->type_of_loader =0x21 ;/* Convert unicode cmdline to ascii */
arch/x86/boot/compressed/head_32.S +8 -6
@@ -50,6 +50,13 @@ ENTRY(efi_pe_entry) pushl %eax pushl %esi pushl %ecx + + call reloc +reloc: + popl %ecx + subl reloc, %ecx + movl %ecx, BP_code32_start(%eax) + sub $0x4, %esp ENTRY(efi_stub_entry)
@@ -63,12 +70,7 @@ ENTRY(efi_stub_entry) hlt jmp 1b 2: - call 3f -3: - popl %eax - subl $3b, %eax - subl BP_pref_address(%esi), %eax - add BP_code32_start(%esi), %eax + movl BP_code32_start(%esi), %eax leal preferred_addr(%eax), %eax jmp *%eax
arch/x86/boot/compressed/head_64.S +3 -6
@@ -217,6 +217,8 @@ ENTRY(efi_pe_entry) cmpq $0,%rax je 1f mov %rax, %rdx + leaq startup_32(%rip), %rax + movl %eax, BP_code32_start(%rdx) popq %rsi popq %rdi
@@ -230,12 +232,7 @@ ENTRY(efi_stub_entry) hlt jmp 1b 2: - call 3f -3: - popq %rax - subq $3b, %rax - subq BP_pref_address(%rsi), %rax - add BP_code32_start(%esi), %eax + movl BP_code32_start(%esi), %eax leaq preferred_addr(%rax), %rax jmp *%rax
arch/x86/kernel/ftrace.c +1 -1
@@ -659,8 +659,8 @@ ftrace_modify_code(unsigned long ip, unsigned const char *old_code, ret = -EPERM ; goto out; } -run_sync (); out: +run_sync ();return ret; fail_update:
arch/x86/kernel/ldt.c +11 -0
@@ -229,6 +229,17 @@ static int write_ldt(void __user *ptr, unsigned long bytecount, int oldmode) } } +/* +* On x86-64 we do not support 16-bit segments due to +* IRET leaking the high bits of the kernel stack address. +*/ +#ifdef CONFIG_X86_64 +if (!ldt_info.seg_32bit) { + error = -EINVAL ; + goto out_unlock; + } +#endif +fill_ldt (&ldt, &ldt_info);if (oldmode) ldt.avl =0 ;
drivers/block/mtip32xx/mtip32xx.c +1 -0
@@ -4040,6 +4040,7 @@ skip_create_disk:blk_queue_max_hw_sectors (dd->queue,0xffff );blk_queue_max_segment_size (dd->queue,0x400000 );blk_queue_io_min (dd->queue,4096 ); +blk_queue_bounce_limit (dd->queue, dd->pdev->dma_mask);/* * write back cache is not supported in the device. FUA depends on
drivers/iio/industrialio-buffer.c +4 -2
@@ -119,7 +119,8 @@ static ssize_t iio_scan_el_show(struct device *dev,int ret;struct iio_dev *indio_dev =dev_to_iio_dev (dev); - ret =test_bit (to_iio_dev_attr (attr)->address, +/* Ensure ret is 0 or 1. */ + ret = !!test_bit (to_iio_dev_attr (attr)->address, indio_dev->buffer->scan_mask);return sprintf (buf,"%d\n" , ret);
@@ -762,7 +763,8 @@ int iio_scan_mask_query(struct iio_dev *indio_dev,if (!buffer->scan_mask)return 0 ; -return test_bit (bit, buffer->scan_mask); +/* Ensure return value is 0 or 1. */ +return !!test_bit (bit, buffer->scan_mask); };EXPORT_SYMBOL_GPL (iio_scan_mask_query);
drivers/infiniband/hw/ehca/ehca_cq.c +1 -0
@@ -283,6 +283,7 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector, (my_cq->galpas.user.fw_handle & (PAGE_SIZE -1 ));if (ib_copy_to_udata (udata, &resp,sizeof (resp))) {ehca_err (device,"Copy to udata failed." ); + cq =ERR_PTR (-EFAULT ); goto create_cq_exit4; } }
drivers/infiniband/hw/ipath/ipath_diag.c +25 -41
110 lines not on this page · raw message
drivers/infiniband/hw/mthca/mthca_provider.c +1 -0
@@ -695,6 +695,7 @@ static struct ib_cq *mthca_create_cq(struct ib_device *ibdev, int entries,if (context &&ib_copy_to_udata (udata, &cq->cqn,sizeof (__u32))) {mthca_free_cq (to_mdev (ibdev), cq); + err = -EFAULT ; goto err_free; }
drivers/infiniband/hw/nes/nes_verbs.c +1 -1
@@ -1186,7 +1186,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,nes_free_resource (nesadapter, nesadapter->allocated_qps, qp_num);kfree (nesqp->allocated_buffer);nes_debug (NES_DBG_QP ,"ib_copy_from_udata() Failed \n" ); -return NULL ; +return ERR_PTR (-EFAULT ); }if (req.user_wqe_buffers) { virt_wqs =1 ;
drivers/infiniband/ulp/srpt/ib_srpt.c +10 -6
@@ -1078,6 +1078,7 @@ static void srpt_unmap_sg_to_ib_sge(struct srpt_rdma_ch *ch,static int srpt_map_sg_to_ib_sge (struct srpt_rdma_ch *ch,struct srpt_send_ioctx *ioctx) { +struct ib_device *dev = ch->sport->sdev->device;struct se_cmd *cmd;struct scatterlist *sg, *sg_orig;int sg_cnt;
@@ -1124,7 +1125,7 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch, db = ioctx->rbufs; tsize = cmd->data_length; - dma_len =sg_dma_len (&sg[0 ]); + dma_len =ib_sg_dma_len (dev, &sg[0 ]); riu = ioctx->rdma_ius;/*
@@ -1155,7 +1156,8 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch, ++j;if (j < count) { sg =sg_next (sg); - dma_len =sg_dma_len (sg); + dma_len =ib_sg_dma_len ( + dev, sg); } } }else {
@@ -1192,8 +1194,8 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch, tsize = cmd->data_length; riu = ioctx->rdma_ius; sg = sg_orig; - dma_len =sg_dma_len (&sg[0 ]); - dma_addr =sg_dma_address (&sg[0 ]); + dma_len =ib_sg_dma_len (dev, &sg[0 ]); + dma_addr =ib_sg_dma_address (dev, &sg[0 ]);/* this second loop is really mapped sg_addres to rdma_iu->ib_sge */ for (i = 0, j = 0;
@@ -1216,8 +1218,10 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch, ++j;if (j < count) { sg =sg_next (sg); - dma_len =sg_dma_len (sg); - dma_addr =sg_dma_address (sg); + dma_len =ib_sg_dma_len ( + dev, sg); + dma_addr =ib_sg_dma_address ( + dev, sg); } } }else {
drivers/media/dvb-frontends/m88rs2000.c +18 -1
@@ -712,6 +712,22 @@ static int m88rs2000_get_frontend(struct dvb_frontend *fe)return 0 ; } +static int m88rs2000_get_tune_settings (struct dvb_frontend *fe, +struct dvb_frontend_tune_settings *tune) +{ +struct dtv_frontend_properties *c = &fe->dtv_property_cache; + +if (c->symbol_rate >3000000 ) + tune->min_delay_ms =2000 ; +else + tune->min_delay_ms =3000 ; + + tune->step_size = c->symbol_rate /16000 ; + tune->max_drift = c->symbol_rate /2000 ; + +return 0 ; +} +static int m88rs2000_i2c_gate_ctrl (struct dvb_frontend *fe,int enable) {struct m88rs2000_state *state = fe->demodulator_priv;
@@ -743,7 +759,7 @@ static struct dvb_frontend_ops m88rs2000_ops = { .symbol_rate_tolerance = 500, /* ppm */ .caps =FE_CAN_FEC_1_2 |FE_CAN_FEC_2_3 |FE_CAN_FEC_3_4 |FE_CAN_FEC_5_6 |FE_CAN_FEC_7_8 | -FE_CAN_QPSK | +FE_CAN_QPSK |FE_CAN_INVERSION_AUTO |FE_CAN_FEC_AUTO },
@@ -763,6 +779,7 @@ static struct dvb_frontend_ops m88rs2000_ops = { .set_frontend = m88rs2000_set_frontend, .get_frontend = m88rs2000_get_frontend, + .get_tune_settings = m88rs2000_get_tune_settings, }; struct dvb_frontend *m88rs2000_attach(const struct m88rs2000_config *config,
drivers/media/pci/saa7134/saa7134-cards.c +2 -2
@@ -8045,8 +8045,8 @@ int saa7134_board_init2(struct saa7134_dev *dev)break ; }/* switch() */ -/* initialize tuner */ -if (TUNER_ABSENT != dev->tuner_type) { +/* initialize tuner (don't do this when resuming) */ +if (!dev->insuspend &&TUNER_ABSENT != dev->tuner_type) {int has_demod = (dev->tda9887_conf &TDA9887_PRESENT );/* Note: radio tuner address is always filled in,
drivers/media/platform/omap3isp/isppreview.c +9 -0
@@ -1079,6 +1079,7 @@ static void preview_config_input_format(struct isp_prev_device *prev,*/ static void preview_config_input_size (struct isp_prev_device *prev,u32 active) { +const struct v4l2_mbus_framefmt *format = &prev->formats[PREV_PAD_SINK ];struct isp_device *isp =to_isp_device (prev);unsigned int sph = prev->crop.left;unsigned int eph = prev->crop.left + prev->crop.width -1 ;
@@ -1086,6 +1087,14 @@ static void preview_config_input_size(struct isp_prev_device *prev, u32 active)unsigned int elv = prev->crop.top + prev->crop.height -1 ;u32 features; +if (format->code !=V4L2_MBUS_FMT_Y8_1X8 && + format->code !=V4L2_MBUS_FMT_Y10_1X10 ) { + sph -=2 ; + eph +=2 ; + slv -=2 ; + elv +=2 ; + } + features = (prev->params.params[0 ].features & active) | (prev->params.params[1 ].features & ~active);
drivers/media/usb/em28xx/em28xx-dvb.c +2 -1
@@ -673,7 +673,8 @@ static void pctv_520e_init(struct em28xx *dev)static int em28xx_pctv_290e_set_lna (struct dvb_frontend *fe) {struct dtv_frontend_properties *c = &fe->dtv_property_cache; -struct em28xx *dev = fe->dvb->priv; +struct em28xx_i2c_bus *i2c_bus = fe->dvb->priv; +struct em28xx *dev = i2c_bus->dev;#ifdef CONFIG_GPIOLIB struct em28xx_dvb *dvb = dev->dvb;int ret;
drivers/media/usb/gspca/sn9c20x.c +1 -0
@@ -2394,6 +2394,7 @@ static const struct usb_device_id device_table[] = { {USB_DEVICE(0x045e, 0x00f4), SN9C20X(OV9650, 0x30, 0)}, {USB_DEVICE(0x145f, 0x013d), SN9C20X(OV7660, 0x21, 0)}, {USB_DEVICE(0x0458, 0x7029), SN9C20X(HV7131R, 0x11, 0)}, + {USB_DEVICE(0x0458, 0x7045), SN9C20X(MT9M112, 0x5d, LED_REVERSE)}, {USB_DEVICE(0x0458, 0x704a), SN9C20X(MT9M112, 0x5d, 0)}, {USB_DEVICE(0x0458, 0x704c), SN9C20X(MT9M112, 0x5d, 0)}, {USB_DEVICE(0xa168, 0x0610), SN9C20X(HV7131R, 0x11, 0)},
drivers/media/usb/uvc/uvc_video.c +19 -1
@@ -1846,7 +1846,25 @@ int uvc_video_enable(struct uvc_streaming *stream, int enable)if (!enable) {uvc_uninit_video (stream,1 ); -usb_set_interface (stream->dev->udev, stream->intfnum,0 ); +if (stream->intf->num_altsetting >1 ) { +usb_set_interface (stream->dev->udev, + stream->intfnum,0 ); + }else { +/* UVC doesn't specify how to inform a bulk-based device +* when the video stream is stopped. Windows sends a +* CLEAR_FEATURE(HALT) request to the video streaming +* bulk endpoint, mimic the same behaviour. +*/ +unsigned int epnum = stream->header.bEndpointAddress + &USB_ENDPOINT_NUMBER_MASK ; +unsigned int dir = stream->header.bEndpointAddress + &USB_ENDPOINT_DIR_MASK ; +unsigned int pipe; + + pipe =usb_sndbulkpipe (stream->dev->udev, epnum) | dir; +usb_clear_halt (stream->dev->udev, pipe); + } +uvc_queue_enable (&stream->queue,0 );uvc_video_clock_cleanup (stream);return 0 ;
drivers/media/v4l2-core/v4l2-compat-ioctl32.c +2 -2
@@ -787,8 +787,8 @@ static int put_v4l2_subdev_edid32(struct v4l2_subdev_edid *kp, struct v4l2_subde#define VIDIOC_DQBUF32 _IOWR('V', 17, struct v4l2_buffer32)#define VIDIOC_ENUMSTD32 _IOWR('V', 25, struct v4l2_standard32)#define VIDIOC_ENUMINPUT32 _IOWR('V', 26, struct v4l2_input32) -#define VIDIOC_SUBDEV_G_EDID32 _IOWR('V', 63, struct v4l2_subdev_edid32) -#define VIDIOC_SUBDEV_S_EDID32 _IOWR('V', 64, struct v4l2_subdev_edid32) +#define VIDIOC_SUBDEV_G_EDID32 _IOWR('V', 40, struct v4l2_subdev_edid32) +#define VIDIOC_SUBDEV_S_EDID32 _IOWR('V', 41, struct v4l2_subdev_edid32)#define VIDIOC_TRY_FMT32 _IOWR('V', 64, struct v4l2_format32)#define VIDIOC_G_EXT_CTRLS32 _IOWR('V', 71, struct v4l2_ext_controls32)#define VIDIOC_S_EXT_CTRLS32 _IOWR('V', 72, struct v4l2_ext_controls32)
drivers/mfd/88pm860x-core.c +6 -0
@@ -1179,12 +1179,18 @@ static int pm860x_probe(struct i2c_client *client, chip->companion_addr = pdata->companion_addr; chip->companion =i2c_new_dummy (chip->client->adapter, chip->companion_addr); +if (!chip->companion) { +dev_err (&client->dev, +"Failed to allocate I2C companion device\n" ); +return -ENODEV ; + } chip->regmap_companion =regmap_init_i2c (chip->companion, &pm860x_regmap_config);if (IS_ERR (chip->regmap_companion)) { ret =PTR_ERR (chip->regmap_companion);dev_err (&chip->companion->dev,"Failed to allocate register map: %d\n" , ret); +i2c_unregister_device (chip->companion);return ret; }i2c_set_clientdata (chip->companion, chip);
drivers/mfd/max77686.c +4 -0
@@ -121,6 +121,10 @@ static int max77686_i2c_probe(struct i2c_client *i2c,dev_info (max77686->dev,"device found\n" ); max77686->rtc =i2c_new_dummy (i2c->adapter,I2C_ADDR_RTC ); +if (!max77686->rtc) { +dev_err (max77686->dev,"Failed to allocate I2C device for RTC\n" ); +return -ENODEV ; + }i2c_set_clientdata (max77686->rtc, max77686);max77686_irq_init (max77686);
drivers/mfd/max77693.c +11 -1
@@ -149,9 +149,18 @@ static int max77693_i2c_probe(struct i2c_client *i2c,dev_info (max77693->dev,"device ID: 0x%x\n" , reg_data); max77693->muic =i2c_new_dummy (i2c->adapter,I2C_ADDR_MUIC ); +if (!max77693->muic) { +dev_err (max77693->dev,"Failed to allocate I2C device for MUIC\n" ); +return -ENODEV ; + }i2c_set_clientdata (max77693->muic, max77693); max77693->haptic =i2c_new_dummy (i2c->adapter,I2C_ADDR_HAPTIC ); +if (!max77693->haptic) { +dev_err (max77693->dev,"Failed to allocate I2C device for Haptic\n" ); + ret = -ENODEV ; + goto err_i2c_haptic; + }i2c_set_clientdata (max77693->haptic, max77693);/*
@@ -187,8 +196,9 @@ err_mfd:max77693_irq_exit (max77693); err_irq: err_regmap_muic: -i2c_unregister_device (max77693->muic);i2c_unregister_device (max77693->haptic); +err_i2c_haptic: +i2c_unregister_device (max77693->muic);return ret; }
drivers/mfd/max8925-i2c.c +9 -0
@@ -180,9 +180,18 @@ static int max8925_probe(struct i2c_client *client,mutex_init (&chip->io_lock); chip->rtc =i2c_new_dummy (chip->i2c->adapter,RTC_I2C_ADDR ); +if (!chip->rtc) { +dev_err (chip->dev,"Failed to allocate I2C device for RTC\n" ); +return -ENODEV ; + }i2c_set_clientdata (chip->rtc, chip); chip->adc =i2c_new_dummy (chip->i2c->adapter,ADC_I2C_ADDR ); +if (!chip->adc) { +dev_err (chip->dev,"Failed to allocate I2C device for ADC\n" ); +i2c_unregister_device (chip->rtc); +return -ENODEV ; + }i2c_set_clientdata (chip->adc, chip);device_init_wakeup (&client->dev,1 );
drivers/mfd/max8997.c +18 -0
@@ -218,10 +218,26 @@ static int max8997_i2c_probe(struct i2c_client *i2c,mutex_init (&max8997->iolock); max8997->rtc =i2c_new_dummy (i2c->adapter,I2C_ADDR_RTC ); +if (!max8997->rtc) { +dev_err (max8997->dev,"Failed to allocate I2C device for RTC\n" ); +return -ENODEV ; + }i2c_set_clientdata (max8997->rtc, max8997); + max8997->haptic =i2c_new_dummy (i2c->adapter,I2C_ADDR_HAPTIC ); +if (!max8997->haptic) { +dev_err (max8997->dev,"Failed to allocate I2C device for Haptic\n" ); + ret = -ENODEV ; + goto err_i2c_haptic; + }i2c_set_clientdata (max8997->haptic, max8997); + max8997->muic =i2c_new_dummy (i2c->adapter,I2C_ADDR_MUIC ); +if (!max8997->muic) { +dev_err (max8997->dev,"Failed to allocate I2C device for MUIC\n" ); + ret = -ENODEV ; + goto err_i2c_muic; + }i2c_set_clientdata (max8997->muic, max8997);pm_runtime_set_active (max8997->dev);
@@ -248,7 +264,9 @@ static int max8997_i2c_probe(struct i2c_client *i2c, err_mfd:mfd_remove_devices (max8997->dev);i2c_unregister_device (max8997->muic); +err_i2c_muic:i2c_unregister_device (max8997->haptic); +err_i2c_haptic:i2c_unregister_device (max8997->rtc); err:kfree (max8997);
drivers/mfd/max8998.c +4 -0
@@ -152,6 +152,10 @@ static int max8998_i2c_probe(struct i2c_client *i2c,mutex_init (&max8998->iolock); max8998->rtc =i2c_new_dummy (i2c->adapter,RTC_I2C_ADDR ); +if (!max8998->rtc) { +dev_err (&i2c->dev,"Failed to allocate I2C device for RTC\n" ); +return -ENODEV ; + }i2c_set_clientdata (max8998->rtc, max8998);max8998_irq_init (max8998);
drivers/mfd/sec-core.c +4 -0
@@ -199,6 +199,10 @@ static int sec_pmic_probe(struct i2c_client *i2c, } sec_pmic->rtc =i2c_new_dummy (i2c->adapter,RTC_I2C_ADDR ); +if (!sec_pmic->rtc) { +dev_err (&i2c->dev,"Failed to allocate I2C for RTC\n" ); +return -ENODEV ; + }i2c_set_clientdata (sec_pmic->rtc, sec_pmic);if (pdata && pdata->cfg_pmic_irq)
drivers/mfd/tps65910.c +3 -1
@@ -254,8 +254,10 @@ static int tps65910_irq_init(struct tps65910 *tps65910, int irq, ret =regmap_add_irq_chip (tps65910->regmap, tps65910->chip_irq,IRQF_ONESHOT , pdata->irq_base, tps6591x_irqs_chip, &tps65910->irq_data); -if (ret <0 ) +if (ret <0 ) {dev_warn (tps65910->dev,"Failed to add irq_chip %d\n" , ret); + tps65910->chip_irq =0 ; + }return ret; }
drivers/misc/mei/hw-me-regs.h +5 -0
@@ -115,6 +115,11 @@#define MEI_DEV_ID_LPT_HR 0x8CBA/* Lynx Point H Refresh */ #define MEI_DEV_ID_WPT_LP 0x9CBA/* Wildcat Point LP */ + +/* Host Firmware Status Registers in PCI Config Space */ +#define PCI_CFG_HFS_1 0x40 +#define PCI_CFG_HFS_2 0x48 +/* * MEI HW Section */
drivers/misc/mei/pci-me.c +23 -7
@@ -105,15 +105,31 @@ static bool mei_me_quirk_probe(struct pci_dev *pdev, const struct pci_device_id *ent) {u32 reg; -if (ent->device ==MEI_DEV_ID_PBG_1 ) { -pci_read_config_dword (pdev,0x48 , ®); -/* make sure that bit 9 is up and bit 10 is down */ -if ((reg &0x600 ) ==0x200 ) { -dev_info (&pdev->dev,"Device doesn't have valid ME Interface\n" ); -return false; - } +/* Cougar Point || Patsburg */ +if (ent->device ==MEI_DEV_ID_CPT_1 || + ent->device ==MEI_DEV_ID_PBG_1 ) { +pci_read_config_dword (pdev,PCI_CFG_HFS_2 , ®); +/* make sure that bit 9 (NM) is up and bit 10 (DM) is down */ +if ((reg &0x600 ) ==0x200 ) + goto no_mei; } + +/* Lynx Point */ +if (ent->device ==MEI_DEV_ID_LPT_H || + ent->device ==MEI_DEV_ID_LPT_W || + ent->device ==MEI_DEV_ID_LPT_HR ) { +/* Read ME FW Status check for SPS Firmware */ +pci_read_config_dword (pdev,PCI_CFG_HFS_1 , ®); +/* if bits [19:16] = 15, running SPS Firmware */ +if ((reg &0xf0000 ) ==0xf0000 ) + goto no_mei; + } +return true; + +no_mei: +dev_info (&pdev->dev,"Device doesn't have valid ME Interface\n" ); +return false; }/** * mei_probe - Device Initialization Routine
drivers/s390/char/con3215.c +1 -1
@@ -922,7 +922,7 @@ static int __init con3215_init(void) raw3215_freelist = req; } - cdev =ccw_device_probe_console (); + cdev =ccw_device_probe_console (&raw3215_ccw_driver);if (IS_ERR (cdev))return -ENODEV ;
drivers/s390/char/con3270.c +1 -5
@@ -576,7 +576,6 @@ static struct console con3270 = {static int __init con3270_init (void ) { -struct ccw_device *cdev;struct raw3270 *rp;void *cbuf;int i;
@@ -591,10 +590,7 @@ con3270_init(void)cpcmd ("TERM AUTOCR OFF" ,NULL ,0 ,NULL ); } - cdev =ccw_device_probe_console (); -if (IS_ERR (cdev)) -return -ENODEV ; - rp =raw3270_setup_console (cdev); + rp =raw3270_setup_console ();if (IS_ERR (rp))return PTR_ERR (rp);
drivers/s390/char/raw3270.c +9 -1
@@ -776,16 +776,24 @@ raw3270_setup_device(struct ccw_device *cdev, struct raw3270 *rp, char *ascebc) }#ifdef CONFIG_TN3270_CONSOLE +/* Tentative definition - see below for actual definition. */ +static struct ccw_driver raw3270_ccw_driver; +/* * Setup 3270 device configured as console. */ -struct raw3270 __init *raw3270_setup_console (struct ccw_device *cdev) +struct raw3270 __init *raw3270_setup_console (void ) { +struct ccw_device *cdev;unsigned long flags;struct raw3270 *rp;char *ascebc;int rc; + cdev =ccw_device_probe_console (&raw3270_ccw_driver); +if (IS_ERR (cdev)) +return ERR_CAST (cdev); + rp =kzalloc (sizeof (struct raw3270 ),GFP_KERNEL |GFP_DMA ); ascebc =kzalloc (256 ,GFP_KERNEL ); rc =raw3270_setup_device (cdev, rp, ascebc);
drivers/s390/char/raw3270.h +1 -1
@@ -190,7 +190,7 @@ raw3270_put_view(struct raw3270_view *view)wake_up (&raw3270_wait_queue); } -struct raw3270 *raw3270_setup_console (struct ccw_device *cdev); +struct raw3270 *raw3270_setup_console (void );void raw3270_wait_cons_dev (struct raw3270 *);/* Notifier for device addition/removal */
drivers/s390/cio/device.c +2 -1
@@ -1610,7 +1610,7 @@ out_unlock:return rc; } -struct ccw_device *ccw_device_probe_console (void ) +struct ccw_device *ccw_device_probe_console (struct ccw_driver *drv) {struct io_subchannel_private *io_priv;struct ccw_device *cdev;
@@ -1632,6 +1632,7 @@ struct ccw_device *ccw_device_probe_console(void)kfree (io_priv);return cdev; } + cdev->drv = drv;set_io_private (sch, io_priv); ret =ccw_device_console_enable (cdev, sch);if (ret) {
drivers/scsi/arcmsr/arcmsr_hba.c +3 -4
@@ -2501,16 +2501,15 @@ static int arcmsr_polling_ccbdone(struct AdapterControlBlock *acb,static int arcmsr_iop_confirm (struct AdapterControlBlock *acb) {uint32_t cdb_phyaddr, cdb_phyaddr_hi32; -dma_addr_t dma_coherent_handle; +/* ******************************************************************** ** here we need to tell iop 331 our freeccb.HighPart ** if freeccb.HighPart is not zero ******************************************************************** */ - dma_coherent_handle = acb->dma_coherent_handle; - cdb_phyaddr = (uint32_t )(dma_coherent_handle); - cdb_phyaddr_hi32 = (uint32_t )((cdb_phyaddr >>16 ) >>16 ); + cdb_phyaddr =lower_32_bits (acb->dma_coherent_handle); + cdb_phyaddr_hi32 =upper_32_bits (acb->dma_coherent_handle); acb->cdb_phyaddr_hi32 = cdb_phyaddr_hi32;/* ***********************************************************************
drivers/scsi/qla2xxx/qla_os.c +3 -3
@@ -2553,7 +2553,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ha->flags.enable_64bit_addressing ?"enable" : "disable"); ret =qla2x00_mem_alloc (ha, req_length, rsp_length, &req, &rsp); -if (!ret) { +if (ret) {ql_log_pci (ql_log_fatal, pdev,0x0031 ,"Failed to allocate memory for adapter, aborting.\n" );
@@ -3458,10 +3458,10 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,else {qla2x00_set_reserved_loop_ids (ha);ql_dbg_pci (ql_dbg_init, ha->pdev,0x0123 , -"loop_id_map=%p. \n" , ha->loop_id_map); +"loop_id_map=%p.\n" , ha->loop_id_map); } -return 1 ; +return 0 ; fail_async_pd:dma_pool_free (ha->s_dma_pool, ha->ex_init_cb, ha->ex_init_cb_dma);
drivers/staging/rtl8712/rtl871x_recv.c +6 -7
@@ -254,7 +254,7 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter,struct sta_info *psta;struct sta_priv *pstapriv;union recv_frame *prtnframe; -u16 ether_type =0 ; +u16 ether_type; pstapriv = &adapter->stapriv; ptr =get_recvframe_data (precv_frame);
@@ -263,15 +263,14 @@ union recv_frame *r8712_portctrl(struct _adapter *adapter, psta =r8712_get_stainfo (pstapriv, psta_addr); auth_alg = adapter->securitypriv.AuthAlgrthm;if (auth_alg ==2 ) { +/* get ether_type */ + ptr = ptr + pfhdr->attrib.hdrlen +LLC_HEADER_SIZE ; +memcpy (ðer_type, ptr,2 ); + ether_type =ntohs ((unsigned short )ether_type); +if ((psta !=NULL ) && (psta->ieee8021x_blocked)) {/* blocked * only accept EAPOL frame */ - prtnframe = precv_frame; -/*get ether_type */ - ptr = ptr + pfhdr->attrib.hdrlen + - pfhdr->attrib.iv_len +LLC_HEADER_SIZE ; -memcpy (ðer_type, ptr,2 ); - ether_type =ntohs ((unsigned short )ether_type);if (ether_type ==0x888e ) prtnframe = precv_frame;else {
drivers/staging/serqt_usb2/serqt_usb2.c +1 -1
@@ -725,7 +725,7 @@ static int qt_startup(struct usb_serial *serial) goto startup_error; } -switch (serial->dev->descriptor.idProduct) { +switch (le16_to_cpu (serial->dev->descriptor.idProduct)) {case QUATECH_DSU100 :case QUATECH_QSU100 :case QUATECH_ESU100A :
drivers/target/iscsi/iscsi_target.c +3 -1
@@ -2454,6 +2454,7 @@ static void iscsit_build_conn_drop_async_message(struct iscsi_conn *conn) {struct iscsi_cmd *cmd;struct iscsi_conn *conn_p; +bool found = false;/* * Only send a Asynchronous Message on connections whos network
@@ -2462,11 +2463,12 @@ static void iscsit_build_conn_drop_async_message(struct iscsi_conn *conn)list_for_each_entry (conn_p, &conn->sess->sess_conn_list, conn_list) {if (conn_p->conn_state ==TARG_CONN_STATE_LOGGED_IN ) {iscsit_inc_conn_usage_count (conn_p); + found = true;break ; } } -if (!conn_p) +if (!found)return ; cmd =iscsit_allocate_cmd (conn_p,GFP_ATOMIC );
drivers/target/tcm_fc/tfc_sess.c +1 -0
@@ -68,6 +68,7 @@ static struct ft_tport *ft_tport_create(struct fc_lport *lport)if (tport) { tport->tpg = tpg; + tpg->tport = tport;return tport; }
drivers/tty/hvc/hvc_console.c +5 -1
@@ -31,6 +31,7 @@#include <linux/list.h> #include <linux/module.h> #include <linux/major.h> +#include <linux/atomic.h> #include <linux/sysrq.h> #include <linux/tty.h> #include <linux/tty_flip.h>
@@ -70,6 +71,9 @@ static struct task_struct *hvc_task;/* Picks up late kicks after list walk but before schedule() */ static int hvc_kicked; +/* hvc_init is triggered from hvc_alloc, i.e. only when actually used */ +static atomic_t hvc_needs_init__read_mostly =ATOMIC_INIT (-1 ); +static int hvc_init (void );#ifdef CONFIG_MAGIC_SYSRQ
@@ -842,7 +846,7 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,int i;/* We wait until a driver actually comes along */ -if (!hvc_driver) { +if (atomic_inc_not_zero (&hvc_needs_init)) {int err =hvc_init ();if (err)return ERR_PTR (err);
drivers/usb/core/driver.c +56 -38
162 lines not on this page · raw message
drivers/usb/core/hcd-pci.c +1 -1
@@ -75,7 +75,7 @@ static void for_each_companion(struct pci_dev *pdev, struct usb_hcd *hcd, PCI_SLOT(companion->devfn) != slot)continue ; companion_hcd =pci_get_drvdata (companion); -if (!companion_hcd) +if (!companion_hcd || !companion_hcd->self.root_hub)continue ;fn (pdev, hcd, companion, companion_hcd); }
drivers/usb/core/hub.c +3 -2
@@ -5252,10 +5252,11 @@ int usb_reset_device(struct usb_device *udev)else if (cintf->condition ==USB_INTERFACE_BOUND ) rebind =1 ; +if (rebind) + cintf->needs_binding =1 ; } -if (ret ==0 && rebind) -usb_rebind_intf (cintf); } +usb_unbind_and_rebind_marked_interfaces (udev); }usb_autosuspend_device (udev);
drivers/usb/core/usb.h +1 -1
@@ -55,7 +55,7 @@ extern int usb_match_one_id_intf(struct usb_device *dev,extern int usb_match_device (struct usb_device *dev,const struct usb_device_id *id);extern void usb_forced_unbind_intf (struct usb_interface *intf); -extern void usb_rebind_intf (struct usb_interface *intf); +extern void usb_unbind_and_rebind_marked_interfaces (struct usb_device *udev);extern int usb_hub_claim_port (struct usb_device *hdev,unsigned port,struct dev_state *owner);
drivers/usb/dwc3/core.h +3 -3
@@ -836,15 +836,15 @@ struct dwc3_event_depevt {* 12 - VndrDevTstRcved * @reserved15_12: Reserved, not used * @event_info: Information about this event -* @reserved31_24: Reserved, not used +* @reserved31_25: Reserved, not used */ struct dwc3_event_devt {u32 one_bit:1 ;u32 device_event:7 ;u32 type:4 ;u32 reserved15_12:4 ; -u32 event_info:8 ; -u32 reserved31_24:8 ; +u32 event_info:9 ; +u32 reserved31_25:7 ; } __packed;/**
drivers/usb/gadget/tcm_usb_gadget.c +1 -1
@@ -1614,7 +1614,7 @@ static struct se_wwn *usbg_make_tport(return ERR_PTR (-ENOMEM ); } tport->tport_wwpn = wwpn; -snprintf (tport->tport_name,sizeof (tport->tport_name), wnn_name); +snprintf (tport->tport_name,sizeof (tport->tport_name),"%s" , wnn_name);return &tport->tport_wwn; }
drivers/usb/gadget/zero.c +1 -1
@@ -280,7 +280,7 @@ static int __init zero_bind(struct usb_composite_dev *cdev) ss_opts->isoc_interval = gzero_options.isoc_interval; ss_opts->isoc_maxpacket = gzero_options.isoc_maxpacket; ss_opts->isoc_mult = gzero_options.isoc_mult; - ss_opts->isoc_maxburst = gzero_options.isoc_maxpacket; + ss_opts->isoc_maxburst = gzero_options.isoc_maxburst; ss_opts->bulk_buflen = gzero_options.bulk_buflen; func_ss =usb_get_function (func_inst_ss);
drivers/usb/host/xhci-pci.c +11 -4
@@ -114,9 +114,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) xhci->quirks |=XHCI_TRUST_TX_LENGTH ; }if (pdev->vendor ==PCI_VENDOR_ID_RENESAS && - pdev->device ==0x0015 && - pdev->subsystem_vendor ==PCI_VENDOR_ID_SAMSUNG && - pdev->subsystem_device ==0xc0cd ) + pdev->device ==0x0015 ) xhci->quirks |=XHCI_RESET_ON_RESUME ;if (pdev->vendor ==PCI_VENDOR_ID_VIA ) xhci->quirks |=XHCI_RESET_ON_RESUME ;
@@ -161,6 +159,10 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)struct usb_hcd *hcd; driver = (struct hc_driver *)id->driver_data; + +/* Prevent runtime suspending between USB-2 and USB-3 initialization */ +pm_runtime_get_noresume (&dev->dev); +/* Register the USB 2.0 roothub. * FIXME: USB core must know to register the USB 2.0 roothub first. * This is sort of silly, because we could just set the HCD driver flags
@@ -170,7 +172,7 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) retval =usb_hcd_pci_probe (dev, id);if (retval) -return retval; + goto put_runtime_pm;/* USB 2.0 roothub is stored in the PCI device now. */ hcd =dev_get_drvdata (&dev->dev);
@@ -199,12 +201,17 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)if (xhci->quirks &XHCI_LPM_SUPPORT )hcd_to_bus (xhci->shared_hcd)->root_hub->lpm_capable =1 ; +/* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */ +pm_runtime_put_noidle (&dev->dev); +return 0 ; put_usb3_hcd:usb_put_hcd (xhci->shared_hcd); dealloc_usb2_hcd:usb_hcd_pci_remove (dev); +put_runtime_pm: +pm_runtime_put_noidle (&dev->dev);return retval; }
drivers/usb/host/xhci.c +3 -3
@@ -394,16 +394,16 @@ static int xhci_try_enable_msi(struct usb_hcd *hcd)#else -static int xhci_try_enable_msi (struct usb_hcd *hcd) +static inline int xhci_try_enable_msi (struct usb_hcd *hcd) {return 0 ; } -static void xhci_cleanup_msix (struct xhci_hcd *xhci) +static inline void xhci_cleanup_msix (struct xhci_hcd *xhci) { } -static void xhci_msix_sync_irqs (struct xhci_hcd *xhci) +static inline void xhci_msix_sync_irqs (struct xhci_hcd *xhci) { }
drivers/usb/musb/musb_core.c +2 -3
@@ -440,7 +440,6 @@ void musb_hnp_stop(struct musb *musb)static irqreturn_t musb_stage0_irq (struct musb *musb,u8 int_usb,u8 devctl) { -struct usb_otg *otg = musb->xceiv->otg;irqreturn_t handled =IRQ_NONE ; dev_dbg(musb->controller, "<== DevCtl=%02x, int_usb=0x%x\n", devctl,
@@ -655,7 +654,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,break ;case OTG_STATE_B_PERIPHERAL :musb_g_suspend (musb); - musb->is_active = otg->gadget->b_hnp_enable; + musb->is_active = musb->g.b_hnp_enable;if (musb->is_active) { musb->xceiv->state =OTG_STATE_B_WAIT_ACON ;dev_dbg (musb->controller,"HNP: Setting timer for b_ase0_brst\n" );
@@ -671,7 +670,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,break ;case OTG_STATE_A_HOST : musb->xceiv->state =OTG_STATE_A_SUSPEND ; - musb->is_active = otg->host->b_hnp_enable; + musb->is_active =musb_to_hcd (musb)->self.b_hnp_enable;break ;case OTG_STATE_B_HOST :/* Transition to B_PERIPHERAL, see 6.8.2.6 p 44 */
drivers/usb/phy/phy-ulpi.c +2 -0
@@ -47,6 +47,8 @@ struct ulpi_info {static struct ulpi_info ulpi_ids[] = {ULPI_INFO (ULPI_ID (0x04cc ,0x1504 ),"NXP ISP1504" ),ULPI_INFO (ULPI_ID (0x0424 ,0x0006 ),"SMSC USB331x" ), +ULPI_INFO (ULPI_ID (0x0424 ,0x0007 ),"SMSC USB3320" ), +ULPI_INFO (ULPI_ID (0x0451 ,0x1507 ),"TI TUSB1210" ), };static int ulpi_set_otg_flags (struct usb_phy *phy)
drivers/usb/serial/pl2303.c +3 -0
@@ -82,6 +82,9 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(YCCABLE_VENDOR_ID, YCCABLE_PRODUCT_ID) }, { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LD960_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LCM220_PRODUCT_ID) }, + { USB_DEVICE(HP_VENDOR_ID, HP_LCM960_PRODUCT_ID) }, { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, { USB_DEVICE(ZEAGLE_VENDOR_ID, ZEAGLE_N2ITION3_PRODUCT_ID) }, { USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) },
drivers/usb/serial/pl2303.h +4 -1
@@ -121,8 +121,11 @@#define SUPERIAL_VENDOR_ID 0x5372#define SUPERIAL_PRODUCT_ID 0x2303 -/* Hewlett-Packard LD220-HP POS Pole Display */ +/* Hewlett-Packard POS Pole Displays */ #define HP_VENDOR_ID 0x03f0 +#define HP_LD960_PRODUCT_ID 0x0b39 +#define HP_LCM220_PRODUCT_ID 0x3139 +#define HP_LCM960_PRODUCT_ID 0x3239#define HP_LD220_PRODUCT_ID 0x3524/* Cressi Edy (diving computer) PC interface */
drivers/w1/w1_netlink.c +13 -12
@@ -54,28 +54,29 @@ static void w1_send_slave(struct w1_master *dev, u64 rn)struct w1_netlink_msg *hdr = (struct w1_netlink_msg *)(msg +1 );struct w1_netlink_cmd *cmd = (struct w1_netlink_cmd *)(hdr +1 );int avail; +u64 *data;/* update kernel slave list */ w1_slave_found (dev, rn); avail = dev->priv_size - cmd->len; -if (avail >8 ) { -u64 *data = (void *)(cmd +1 ) + cmd->len; +if (avail <8 ) { + msg->ack++; +cn_netlink_send (msg,0 ,GFP_KERNEL ); - *data = rn; - cmd->len +=8 ; - hdr->len +=8 ; - msg->len +=8 ; -return ; + msg->len =sizeof (struct w1_netlink_msg ) + +sizeof (struct w1_netlink_cmd ); + hdr->len =sizeof (struct w1_netlink_cmd ); + cmd->len =0 ; } - msg->ack++; -cn_netlink_send (msg,0 ,GFP_KERNEL ); + data = (void *)(cmd +1 ) + cmd->len; - msg->len =sizeof (struct w1_netlink_msg ) +sizeof (struct w1_netlink_cmd ); - hdr->len =sizeof (struct w1_netlink_cmd ); - cmd->len =0 ; + *data = rn; + cmd->len +=8 ; + hdr->len +=8 ; + msg->len +=8 ; } static int w1_process_search_command(struct w1_master *dev, struct cn_msg *msg,
fs/ext4/file.c +1 -1
@@ -82,7 +82,7 @@ ext4_unaligned_aio(struct inode *inode, const struct iovec *iov,size_t count =iov_length (iov, nr_segs);loff_t final_size = pos + count; -if (pos >= inode->i_size) +if (pos >=i_size_read (inode))return 0 ;if ((pos & blockmask) || (final_size & blockmask))
fs/ext4/xattr.c +19 -4
@@ -517,8 +517,8 @@ static void ext4_xattr_update_super_block(handle_t *handle, }/* -* Release the xattr block BH: If the reference count is > 1, decrement -* it; otherwise free the block. +* Release the xattr block BH: If the reference count is > 1, decrement it; +* otherwise free the block. */ static void ext4_xattr_release_block(handle_t *handle, struct inode *inode,
@@ -538,16 +538,31 @@ ext4_xattr_release_block(handle_t *handle, struct inode *inode,if (ce)mb_cache_entry_free (ce);get_bh (bh); +unlock_buffer (bh);ext4_free_blocks (handle, inode, bh,0 ,1 ,EXT4_FREE_BLOCKS_METADATA |EXT4_FREE_BLOCKS_FORGET ); -unlock_buffer (bh); }else {le32_add_cpu (&BHDR (bh)->h_refcount,-1 );if (ce)mb_cache_entry_release (ce); +/* +* Beware of this ugliness: Releasing of xattr block references +* from different inodes can race and so we have to protect +* from a race where someone else frees the block (and releases +* its journal_head) before we are done dirtying the buffer. In +* nojournal mode this race is harmless and we actually cannot +* call ext4_handle_dirty_xattr_block() with locked buffer as +* that function can call sync_dirty_buffer() so for that case +* we handle the dirtying after unlocking the buffer. +*/ +if (ext4_handle_valid (handle)) + error =ext4_handle_dirty_xattr_block (handle, inode, + bh);unlock_buffer (bh); - error =ext4_handle_dirty_xattr_block (handle, inode, bh); +if (!ext4_handle_valid (handle)) + error =ext4_handle_dirty_xattr_block (handle, inode, + bh);if (IS_SYNC (inode))ext4_handle_sync (handle);dquot_free_block (inode,EXT4_C2B (EXT4_SB (inode->i_sb),1 ));
fs/nfsd/nfs4callback.c +3 -1
@@ -637,9 +637,11 @@ static struct rpc_cred *get_backchannel_cred(struct nfs4_client *clp, struct rpcstatic int setup_callback_client (struct nfs4_client *clp,struct nfs4_cb_conn *conn,struct nfsd4_session *ses) { +int maxtime =max_cb_time (clp->net);struct rpc_timeout timeparms = { - .to_initval =max_cb_time (clp->net), + .to_initval = maxtime, .to_retries =0 , + .to_maxval = maxtime, };struct rpc_create_args args = { .net = clp->net,
fs/nfsd/nfs4proc.c +8 -1
@@ -1307,6 +1307,12 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,/* If op is non-idempotent */ if (opdesc->op_flags &OP_MODIFIES_SOMETHING ) { plen = opdesc->op_rsize_bop (rqstp, op); +/* +* If there's still another operation, make sure +* we'll have space to at least encode an error: +*/ +if (resp->opcnt < args->opcnt) + plen +=COMPOUND_ERR_SLACK_SPACE ; op->status =nfsd4_check_resp_size (resp, plen); }
@@ -1471,7 +1477,8 @@ static inline u32 nfsd4_setattr_rsize(struct svc_rqst *rqstp, struct nfsd4_op *ostatic inline u32 nfsd4_setclientid_rsize (struct svc_rqst *rqstp,struct nfsd4_op *op) { -return (op_encode_hdr_size +2 +1024 ) *sizeof (__be32); +return (op_encode_hdr_size +2 +XDR_QUADLEN (NFS4_VERIFIER_SIZE )) * +sizeof (__be32); }static inline u32 nfsd4_write_rsize (struct svc_rqst *rqstp,struct nfsd4_op *op)
fs/nfsd/nfs4state.c +5 -8
@@ -4958,7 +4958,6 @@ nfs4_state_destroy_net(struct net *net)int i;struct nfs4_client *clp =NULL ;struct nfsd_net *nn =net_generic (net, nfsd_net_id); -struct rb_node *node, *tmp;for (i =0 ; i <CLIENT_HASH_SIZE ; i++) {while (!list_empty (&nn->conf_id_hashtbl[i])) {
@@ -4967,13 +4966,11 @@ nfs4_state_destroy_net(struct net *net) } } - node =rb_first (&nn->unconf_name_tree); -while (node !=NULL ) { - tmp = node; - node =rb_next (tmp); - clp = rb_entry(tmp, struct nfs4_client, cl_namenode); -rb_erase (tmp, &nn->unconf_name_tree); -destroy_client (clp); +for (i =0 ; i <CLIENT_HASH_SIZE ; i++) { +while (!list_empty (&nn->unconf_id_hashtbl[i])) { + clp = list_entry(nn->unconf_id_hashtbl[i].next, struct nfs4_client, cl_idhash); +destroy_client (clp); + } }kfree (nn->sessionid_hashtbl);
fs/nfsd/nfs4xdr.c +5 -0
@@ -2401,6 +2401,8 @@ out_acl:WRITE64 (stat.ino); }if (bmval2 &FATTR4_WORD2_SUPPATTR_EXCLCREAT ) { +if ((buflen -=16 ) <0 ) + goto out_resource;WRITE32 (3 );WRITE32 (NFSD_SUPPATTR_EXCLCREAT_WORD0 );WRITE32 (NFSD_SUPPATTR_EXCLCREAT_WORD1 );
@@ -3382,6 +3384,9 @@ nfsd4_encode_test_stateid(struct nfsd4_compoundres *resp, __be32 nfserr,struct nfsd4_test_stateid_id *stateid, *next;__be32 *p; +if (nfserr) +return nfserr; +RESERVE_SPACE (4 + (4 * test_stateid->ts_num_ids)); *p++ =htonl (test_stateid->ts_num_ids);
fs/nfsd/nfsctl.c +5 -0
@@ -699,6 +699,11 @@ static ssize_t __write_ports_addfd(char *buf, struct net *net)if (err !=0 || fd <0 )return -EINVAL ; +if (svc_alien_sock (net, fd)) { +printk (KERN_ERR "%s: socket net is different to NFSd's one\n" , __func__); +return -EINVAL ; + } + err =nfsd_create_serv (net);if (err !=0 )return err;
fs/nfsd/vfs.c +9 -0
@@ -406,6 +406,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,umode_t ftype =0 ;__be32 err;int host_err; +bool get_write_count;int size_change =0 ;if (iap->ia_valid & (ATTR_ATIME |ATTR_MTIME |ATTR_SIZE ))
@@ -413,10 +414,18 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap,if (iap->ia_valid &ATTR_SIZE ) ftype =S_IFREG ; +/* Callers that do fh_verify should do the fh_want_write: */ + get_write_count = !fhp->fh_dentry; +/* Get inode */ err =fh_verify (rqstp, fhp, ftype, accmode);if (err) goto out; +if (get_write_count) { + host_err =fh_want_write (fhp); +if (host_err) +return nfserrno (host_err); + } dentry = fhp->fh_dentry; inode = dentry->d_inode;
fs/ocfs2/buffer_head_io.c +0 -2
@@ -90,7 +90,6 @@ int ocfs2_write_block(struct ocfs2_super *osb, struct buffer_head *bh,* information for this bh as it's not marked locally * uptodate. */ ret = -EIO ; -put_bh (bh);mlog_errno (ret); }
@@ -420,7 +419,6 @@ int ocfs2_write_super_or_backup(struct ocfs2_super *osb,if (!buffer_uptodate (bh)) { ret = -EIO ; -put_bh (bh);mlog_errno (ret); }
fs/ocfs2/dlm/dlmrecovery.c +21 -8
@@ -540,7 +540,10 @@ master_here:/* success! see if any other nodes need recovery */ mlog (0 ,"DONE mastering recovery of %s:%u here(this=%u)!\n" , dlm->name, dlm->reco.dead_node, dlm->node_num); -dlm_reset_recovery (dlm); +spin_lock (&dlm->spinlock); +__dlm_reset_recovery (dlm); + dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE ; +spin_unlock (&dlm->spinlock); }dlm_end_recovery (dlm);
@@ -698,6 +701,14 @@ static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node)if (all_nodes_done) {int ret; +/* Set this flag on recovery master to avoid +* a new recovery for another dead node start +* before the recovery is not done. That may +* cause recovery hung.*/ +spin_lock (&dlm->spinlock); + dlm->reco.state |=DLM_RECO_STATE_FINALIZE ; +spin_unlock (&dlm->spinlock); +/* all nodes are now in DLM_RECO_NODE_DATA_DONE state * just send a finalize message to everyone and * clean up */
@@ -1751,13 +1762,13 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, struct dlm_migratable_lockres *mres) {struct dlm_migratable_lock *ml; -struct list_head *queue; +struct list_head *queue, *iter;struct list_head *tmpq =NULL ;struct dlm_lock *newlock =NULL ;struct dlm_lockstatus *lksb =NULL ;int ret =0 ;int i, j, bad; -struct dlm_lock *lock =NULL ; +struct dlm_lock *lock;u8 from =O2NM_MAX_NODES ;unsigned int added =0 ;__be64 c;
@@ -1792,14 +1803,16 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,/* MIGRATION ONLY! */ BUG_ON (!(mres->flags &DLM_MRES_MIGRATION )); + lock =NULL ;spin_lock (&res->spinlock);for (j =DLM_GRANTED_LIST ; j <=DLM_BLOCKED_LIST ; j++) { tmpq =dlm_list_idx_to_ptr (res, j); -list_for_each_entry (lock, tmpq, list) { -if (lock->ml.cookie != ml->cookie) - lock =NULL ; -else +list_for_each (iter, tmpq) { + lock =list_entry (iter, + struct dlm_lock, list); +if (lock->ml.cookie == ml->cookie)break ; + lock =NULL ; }if (lock)break ;
@@ -2867,8 +2880,8 @@ int dlm_finalize_reco_handler(struct o2net_msg *msg, u32 len, void *data,BUG (); } dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE ; +__dlm_reset_recovery (dlm);spin_unlock (&dlm->spinlock); -dlm_reset_recovery (dlm);dlm_kick_recovery_thread (dlm);break ;default :
fs/reiserfs/dir.c +4 -2
@@ -128,6 +128,7 @@ int reiserfs_readdir_dentry(struct dentry *dentry, void *dirent,char *d_name;off_t d_off;ino_t d_ino; +loff_t cur_pos =deh_offset (deh);if (!de_visible (deh))/* it is hidden entry */
@@ -200,8 +201,9 @@ int reiserfs_readdir_dentry(struct dentry *dentry, void *dirent,if (local_buf != small_buf) {kfree (local_buf); } -// next entry should be looked for with such offset - next_pos =deh_offset (deh) +1 ; + +/* deh_offset(deh) may be invalid now. */ + next_pos = cur_pos +1 ;if (item_moved (&tmp_ih, &path_to_entry)) { set_cpu_key_k_offset(&pos_key,
fs/xfs/xfs_da_btree.c +1 -1
@@ -1334,7 +1334,7 @@ xfs_da3_fixhashpath( node = blk->bp->b_addr;xfs_da3_node_hdr_from_disk (&nodehdr, node); btree =xfs_da3_node_tree_p (node); -if (be32_to_cpu (btree->hashval) == lasthash) +if (be32_to_cpu (btree[blk->index].hashval) == lasthash)break ; blk->hashval = lasthash; btree[blk->index].hashval =cpu_to_be32 (lasthash);
include/linux/sunrpc/svcsock.h +1 -0
@@ -56,6 +56,7 @@ int svc_recv(struct svc_rqst *, long);int svc_send (struct svc_rqst *);void svc_drop (struct svc_rqst *);void svc_sock_update_bufs (struct svc_serv *serv); +bool svc_alien_sock (struct net *net,int fd);int svc_addsock (struct svc_serv *serv,const int fd,char *name_return,const size_t len);void svc_init_xprt_sock (void );
kernel/sysctl.c +6 -0
@@ -144,6 +144,11 @@ static int min_percpu_pagelist_fract = 8;static int ngroups_max =NGROUPS_MAX ;static const int cap_last_cap =CAP_LAST_CAP ; +/*this is needed for proc_doulongvec_minmax of sysctl_hung_task_timeout_secs */ +#ifdef CONFIG_DETECT_HUNG_TASK +static unsigned long hung_task_timeout_max = (LONG_MAX /HZ ); +#endif +#ifdef CONFIG_INOTIFY_USER #include <linux/inotify.h> #endif
@@ -966,6 +971,7 @@ static struct ctl_table kern_table[] = { .maxlen = sizeof(unsigned long), .mode = 0644, .proc_handler = proc_dohung_task_timeout_secs, + .extra2 = &hung_task_timeout_max, }, { .procname = "hung_task_warnings",
mm/hugetlb.c +1 -0
@@ -1487,6 +1487,7 @@ static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count,while (min_count <persistent_huge_pages (h)) {if (!free_pool_huge_page (h, nodes_allowed,0 ))break ; +cond_resched_lock (&hugetlb_lock); }while (count <persistent_huge_pages (h)) {if (!adjust_pool_surplus (h, nodes_allowed,1 ))
mm/mlock.c +2 -0
@@ -76,6 +76,7 @@ void clear_page_mlock(struct page *page)*/ void mlock_vma_page (struct page *page) { +/* Serialize with page migration */ BUG_ON (!PageLocked (page));if (!TestSetPageMlocked (page)) {
@@ -106,6 +107,7 @@ unsigned int munlock_vma_page(struct page *page) {unsigned int page_mask =0 ; +/* For try_to_munlock() and to serialize with page migration */ BUG_ON (!PageLocked (page));if (TestClearPageMlocked (page)) {
mm/rmap.c +12 -2
@@ -1390,9 +1390,19 @@ static int try_to_unmap_cluster(unsigned long cursor, unsigned int *mapcount,BUG_ON (!page ||PageAnon (page));if (locked_vma) { -mlock_vma_page (page);/* no-op if already mlocked */ -if (page == check_page) +if (page == check_page) { +/* we know we have check_page locked */ +mlock_vma_page (page); ret =SWAP_MLOCK ; + }else if (trylock_page (page)) { +/* +* If we can lock the page, perform mlock. +* Otherwise leave the page alone, it will be +* eventually encountered again later. +*/ +mlock_vma_page (page); +unlock_page (page); + }continue ;/* don't unmap */ }
net/sunrpc/svcsock.c +16 -0
@@ -1393,6 +1393,22 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,return svsk; } +bool svc_alien_sock (struct net *net,int fd) +{ +int err; +struct socket *sock =sockfd_lookup (fd, &err); +bool ret = false; + +if (!sock) + goto out; +if (sock_net (sock->sk) != net) + ret = true; +sockfd_put (sock); +out: +return ret; +} +EXPORT_SYMBOL_GPL (svc_alien_sock); +/** * svc_addsock - add a listener socket to an RPC service * @serv: pointer to RPC service to which to add a new listener
sound/pci/hda/patch_realtek.c +6 -2
@@ -937,6 +937,7 @@ static int alc_codec_rename_from_preset(struct hda_codec *codec)static const struct snd_pci_quirk beep_white_list[] = {SND_PCI_QUIRK (0x1043 ,0x103c ,"ASUS" ,1 ), +SND_PCI_QUIRK (0x1043 ,0x115d ,"ASUS" ,1 ),SND_PCI_QUIRK (0x1043 ,0x829f ,"ASUS" ,1 ),SND_PCI_QUIRK (0x1043 ,0x8376 ,"EeePC" ,1 ),SND_PCI_QUIRK (0x1043 ,0x83ce ,"EeePC" ,1 ),
@@ -2858,8 +2859,9 @@ static void alc269_fixup_mic_mute_hook(void *private_data, int enabled)if (spec->mute_led_polarity) enabled = !enabled; - pinval =AC_PINCTL_IN_EN | - (enabled ?AC_PINCTL_VREF_HIZ :AC_PINCTL_VREF_80 ); + pinval =snd_hda_codec_get_pin_target (codec, spec->mute_led_nid); + pinval &= ~AC_PINCTL_VREFEN ; + pinval |= enabled ?AC_PINCTL_VREF_HIZ :AC_PINCTL_VREF_80 ;if (spec->mute_led_nid)snd_hda_set_pin_ctl_cache (codec, spec->mute_led_nid, pinval); }
@@ -3901,6 +3903,7 @@ static int patch_alc269(struct hda_codec *codec) spec->codec_variant =ALC269_TYPE_ALC284 ;break ;case 0x10ec0286 : +case 0x10ec0288 : spec->codec_variant =ALC269_TYPE_ALC286 ;break ;case 0x10ec0255 :
@@ -4643,6 +4646,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { { .id = 0x10ec0283, .name = "ALC283", .patch = patch_alc269 }, { .id = 0x10ec0284, .name = "ALC284", .patch = patch_alc269 }, { .id = 0x10ec0286, .name = "ALC286", .patch = patch_alc269 }, + { .id = 0x10ec0288, .name = "ALC288", .patch = patch_alc269 }, { .id = 0x10ec0290, .name = "ALC290", .patch = patch_alc269 }, { .id = 0x10ec0292, .name = "ALC292", .patch = patch_alc269 }, { .id = 0x10ec0861, .rev = 0x100340, .name = "ALC660",
sound/pci/ice1712/ice1712.c +10 -5
@@ -685,9 +685,10 @@ static snd_pcm_uframes_t snd_ice1712_playback_pointer(struct snd_pcm_substream *if (!(snd_ice1712_read (ice,ICE1712_IREG_PBK_CTRL ) &1 ))return 0 ; ptr = runtime->buffer_size -inw (ice->ddma_port +4 ); + ptr =bytes_to_frames (substream->runtime, ptr);if (ptr == runtime->buffer_size) ptr =0 ; -return bytes_to_frames (substream->runtime, ptr); +return ptr; }static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer (struct snd_pcm_substream *substream)
@@ -704,9 +705,10 @@ static snd_pcm_uframes_t snd_ice1712_playback_ds_pointer(struct snd_pcm_substrea addr =ICE1712_DSC_ADDR0 ; ptr =snd_ice1712_ds_read (ice, substream->number *2 , addr) - ice->playback_con_virt_addr[substream->number]; + ptr =bytes_to_frames (substream->runtime, ptr);if (ptr == substream->runtime->buffer_size) ptr =0 ; -return bytes_to_frames (substream->runtime, ptr); +return ptr; }static snd_pcm_uframes_t snd_ice1712_capture_pointer (struct snd_pcm_substream *substream)
@@ -717,9 +719,10 @@ static snd_pcm_uframes_t snd_ice1712_capture_pointer(struct snd_pcm_substream *sif (!(snd_ice1712_read (ice,ICE1712_IREG_CAP_CTRL ) &1 ))return 0 ; ptr =inl (ICEREG (ice,CONCAP_ADDR )) - ice->capture_con_virt_addr; + ptr =bytes_to_frames (substream->runtime, ptr);if (ptr == substream->runtime->buffer_size) ptr =0 ; -return bytes_to_frames (substream->runtime, ptr); +return ptr; }static const struct snd_pcm_hardware snd_ice1712_playback = {
@@ -1113,9 +1116,10 @@ static snd_pcm_uframes_t snd_ice1712_playback_pro_pointer(struct snd_pcm_substreif (!(inl (ICEMT (ice,PLAYBACK_CONTROL )) &ICE1712_PLAYBACK_START ))return 0 ; ptr = ice->playback_pro_size - (inw (ICEMT (ice,PLAYBACK_SIZE )) <<2 ); + ptr =bytes_to_frames (substream->runtime, ptr);if (ptr == substream->runtime->buffer_size) ptr =0 ; -return bytes_to_frames (substream->runtime, ptr); +return ptr; }static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer (struct snd_pcm_substream *substream)
@@ -1126,9 +1130,10 @@ static snd_pcm_uframes_t snd_ice1712_capture_pro_pointer(struct snd_pcm_substreaif (!(inl (ICEMT (ice,PLAYBACK_CONTROL )) &ICE1712_CAPTURE_START_SHADOW ))return 0 ; ptr = ice->capture_pro_size - (inw (ICEMT (ice,CAPTURE_SIZE )) <<2 ); + ptr =bytes_to_frames (substream->runtime, ptr);if (ptr == substream->runtime->buffer_size) ptr =0 ; -return bytes_to_frames (substream->runtime, ptr); +return ptr; }static const struct snd_pcm_hardware snd_ice1712_playback_pro = {
sound/soc/codecs/cs42l51.c +4 -5
@@ -124,9 +124,8 @@ static int cs42l51_set_chan_mix(struct snd_kcontrol *kcontrol, static const DECLARE_TLV_DB_SCALE(adc_pcm_tlv, -5150, 50, 0); static const DECLARE_TLV_DB_SCALE(tone_tlv, -1050, 150, 0); -/* This is a lie. after -102 db, it stays at -102 */ -/* maybe a range would be better */ -static const DECLARE_TLV_DB_SCALE(aout_tlv, -11550, 50, 0); + +static const DECLARE_TLV_DB_SCALE(aout_tlv, -10200, 50, 0); static const DECLARE_TLV_DB_SCALE(boost_tlv, 1600, 1600, 0);static const char *chan_mix[] = {
@@ -141,7 +140,7 @@ static const struct soc_enum cs42l51_chan_mix =static const struct snd_kcontrol_new cs42l51_snd_controls[] = {SOC_DOUBLE_R_SX_TLV ("PCM Playback Volume" ,CS42L51_PCMA_VOL ,CS42L51_PCMB_VOL , -6 ,0x19 ,0x7F , adc_pcm_tlv), +0 ,0x19 ,0x7F , adc_pcm_tlv),SOC_DOUBLE_R ("PCM Playback Switch" ,CS42L51_PCMA_VOL ,CS42L51_PCMB_VOL ,7 ,1 ,1 ), SOC_DOUBLE_R_SX_TLV("Analog Playback Volume",
@@ -149,7 +148,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = { 0, 0x34, 0xE4, aout_tlv),SOC_DOUBLE_R_SX_TLV ("ADC Mixer Volume" ,CS42L51_ADCA_VOL ,CS42L51_ADCB_VOL , -6 ,0x19 ,0x7F , adc_pcm_tlv), +0 ,0x19 ,0x7F , adc_pcm_tlv),SOC_DOUBLE_R ("ADC Mixer Switch" ,CS42L51_ADCA_VOL ,CS42L51_ADCB_VOL ,7 ,1 ,1 ), SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0),
sound/soc/codecs/cs42l52.c +4 -4
@@ -350,7 +350,7 @@ static const char * const right_swap_text[] = {static const unsigned int swap_values[] = {0 ,1 ,3 };static const struct soc_enum adca_swap_enum = -SOC_VALUE_ENUM_SINGLE (CS42L52_ADC_PCM_MIXER ,2 ,1 , +SOC_VALUE_ENUM_SINGLE (CS42L52_ADC_PCM_MIXER ,2 ,3 ,ARRAY_SIZE (left_swap_text), left_swap_text, swap_values);
@@ -359,7 +359,7 @@ static const struct snd_kcontrol_new adca_mixer =SOC_DAPM_ENUM ("Route" , adca_swap_enum);static const struct soc_enum pcma_swap_enum = -SOC_VALUE_ENUM_SINGLE (CS42L52_ADC_PCM_MIXER ,6 ,1 , +SOC_VALUE_ENUM_SINGLE (CS42L52_ADC_PCM_MIXER ,6 ,3 ,ARRAY_SIZE (left_swap_text), left_swap_text, swap_values);
@@ -368,7 +368,7 @@ static const struct snd_kcontrol_new pcma_mixer =SOC_DAPM_ENUM ("Route" , pcma_swap_enum);static const struct soc_enum adcb_swap_enum = -SOC_VALUE_ENUM_SINGLE (CS42L52_ADC_PCM_MIXER ,0 ,1 , +SOC_VALUE_ENUM_SINGLE (CS42L52_ADC_PCM_MIXER ,0 ,3 ,ARRAY_SIZE (right_swap_text), right_swap_text, swap_values);
@@ -377,7 +377,7 @@ static const struct snd_kcontrol_new adcb_mixer =SOC_DAPM_ENUM ("Route" , adcb_swap_enum);static const struct soc_enum pcmb_swap_enum = -SOC_VALUE_ENUM_SINGLE (CS42L52_ADC_PCM_MIXER ,4 ,1 , +SOC_VALUE_ENUM_SINGLE (CS42L52_ADC_PCM_MIXER ,4 ,3 ,ARRAY_SIZE (right_swap_text), right_swap_text, swap_values);
sound/soc/codecs/cs42l73.c +3 -3
@@ -325,7 +325,7 @@ static const char * const cs42l73_mono_mix_texts[] = {static const unsigned int cs42l73_mono_mix_values[] = {0 ,1 ,2 };static const struct soc_enum spk_asp_enum = -SOC_VALUE_ENUM_SINGLE (CS42L73_MMIXCTL ,6 ,1 , +SOC_VALUE_ENUM_SINGLE (CS42L73_MMIXCTL ,6 ,3 ,ARRAY_SIZE (cs42l73_mono_mix_texts), cs42l73_mono_mix_texts, cs42l73_mono_mix_values);
@@ -343,7 +343,7 @@ static const struct snd_kcontrol_new spk_xsp_mixer =SOC_DAPM_ENUM ("Route" , spk_xsp_enum);static const struct soc_enum esl_asp_enum = -SOC_VALUE_ENUM_SINGLE (CS42L73_MMIXCTL ,2 ,5 , +SOC_VALUE_ENUM_SINGLE (CS42L73_MMIXCTL ,2 ,3 ,ARRAY_SIZE (cs42l73_mono_mix_texts), cs42l73_mono_mix_texts, cs42l73_mono_mix_values);
@@ -352,7 +352,7 @@ static const struct snd_kcontrol_new esl_asp_mixer =SOC_DAPM_ENUM ("Route" , esl_asp_enum);static const struct soc_enum esl_xsp_enum = -SOC_VALUE_ENUM_SINGLE (CS42L73_MMIXCTL ,0 ,7 , +SOC_VALUE_ENUM_SINGLE (CS42L73_MMIXCTL ,0 ,3 ,ARRAY_SIZE (cs42l73_mono_mix_texts), cs42l73_mono_mix_texts, cs42l73_mono_mix_values);