[lkml]   [2000]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: getting "struct pci_dev" from "struct netdevice"
"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
> pci tree and find a match based on base_addr. This works in both
> 2.2 and 2.4

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.

> Jeff:
> > Or really? Exactly how does one do this?
> pdev->driver_data = dev
> Of course the driver has to implement this.

...and noone but the driver can trust this information to be pointing to
an up-to-date struct netdevice.

Since struct pci_dev is probably going to morph into a more generic
struct hw_dev, maybe struct netdevice needs a pci_dev member...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:39    [W:0.044 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site