what does CMD_SET_BOOT2_VER ?

Dan Williams dcbw at redhat.com
Thu Dec 6 05:55:05 EST 2007


On Thu, 2007-12-06 at 10:48 +0000, David Woodhouse wrote:
> On Thu, 2007-12-06 at 05:25 -0500, Dan Williams wrote:
> > > However, my real question is: isn't BOOT2 a purely USB specific
> > > thing?  If yes, than this belongs into if_usb.c.
> > 
> > Possibly, yes. At this point the command is implemented only for the
> > usb8388.  But think of "Boot2" like the helper firmware for SD or CF
> > cards.  The real firmware replaces the helper image in the  memory of
> > the 838x after you load it.  On OLPC the helper firmware is stored in
> > SPI flash on the libertas module itself since it needs to know how to
> > talk USB before the host can tell it to do anything.
> > 
> > The problem is that after the helper (boot2) firmware has been replaced
> > by the real firmware, at least on USB, the real firmware has no idea
> > what version the helper firmware was.  This is fine until you start
> > suspending and resuming, because after the Linux kernel has disconnected
> > the libertas module from the bus for suspend and tried to reconnect for
> > resume, it has lost the original USB bcdDevice number. 
> 
> Actually, hasn't it stored it in priv->boot2_version, which is precisely
> where we get it from in lbs_cmd_set_boot2_ver() ? 
> 
> And even then, I don't actually see anywhere we actually _care_ about
> bcdDevice, except when we're starting to load the firmware.
> 
> Anyway, I've moved it to if_usb.c and tested it, and pushed that fix.
> I reserve the right to remove it completely at a later date :)

The problem is that if it doesn't get reset in the usb8388, then it'll
be wrong in /proc/bus/usb/devices too.  Before suspend it'll be correct
there, but after it'll be changed.  Not horrible, but not helpful in
debugging since to determine your boot2 version you must restart the
machine or plug/unplug the module.  This patch came in during all the
wireless suspend/resume stuff, not sure what the overall importance of
the patch really is any more though given that it wasn't the real
problem.

Dan





More information about the libertas-dev mailing list