Re: two hotplug issues

From: Andrew Morton (andrewm@uow.edu.au)
Date: Wed Apr 12 2000 - 06:28:20 EST


Jeff Garzik wrote:
>
> Andrew Morton wrote:
> > Perhaps pci_driver needs a new method:
> >
> > char * (*devname)(struct pci_dev *dev, int card_idx);
>
> why not just a 'const char *' member that the driver can optionally fill
> in?

That would assume a one-to-one mapping between a driver and an
interface. Is that legit? Two NICs served by one driver or a
dual-interface NIC would break this. Hence "card_idx" above.

I think what's happened here is that we're the victim of successful
modularisation. The entire netdevice subsystem knows nothing about the
PCI system and vice versa. The only module which has visibility of both
is the driver itself. All very nice, but it would be good if the PCI
system could access the netdevice layer at some level higher than the
driver so we don't need to take yet another bombing run across all the
drivers, teaching them individually to associate a driver instance with
the names of the interfaces which it supports.

So, can we have a generic "get_interface_name(struct pci_dev *dev, int
card_idx)"?

-- 
-akpm-

[ We can make class netDevice derive from class Device, have an abstract "Device::name(int idx)" method and give class PCIDriver a reference relationship with Vector of class Device. We'll call it Linux++. ]

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



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:18 EST