1. 31 Aug, 2016 2 commits
  2. 02 May, 2016 1 commit
    • Andreas Noever's avatar
      thunderbolt: Fix double free of drom buffer · 2ffa9a5d
      Andreas Noever authored
      If tb_drom_read() fails, sw->drom is freed but not set to NULL.  sw->drom
      is then freed again in the error path of tb_switch_alloc().
      
      The bug can be triggered by unplugging a thunderbolt device shortly after
      it is detected by the thunderbolt driver.
      
      Clear sw->drom if tb_drom_read() fails.
      
      [bhelgaas: add Fixes:, stable versions of interest]
      Fixes: 343fcb8c ("thunderbolt: Fix nontrivial endpoint devices.")
      Signed-off-by: 's avatarAndreas Noever <andreas.noever@gmail.com>
      Signed-off-by: 's avatarBjorn Helgaas <bhelgaas@google.com>
      CC: stable@vger.kernel.org	# v3.17+
      CC: Lukas Wunner <lukas@wunner.de>
      2ffa9a5d
  3. 08 Apr, 2016 3 commits
    • Lukas Wunner's avatar
      thunderbolt: Support 1st gen Light Ridge controller · 19bf4d4f
      Lukas Wunner authored
      Add support for the 1st gen Light Ridge controller, which is built into
      these systems:
      
        iMac12,1       2011  21.5"
        iMac12,2       2011  27"
        Macmini5,1     2011  i5 2.3 GHz
        Macmini5,2     2011  i5 2.5 GHz
        Macmini5,3     2011  i7 2.0 GHz
        MacBookPro8,1  2011  13"
        MacBookPro8,2  2011  15"
        MacBookPro8,3  2011  17"
        MacBookPro9,1  2012  15"
        MacBookPro9,2  2012  13"
      
      Light Ridge (CV82524) was the very first copper Thunderbolt controller,
      introduced 2010 alongside its fiber-optic cousin Light Peak (CVL2510).
      Consequently the chip suffers from some teething troubles:
      
        - MSI is broken for hotplug signaling on the downstream bridges: The chip
          just never sends an interrupt.  It requests 32 MSIs for each of its six
          bridges and the pcieport driver only allocates one per bridge.  However
          I've verified that even if 32 MSIs are allocated there's no interrupt
          on hotplug.  The only option is thus to disable MSI, which is also what
          OS X does.  Apparently all Thunderbolt chips up to revision 1 of Cactus
          Ridge 4C are plagued by this issue so quirk those as well.
      
        - The chip supports a maximum hop_count of 32, unlike its successors
          which support only 12.  Fixup ring_interrupt_active() to cope with
          values >= 32.
      
        - Another peculiarity is that the chip supports a maximum of 13 ports
          whereas its successors support 12.  However the additional port (#5)
          seems to be unusable as reading its TB_CFG_PORT config space results in
          TB_CFG_ERROR_INVALID_CONFIG_SPACE.  Add a quirk to mark the port
          disabled on the root switch, assuming that's necessary on all Macs
          using this chip.
      
      Tested-by: Lukas Wunner <lukas@wunner.de> [MacBookPro9,1]
      Tested-by: William Brown <william@blackhats.net.au> [MacBookPro8,2]
      Signed-off-by: 's avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: 's avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: 's avatarAndreas Noever <andreas.noever@gmail.com>
      19bf4d4f
    • Lukas Wunner's avatar
      thunderbolt: Fix typos and magic number · aae20bb6
      Lukas Wunner authored
      Fix typo in tb_cfg_print_error() message.  Fix bytecount in struct
      tb_drom_entry_port comment.  Replace magic number in tb_switch_alloc().
      Rename tb_sw_set_unpplugged() and TB_CAL_IECS to fix typos.
      
      [bhelgaas: no functional change intended]
      Signed-off-by: 's avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: 's avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: 's avatarAndreas Noever <andreas.noever@gmail.com>
      aae20bb6
    • Lukas Wunner's avatar
      PCI: Add Intel Thunderbolt device IDs · 1d111406
      Lukas Wunner authored
      Intel Gen 1 and 2 chips use the same ID for NHI, bridges and switch.  Gen 3
      chips and onward use a distinct ID for the NHI.
      
      No functional change intended.
      Signed-off-by: 's avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: 's avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: 's avatarAndreas Noever <andreas.noever@gmail.com>
      1d111406
  4. 20 Sep, 2015 1 commit
    • Knuth Posern's avatar
      thunderbolt: Allow loading of module on recent Apple MacBooks with thunderbolt 2 controller · a42fb351
      Knuth Posern authored
      The pci device ids listed in the thunderbolt driver are to restrictive,
      which prevents the driver from being loaded on recent Apple MacBooks
      using a thunderbolt 2 controller. In particular this prevented any
      hot-plugging functionality for thunderbolt based ethernet dongles
      (i.e. Apples thunderbolt gigabit ethernet broadcom tg3 based dongle
      Model A1433 EMC 2590).
      
      Changing the subvendor and subdevice to PCI_ANY_ID the thunderbolt driver
      loads and binds to the pci device 07:00.0 System peripheral:
      Intel Corporation Device 156c which is the thunderbolt 2 controller on
      the MacBookPro12,1.
      
      Successfully tested on MacBookPro12,1. With the patch the thunderbolt
      module gets now loaded on boot. And it provides hot-plugging support both
      for a cold-plugged and a warm-plugged ethernet dongle.
      Signed-off-by: 's avatarAndreas Noever <andreas.noever@gmail.com>
      Acked-by: 's avatarKnuth Posern <knuth@posern.org>
      Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a42fb351
  5. 26 Aug, 2014 1 commit
  6. 13 Jul, 2014 1 commit
  7. 07 Jul, 2014 1 commit
  8. 21 Jun, 2014 1 commit
  9. 20 Jun, 2014 12 commits
  10. 19 Jun, 2014 15 commits