2003-09-15 22:56:45

by Kendrick Hamilton

[permalink] [raw]
Subject: PCI probe, please CC [email protected]

Hello,
we are using the Linux 2.2.16 kernel (some of the code we purchased
does not work with 2.4.x kernels and we would have to do a lot of
regression testing to upgrade) on an IBM e-server. We wrote a module for
a modulator card we are using. The code uses pci_find_device to find the
modulator cards. The problem we are having is that it finds the cards in
different orders. One time hss0 is the card in slot 4 and hss1 is the
card in slot5. The next time we power up the computer, hss0 is the card
in slot5 and hss1 is the card in slot 4.
The IBM e-server has about 5 PCI bridges.
Do you have any suggestion as to how I might be able to ensure the
cards are always detected in the same order? Our system requires that
they always be in the same order.
I can email you the source code for our module, it is GPLed.

Please CC comments to [email protected]
TIA,
Kendrick Hamilton


2003-09-15 23:09:40

by Greg KH

[permalink] [raw]
Subject: Re: PCI probe, please CC [email protected]

On Mon, Sep 15, 2003 at 04:58:39PM -0600, Kendrick Hamilton wrote:
> Hello,
> we are using the Linux 2.2.16 kernel (some of the code we purchased
> does not work with 2.4.x kernels and we would have to do a lot of
> regression testing to upgrade) on an IBM e-server. We wrote a module for
> a modulator card we are using. The code uses pci_find_device to find the
> modulator cards. The problem we are having is that it finds the cards in
> different orders. One time hss0 is the card in slot 4 and hss1 is the
> card in slot5. The next time we power up the computer, hss0 is the card
> in slot5 and hss1 is the card in slot 4.
> The IBM e-server has about 5 PCI bridges.
> Do you have any suggestion as to how I might be able to ensure the
> cards are always detected in the same order? Our system requires that
> they always be in the same order.

Are the pci device ids different across different boots? If not, is
there any way you can tie a specific device to a specific interface
(unique hardware addresses, mac addresses, etc.)?

thanks,

greg k-h

2003-09-15 23:20:22

by Kendrick Hamilton

[permalink] [raw]
Subject: Re: PCI probe, please CC [email protected]

Greg,
We don't have a hardware address to use. What I am looking for is a
way to tie it to the slot number. Is there any way of getting the slot
number?
Kendrick

PS. I just subscribed to the linux kernel mailing list so I don't need
the CC [email protected] anymore.


Greg KH wrote:

>On Mon, Sep 15, 2003 at 04:58:39PM -0600, Kendrick Hamilton wrote:
>
>
>>Hello,
>> we are using the Linux 2.2.16 kernel (some of the code we purchased
>>does not work with 2.4.x kernels and we would have to do a lot of
>>regression testing to upgrade) on an IBM e-server. We wrote a module for
>>a modulator card we are using. The code uses pci_find_device to find the
>>modulator cards. The problem we are having is that it finds the cards in
>>different orders. One time hss0 is the card in slot 4 and hss1 is the
>>card in slot5. The next time we power up the computer, hss0 is the card
>>in slot5 and hss1 is the card in slot 4.
>> The IBM e-server has about 5 PCI bridges.
>> Do you have any suggestion as to how I might be able to ensure the
>>cards are always detected in the same order? Our system requires that
>>they always be in the same order.
>>
>>
>
>Are the pci device ids different across different boots? If not, is
>there any way you can tie a specific device to a specific interface
>(unique hardware addresses, mac addresses, etc.)?
>
>thanks,
>
>greg k-h
>
>

2003-09-16 00:18:48

by Greg KH

[permalink] [raw]
Subject: Re: PCI probe, please CC [email protected]

On Mon, Sep 15, 2003 at 05:22:09PM -0600, Kendrick Hamilton wrote:
> Greg,
> We don't have a hardware address to use. What I am looking for is a
> way to tie it to the slot number. Is there any way of getting the slot
> number?

Again, do the pci bus ids change between boots?

And no, there usually is not a way to get to the slot number, except for
machines that happen to have a pci hotplug controller. They usually
have some way to map from the slot to the pci devices.

thanks,

greg k-h