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

2000-10-11 Thread Alan Cox
> 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. Or where it points on a driv

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

2000-10-10 Thread Vojtech Pavlik
On Wed, Oct 11, 2000 at 11:08:52AM +0530, [EMAIL PROTECTED] 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.

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

2000-10-10 Thread aprasad
>> >> 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 chang

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

2000-10-10 Thread Alan Cox
> Since struct pci_dev is probably going to morph into a more generic > struct hw_dev, maybe struct netdevice needs a pci_dev member... 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 - To unsubs

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

2000-10-10 Thread Alan Cox
> Not directly, but pci_dev knows about netdevice, so you can scan the > pci_dev's > to find a match with the required netdevice. (Or do a similar match search > on base_addr) Not I suspect reliably. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a messa

RE: getting "struct pci_dev" from "struct netdevice"

2000-10-10 Thread Phillips, Mike
> Doesn't work for all devices. Also since base_addr is truncated to > 16-bits when passed to ifconfig, this gets even nastier for userspace. You do the best you can with what's available :) > ...and noone but the driver can trust this information to be pointing to > an up-to-date struct netdev

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

2000-10-10 Thread Jeff Garzik
"Phillips, Mike" wrote: > Take a look at the olympic driver (drivers/net/tokenring/olympic.c) > function olympic_proc_info. This is called from a read into the proc > filesystem. When we get the read we want to print out details on > all the olympic devices in the system so we have to scan the > p

RE: getting "struct pci_dev" from "struct netdevice"

2000-10-10 Thread Phillips, Mike
Hi Andrew, Take a look at the olympic driver (drivers/net/tokenring/olympic.c) function olympic_proc_info. This is called from a read into the proc filesystem. When we get the read we want to print out details on all the olympic devices in the system so we have to scan the pci tree and find a mat

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

2000-10-10 Thread Jeff Garzik
"Phillips, Mike" wrote: > > >> hi all, > >> given struct netdevice for any pci network device, is there any way to > get > >> corresponding > >> "struct pci_dev". > > > No. > > Not directly, but pci_dev knows about netdevice, so you can scan the > pci_dev's > to find a match with the required n

RE: getting "struct pci_dev" from "struct netdevice"

2000-10-10 Thread Phillips, Mike
>> hi all, >> given struct netdevice for any pci network device, is there any way to get >> corresponding >> "struct pci_dev". > No. Not directly, but pci_dev knows about netdevice, so you can scan the pci_dev's to find a match with the required netdevice. (Or do a similar match search on base_a

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

2000-10-10 Thread Vojtech Pavlik
On Tue, Oct 10, 2000 at 04:44:40PM +0530, [EMAIL PROTECTED] wrote: > hi all, > given struct netdevice for any pci network device, is there any way to get > corresponding > "struct pci_dev". No. -- Vojtech Pavlik SuSE Labs - To unsubscribe from this list: send the line "unsubscribe linux-kernel