Kevin/Paolo, Our concern was that actual rotating media (e.g. USB-to-SATA adapter) may have problems without the cdb_mode_sense_geom(). I hope to have my hands on one tomorrow to do some testing.
----- Original Message -----
From: "Kevin O'Connor" firstname.lastname@example.org To: "Dave Frodin" email@example.com, "Paolo Bonzini" firstname.lastname@example.org Cc: email@example.com Sent: Sunday, March 4, 2012 11:49:30 AM Subject: Re: [SeaBIOS] Booting from USB thumbdrives, older drives boot, newer drives don't.
On Fri, Mar 02, 2012 at 03:10:33PM -0700, Dave Frodin wrote:
Here are my latest results. The sg_modes command has a "-a" option to dump out all of the supported page codes
- it reports that none of the thumbdrives (tested 9) support
page code = 4
- it reports that most of the thumbdrives (tested 9) support
page code = 5
- it commented that page code 5 is obsolete
Thanks Dave. I appreciate your detailed analysis.
The call to cdb_mode_sense_geom() was only recently added. I'm inclined to just remove the call. Paolo, is there a use case where having the "physical" chs info is important? SeaBIOS should generate good "virtual" chs info regardless, and the underlying "physical" info is only exported in a couple of places.
Marc suggested that I leave the page_code set to 4 in order to preserve functionality for drives that actually report valid CHS geometry, and to add code that would clear the stall from the USB controller and thumbdrive.
The SeaBIOS code really should know how to clear a stall. However, it's a bit of a pain to do that in the general case. (In the general case, we'd need to support clearing the stall from 16bit mode, which would require the ability to send control messages to the drive in 16bit mode.)
- Is there any way to differentiate between a USB thumbdrive and a USB-to-SATA adapter?
I don't know of a way to detect it, but I haven't looked closely.