All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch v2 00/14] Thunderbolt support for Apple MBP
@ 2014-04-11  0:24 Andreas Noever
  2014-04-11  0:24 ` [PATCH v2 01/14] thunderbolt: Add initial cactus ridge NHI support Andreas Noever
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: Andreas Noever @ 2014-04-11  0:24 UTC (permalink / raw)
  To: linux-kernel, Matthew Garrett
  Cc: Daniel J Blueman, Bjorn Helgaas, linux-pci, Andreas Noever

Hi

This is version 2 of my Thunderbolt driver for Apple hardware (see [1] for v1).
The short story is that Apple decided to implement hotplug support in a driver
instead of the firmware. The firmware will only initialize coldplugged devices.
Hotplugged devices do not work.

This series adds support for single device hotplug (no chaining) for the Cactus
Ridge C4 Thunderbolt controller (device id 0x1547, present on MacBookPro10,1).
As far as I can tell newer generations work quite similar and it should be
possible to add support for more controllers with some work.

Changes from v1:
 - suspend/hibernate support (yeah)
 - general cleanups and refactoring

>From my perspective the driver is working quite well and is ready for merging
(maybe someone can tell me whom I should ask to get a review?). I have taken
some care to not stomp on tunnels setup by the firmware for coldplugged
devices. If this works as intendend then there should be no regressions
(coldplugged devices continue to work and simple hotplugged devices will start
working). In particular the Apple Ethernet adapter works very well (and this is
probably the most used TB device out there).

Some notes:
 - The patch requires Matthew's acpi_osi fix [2]
 - @pci, Bjorn: I hope patch 12 is acceptable. If there is a better way to do
   this please let me know.
 - Thunderbolt displays: I have a pretty good idea on how they should work, but
   I did not yet write any code to support them. Also judging by the replies I
got for v1 of the patch it seems that there are some graphics driver problems
even with coldplugged tb displays (at least on MBP models with discrete
graphics cards).
 - Hibernate gotcha: The amount of available memory reported by the firmware
   depends on whether a tb device is connected. This makes Linux refuse to
restore the saved image. This has nothing to do with this driver, but you might
run into it during testing.

Thanks,
Andreas


Andreas Noever (14):
  thunderbolt: Add initial cactus ridge NHI support
  thunderbolt: Add control channel interface
  thunderbolt: Setup control channel
  thunderbolt: Add tb_regs.h
  thunderbolt: Initialize root switch and ports
  thunderbolt: Add thunderbolt capability handling
  thunderbolt: Enable plug events
  thunderbolt: Scan for downstream switches
  thunderbolt: Handle hotplug events
  thunderbolt: Add path setup code.
  thunderbolt: Add support for simple pci tunnels.
  pci: Suspend/resume support for appel thunderbolt
  thunderbolt: Read switch uid from EEPROM
  thunderbolt: Add suspend/hibernate support

 drivers/Kconfig                  |   2 +
 drivers/Makefile                 |   1 +
 drivers/pci/pcie/portdrv_pci.c   | 117 +++++++
 drivers/thunderbolt/Kconfig      |  12 +
 drivers/thunderbolt/Makefile     |   3 +
 drivers/thunderbolt/cap.c        | 116 +++++++
 drivers/thunderbolt/ctl.c        | 731 +++++++++++++++++++++++++++++++++++++++
 drivers/thunderbolt/ctl.h        |  75 ++++
 drivers/thunderbolt/eeprom.c     | 189 ++++++++++
 drivers/thunderbolt/nhi.c        | 671 +++++++++++++++++++++++++++++++++++
 drivers/thunderbolt/nhi.h        | 114 ++++++
 drivers/thunderbolt/nhi_regs.h   | 101 ++++++
 drivers/thunderbolt/path.c       | 215 ++++++++++++
 drivers/thunderbolt/switch.c     | 492 ++++++++++++++++++++++++++
 drivers/thunderbolt/tb.c         | 431 +++++++++++++++++++++++
 drivers/thunderbolt/tb.h         | 266 ++++++++++++++
 drivers/thunderbolt/tb_regs.h    | 213 ++++++++++++
 drivers/thunderbolt/tunnel_pci.c | 232 +++++++++++++
 drivers/thunderbolt/tunnel_pci.h |  30 ++
 19 files changed, 4011 insertions(+)
 create mode 100644 drivers/thunderbolt/Kconfig
 create mode 100644 drivers/thunderbolt/Makefile
 create mode 100644 drivers/thunderbolt/cap.c
 create mode 100644 drivers/thunderbolt/ctl.c
 create mode 100644 drivers/thunderbolt/ctl.h
 create mode 100644 drivers/thunderbolt/eeprom.c
 create mode 100644 drivers/thunderbolt/nhi.c
 create mode 100644 drivers/thunderbolt/nhi.h
 create mode 100644 drivers/thunderbolt/nhi_regs.h
 create mode 100644 drivers/thunderbolt/path.c
 create mode 100644 drivers/thunderbolt/switch.c
 create mode 100644 drivers/thunderbolt/tb.c
 create mode 100644 drivers/thunderbolt/tb.h
 create mode 100644 drivers/thunderbolt/tb_regs.h
 create mode 100644 drivers/thunderbolt/tunnel_pci.c
 create mode 100644 drivers/thunderbolt/tunnel_pci.h

-- 
1.9.2


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-04-15 23:31 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-11  0:24 [Patch v2 00/14] Thunderbolt support for Apple MBP Andreas Noever
2014-04-11  0:24 ` [PATCH v2 01/14] thunderbolt: Add initial cactus ridge NHI support Andreas Noever
2014-04-11  0:24 ` [PATCH v2 02/14] thunderbolt: Add control channel interface Andreas Noever
2014-04-11  0:24 ` [PATCH v2 03/14] thunderbolt: Setup control channel Andreas Noever
2014-04-11  0:24 ` [PATCH v2 04/14] thunderbolt: Add tb_regs.h Andreas Noever
2014-04-11  0:24 ` [PATCH v2 05/14] thunderbolt: Initialize root switch and ports Andreas Noever
2014-04-11  0:24 ` [PATCH v2 06/14] thunderbolt: Add thunderbolt capability handling Andreas Noever
2014-04-11  0:24 ` [PATCH v2 07/14] thunderbolt: Enable plug events Andreas Noever
2014-04-11  0:24 ` [PATCH v2 08/14] thunderbolt: Scan for downstream switches Andreas Noever
2014-04-11  0:24 ` [PATCH v2 09/14] thunderbolt: Handle hotplug events Andreas Noever
2014-04-11  0:24 ` [PATCH v2 10/14] thunderbolt: Add path setup code Andreas Noever
2014-04-11  0:24 ` [PATCH v2 11/14] thunderbolt: Add support for simple pci tunnels Andreas Noever
2014-04-11  0:24 ` [PATCH v2 12/14] pci: Suspend/resume support for appel thunderbolt Andreas Noever
2014-04-15 17:37   ` Bjorn Helgaas
2014-04-15 23:31     ` Andreas Noever
2014-04-11  0:25 ` [PATCH v2 13/14] thunderbolt: Read switch uid from EEPROM Andreas Noever
2014-04-11  0:25 ` [PATCH v2 14/14] thunderbolt: Add suspend/hibernate support Andreas Noever
2014-04-11 21:06 ` [Patch v2 00/14] Thunderbolt support for Apple MBP Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.