Paolo, Thanks for the reply. I ran the sg_modes for pages 4 and 5 on 4 USB thumbdrives. sandisk_old is a 4GB Sandisk Cruzer (yes, the old is ver=8.02) sandisk_new is a 4GB Sandisk Cruzer transcend is a 2GB drive verbatim is a 2GB drive
If I use the unmodified "master" SeaBIOS ... sandisk_old boots sandisk_new stalls at mode sense transcend stalls at mode sense verbatim boots
If I change the mode page from 4 to 5 ... sandisk_old boots sandisk_new boots transcend stalls at mode sense verbatim boots
The mode page change from 4 to 5 allowed four of my none booting drives to boot. Hopefully these logs will be helpful.
Thanks again, dave
starting sandisk_old tests sudo sg_modes -HHp 4 /dev/sdb SanDisk Cruzer 8.02 peripheral_type: disk [0x0] Mode parameter header from MODE SENSE(10): 00 00 46 00 00 00 00 00 00 Mode data length=72, medium type=0x00, WP=0, DpoFua=0, longlba=0 Block descriptor length=0 >> page_code=0x0, page_control=0 00 00 00 Unexpectedly received extra mode page responses, ignore
sudo sg_modes -HHp 5 /dev/sdb SanDisk Cruzer 8.02 peripheral_type: disk [0x0] Mode parameter header from MODE SENSE(10): 00 00 26 00 00 00 00 00 00 Mode data length=40, medium type=0x00, WP=0, DpoFua=0, longlba=0 Block descriptor length=0 >> page_code=0x5, page_control=0 00 05 1e 80 00 04 20 02 00 ef c0 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
starting sandisk_new tests sudo sg_modes -HHp 4 /dev/sdb SanDisk Cruzer 1.26 peripheral_type: disk [0x0] invalid field in cdb (perhaps page 0x4 not supported)
sudo sg_modes -HHp 5 /dev/sdb SanDisk Cruzer 1.26 peripheral_type: disk [0x0] Mode parameter header from MODE SENSE(10): 00 00 26 00 00 00 00 00 00 Mode data length=40, medium type=0x00, WP=0, DpoFua=0, longlba=0 Block descriptor length=0 >> page_code=0x5, page_control=0 00 05 1e 00 00 10 3f 02 00 1e 4f 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
starting transcend sudo sg_modes -HHp 4 /dev/sdb JetFlash Transcend 2GB 8.07 peripheral_type: disk [0x0] Mode parameter header from MODE SENSE(10): 00 00 06 00 00 00 00 00 00 Mode data length=8, medium type=0x00, WP=0, DpoFua=0, longlba=0 Block descriptor length=0
sudo sg_modes -HHp 5 /dev/sdb JetFlash Transcend 2GB 8.07 peripheral_type: disk [0x0] Mode parameter header from MODE SENSE(10): 00 00 06 00 00 00 00 00 00 Mode data length=8, medium type=0x00, WP=0, DpoFua=0, longlba=0 Block descriptor length=0
starting verbatim sudo sg_modes -HHp 4 /dev/sdb Verbatim STORE N GO 5.00 peripheral_type: disk [0x0] Mode parameter header from MODE SENSE(10): 00 00 06 00 00 00 00 00 00 Mode data length=8, medium type=0x00, WP=0, DpoFua=0, longlba=0 Block descriptor length=0
sudo sg_modes -HHp 5 /dev/sdb Verbatim STORE N GO 5.00 peripheral_type: disk [0x0] Mode parameter header from MODE SENSE(10): 00 00 26 00 00 00 00 00 00 Mode data length=40, medium type=0x00, WP=0, DpoFua=0, longlba=0 Block descriptor length=0 >> page_code=0x5, page_control=0 00 05 1e f0 00 ff 20 02 00 01 df 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
----- Original Message -----
From: "Paolo Bonzini" pbonzini@redhat.com To: seabios@seabios.org, dave@camp.se-eng.com Sent: Friday, March 2, 2012 7:20:28 AM Subject: Re: Booting from USB thumbdrives, older drives boot, newer drives don't.
Il 02/03/2012 01:34, Dave Frodin ha scritto:
On a related topic, I have a copy of the "Indispensable PC Hardware" book that lists the return values for the mode page 4 request. It list the cyc/head data as follows... offset value ================== 2 cyl(msb) 3 cyl 4 cyl(lsb) 5 heads
the struct in the blockcmd.h file shows... struct cdbres_mode_sense_geom { u8 unused_00[3]; u8 read_only; u32 unused_04; u8 page; u8 length; u8 cyl[3]; u8 heads; u8 precomp[3]; u8 reduced[3]; u16 step_rate; u8 landing[3]; u16 rpm; } PACKED; which would put cyl[3] at offset 10 thru 12 and heads at offset 13. Am I missing something here?
The first eight bytes are not part of the page, they are common to all MODE SENSE responses.
Perhaps we could restrict the MODE SENSE to disks of 504MiB and less. I still have a couple of 256 MB pen drives around, I can test them.
Can you try "sg_modes -HHp 4 /dev/sda" (from Linux) on both those that fail and those that work?
Paolo