From: Douglas G. <dgi...@in...> - 2010-01-03 16:31:25
|
Christian Franke wrote: > Antonio Expósito Lorenzo wrote: >> It's OK, it was my fault. Second try attached. >> >> > > Thanks. > > Both hdparm and smartctl only issue one command to the drive. There is a > small difference in the SAT ATA PASS-THROUGH(16) command issued: > > hdparm: 85 06 20 00 00 00 00 00 00 00 00 00 00 40 e5 00 > smartctl: 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00 > > cdb[2] hdparm: CK_COND=1, T_DIR=0, BYTE_BLOCK=0, T_LENGTH=0 > cdb[2] smartctl: CK_COND=1, T_DIR=1, BYTE_BLOCK=1, T_LENGTH=0 > > T_DIR and BYTE_BLOCK should be ignored if T_LENGTH=0, so this should not > matter. > > > cdb[13]: hdparm: device register N/A=1 > cdb[13]: smartctl: device register N/A=0 > > This bit is not used for this ATA command. > > Doug: Is the T_DIR difference possibly the reason why smartctl wakes up > the disk on Linux but hdparm doesn't ? Christian, Mark Lord is the expert in the ATA command field so I'm happy to copy whatever he does (and he copied the SAT framework from me). Also strange is why bit 6 in the "device field" cdb[13] is set. For the CHECK POWER MODE (non data) ATA command (E5h) that device field bit is defined as "N/A" (ref: d2015r2 from t13.org) . So we should try clearing T_DIR and BYTE_BLOCK in that situation to see if it stops the nuisance wake up. Doug Gilbert |