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