2000-11-08 04:56:46

by Ivan Passos

[permalink] [raw]
Subject: Question on new PCI architecture (2.4.x)


Hello,

I was just checking the driver changes needed to comply with the new PCI
architecture in 2.4.x, and then I got into a problem. I noticed that all
drivers that use this architecture (or at least the ones I found, such as
the Tulip, EEPro100, 3c59x ...) support boards with only one net_device
per board. What about boards with more than one net_device??

In my case, the driver supports one- and two-channel boards, and I don't
know how to remove a board that has two net_devices (since
pdev->driver_data can't contain two pointers!! ;).

Also, if anyone could give me pointers to documentation on this new PCI
architecture (sample src code would be great, real documentation, even
better!!), I'd really appreciate it.

Thanks in advance!

Regards,
Ivan


2000-11-08 05:02:38

by Jeff Garzik

[permalink] [raw]
Subject: Re: Question on new PCI architecture (2.4.x)

Ivan Passos wrote:
>
> Hello,
>
> I was just checking the driver changes needed to comply with the new PCI
> architecture in 2.4.x, and then I got into a problem. I noticed that all
> drivers that use this architecture (or at least the ones I found, such as
> the Tulip, EEPro100, 3c59x ...) support boards with only one net_device
> per board. What about boards with more than one net_device??
>
> In my case, the driver supports one- and two-channel boards, and I don't
> know how to remove a board that has two net_devices (since
> pdev->driver_data can't contain two pointers!! ;).

pdev->driver_data is only there as a convenience, there is no rule about
one device per board.

In the case of multiple net devices per board, pdev->driver_data would
point to a structure which you allocate, which contains pointers to each
of that board's net devices.


> Also, if anyone could give me pointers to documentation on this new PCI
> architecture (sample src code would be great, real documentation, even
> better!!), I'd really appreciate it.

What questions do you have?

Documentation/pci.txt, include/linux/pci.h, drivers/pci/pci.c, and
various PCI drivers are the only documentation available.

Jeff


--
Jeff Garzik | "When I do this, my computer freezes."
Building 1024 | -user
MandrakeSoft | "Don't do that."
| -level 1

2000-11-08 05:11:39

by David Miller

[permalink] [raw]
Subject: Re: Question on new PCI architecture (2.4.x)

Date: Wed, 08 Nov 2000 00:01:43 -0500
From: Jeff Garzik <[email protected]>

Documentation/pci.txt, include/linux/pci.h, drivers/pci/pci.c, and
various PCI drivers are the only documentation available.

Do not forget Documentation/DMA-mapping.txt

Later,
David S. Miller
[email protected]