From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Sat, 30 Oct 2004 04:37:51 +0000 Subject: Re: pci express switch driver Message-Id: <20041030043751.GA1907@kroah.com> List-Id: References: <73943A6B3BEAA1468EE1A4A090129F436DABCD@corpbridge.corp.idt.com> In-Reply-To: <73943A6B3BEAA1468EE1A4A090129F436DABCD@corpbridge.corp.idt.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Sat, Oct 09, 2004 at 07:15:37PM -0700, Sadik, Pallathu wrote: > Hello, > > I am am familiar with linux kernel. I have ported > linux to IDT's MIPS based platforms and have written device > drivers for their integrated ethernet controllers. > > Currently, I am working on developing a driver > for a PCI express switch that have one upstream and > multiple downstream ports with hotplug capability. I've waited so long in responding, as I would hope the Intel people I know would pipe up. But they didn't :( Anyway, some other people are currently working on adding this kind of functionality to Linux. But I have no idea when they will release it to the public... > I am totally new to PCI express and hotplug. I have > gone through various kernel documents, source code > and tutorials to understand the linux support for PCI > express, particularly the hotplug feature support. > I have some understanding of a PCI/PCI express driver > structure in linux (from pm.txt, pci.txt and power/pci.txt > etc of ~linux/Documentation). This clearly explains how > to write a driver for a PCI/PCIexpress device/endpoint. > However, I am not able to figure out whether these > are applicable in the case of a switch. > > My hardware setup is as follows: > > PCI express switch: > As I have mentioned above, the switch is going to > have one upstream and multiple downstream ports. > The downstream ports have implemented hotpulg feature > (Attention indicator, power indicator, attention button, > MRL sensor etc). They are capable of generating interrupts > on the hotplug events. And the current pci express hotplug driver does not work for you? If not, I'm sure the author of that code would be interested in working with you. Did you contact them? > 1. Do I need to write a driver for this device? I couldn't locate a > driver for PCI to PCI bridge in the linux code and functionally a > PCI express switch is not that much different from a PCI bridge. I think the kernel already has such a driver. > I have gone through the source code and found different kinds of > hotplug drivers under ~linux/drivers/pci/hotplug directory, namely > pci_hotplug, shpchp, pciehp, acpiphp. I experimentally found out > that the pci_hotplug module is required for the rest of the modules > to load. However, I am not sure which one I should select. Try them all, one of them should work :) Seriously, the pciehp should be what you are looking for. If not, try the shpchp driver. I've seen boxes that need both. > As I understand acpiphp is for ACPI based hotplug control and > pciehp is for PCI express native hotplug. Is that true? Do I need > both of them for the correct operation? Don't know, depends on how your chipset works. > 4. Application code. > > I looked at Greg's website (www.kroah.com), and see that the pcihpview > can be used to display all hotplug slots and enable/disable particular > slots. Will this utility automatically detect the switch and control > a switch? If a pci hotplug driver is bound to that hardware, yes it will work. I need to get an updated program out there one of these days, the last released version doesn't even work on 2.6 (hint, grab the bk version, it does.) Hope this helps, greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id065&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel