[patch] Allow devices with no sysdevices

David Zeuthen david at fubar.dk
Tue May 25 12:16:47 PDT 2004


On Tue, 2004-05-25 at 15:16 -0400, Joe Shaw wrote:
> On Tue, 2004-05-25 at 20:31 +0200, David Zeuthen wrote:
> > > Me too, but from talking it over with Robert it seems like this simply
> > > won't happen until 2.7 at the earliest.
> >
> > Really? I googled a bit for it some weeks ago and found this patch
> > 
> >  http://www.uwsg.iu.edu/hypermail/linux/kernel/0303.3/1548.html
> > 
> > that looked pretty simple. Haven't applied though, because I rarely use
> > the one box I have with PCMCIA sockets and I don't know enough kernel
> > stuff. 
> 
> I think the key there is "... for any pcmcia device registered with the
> sysfs core", which most aren't.  I think the problem (at least with the
> wireless drivers I looked at) is that there isn't a "struct device *"
> anywhere to be found.
> 

OK, I see.

> > Waiting for 2.7 for this would really really suck. One thing we should
> > then is to try to do what cardmgr and cardctl does and build our tree
> > this way if at all possible (I've would have no clue on how to map class
> > devices to such bus devices though).
> 
> I looked into this.  There's no way to associate the information we get
> from cardctl with a class device as far as I can tell.
> 

That's also my contention.

> > But in the, unlikely, event that I have two 16-bit PCMCIA networking
> > cards they will both merge net.* stuff on the same fakeroot device and
> > one will overwrite the other, right?
> 
> No, the fakeroot exists only as a parent to those devices.  None of the
> net.* stuff gets merged onto it.  That's the reason for the hackish
> passing around of a "merge_or_add" variable.  It'll get overridden from
> the class handler's TRUE to FALSE if there is no sysdevice.  That's also
> why we need to add a compute_udi function.
> 
> To better illustrate this, here's the relevant lshal output:
> 

Now I understand; thanks for clearing that up. Patch looks good, please
go ahead and commit it.
	
Cheers,
David


_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list