libusual interface [was Re: libusual and ub]

Jeremy Katz katzj at redhat.com
Fri Dec 16 14:08:10 UTC 2005


On Fri, 2005-12-16 at 00:12 -0800, Pete Zaitcev wrote:
> On Thu, 15 Dec 2005 09:00:33 -0500, Jeremy Katz <katzj at redhat.com> wrote:
> > Hey, to be fair, my patch was just probing for the devices once ub
> > already got loaded.  I ignored the question of "how does ub get loaded"
> > since I can guarantee that it happens in anaconda.
> 
> BTW... Just to make sure that we're on the same page, if there's no
> working hotplug, you have to load both ub and usb-storage, because
> with libusual there is no way to know which is required for the particular
> device. In most cases, usb-storage is not needed, and it's a waste of
> about 30KB of RAM or so. But I see no (easy) way around it.

Right.  Or just loading ub in the normal case and see who complains ;)
Hmm, actually, would it make sense/be possible to attach the usb ids to
usb-storage that we know ub can't drive?  Obviously libusual knows that
so why not make it a little more explicit?

> > [...] So if we're going to build libusual
> > in statically, having the sysfs method to change the bias becomes
> > incredibly important (... as then I can just write to the file from the
> > loader and not worry about it)
> 
> OK, that was a half an hour job. See attached, I'll ask Dave to include
> it and send it to upstream now. Note that there's no bind/unbind here,
> so it has to be set before the back end drivers are loaded.

Looks good to me.

> Out of curiousity, what part of the code makes these decisions:
>  a) If to load USB storage drivers at all, whatever they are

We do a kudzu probe for cd, hd or floppy devices on the usb bus -- which
basically looks for devices of usbclass 8.

>  b) What of the available CD-ROMs has the ISO

We look just on things that are CDs (kudzu checks the subclass code) and
try to mount them and see if there's anything there.  If we find what
we're looking for, we pass that information on to the second stage of
the installer and off we go.

> I would like to look.

The kudzu code is kudzu/usb.c, the first stage of the installer is under
anaconda/loader2/ with the probing code in usb.c and the mounting code
scattered around a bit more.

Jeremy




More information about the fedora-devel-list mailing list