Merge tag 'char-misc-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregk...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Aug 2014 00:32:24 +0000 (17:32 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Aug 2014 00:32:24 +0000 (17:32 -0700)
Pull char / misc driver patches from Greg KH:
 "Here's the big driver misc / char pull request for 3.17-rc1.

  Lots of things in here, the thunderbolt support for Apple laptops,
  some other new drivers, testing fixes, and other good things.  All
  have been in linux-next for a long time"

* tag 'char-misc-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (119 commits)
  misc: bh1780: Introduce the use of devm_kzalloc
  Lattice ECP3 FPGA: Correct endianness
  drivers/misc/ti-st: Load firmware from ti-connectivity directory.
  dt-bindings: extcon: Add support for SM5502 MUIC device
  extcon: sm5502: Change internal hardware switch according to cable type
  extcon: sm5502: Detect cable state after completing platform booting
  extcon: sm5502: Add support new SM5502 extcon device driver
  extcon: arizona: Get MICVDD against extcon device
  extcon: Remove unnecessary OOM messages
  misc: vexpress: Fix sparse non static symbol warnings
  mei: drop unused hw dependent fw status functions
  misc: bh1770glc: Use managed functions
  pcmcia: remove DEFINE_PCI_DEVICE_TABLE usage
  misc: remove DEFINE_PCI_DEVICE_TABLE usage
  ipack: Replace DEFINE_PCI_DEVICE_TABLE macro use
  drivers/char/dsp56k.c: drop check for negativity of unsigned parameter
  mei: fix return value on disconnect timeout
  mei: don't schedule suspend in pm idle
  mei: start disconnect request timer consistently
  mei: reset client connection state on timeout
  ...

1  2 
MAINTAINERS
drivers/Kconfig
drivers/Makefile
drivers/pci/quirks.c
include/linux/pci.h

diff --combined MAINTAINERS
@@@ -70,8 -70,6 +70,8 @@@ Descriptions of section entries
  
        P: Person (obsolete)
        M: Mail patches to: FullName <address@domain>
 +      R: Designated reviewer: FullName <address@domain>
 +         These reviewers should be CCed on patches.
        L: Mailing list that is relevant to this area
        W: Web-page with status/info
        Q: Patchwork web based patch tracking system site
@@@ -158,6 -156,7 +158,6 @@@ F: drivers/net/hamradio/6pack.
  
  8169 10/100/1000 GIGABIT ETHERNET DRIVER
  M:    Realtek linux nic maintainers <nic_swsd@realtek.com>
 -M:    Francois Romieu <romieu@fr.zoreil.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/realtek/r8169.c
@@@ -3352,13 -3351,6 +3352,13 @@@ W:    bluesmoke.sourceforge.ne
  S:    Maintained
  F:    drivers/edac/i82975x_edac.c
  
 +EDAC-IE31200
 +M:    Jason Baron <jbaron@akamai.com>
 +L:    linux-edac@vger.kernel.org
 +W:    bluesmoke.sourceforge.net
 +S:    Maintained
 +F:    drivers/edac/ie31200_edac.c
 +
  EDAC-MPC85XX
  M:    Johannes Thumshirn <johannes.thumshirn@men.de>
  L:    linux-edac@vger.kernel.org
@@@ -4519,7 -4511,8 +4519,7 @@@ S:      Supporte
  F:    drivers/idle/i7300_idle.c
  
  IEEE 802.15.4 SUBSYSTEM
 -M:    Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
 -M:    Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
 +M:    Alexander Aring <alex.aring@gmail.com>
  L:    linux-zigbee-devel@lists.sourceforge.net (moderated for non-subscribers)
  W:    http://apps.sourceforge.net/trac/linux-zigbee
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lowpan/lowpan.git
@@@ -6965,12 -6958,6 +6965,12 @@@ L:    linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    drivers/pinctrl/pinctrl-at91.c
  
 +PIN CONTROLLER - RENESAS
 +M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 +L:    linux-sh@vger.kernel.org
 +S:    Maintained
 +F:    drivers/pinctrl/sh-pfc/
 +
  PIN CONTROLLER - SAMSUNG
  M:    Tomasz Figa <t.figa@samsung.com>
  M:    Thomas Abraham <thomas.abraham@linaro.org>
@@@ -7252,12 -7239,6 +7252,12 @@@ M:    Robert Jarzmik <robert.jarzmik@free.
  L:    rtc-linux@googlegroups.com
  S:    Maintained
  
 +QAT DRIVER
 +M:      Tadeusz Struk <tadeusz.struk@intel.com>
 +L:      qat-linux@intel.com
 +S:      Supported
 +F:      drivers/crypto/qat/
 +
  QIB DRIVER
  M:    Mike Marciniszyn <infinipath@intel.com>
  L:    linux-rdma@vger.kernel.org
@@@ -7439,20 -7420,16 +7439,20 @@@ S:   Orpha
  F:    drivers/net/wireless/ray*
  
  RCUTORTURE MODULE
 -M:    Josh Triplett <josh@freedesktop.org>
 +M:    Josh Triplett <josh@joshtriplett.org>
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
  F:    Documentation/RCU/torture.txt
 -F:    kernel/rcu/torture.c
 +F:    kernel/rcu/rcutorture.c
  
  RCUTORTURE TEST FRAMEWORK
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
 +M:    Josh Triplett <josh@joshtriplett.org>
 +R:    Steven Rostedt <rostedt@goodmis.org>
 +R:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 +R:    Lai Jiangshan <laijs@cn.fujitsu.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
@@@ -7475,11 -7452,8 +7475,11 @@@ S:    Supporte
  F:    net/rds/
  
  READ-COPY UPDATE (RCU)
 -M:    Dipankar Sarma <dipankar@in.ibm.com>
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
 +M:    Josh Triplett <josh@joshtriplett.org>
 +R:    Steven Rostedt <rostedt@goodmis.org>
 +R:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 +R:    Lai Jiangshan <laijs@cn.fujitsu.com>
  L:    linux-kernel@vger.kernel.org
  W:    http://www.rdrop.com/users/paulmck/RCU/
  S:    Supported
@@@ -7489,7 -7463,7 +7489,7 @@@ X:      Documentation/RCU/torture.tx
  F:    include/linux/rcu*
  X:    include/linux/srcu.h
  F:    kernel/rcu/
 -X:    kernel/rcu/torture.c
 +X:    kernel/torture.c
  
  REAL TIME CLOCK (RTC) SUBSYSTEM
  M:    Alessandro Zummo <a.zummo@towertech.it>
@@@ -7844,6 -7818,11 +7844,11 @@@ S:    Maintaine
  F:    include/linux/mmc/dw_mmc.h
  F:    drivers/mmc/host/dw_mmc*
  
+ THUNDERBOLT DRIVER
+ M:    Andreas Noever <andreas.noever@gmail.com>
+ S:    Maintained
+ F:    drivers/thunderbolt/
  TIMEKEEPING, CLOCKSOURCE CORE, NTP
  M:    John Stultz <john.stultz@linaro.org>
  M:    Thomas Gleixner <tglx@linutronix.de>
@@@ -8047,16 -8026,6 +8052,16 @@@ F:    drivers/ata
  F:    include/linux/ata.h
  F:    include/linux/libata.h
  
 +SERIAL ATA AHCI PLATFORM devices support
 +M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Tejun Heo <tj@kernel.org>
 +L:    linux-ide@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
 +S:    Supported
 +F:    drivers/ata/ahci_platform.c
 +F:    drivers/ata/libahci_platform.c
 +F:    include/linux/ahci_platform.h
 +
  SERVER ENGINES 10Gbps iSCSI - BladeEngine 2 DRIVER
  M:    Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
  L:    linux-scsi@vger.kernel.org
@@@ -8272,9 -8241,6 +8277,9 @@@ F:      mm/sl?b
  SLEEPABLE READ-COPY UPDATE (SRCU)
  M:    Lai Jiangshan <laijs@cn.fujitsu.com>
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
 +M:    Josh Triplett <josh@joshtriplett.org>
 +R:    Steven Rostedt <rostedt@goodmis.org>
 +R:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  L:    linux-kernel@vger.kernel.org
  W:    http://www.rdrop.com/users/paulmck/RCU/
  S:    Supported
@@@ -8947,7 -8913,7 +8952,7 @@@ M:      Stephen Warren <swarren@wwwdotorg.or
  M:    Thierry Reding <thierry.reding@gmail.com>
  L:    linux-tegra@vger.kernel.org
  Q:    http://patchwork.ozlabs.org/project/linux-tegra/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git
  S:    Supported
  N:    [^a-z]tegra
  
@@@ -9069,13 -9035,6 +9074,13 @@@ L:    linux-pm@vger.kernel.or
  S:    Supported
  F:    drivers/thermal/ti-soc-thermal/
  
 +TI CLOCK DRIVER
 +M:    Tero Kristo <t-kristo@ti.com>
 +L:    linux-omap@vger.kernel.org
 +S:    Maintained
 +F:    drivers/clk/ti/
 +F:    include/linux/clk/ti.h
 +
  TI FLASH MEDIA INTERFACE DRIVER
  M:    Alex Dubov <oakad@yahoo.com>
  S:    Maintained
diff --combined drivers/Kconfig
@@@ -176,6 -176,6 +176,8 @@@ source "drivers/powercap/Kconfig
  
  source "drivers/mcb/Kconfig"
  
 +source "drivers/ras/Kconfig"
 +
+ source "drivers/thunderbolt/Kconfig"
  endmenu
diff --combined drivers/Makefile
@@@ -158,4 -158,4 +158,5 @@@ obj-$(CONFIG_NTB)          += ntb
  obj-$(CONFIG_FMC)             += fmc/
  obj-$(CONFIG_POWERCAP)                += powercap/
  obj-$(CONFIG_MCB)             += mcb/
 +obj-$(CONFIG_RAS)             += ras/
+ obj-$(CONFIG_THUNDERBOLT)     += thunderbolt/
diff --combined drivers/pci/quirks.c
@@@ -2986,6 -2986,103 +2986,103 @@@ DECLARE_PCI_FIXUP_HEADER(0x1814, 0x0601
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_REALTEK, 0x8169,
                         quirk_broken_intx_masking);
  
+ #ifdef CONFIG_ACPI
+ /*
+  * Apple: Shutdown Cactus Ridge Thunderbolt controller.
+  *
+  * On Apple hardware the Cactus Ridge Thunderbolt controller needs to be
+  * shutdown before suspend. Otherwise the native host interface (NHI) will not
+  * be present after resume if a device was plugged in before suspend.
+  *
+  * The thunderbolt controller consists of a pcie switch with downstream
+  * bridges leading to the NHI and to the tunnel pci bridges.
+  *
+  * This quirk cuts power to the whole chip. Therefore we have to apply it
+  * during suspend_noirq of the upstream bridge.
+  *
+  * Power is automagically restored before resume. No action is needed.
+  */
+ static void quirk_apple_poweroff_thunderbolt(struct pci_dev *dev)
+ {
+       acpi_handle bridge, SXIO, SXFP, SXLV;
+       if (!dmi_match(DMI_BOARD_VENDOR, "Apple Inc."))
+               return;
+       if (pci_pcie_type(dev) != PCI_EXP_TYPE_UPSTREAM)
+               return;
+       bridge = ACPI_HANDLE(&dev->dev);
+       if (!bridge)
+               return;
+       /*
+        * SXIO and SXLV are present only on machines requiring this quirk.
+        * TB bridges in external devices might have the same device id as those
+        * on the host, but they will not have the associated ACPI methods. This
+        * implicitly checks that we are at the right bridge.
+        */
+       if (ACPI_FAILURE(acpi_get_handle(bridge, "DSB0.NHI0.SXIO", &SXIO))
+           || ACPI_FAILURE(acpi_get_handle(bridge, "DSB0.NHI0.SXFP", &SXFP))
+           || ACPI_FAILURE(acpi_get_handle(bridge, "DSB0.NHI0.SXLV", &SXLV)))
+               return;
+       dev_info(&dev->dev, "quirk: cutting power to thunderbolt controller...\n");
+       /* magic sequence */
+       acpi_execute_simple_method(SXIO, NULL, 1);
+       acpi_execute_simple_method(SXFP, NULL, 0);
+       msleep(300);
+       acpi_execute_simple_method(SXLV, NULL, 0);
+       acpi_execute_simple_method(SXIO, NULL, 0);
+       acpi_execute_simple_method(SXLV, NULL, 0);
+ }
+ DECLARE_PCI_FIXUP_SUSPEND_LATE(PCI_VENDOR_ID_INTEL, 0x1547,
+                              quirk_apple_poweroff_thunderbolt);
+ /*
+  * Apple: Wait for the thunderbolt controller to reestablish pci tunnels.
+  *
+  * During suspend the thunderbolt controller is reset and all pci
+  * tunnels are lost. The NHI driver will try to reestablish all tunnels
+  * during resume. We have to manually wait for the NHI since there is
+  * no parent child relationship between the NHI and the tunneled
+  * bridges.
+  */
+ static void quirk_apple_wait_for_thunderbolt(struct pci_dev *dev)
+ {
+       struct pci_dev *sibling = NULL;
+       struct pci_dev *nhi = NULL;
+       if (!dmi_match(DMI_BOARD_VENDOR, "Apple Inc."))
+               return;
+       if (pci_pcie_type(dev) != PCI_EXP_TYPE_DOWNSTREAM)
+               return;
+       /*
+        * Find the NHI and confirm that we are a bridge on the tb host
+        * controller and not on a tb endpoint.
+        */
+       sibling = pci_get_slot(dev->bus, 0x0);
+       if (sibling == dev)
+               goto out; /* we are the downstream bridge to the NHI */
+       if (!sibling || !sibling->subordinate)
+               goto out;
+       nhi = pci_get_slot(sibling->subordinate, 0x0);
+       if (!nhi)
+               goto out;
+       if (nhi->vendor != PCI_VENDOR_ID_INTEL
+                       || (nhi->device != 0x1547 && nhi->device != 0x156c)
+                       || nhi->subsystem_vendor != 0x2222
+                       || nhi->subsystem_device != 0x1111)
+               goto out;
+       dev_info(&dev->dev, "quirk: wating for thunderbolt to reestablish pci tunnels...\n");
+       device_pm_wait_for_dev(&dev->dev, &nhi->dev);
+ out:
+       pci_dev_put(nhi);
+       pci_dev_put(sibling);
+ }
+ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_INTEL, 0x1547,
+                              quirk_apple_wait_for_thunderbolt);
+ DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_INTEL, 0x156d,
+                              quirk_apple_wait_for_thunderbolt);
+ #endif
  static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
                          struct pci_fixup *end)
  {
@@@ -3018,6 -3115,8 +3115,8 @@@ extern struct pci_fixup __start_pci_fix
  extern struct pci_fixup __end_pci_fixups_resume_early[];
  extern struct pci_fixup __start_pci_fixups_suspend[];
  extern struct pci_fixup __end_pci_fixups_suspend[];
+ extern struct pci_fixup __start_pci_fixups_suspend_late[];
+ extern struct pci_fixup __end_pci_fixups_suspend_late[];
  
  static bool pci_apply_fixup_final_quirks;
  
@@@ -3063,6 -3162,11 +3162,11 @@@ void pci_fixup_device(enum pci_fixup_pa
                end = __end_pci_fixups_suspend;
                break;
  
+       case pci_fixup_suspend_late:
+               start = __start_pci_fixups_suspend_late;
+               end = __end_pci_fixups_suspend_late;
+               break;
        default:
                /* stupid compiler warning, you would think with an enum... */
                return;
@@@ -3405,8 -3509,6 +3509,8 @@@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_
  DECLARE_PCI_FIXUP_HEADER(0x10e3, 0x8113, quirk_use_pcie_bridge_dma_alias);
  /* ITE 8892, https://bugzilla.kernel.org/show_bug.cgi?id=73551 */
  DECLARE_PCI_FIXUP_HEADER(0x1283, 0x8892, quirk_use_pcie_bridge_dma_alias);
 +/* Intel 82801, https://bugzilla.kernel.org/show_bug.cgi?id=44881#c49 */
 +DECLARE_PCI_FIXUP_HEADER(0x8086, 0x244e, quirk_use_pcie_bridge_dma_alias);
  
  static struct pci_dev *pci_func_0_dma_source(struct pci_dev *dev)
  {
diff --combined include/linux/pci.h
@@@ -978,8 -978,6 +978,8 @@@ int pci_try_reset_slot(struct pci_slot 
  int pci_probe_reset_bus(struct pci_bus *bus);
  int pci_reset_bus(struct pci_bus *bus);
  int pci_try_reset_bus(struct pci_bus *bus);
 +void pci_reset_secondary_bus(struct pci_dev *dev);
 +void pcibios_reset_secondary_bus(struct pci_dev *dev);
  void pci_reset_bridge_secondary_bus(struct pci_dev *dev);
  void pci_update_resource(struct pci_dev *dev, int resno);
  int __must_check pci_assign_resource(struct pci_dev *dev, int i);
@@@ -1188,6 -1186,7 +1188,6 @@@ int pci_msix_vec_count(struct pci_dev *
  int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec);
  void pci_msix_shutdown(struct pci_dev *dev);
  void pci_disable_msix(struct pci_dev *dev);
 -void msi_remove_pci_irq_vectors(struct pci_dev *dev);
  void pci_restore_msi_state(struct pci_dev *dev);
  int pci_msi_enabled(void);
  int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec);
@@@ -1218,6 -1217,7 +1218,6 @@@ static inline int pci_enable_msix(struc
  { return -ENOSYS; }
  static inline void pci_msix_shutdown(struct pci_dev *dev) { }
  static inline void pci_disable_msix(struct pci_dev *dev) { }
 -static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) { }
  static inline void pci_restore_msi_state(struct pci_dev *dev) { }
  static inline int pci_msi_enabled(void) { return 0; }
  static inline int pci_enable_msi_range(struct pci_dev *dev, int minvec,
@@@ -1477,8 -1477,9 +1477,9 @@@ enum pci_fixup_pass 
        pci_fixup_final,        /* Final phase of device fixups */
        pci_fixup_enable,       /* pci_enable_device() time */
        pci_fixup_resume,       /* pci_device_resume() */
-       pci_fixup_suspend,      /* pci_device_suspend */
+       pci_fixup_suspend,      /* pci_device_suspend() */
        pci_fixup_resume_early, /* pci_device_resume_early() */
+       pci_fixup_suspend_late, /* pci_device_suspend_late() */
  };
  
  /* Anonymous variables would be nice... */
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend,                   \
                suspend##hook, vendor, device, class,   \
                class_shift, hook)
+ #define DECLARE_PCI_FIXUP_CLASS_SUSPEND_LATE(vendor, device, class,   \
+                                        class_shift, hook)             \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend_late,              \
+               suspend_late##hook, vendor, device,     \
+               class, class_shift, hook)
  
  #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook)                 \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early,                     \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend,                   \
                suspend##hook, vendor, device,          \
                PCI_ANY_ID, 0, hook)
+ #define DECLARE_PCI_FIXUP_SUSPEND_LATE(vendor, device, hook)          \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend_late,              \
+               suspend_late##hook, vendor, device,     \
+               PCI_ANY_ID, 0, hook)
  
  #ifdef CONFIG_PCI_QUIRKS
  void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);