Skip to content
  1. Apr 28, 2014
    • Linus Torvalds's avatar
      Merge tag 'tty-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · a8d70698
      Linus Torvalds authored
      Pull tty/serial fixes from Greg KH:
       "Here are a few tty/serial fixes for 3.15-rc3 that resolve a number of
        reported issues in the 8250 and samsung serial drivers, as well as a
        character loss fix for the tty core that was caused by the lock
        removal patches a release ago"
      
      * tag 'tty-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial_core: fix uart PORT_UNKNOWN handling
        serial: samsung: Change barrier() to cpu_relax() in console output
        serial: samsung: don't check config for every character
        serial: samsung: Use the passed in "port", fixing kgdb w/ no console
        serial: 8250: Fix thread unsafe __dma_tx_complete function
        8250_core: Fix unwanted TX chars write
        tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc
      a8d70698
    • Linus Torvalds's avatar
      Merge tag 'staging-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · d0c15ad7
      Linus Torvalds authored
      Pull staging / IIO driver fixes from Greg KH:
       "Here are some small staging and IIO driver fixes for 3.15-rc3.
      
        Nothing major at all, just some assorted issues that people have
        reported"
      
      * tag 'staging-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: usbdux: bug fix for accessing 'ao_chanlist' in private data
        iio: adc: mxs-lradc: fix warning when buidling on avr32
        iio: cm36651: Fix i2c client leak and possible NULL pointer dereference
        iio: querying buffer scan_mask should return 0/1
        staging:iio:ad2s1200 fix a missing break
        iio: adc: at91_adc: correct default shtim value
        ARM: at91: at91sam9260: change at91_adc name
        ARM: at91: at91sam9g45: change at91_adc name
        iio: cm32181: Fix read integration time function
        iio: adc: at91_adc: Repair broken platform_data support
      d0c15ad7
    • Linus Torvalds's avatar
      Merge tag 'driver-core-3.15-rc3' of... · 005fbcd0
      Linus Torvalds authored
      Merge tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
      
      Pull driver core fixes from Greg KH:
       "Here are some kernfs fixes for 3.15-rc3 that resolve some reported
        problems.  Nothing huge, but all needed"
      
      * tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        s390/ccwgroup: Fix memory corruption
        kernfs: add back missing error check in kernfs_fop_mmap()
        kernfs: fix a subdir count leak
      005fbcd0
    • Linus Torvalds's avatar
      Merge tag 'usb-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · fefb8275
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a number of USB fixes for 3.15-rc3.  The majority are gadget
        fixes, as we didn't get any of those in for 3.15-rc2.  The others are
        all over the place, and there's a number of new device id addtions as
        well."
      
      * tag 'usb-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (35 commits)
        usb: option: add and update a number of CMOTech devices
        usb: option: add Alcatel L800MA
        usb: option: add Olivetti Olicard 500
        usb: qcserial: add Sierra Wireless MC7305/MC7355
        usb: qcserial: add Sierra Wireless MC73xx
        usb: qcserial: add Sierra Wireless EM7355
        USB: io_ti: fix firmware download on big-endian machines
        usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PM
        xhci: extend quirk for Renesas cards
        xhci: Switch Intel Lynx Point ports to EHCI on shutdown.
        usb: xhci: Prefer endpoint context dequeue pointer over stopped_trb
        phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY
        phy: fix kernel oops in phy_lookup()
        phy: restore OMAP_CONTROL_PHY dependencies
        phy: exynos: fix building as a module
        USB: serial: fix sysfs-attribute removal deadlock
        usb: wusbcore: fix panic in wusbhc_chid_set
        usb: wusbcore: convert nested lock to use spin_lock instead of spin_lock_irq
        uwb: don't call spin_unlock_irq in a USB completion handler
        usb: chipidea: coordinate usb phy initialization for different phy type
        ...
      fefb8275
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · e9dba837
      Linus Torvalds authored
      Pull ACPI and power management fixes from Rafael Wysocki:
       "These include a fix for a recent ACPI regression related to device
        notifications, intel_idle fix related to IvyTown support, fix for a
        buffer size issue in ACPICA, PM core fix related to the "freeze" sleep
        state, four fixes for various types of breakage in cpufreq drivers, a
        PNP workaround for a wrong memory region size in ACPI tables, and a
        fix and cleanup for the ACPI tools Makefile.
      
        Specifics:
      
         - Fix for broken ACPI notifications on some systems caused by a
           recent ACPI hotplug commit that blocked the propagation of unknown
           type notifications to device drivers inadvertently.
      
         - intel_idle fix to make the IvyTown C-states handling (added
           recently) work as intended which now is broken due to missing
           braces.  From Christoph Jaeger.
      
         - ACPICA fix to make it allocate buffers of the right sizes for the
           Generic Serial Bus operation region access.  From Lv Zheng.
      
         - PM core fix unblocking cpuidle before entering the "freeze" sleep
           state which causes that state to be able to actually save more
           energy than runtime idle.
      
         - Configuration and build fixes for the highbank and powernv cpufreq
           drivers from Kefeng Wang and Srivatsa S Bhat.
      
         - Coccinelle warning fix related to error pointers for the unicore32
           cpufreq driver from Duan Jiong.
      
         - Integer overflow fix for the ppc-corenet cpufreq driver from Geert
           Uytterhoeven.
      
         - Workaround for BIOSes that don't report the entire Intel MCH area
           in their ACPI tables from Bjorn Helgaas.
      
         - ACPI tools Makefile fix and cleanup from Thomas Renninger"
      
      * tag 'pm+acpi-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI / notify: Do not block unknown type notifications in root handler
        PNP: Work around BIOS defects in Intel MCH area reporting
        cpufreq: highbank: fix ARM_HIGHBANK_CPUFREQ dependency warning
        cpufreq: ppc: Fix integer overflow in expression
        cpufreq, powernv: Fix build failure on UP
        cpufreq: unicore32: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
        PM / suspend: Make cpuidle work in the "freeze" state
        intel_idle: fix IVT idle state table setting
        ACPICA: Fix buffer allocation issue for generic_serial_bus region accesses.
        tools/power/acpi: Minor bugfixes
      e9dba837
  2. Apr 26, 2014
    • Rafael J. Wysocki's avatar
      Merge branches 'pnp' and 'acpi-hotplug' · d4c9c8a0
      Rafael J. Wysocki authored
      * pnp:
        PNP: Work around BIOS defects in Intel MCH area reporting
      
      * acpi-hotplug:
        ACPI / notify: Do not block unknown type notifications in root handler
      d4c9c8a0
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging · 9a60ee11
      Linus Torvalds authored
      Pull hwmon fixes from Guenter Roeck:
       - ltc2945: Don't unecessarily crash kernel on implementation error
       - vexpress: Fix 'name' and 'label' attributes
      
      * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (ltc2945) Don't crash the kernel unnecessarily
        hwmon: (vexpress) Avoid creating non-existing attributes
        hwmon: (vexpress) Use legal hwmon device names
      9a60ee11
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 6dda80ff
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a set of seven fixes, three (hpsa) and free'd command
        references correcting bugs in the last round of updates and the
        remaining four correcting problems within the SCSI error handler that
        was causing a deadlock within USB"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        [SCSI] More USB deadlock fixes
        [SCSI] Fix USB deadlock caused by SCSI error handling
        [SCSI] Fix command result state propagation
        [SCSI] Fix spurious request sense in error handling
        [SCSI] don't reference freed command in scsi_prep_return
        [SCSI] don't reference freed command in scsi_init_sgtable
        [SCSI] hpsa: fix NULL dereference in hpsa_put_ctlr_into_performant_mode()
      6dda80ff
    • Linus Torvalds's avatar
      Merge tag 'fixes-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 3fe89d2e
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "Since we didn't get around to collect fixes in time for -rc2 over the
        easter vacation, this one is unfortunately a bit larger than we'd like
        for an -rc3 merge.
      
        A large set of the changes is in the device tree sources, so I'm
        splitting out the description between code changes and DT changes.
        Aside from omap and versatile express, the actual code bugs are and
        trivial.  Here is an overview:
      
        imx:
         - fix video clock settings
         - fix one clock refcounting bug
      
        omap:
         - update defconfig for renamed USB PHY driver
         - fix error handling in gpmc
         - fix N900 video initialization regression
         - fix reression in hwmod code from missing braces
         - fix am43xx and omap3 clocks
         - remove bogus write to voltage control register
      
        pxa:
         - fix build regression from 3.13 header cleanup
      
        rockchip:
         - fix a misleading printk string
      
        shmobile:
         - fix incorrect sound setting on multiple machines
      
        spear:
         - remove incorrect __init section annotation
      
        tegra:
         - remove a stale Kconfig entry
      
        u300:
         - update defconfig
      
        ux500:
         - enable common wireless and sensor drivers in defconfig
         - more defconfig updates
      
        vexpress:
         - fix voltage calculation for opp
         - fix reboot hang and warning
         - fix out-of-bounds array access
         - improve error handling in clock driver
      
        overall:
         - always select CLKSRC_OF in multiplatform builds
      
        And these are the devicetree related changes:
      
        imx:
         - add missing #clock-cell properties
         - fix pinctrl setting in imx6sl-evk
         - fix video endpoint on imx53
         - remove obsolete lvds-channel nodes (multiple patches)
         - add missing second stmpe node
         - fix usb host mode on dmo-edmqmx6 (multiple patches)
         - fix gic node #address-cells to match usage
         - add missing legacy IRQ map for PCIe
         - fix microsom pincontrol setting for rgmii
         - fix fatal typo in touchscreen DT usage for mx5
         - list all RAM present on m53evk and mx53qsb
      
        omap:
         - fix bug in DT handling of gpmc external bus
         - add DT for older revision of beagleboard
         - fix regression after DT node name fixes
         - remove obsolete properties for gpmc
         - fix pinmux comment to match DT it refers to
         - fix newly added dra7xx clock node data
         - add missing clock for USB PHY
      
        mvebu:
         - add missing clock for mdio node
         - fix nonstandard vendor prefixes on i2c nodes
      
        rockchip:
         - fix pin control setting for uart
      
        shmobile:
         - fix typo in DT data for pin control (multiple patches)
         - fix gic node #address-cells to match usage
      
        tegra:
         - fix clock and uart DT representation to match hardware
      
        zynq:
         - add DT nodes for newly added driver
         - add DT properties required for cpufreq-ondemand
      
        overall:
         - restore alphabetic order in Makefile
         - grammar fixes in bindings"
      
      * tag 'fixes-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (66 commits)
        ARM: vexpress/TC2: Convert OPP voltage to uV before storing
        power/reset: vexpress: Fix restart/power off operation
        dt: tegra: remove non-existent clock IDs
        clk: tegra: remove non-existent clocks
        ARM: tegra: remove UART5/UARTE from tegra124.dtsi
        ARM: tegra: remove TEGRA_EMC_SCALING_ENABLE
        ARM: Tidy up DTB Makefile entries
        ARM: fix missing CLKSRC_OF on multi-platform
        ARM: spear: add __init to spear_clocksource_init()
        ARM: pxa: hx4700.h: include "irqs.h" for PXA_NR_BUILTIN_GPIO
        arm/mach-vexpress: array accessed out of bounds
        clk: vexpress: NULL dereference on error path
        ARM: OMAP2+: Fix GPMC remap for devices using an offset
        ARM: zynq: dt: Add I2C nodes to Zynq device tree
        ARM: zynq: DT: Add 'clock-latency' property
        ARM: OMAP2+: Fix oops for GPMC free
        ARM: dts: Add support for the BeagleBoard xM A/B
        ARM: dts: Grammar /that will/it will/
        ARM: dts: Grammar /is uses/ is used/
        ARM: OMAP2+: Fix config name for USB3 PHY
        ...
      3fe89d2e
    • Linus Torvalds's avatar
      Merge tag 'locks-v3.15-2' of git://git.samba.org/jlayton/linux · 625bba66
      Linus Torvalds authored
      Pull file locking fixes from Jeff Layton:
       "File locking related bugfixes for v3.15 (pile #2)
      
         - fix for a long-standing bug in __break_lease that can cause soft
           lockups
         - renaming of file-private locks to "open file description" locks,
           and the command macros to more visually distinct names
      
        The fix for __break_lease is also in the pile of patches for which
        Bruce sent a pull request, but I assume that your merge procedure will
        handle that correctly.
      
        For the other patches, I don't like the fact that we need to rename
        this stuff at this late stage, but it should be settled now
        (hopefully)"
      
      * tag 'locks-v3.15-2' of git://git.samba.org/jlayton/linux:
        locks: rename FL_FILE_PVT and IS_FILE_PVT to use "*_OFDLCK" instead
        locks: rename file-private locks to "open file description locks"
        locks: allow __break_lease to sleep even when break_time is 0
      625bba66
    • Linus Torvalds's avatar
      Merge branch 'for-3.15' of git://linux-nfs.org/~bfields/linux · b8e6dece
      Linus Torvalds authored
      Pull nfsd bugfixes from Bruce Fields:
       "Three small nfsd bugfixes (including one locks.c fix for a bug
        triggered only from nfsd).
      
        Jeff's patches are for long-existing problems that became easier to
        trigger since the addition of vfs delegation support"
      
      * 'for-3.15' of git://linux-nfs.org/~bfields/linux:
        Revert "nfsd4: fix nfs4err_resource in 4.1 case"
        nfsd: set timeparms.to_maxval in setup_callback_client
        locks: allow __break_lease to sleep even when break_time is 0
      b8e6dece
    • Christian Borntraeger's avatar
      s390/ccwgroup: Fix memory corruption · 0c8c77d3
      Christian Borntraeger authored
      commit 0b60f9ea
      
       (s390: use
      device_remove_file_self() instead of device_schedule_callback())
      
      caused random memory corruption on my s390 box. Turns out that the
      last element of the ccwgroup structure is of dynamic size, so we
      must move the newly introduced work structure _before_ the zero
      length array.
      
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      CC: Tejun Heo <tj@kernel.org>
      CC: Martin Schwidefsky <schwidefsky@de.ibm.com>
      CC: Heiko Carstens <heiko.carstens@de.ibm.com>
      CC: Sebastian Ott <sebott@linux.vnet.ibm.com>
      CC: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0c8c77d3
    • Tejun Heo's avatar
      kernfs: add back missing error check in kernfs_fop_mmap() · b44b2140
      Tejun Heo authored
      While updating how mmap enabled kernfs files are handled by lockdep,
      9b2db6e1
      
       ("sysfs: bail early from kernfs_file_mmap() to avoid
      spurious lockdep warning") inadvertently dropped error return check
      from kernfs_file_mmap().  The intention was just dropping "if
      (ops->mmap)" check as the control won't reach the point if the mmap
      callback isn't implemented, but I mistakenly removed the error return
      check together with it.
      
      This led to Xorg crash on i810 which was reported and bisected to the
      commit and then to the specific change by Tobias.
      
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Reported-and-bisected-by: default avatarTobias Powalowski <tobias.powalowski@googlemail.com>
      Tested-by: default avatarTobias Powalowski <tobias.powalowski@googlemail.com>
      References: http://lkml.kernel.org/g/533D01BD.1010200@googlemail.com
      
      
      Cc: stable <stable@vger.kernel.org> # 3.14
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b44b2140
    • Jianyu Zhan's avatar
      kernfs: fix a subdir count leak · c1befb88
      Jianyu Zhan authored
      
      
      Currently kernfs_link_sibling() increates parent->dir.subdirs before
      adding the node into parent's chidren rb tree.
      
      Because it is possible that kernfs_link_sibling() couldn't find
      a suitable slot and bail out, this leads to a mismatch between
      elevated subdir count with actual children node numbers.
      
      This patches fix this problem, by moving the subdir accouting
      after the actual addtion happening.
      
      Signed-off-by: default avatarJianyu Zhan <nasa4836@gmail.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c1befb88
    • Bjørn Mork's avatar
      usb: option: add and update a number of CMOTech devices · 34f972d6
      Bjørn Mork authored
      
      
      A number of older CMOTech modems are based on Qualcomm
      chips.  The blacklisted interfaces are QMI/wwan.
      
      Reported-by: default avatarLars Melin <larsm17@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      34f972d6
    • Bjørn Mork's avatar
      usb: option: add Alcatel L800MA · dd6b48ec
      Bjørn Mork authored
      
      
      Device interface layout:
      0: ff/ff/ff - serial
      1: ff/00/00 - serial AT+PPP
      2: ff/ff/ff - QMI/wwan
      3: 08/06/50 - storage
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      dd6b48ec
    • Bjørn Mork's avatar
      usb: option: add Olivetti Olicard 500 · 533b3994
      Bjørn Mork authored
      
      
      Device interface layout:
      0: ff/ff/ff - serial
      1: ff/ff/ff - serial AT+PPP
      2: 08/06/50 - storage
      3: ff/ff/ff - serial
      4: ff/ff/ff - QMI/wwan
      
      Cc: <stable@vger.kernel.org>
      Reported-by: default avatarJulio Araujo <julio.araujo@wllctel.com.br>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      533b3994
    • Bjørn Mork's avatar
      usb: qcserial: add Sierra Wireless MC7305/MC7355 · bce4f588
      Bjørn Mork authored
      
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bce4f588
    • Bjørn Mork's avatar
      usb: qcserial: add Sierra Wireless MC73xx · 70a3615f
      Bjørn Mork authored
      
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      70a3615f
    • Bjørn Mork's avatar
      usb: qcserial: add Sierra Wireless EM7355 · a00986f8
      Bjørn Mork authored
      
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a00986f8
    • Johan Hovold's avatar
      USB: io_ti: fix firmware download on big-endian machines · 5509076d
      Johan Hovold authored
      
      
      During firmware download the device expects memory addresses in
      big-endian byte order. As the wIndex parameter which hold the address is
      sent in little-endian byte order regardless of host byte order, we need
      to use swab16 rather than cpu_to_be16.
      
      Also make sure to handle the struct ti_i2c_desc size parameter which is
      returned in little-endian byte order.
      
      Reported-by: default avatarLudovic Drolez <ldrolez@debian.org>
      Tested-by: default avatarLudovic Drolez <ldrolez@debian.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5509076d
    • David Cohen's avatar
      usb/xhci: fix compilation warning when !CONFIG_PCI && !CONFIG_PM · 01bb59eb
      David Cohen authored
      When CONFIG_PCI and CONFIG_PM are not selected, xhci.c gets this
      warning:
      drivers/usb/host/xhci.c:409:13: warning: ‘xhci_msix_sync_irqs’ defined
      but not used [-Wunused-function]
      
      Instead of creating nested #ifdefs, this patch fixes it by defining the
      xHCI PCI stubs as inline.
      
      This warning has been in since 3.2 kernel and was
      caused by commit 421aa841
      
      
      "usb/xhci: hide MSI code behind PCI bars", but wasn't noticed
      until 3.13 when a configuration with these options was tried
      
      Signed-off-by: default avatarDavid Cohen <david.a.cohen@linux.intel.com>
      Cc: stable@vger.kernel.org # 3.2
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      01bb59eb
    • Igor Gnatenko's avatar
      xhci: extend quirk for Renesas cards · 6db249eb
      Igor Gnatenko authored
      After suspend another Renesas PCI-X USB 3.0 card doesn't work.
      [root@fedora-20 ~]# lspci -vmnnd 1912:
      Device:	03:00.0
      Class:	USB controller [0c03]
      Vendor:	Renesas Technology Corp. [1912]
      Device:	uPD720202 USB 3.0 Host Controller [0015]
      SVendor:	Renesas Technology Corp. [1912]
      SDevice:	uPD720202 USB 3.0 Host Controller [0015]
      Rev:	02
      ProgIf:	30
      
      This patch should be applied to stable kernel 3.14 that contain
      the commit 1aa9578c
      
      
      "xhci: Fix resume issues on Renesas chips in Samsung laptops"
      
      Reported-and-tested-by: default avatarAnatoly Kharchenko <rfr-bugs@yandex.ru>
      Reference: http://redmine.russianfedora.pro/issues/1315
      
      
      Signed-off-by: default avatarIgor Gnatenko <i.gnatenko.brain@gmail.com>
      Cc: stable@vger.kernel.org # 3.14
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6db249eb
    • Denis Turischev's avatar
      xhci: Switch Intel Lynx Point ports to EHCI on shutdown. · c09ec25d
      Denis Turischev authored
      The same issue like with Panther Point chipsets. If the USB ports are
      switched to xHCI on shutdown, the xHCI host will send a spurious interrupt,
      which will wake the system. Some BIOS have work around for this, but not all.
      One example is Compulab's mini-desktop, the Intense-PC2.
      
      The bug can be avoided if the USB ports are switched back to EHCI on
      shutdown.
      
      This patch should be backported to stable kernels as old as 3.12,
      that contain the commit 638298dc
      
      
      "xhci: Fix spurious wakeups after S5 on Haswell"
      
      Signed-off-by: default avatarDenis Turischev <denis@compulab.co.il>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c09ec25d
    • Julius Werner's avatar
      usb: xhci: Prefer endpoint context dequeue pointer over stopped_trb · 1f81b6d2
      Julius Werner authored
      We have observed a rare cycle state desync bug after Set TR Dequeue
      Pointer commands on Intel LynxPoint xHCs (resulting in an endpoint that
      doesn't fetch new TRBs and thus an unresponsive USB device). It always
      triggers when a previous Set TR Dequeue Pointer command has set the
      pointer to the final Link TRB of a segment, and then another URB gets
      enqueued and cancelled again before it can be completed. Further
      investigation showed that the xHC had returned the Link TRB in the TRB
      Pointer field of the Transfer Event (CC == Stopped -- Length Invalid),
      but when xhci_find_new_dequeue_state() later accesses the Endpoint
      Context's TR Dequeue Pointer field it is set to the first TRB of the
      next segment.
      
      The driver expects those two values to be the same in this situation,
      and uses the cycle state of the latter together with the address of the
      former. This should be fine according to the XHCI specification, since
      the endpoint ring should be stopped when returning the Transfer Event
      and thus should not advance over the Link TRB before it gets restarted.
      However, real-world XHCI implementations apparently don't really care
      that much about these details, so the driver should follow a more
      defensive approach to try to work around HC spec violations.
      
      This patch removes the stopped_trb variable that had been used to store
      the TRB Pointer from the last Transfer Event of a stopped TRB. Instead,
      xhci_find_new_dequeue_state() now relies only on the Endpoint Context,
      requiring a small amount of additional processing to find the virtual
      address corresponding to the TR Dequeue Pointer. Some other parts of the
      function were slightly rearranged to better fit into this model.
      
      This patch should be backported to kernels as old as 2.6.31 that contain
      the commit ae636747
      
       "USB: xhci: URB
      cancellation support."
      
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1f81b6d2
  3. Apr 25, 2014
    • Arnd Bergmann's avatar
      Merge tag 'zynq-dt-fixes-for-3.15' of git://git.xilinx.com/linux-xlnx into fixes · 76e7745e
      Arnd Bergmann authored
      arm: Xilinx Zynq DT fixes for v3.15
      
      - Enable Zynq I2c
      - Fix cpufreq DT binding
      
      * tag 'zynq-dt-fixes-for-3.15' of git://git.xilinx.com/linux-xlnx
      
      :
        ARM: zynq: dt: Add I2C nodes to Zynq device tree
        ARM: zynq: DT: Add 'clock-latency' property
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      76e7745e
    • Thomas Pfaff's avatar
      serial_core: fix uart PORT_UNKNOWN handling · 7deb39ed
      Thomas Pfaff authored
      
      
      While porting a RS485 driver from 2.6.29 to 3.14, i noticed that the serial tty
      driver could break it by using uart ports that it does not own :
      
      1. uart_change_pm ist called during uart_open and calls the uart pm function
         without checking for PORT_UNKNOWN.
         The fix is to move uart_change_pm from uart_open to uart_port_startup.
      2. The return code from the uart request_port call in uart_set_info is not
         handled properly, leading to the situation that the serial driver also
         thinks it owns the uart ports.
         This can triggered by doing following actions :
      
         setserial /dev/ttyS0 uart none    # release the uart ports
         modprobe lirc-serial              # or any other device that uses the uart
         setserial /dev/ttyS0 uart 16550   # gives no error and the uart tty driver
                                           # can use the ports as well
      
      Signed-off-by: default avatarThomas Pfaff <tpfaff@pcs.com>
      Reviewed-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7deb39ed
    • Doug Anderson's avatar
      serial: samsung: Change barrier() to cpu_relax() in console output · f94b0572
      Doug Anderson authored
      
      
      The two functions to write out to the console (one used in normal
      console mode and one in polling console mode) were slightly different.
      One used a barrier() in its loop and the other a cpu_relax().  The
      barrier() really doesn't do anything since we're using rd_regl() to
      read the port anyway.  Switch it to cpu_relax() to make things
      consistent.
      
      No known bugs / issues are fixed by this change--it just makes things
      more consistent.
      
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f94b0572
    • Doug Anderson's avatar
      serial: samsung: don't check config for every character · ab88c8dc
      Doug Anderson authored
      
      
      The s3c24xx_serial_console_putchar() is _only_ ever used by
      s3c24xx_serial_console_write() and is called in a loop (indirectly
      through uart_console_write()).  There's no reason to call
      s3c24xx_port_configured() for every iteration through the loop.  Move
      it outside the loop.
      
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ab88c8dc
    • Doug Anderson's avatar
      serial: samsung: Use the passed in "port", fixing kgdb w/ no console · bb7f09ba
      Doug Anderson authored
      
      
      The two functions in the samsung serial driver used for writing
      characters out to the port were inconsistent about whether they used
      the passed in "port" or the global "cons_uart".  There was no reason
      to use the global and the use of the global in
      s3c24xx_serial_put_poll_char() caused a crash in the case where you
      used the serial port for kgdboc but not for console.
      
      Fix it so we used the passed in variable.
      
      Note that this doesn't fix all problems with the samsung serial
      driver.  Specifically:
      * s3c24xx_serial_console_putchar() is still 99% identical to
        s3c24xx_serial_put_poll_char() (the function signature is different,
        but that's about it).  A future patch will make them slightly less
        identical and judging by other serial drivers we may need yet more
        differences eventually.
      * The samsung serial driver still doesn't allow you to have more than
        one console port since it still uses the global cons_uart in
        s3c24xx_serial_console_write().
      
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bb7f09ba
    • Loic Poulain's avatar
      serial: 8250: Fix thread unsafe __dma_tx_complete function · f8fd1b03
      Loic Poulain authored
      
      
      __dma_tx_complete is not protected against concurrent
      call of serial8250_tx_dma. it can lead to circular tail
      index corruption or parallel call of serial_tx_dma on the
      same data portion.
      
      This patch fixes this issue by holding the port lock.
      
      Signed-off-by: default avatarLoic Poulain <loic.poulain@intel.com>
      Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f8fd1b03
    • Loic Poulain's avatar
      8250_core: Fix unwanted TX chars write · b08c9c31
      Loic Poulain authored
      
      
      On transmit-hold-register empty, serial8250_tx_chars
      should be called only if we don't use DMA.
      DMA has its own tx cycle.
      
      Signed-off-by: default avatarLoic Poulain <loic.poulain@intel.com>
      Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b08c9c31
    • Manfred Schlaegl's avatar
      tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc · 6a20dbd6
      Manfred Schlaegl authored
      The race was introduced while development of linux-3.11 by
      e8437d7e and
      e9975fde
      
      .
      Originally it was found and reproduced on linux-3.12.15 and
      linux-3.12.15-rt25, by sending 500 byte blocks with 115kbaud to the
      target uart in a loop with 100 milliseconds delay.
      
      In short:
       1. The consumer flush_to_ldisc is on to remove the head tty_buffer.
       2. The producer adds a number of bytes, so that a new tty_buffer must
      	be allocated and added by __tty_buffer_request_room.
       3. The consumer removes the head tty_buffer element, without handling
      	newly committed data.
      
      Detailed example:
       * Initial buffer:
         * Head, Tail -> 0: used=250; commit=250; read=240; next=NULL
       * Consumer: ''flush_to_ldisc''
         * consumed 10 Byte
         * buffer:
           * Head, Tail -> 0: used=250; commit=250; read=250; next=NULL
      {{{
      		count = head->commit - head->read;	// count = 0
      		if (!count) {				// enter
      			// INTERRUPTED BY PRODUCER ->
      			if (head->next == NULL)
      				break;
      			buf->head = head->next;
      			tty_buffer_free(port, head);
      			continue;
      		}
      }}}
       * Producer: tty_insert_flip_... 10 bytes + tty_flip_buffer_push
         * buffer:
           * Head, Tail -> 0: used=250; commit=250; read=250; next=NULL
         * added 6 bytes: head-element filled to maximum.
           * buffer:
             * Head, Tail -> 0: used=256; commit=250; read=250; next=NULL
         * added 4 bytes: __tty_buffer_request_room is called
           * buffer:
             * Head -> 0: used=256; commit=256; read=250; next=1
             * Tail -> 1: used=4; commit=0; read=250 next=NULL
         * push (tty_flip_buffer_push)
           * buffer:
             * Head -> 0: used=256; commit=256; read=250; next=1
             * Tail -> 1: used=4; commit=4; read=250 next=NULL
       * Consumer
      {{{
      		count = head->commit - head->read;
      		if (!count) {
      			// INTERRUPTED BY PRODUCER <-
      			if (head->next == NULL)		// -> no break
      				break;
      			buf->head = head->next;
      			tty_buffer_free(port, head);
      			// ERROR: tty_buffer head freed -> 6 bytes lost
      			continue;
      		}
      }}}
      
      This patch reintroduces a spin_lock to protect this case. Perhaps later
      a lock-less solution could be found.
      
      Signed-off-by: default avatarManfred Schlaegl <manfred.schlaegl@gmx.at>
      Cc: stable <stable@vger.kernel.org> # 3.11
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6a20dbd6
    • Arnd Bergmann's avatar
      Merge tag 'vexpress/fixes-for-3.15' of git://git.linaro.org/people/pawel.moll/linux into fixes · 1fc52762
      Arnd Bergmann authored
      ARM Versatile Express fixes for 3.15
      
      This series contains straight-forward fixes for different
      Versatile Express infrastructure drivers:
      
      - NULL pointer dereference on the error path in the clk driver
      - out of boundary array access in the dcscb driver
      - broken restart/power off implementation
      - mis-interpreted voltage unit in the spc driver
      
      * tag 'vexpress/fixes-for-3.15' of git://git.linaro.org/people/pawel.moll/linux
      
      :
        ARM: vexpress/TC2: Convert OPP voltage to uV before storing
        power/reset: vexpress: Fix restart/power off operation
        arm/mach-vexpress: array accessed out of bounds
        clk: vexpress: NULL dereference on error path
      
      Includes an update to 3.15-rc2
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      1fc52762
    • Grygorii Strashko's avatar
      phy: core: make NULL a valid phy reference if !CONFIG_GENERIC_PHY · 2b97789f
      Grygorii Strashko authored
      This fixes a regression on Keystone 2 platforms caused by patch
      57303488
      "usb: dwc3: adapt dwc3 core to use Generic PHY Framework" which adds
      optional support of generic phy in DWC3 core.
      
      On Keystone 2 platforms the USB is not working now because
      CONFIG_GENERIC_PHY isn't set and, as result, Generic PHY APIs stubs
      return -ENOSYS always. The log shows:
       dwc3 2690000.dwc3: failed to initialize core
       dwc3: probe of 2690000.dwc3 failed with error -38
      
      Hence, fix it by making NULL a valid phy reference in Generic PHY
      APIs stubs in the same way as it was done by the patch
      04c2faca
      
       "drivers: phy: Make NULL
      a valid phy reference".
      
      Acked-by: default avatarFelipe Balbi <balbi@ti.com>
      Acked-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2b97789f
    • Sergei Shtylyov's avatar
      phy: fix kernel oops in phy_lookup() · 743bb387
      Sergei Shtylyov authored
      
      
      The kernel oopses in phy_lookup() due to 'phy->init_data' being NULL if we
      register PHYs from a device tree probing driver and then call phy_get() on a
      device that has no representation in the device tree (e.g. a PCI device).
      Checking the pointer before dereferening it and skipping an interation if
      it's NULL prevents this kernel oops.
      
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      743bb387
    • Jean Delvare's avatar
      phy: restore OMAP_CONTROL_PHY dependencies · 907aa3aa
      Jean Delvare authored
      When OMAP_CONTROL_USB was renamed to OMAP_CONTROL_PHY (commit
      14da699b
      
      ), its dependencies were lost in the process. Nothing in the
      commit message indicates that this removal was intentional, so I think
      it was by accident and the dependencies should be restored.
      
      Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
      Acked-by: default avatarRoger Quadros <rogerq@ti.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      907aa3aa
    • Arnd Bergmann's avatar
      phy: exynos: fix building as a module · d1481832
      Arnd Bergmann authored
      
      
      The top-level phy-samsung-usb2 driver may be configured as a
      loadable module, which currently causes link errors because
      of the dependency on the exynos{5250,4x12,4210}_usb2_phy_config
      symbol. Solving this could be achieved by exporting these
      symbols, but as the SoC-specific parts of the driver are not
      currently built as modules, it seems better to just link
      everything into one module and avoid the need for the export.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatarKamil Debski <k.debski@samsung.com>
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d1481832
    • Johan Hovold's avatar
      USB: serial: fix sysfs-attribute removal deadlock · 10164c2a
      Johan Hovold authored
      
      
      Fix driver new_id sysfs-attribute removal deadlock by making sure to
      not hold any locks that the attribute operations grab when removing the
      attribute.
      
      Specifically, usb_serial_deregister holds the table mutex when
      deregistering the driver, which includes removing the new_id attribute.
      This can lead to a deadlock as writing to new_id increments the
      attribute's active count before trying to grab the same mutex in
      usb_serial_probe.
      
      The deadlock can easily be triggered by inserting a sleep in
      usb_serial_deregister and writing the id of an unbound device to new_id
      during module unload.
      
      As the table mutex (in this case) is used to prevent subdriver unload
      during probe, it should be sufficient to only hold the lock while
      manipulating the usb-serial driver list during deregister. A racing
      probe will then either fail to find a matching subdriver or fail to get
      the corresponding module reference.
      
      Since v3.15-rc1 this also triggers the following lockdep warning:
      
      ======================================================
      [ INFO: possible circular locking dependency detected ]
      3.15.0-rc2 #123 Tainted: G        W
      -------------------------------------------------------
      modprobe/190 is trying to acquire lock:
       (s_active#4){++++.+}, at: [<c0167aa0>] kernfs_remove_by_name_ns+0x4c/0x94
      
      but task is already holding lock:
       (table_lock){+.+.+.}, at: [<bf004d84>] usb_serial_deregister+0x3c/0x78 [usbserial]
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #1 (table_lock){+.+.+.}:
             [<c0075f84>] __lock_acquire+0x1694/0x1ce4
             [<c0076de8>] lock_acquire+0xb4/0x154
             [<c03af3cc>] _raw_spin_lock+0x4c/0x5c
             [<c02bbc24>] usb_store_new_id+0x14c/0x1ac
             [<bf007eb4>] new_id_store+0x68/0x70 [usbserial]
             [<c025f568>] drv_attr_store+0x30/0x3c
             [<c01690e0>] sysfs_kf_write+0x5c/0x60
             [<c01682c0>] kernfs_fop_write+0xd4/0x194
             [<c010881c>] vfs_write+0xbc/0x198
             [<c0108e4c>] SyS_write+0x4c/0xa0
             [<c000f880>] ret_fast_syscall+0x0/0x48
      
      -> #0 (s_active#4){++++.+}:
             [<c03a7a28>] print_circular_bug+0x68/0x2f8
             [<c0076218>] __lock_acquire+0x1928/0x1ce4
             [<c0076de8>] lock_acquire+0xb4/0x154
             [<c0166b70>] __kernfs_remove+0x254/0x310
             [<c0167aa0>] kernfs_remove_by_name_ns+0x4c/0x94
             [<c0169fb8>] remove_files.isra.1+0x48/0x84
             [<c016a2fc>] sysfs_remove_group+0x58/0xac
             [<c016a414>] sysfs_remove_groups+0x34/0x44
             [<c02623b8>] driver_remove_groups+0x1c/0x20
             [<c0260e9c>] bus_remove_driver+0x3c/0xe4
             [<c026235c>] driver_unregister+0x38/0x58
             [<bf007fb4>] usb_serial_bus_deregister+0x84/0x88 [usbserial]
             [<bf004db4>] usb_serial_deregister+0x6c/0x78 [usbserial]
             [<bf005330>] usb_serial_deregister_drivers+0x2c/0x4c [usbserial]
             [<bf016618>] usb_serial_module_exit+0x14/0x1c [sierra]
             [<c009d6cc>] SyS_delete_module+0x184/0x210
             [<c000f880>] ret_fast_syscall+0x0/0x48
      
      other info that might help us debug this:
      
       Possible unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(table_lock);
                                     lock(s_active#4);
                                     lock(table_lock);
        lock(s_active#4);
      
       *** DEADLOCK ***
      
      1 lock held by modprobe/190:
       #0:  (table_lock){+.+.+.}, at: [<bf004d84>] usb_serial_deregister+0x3c/0x78 [usbserial]
      
      stack backtrace:
      CPU: 0 PID: 190 Comm: modprobe Tainted: G        W     3.15.0-rc2 #123
      [<c0015e10>] (unwind_backtrace) from [<c0013728>] (show_stack+0x20/0x24)
      [<c0013728>] (show_stack) from [<c03a9a54>] (dump_stack+0x24/0x28)
      [<c03a9a54>] (dump_stack) from [<c03a7cac>] (print_circular_bug+0x2ec/0x2f8)
      [<c03a7cac>] (print_circular_bug) from [<c0076218>] (__lock_acquire+0x1928/0x1ce4)
      [<c0076218>] (__lock_acquire) from [<c0076de8>] (lock_acquire+0xb4/0x154)
      [<c0076de8>] (lock_acquire) from [<c0166b70>] (__kernfs_remove+0x254/0x310)
      [<c0166b70>] (__kernfs_remove) from [<c0167aa0>] (kernfs_remove_by_name_ns+0x4c/0x94)
      [<c0167aa0>] (kernfs_remove_by_name_ns) from [<c0169fb8>] (remove_files.isra.1+0x48/0x84)
      [<c0169fb8>] (remove_files.isra.1) from [<c016a2fc>] (sysfs_remove_group+0x58/0xac)
      [<c016a2fc>] (sysfs_remove_group) from [<c016a414>] (sysfs_remove_groups+0x34/0x44)
      [<c016a414>] (sysfs_remove_groups) from [<c02623b8>] (driver_remove_groups+0x1c/0x20)
      [<c02623b8>] (driver_remove_groups) from [<c0260e9c>] (bus_remove_driver+0x3c/0xe4)
      [<c0260e9c>] (bus_remove_driver) from [<c026235c>] (driver_unregister+0x38/0x58)
      [<c026235c>] (driver_unregister) from [<bf007fb4>] (usb_serial_bus_deregister+0x84/0x88 [usbserial])
      [<bf007fb4>] (usb_serial_bus_deregister [usbserial]) from [<bf004db4>] (usb_serial_deregister+0x6c/0x78 [usbserial])
      [<bf004db4>] (usb_serial_deregister [usbserial]) from [<bf005330>] (usb_serial_deregister_drivers+0x2c/0x4c [usbserial])
      [<bf005330>] (usb_serial_deregister_drivers [usbserial]) from [<bf016618>] (usb_serial_module_exit+0x14/0x1c [sierra])
      [<bf016618>] (usb_serial_module_exit [sierra]) from [<c009d6cc>] (SyS_delete_module+0x184/0x210)
      [<c009d6cc>] (SyS_delete_module) from [<c000f880>] (ret_fast_syscall+0x0/0x48)
      
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      10164c2a
    • Thomas Pugliese's avatar
      usb: wusbcore: fix panic in wusbhc_chid_set · bd130ada
      Thomas Pugliese authored
      
      
      If no valid CHID value has previously been set on an HWA, writing a
      value of all zeros will cause a kernel panic in uwb_radio_stop because
      wusbhc->uwb_rc has not been set.  This patch skips the call to
      uwb_radio_stop if wusbhc->uwb_rc has not been initialized.
      
      Signed-off-by: default avatarThomas Pugliese <thomas.pugliese@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      bd130ada