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.
-Kevin