Re: getting "struct pci_dev" from "struct netdevice"

From: Vojtech Pavlik (vojtech@suse.cz)
Date: Wed Oct 11 2000 - 01:46:42 EST


On Wed, Oct 11, 2000 at 11:08:52AM +0530, aprasad@in.ibm.com wrote:
> >>
> >> Since struct pci_dev is probably going to morph into a more generic
> >> struct hw_dev, maybe struct netdevice needs a pci_dev member...
>
> > alan cox wrote:
> >There is no guarantee there would be a meaningful pci_dev. In addition in
> >a hot pluggable box the pointer is useless since it will change arbitarily
>
> i searched through pci net drivers. all the drivers are setting their
> pci_dev->driver_data field to net_device structure. this is working for
> single device being controlled by driver but i am not sure about multiple
> pci devices being controlled by same driver.

Yes, they do it, but they don't have to, they can point
pci_dev->driver_data to any structure they like. Expect this to happen
somewhere sometime.

-- 
Vojtech Pavlik
SuSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:16 EST