linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/4]  Hot Dock/Undock support
@ 2006-01-18  0:56 Kristen Accardi
  2006-01-18 12:16 ` Pavel Machek
  2006-01-18 13:04 ` Pavel Machek
  0 siblings, 2 replies; 16+ messages in thread
From: Kristen Accardi @ 2006-01-18  0:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: greg, pcihpd-discuss, len.brown, linux-acpi, pavel

This series of patches is against the -mm kernel, and will enable
docking station support.  It is an early patch, but still pretty 
functional, so I think it's worthwhile to include at this point.
For some laptops, it's necessary to use the pci=assign-busses kernel 
parameter, because some _DCK methods will attempt to assign bus numbers
to the dock bridge (incorrectly).

Supported Features:
* Hot Dock/Undock via hardware control
* Enumeration of PCI Devices on Dock Station (Hot Add/Remove) via pci 

Not Supported Yet (but will be with laptops with sane dsdts):
* _EJD, _EDL support for devices that aren't enumerable
* hot add of devices other than PCI devices (such as the serial/lpt etc).
* More thorough testing needs to be done for everything, but especially
  video, as I've not even begun to worry about that.

All docking events are handled by the acpiphp driver.  For docking,
the acpiphp driver will call the _DCK acpi method, and then insert
the docking bridge and all the pci devices behind the dock bridge.
This is in conflict with some acpi platform drivers (ibm_acpi) that already
attempt to implement a limited form of docking support only for that platform.
You may not use both drivers at the same time right now.  This is a generic
docking solution that should work for all docking stations, not just IBM,
although I tested it on an IBM docking station exclusively, because that's
all I've got right now. 

Right now devices that are not on enumerable buses (or on the PCI bus at all) 
will not be discovered by acpiphp.  Your mileage will vary on any devices 
other than PCI.  This is because in many cases, there are extra hardware 
configuration steps that need to occur after the _DCK method (because they 
really should have been done in the _DCK method but were not).  Even with PCI 
devices, you may find that some things don't work properly, because there 
was some extra configuration step that needed to occur that didn't get done 
as part of _DCK.  For example, included in this patch series is a quirk for the
IBM Dock Station II, which seemed to need the cardbus controller interrupts
tied together, but this didn't get done with any of the laptops I tested
with.  I've not yet been able to determine what needs to be done to the 
USB controller on the T30 or T41 to make it discover the USB hub on the
docking station, although this works fine on the T20, and also I hear on
the T42, although I've not tested the T42 myself.  

You may also find that as soon as you call _DCK, everything is
broken.  For example, on the T30 laptop I tested, the _DCK method would set
the dock bridge's parent secondary bus number to zero, even if it should
have been something other than zero.  This specific case is handled in
the acpiphp driver in the post_dock_fixups() routine, but this may need to
be changed for the future if it starts to get out of hand. 

There is a workaround right now in this patch for a problem with acpi, where
the acpi thread that notifies acpiphp of the dock event will deadlock while
executing the _DCK method.  I've managed to avoid trying to solve this 
problem for now by spawning a separate thread to handle the _DCK, but 
eventually this will be addressed when I'm brave enough. 

Please comment on these patches, and test if you have a docking station
available.  When you find problems, if you would like me to debug them,
please load the acpiphp driver with the debug param (modprobe acpiphp debug=1),
and send me the output of dmesg -s 100000 as well as lspci -vv -x -n with
the laptop booted in the station, and then the output after booting out
of the station and attempting to dock, as well as a copy of your disassembled
dsdt.  Make sure you have PCI debugging enabled, and debugging enabled for
whatever device you are having issues with.  This should be a good starting 
point.

Kristen

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

end of thread, other threads:[~2006-01-20  1:24 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-18  0:56 [patch 0/4] Hot Dock/Undock support Kristen Accardi
2006-01-18 12:16 ` Pavel Machek
2006-01-18 13:04 ` Pavel Machek
2006-01-18 18:42   ` [Pcihpd-discuss] " Kristen Accardi
2006-01-18 19:45     ` Pavel Machek
2006-01-18 21:06       ` Kristen Accardi
2006-01-18 21:47         ` Matthew Garrett
2006-01-18 22:08           ` Pavel Machek
2006-01-18 22:23         ` Pavel Machek
2006-01-19  0:06           ` Kristen Accardi
2006-01-19 15:23             ` Dmitry Torokhov
2006-01-18 14:51               ` Pavel Machek
2006-01-20  1:27                 ` Kristen Accardi
2006-01-18 20:42     ` Pavel Machek
2006-01-18 21:43       ` Kristen Accardi
2006-01-18 21:11     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).