multiple devices behind a cardbus bridge (adding magma pci extender support)
i'm trying to get the magma pci extender to work under linux. basically, this device is a bunch of external pci slots which connects to a laptop via a cardbus pc card. i've email david hinds, the maintainer of the linux pcmcia, and he said that currently linux only supports adding a single device behind a cardbus bridge. he suggested that i check out the hot plug stuff, saying you were providing a more generic interface.
(when i plugged the device in on the 2.2 and an early 2.4 kernel, btw, lspic would detect the cardbus bridge. i just couldn't see beyond it.)
any assistance on where to begin on this exercise would be greatly appreciated.
thanks in advance.
--mk
----------------------------------------------------------------------------
----
Mark Krischer
Manager, Software Engineering
Wireless Networking Business Unit, Ethernet Access Group Cisco Systems
P.O. Box 617, North Ryde 1670 AUSTRALIA
Level 2, 3 Innovation Road, Macquarie Research Park, North Ryde, NSW 2113 AUSTRALIA
Phone: +61 2 8446 1009 Fax: +61 2 8874 5401 Web: www.cisco.com
"I consider the terrorist attacks on September 11th to be an attack against America's ideals.
If our freedoms erode because of those attacks, then the terrorists have won."
— Bruce Schneier
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." — Benjamin Franklin
Re: multiple devices behind a cardbus bridge (adding magma pci
Quoted 2 lines
he said that currently linux only supports adding a single
device behind a cardbus bridge.
Is the root problem that drivers/pcmcia/cardbus.c doesn't set up bridge devices when they're connected to the Cardbus bridge? Or is it perhaps that something in drivers/pci/* isn't doing what's expected?
Once that bridge is hooked up, I'd expect it to hotplug cards on that bus just like any other PCI device; that's generic code. The info I noticed at www.magma.com doesn't suggest you'd need to worry about the sort of per-slot poweron/poweroff handshaking that designs like "CompactPCI" or "Hotplug PCI" systems do.
- Dave
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
i believe it's the former. though i'm still tracing through the code. it looks like the new yenta.c is what's used now? i had to return my magma pci extender and won't be getting new ones until the end of next week. so i guess i'm trying to get an idea of where i should start playing when i start next week.
my understanding was not so much that i needed the hot-plug specific stuff, but rather whatever new pci support you've added. but i could be on the wrong path here.
thanks.
--mk
Quoted 16 lines
-----Original Message-----
From: David Brownell [mailto:[email protected]]
Sent: Thursday, 4 October 2001 11:11 AM
To: Mark Krischer; [email protected]
Subject: Re: multiple devices behind a cardbus bridge (adding magma pci extender support)Quoted 2 lines
he said that currently linux only supports adding a single
device behind a cardbus bridge.Is the root problem that
drivers/pcmcia/cardbus.cdoesn't set up bridge devices when they're connected to the Cardbus bridge? Or is it perhaps that something indrivers/pci/*isn't doing what's expected?
Quoted 11 lines
Once that bridge is hooked up, I'd expect it to hotplug cards on that bus just like any other PCI device; that's generic code. The info I noticed at www.magma.com doesn't suggest you'd need to worry about the sort of per-slot poweron/poweroff handshaking that designs like "CompactPCI" or "Hotplug PCI" systems do.
- Dave
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · David Brownell
Is the root problem that
drivers/pcmcia/cardbus.cdoesn't set up bridge devices when they're connected to the Cardbus bridge?
This is it. The cardbus code will configure a single normal device on the far side of the cardbus bridge, not (potentially) a whole tree of things. It is similar to the hot plug PCI situation.
-- Dave
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · David Hinds
Quoted 4 lines · David Brownell
Is the root problem that
drivers/pcmcia/cardbus.cdoesn't set up bridge devices when they're connected to the Cardbus bridge?This is it. The cardbus code will configure a single normal device on the far side of the cardbus bridge, not (potentially) a whole tree of things. It is similar to the hot plug PCI situation.
But for hotplug PCI, you need a hotplug pci controller that handles the initialization of that pci tree (among other things). For this device, does it have a controller that can be addressed to do these things?
thanks,
greg k-h
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · Greg KH
But for hotplug PCI, you need a hotplug pci controller that handles the initialization of that pci tree (among other things). For this device, does it have a controller that can be addressed to do these things?
What do you mean by "handles the initialization"? A hot plug PCI controller mainly gives control over power sequencing and isolation of the PCI devices behind the controller from the rest of the PCI tree, right? I'd think that this product would have to provide the same functionality.
-- Dave
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 11 lines · David Hinds
Quoted 4 lines · Greg KH
But for hotplug PCI, you need a hotplug pci controller that handles the initialization of that pci tree (among other things). For this device, does it have a controller that can be addressed to do these things?
What do you mean by "handles the initialization"? A hot plug PCI controller mainly gives control over power sequencing and isolation of the PCI devices behind the controller from the rest of the PCI tree, right? I'd think that this product would have to provide the same functionality.
Yes, you are correct. That's what I was trying to say.
thanks,
greg k-h
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Re: multiple devices behind a cardbus bridge (adding magma pci
In reply to Mark KrischerQuoted 11 lines
Quoted 9 lines
Quoted 3 lines
But for hotplug PCI, you need a hotplug pci controller that handles the initialization of that pci tree (among other things). For this device, does it have a controller that can be addressed to do these things?
What do you mean by "handles the initialization"? A hot plug PCI controller mainly gives control over power sequencing and isolation of the PCI devices behind the controller from the rest of the PCI tree, right? I'd think that this product would have to provide the same functionality.
Yes, you are correct. That's what I was trying to say.
Not all PCI bridges have per-slot power control over devices connected to them though, do they?
I was under the strong impression that most didn't, and that CompactPCI/HotplugPCI/Cardbus/... were the exceptions to the rule. And that these Magma extenders were likely pretty standard -- the pictures I saw didn't show any of the special hardware I've seen on HotplugPCI rackmounts, etc.
I guess it all comes down to needing more info about the Magma card. Also a potential confusion about what "Hotplug" means; at one level it's a particular implementation of power switching on PCI (CompactPCI and Cardbus being others), and at another level it's a generic feature of the Linux PCI support that fires automatically for all correctly configured devices (assuming it's been configured in).
- Dave
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 10 lines · David Brownell
Quoted 7 lines
Quoted 5 lines
What do you mean by "handles the initialization"? A hot plug PCI controller mainly gives control over power sequencing and isolation of the PCI devices behind the controller from the rest of the PCI tree, right? I'd think that this product would have to provide the same functionality.
Yes, you are correct. That's what I was trying to say.
Not all PCI bridges have per-slot power control over devices connected to them though, do they?
Certainly.
The PCI-to-PCI bridge in the Magma device may well be an ordinary one that provides no per-slot power control. However, the fact that it is sitting behind a cardbus bridge that does provide hot plug power control, means that as far as the kernel is concerned, this is an instance of the "general" PCI hot plug configuration problem (more like Hot Plug PCI or Compact PCI), which is fairly complex from a resource allocation perspective, as opposed to the "narrow" PCI hot plug problem that is currently addressed by the simple CardBus one-PCI-device configuration system.
-- Dave
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel