[openib-general] struct class and device.c

Michael S. Tsirkin mst at mellanox.co.il
Mon Nov 29 12:02:07 PST 2004


Hello!
Sorry about replying to myself ...

Quoting Michael S. Tsirkin (mst at mellanox.co.il) "Re: [openib-general] struct class and device.c":
> Quoting r. Roland Dreier (roland at topspin.com) "Re: [openib-general] struct class and device.c":
> >     Michael> No, I had in mind using the children list in the class
> >     Michael> instead of the device_list in device.c and interfaces
> >     Michael> list instead of the client_list. Why not? Wouldnt that
> >     Michael> work?
> > 
> > I guess it would work but it seems ugly to rely on the internals of
> > struct class.  Although drivers/ieee1394 does do exactly this (without
> > any locking)....
> 
> Yes.

I mean,  duplicating the code from drivers/base/ is ugly too.

> Further, thats just for the alloc_name hacks. I am not sure why
> that is useful - this creates arbitrary names like mthca0
> which are not really useful to identify the devices.
> Couldnt just say pci bus names be used?

Or use the system guid. As it is you can pull a device out
and another device will be renamed.

mst



More information about the general mailing list