linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: pci express switch driver
Date: Sat, 30 Oct 2004 04:37:51 +0000	[thread overview]
Message-ID: <20041030043751.GA1907@kroah.com> (raw)
In-Reply-To: <73943A6B3BEAA1468EE1A4A090129F436DABCD@corpbridge.corp.idt.com>

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_id\x12065&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

  reply	other threads:[~2004-10-30  4:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-10  2:15 pci express switch driver Sadik, Pallathu
2004-10-30  4:37 ` Greg KH [this message]
2004-11-02  1:58 ` Rajesh Shah
2004-11-03  0:42 ` Sy, Dely L
2004-11-04  1:52 ` Sadik, Pallathu
2004-11-04 22:22 ` Rajesh Shah
2004-11-04 23:40 ` Sadik, Pallathu
2004-11-05 21:57 ` Rajesh Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041030043751.GA1907@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).