on integrating SMART/ATA-Security in usb-storage driver
Quoted 34 lines · James Bottomley
Quoted 3 lines
Quoted 3 lines
It's quite possible that usb-storage no longer needs to force the scsi-level to 2. No one has recently tested what would
happen without
Quoted 1 line
Quoted 1 line
it. Matt probably has the best selection of devices for
testing...
Quoted 2 lines
Quoted 2 lines
There is one problem we have with devices that report
themselves as SCSI-3
Quoted 1 line
Quoted 1 line
or SCSI-4 but hang when they receive a REPORT LUNS
command. That's easily
Quoted 1 line
Quoted 1 line
handled by making usb-storage set the NOREPORTLUN flag.
Maybe that's all
Quoted 3 lines
Quoted 1 line
we need to do.
If you could try this out, I'd be grateful.
I tried the patch below on several combinations of SCSI levels and device
types. It seems to do exactly what we want; for reads I always saw READ(10) and for MODE SENSE I saw either the 6- or 10-byte form, depending
on the device type and USB subclass value.The question remains whether pass-thru will now work and whether the patch
will mess up some existing non-compliant device that currently works okay.
The only way to know is by trying it out. Matt and Timothy, that's up to
you.
Quoted 2 lines
Alan Stern
I did some initial testing on Alan's patch with a sandisk cruzer mini thumb drive (level 2), a memorex thumb drive (level 0), and that cypress part (level 0), and I haven't seen any IO problems.
After that I made another patch (below and attached because of wrapping) you can apply after Alan's that disables cdb mangling on level 0 devices. It was generated against Linus' git repo after applying Alan's patch.
With both patches applied I can now do passthru cdbs on the cypress part without issue, and I still don't see any IO issues.
Anyone out there have a better selection of hardware to test with?
---
drivers/scsi/scsi.c +3 -2
@@ -569,9 +569,10 @@ int scsi_dispatch_cmd(struct scsi_cmnd * }/* -* If SCSI-2 or lower, store the LUN value in cmnd. +* If SCSI-2 or lower (except SCSI-0), store the LUN value in cmnd. */ -if (cmd->device->scsi_level <=SCSI_2 ) { +if (cmd->device->scsi_level !=SCSI_UNKNOWN && + cmd->device->scsi_level <=SCSI_2 ) { cmd->cmnd[1 ] = (cmd->cmnd[1 ] &0x1f ) | (cmd->device->lun <<5 &0xe0 ); }
drivers/scsi/scsi.c +3 -2
@@ -569,9 +569,10 @@ int scsi_dispatch_cmd(struct scsi_cmnd * }/* -* If SCSI-2 or lower, store the LUN value in cmnd. +* If SCSI-2 or lower (except SCSI-0), store the LUN value in cmnd. */ -if (cmd->device->scsi_level <=SCSI_2 ) { +if (cmd->device->scsi_level !=SCSI_UNKNOWN && + cmd->device->scsi_level <=SCSI_2 ) { cmd->cmnd[1 ] = (cmd->cmnd[1 ] &0x1f ) | (cmd->device->lun <<5 &0xe0 ); }
Quoted 10 lines · Timothy Thelin
Quoted 2 lines · James Bottomley
It was generated against Linus' git repo after
applying Alan's patch.With both patches applied I can now do passthru cdbs on the cypress part without issue, and I still don't see any IO issues.
Anyone out there have a better selection of hardware to test with?
first i need better software, the 2.6.14-git-11 snapshot wont boot, cause it tries to mount root without detecting partitions before :/
did i miss some patch since this snapshot?
Quoted 11 lines · thomas schorpp
Quoted 9 lines · Timothy Thelin
Quoted 2 lines · James Bottomley
It was generated against Linus' git repo after
applying Alan's patch.With both patches applied I can now do passthru cdbs on the cypress part without issue, and I still don't see any IO issues.
Quoted 9 lines
Quoted 2 lines
Anyone out there have a better selection of hardware to test with?
first i need better software, the 2.6.14-git-11 snapshot wont boot, cause it tries to mount root without detecting partitions before :/
did i miss some patch since this snapshot?
ok, applies against 2.6.14.0. device: cypress -A- bridge.
no change with smartctl:
tom1:/usr/src/sm5/debug# ./smartctl -a -r ioctl,2 -T verypermissive /dev/sda smartctl version 5.34 [i686-pc-linux-gnu] Copyright (C) 2002-5 Bruce Allen Home page is http://smartmontools.sourceforge.net/
[inquiry: 12 00 00 00 24 00 ]
scsi_status=0x0, host_status=0x0, driver_status=0x0 info=0x0 duration=0 milliseconds
Incoming data, len=36:
00 00 00 00 00 1f 00 00 00 49 43 33 35 4c 30 33 30 10 41 56 56 4e 30 37 2d 30 20 20 20 20 20 20 20 20 20 00 30 00 30
status=0x0
Device: IC35L030 AVVN07-0 Version:
[mode sense: 1a 00 1c 00 40 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=0 milliseconds
Incoming data, len=64:
00 00 00 00 00 1f 00 00 00 49 43 33 35 4c 30 33 30 10 41 56 56 4e 30 37 2d 30 20 20 20 20 20 20 20 20 20 00 30 00 30 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00
10 00 00
status=2: sense_key=5 asc=24 ascq=0
[inquiry: 12 01 80 00 40 00 ]
scsi_status=0x0, host_status=0x0, driver_status=0x0 info=0x0 duration=4 milliseconds
Incoming data, len=64:
00 00 00 00 00 1f 00 00 00 49 43 33 35 4c 30 33 30 10 41 56 56 4e 30 37 2d 30 20 20 20 20 20 20 20 20 20 00 30 00 30 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
status=0x0
Vital Product Data (VPD) bit ignored in INQUIRY Device type: disk
[mode sense: 1a 00 19 00 40 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=4 milliseconds
Incoming data, len=64:
00 00 00 00 00 e8 30 ef c7 80 35 23 c5 00 00 00 00 10 70 6a bd c5 a0 84 11 c0 00 01 10 00 00 02 20 00 20 18 5e 3f d0 20 af 02 c8 00 00 00 00 70 6a bd c5 30 a0 84 11 c0 00 01 10 00 00 02 20 00 18 be db c5
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00
10 00 00
status=2: sense_key=5 asc=24 ascq=0
Local Time is: Wed Nov 9 10:34:46 2005 CET
[test unit ready: 00 00 00 00 00 00 ]
scsi_status=0x0, host_status=0x0, driver_status=0x0 info=0x0 duration=0 milliseconds
status=0x0
Device does not support SMART [unsupported field in scsi command]
[log sense: 4d 00 40 00 00 00 00 00 04 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=0 milliseconds
Incoming data, len=4:
00 54 5a 69 66
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00
10 00 00
status=2: sense_key=5 asc=20 ascq=0
Log Sense for supported pages failed [unsupported scsi opcode]
[request sense: 03 00 00 00 12 00 ]
scsi_status=0x0, host_status=0x0, driver_status=0x0 info=0x0 duration=4 milliseconds
Incoming data, len=18:
00 70 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 00
10 00 00
status=0x0
[read defect list(10): 37 00 0c 00 00 00 00 00 04 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=0 milliseconds
Incoming data, len=4:
00 70 00 00 00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00
10 00 00
status=2: sense_key=5 asc=20 ascq=0
Read defect list (10) Failed: unsupported scsi opcode
Error Counter logging not supported
[mode sense: 1a 00 0a 00 40 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=0 milliseconds
Incoming data, len=64:
00 00 00 00 00 1f 00 00 00 49 43 33 35 4c 30 33 30 10 41 56 56 4e 30 37 2d 30 20 20 20 20 20 20 20 20 20 00 30 00 30 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00
10 00 00
status=2: sense_key=5 asc=24 ascq=0
Device does not support Self Test logging
tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug# ./smartctl -a -r ioctl,2 -T verypermissive /dev/sg0 smartctl version 5.34 [i686-pc-linux-gnu] Copyright (C) 2002-5 Bruce Allen Home page is http://smartmontools.sourceforge.net/
[inquiry: 12 00 00 00 24 00 ]
scsi_status=0x0, host_status=0x0, driver_status=0x0 info=0x0 duration=0 milliseconds
Incoming data, len=36:
00 00 00 00 00 1f 00 00 00 49 43 33 35 4c 30 33 30 10 41 56 56 4e 30 37 2d 30 20 20 20 20 20 20 20 20 20 00 30 00 30
status=0x0
Device: IC35L030 AVVN07-0 Version:
[mode sense: 1a 00 1c 00 40 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=0 milliseconds
Incoming data, len=64:
00 00 00 00 00 1f 00 00 00 49 43 33 35 4c 30 33 30 10 41 56 56 4e 30 37 2d 30 20 20 20 20 20 20 20 20 20 00 30 00 30 11 00 00 00 06 00 00 00 00 00 00 00 30 00 00 00 00 11 00 00 00 07 00 00 00 00 00 00 00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00
10 00 00
status=2: sense_key=5 asc=24 ascq=0
[inquiry: 12 01 80 00 40 00 ]
scsi_status=0x0, host_status=0x0, driver_status=0x0 info=0x0 duration=4 milliseconds
Incoming data, len=64:
00 00 00 00 00 1f 00 00 00 49 43 33 35 4c 30 33 30 10 41 56 56 4e 30 37 2d 30 20 20 20 20 20 20 20 20 20 00 30 00 30 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 00 00 11 00 00 00 07 00 00 00 00 00 00 00
status=0x0
Vital Product Data (VPD) bit ignored in INQUIRY Device type: disk
[mode sense: 1a 00 19 00 40 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=0 milliseconds
Incoming data, len=64:
00 00 00 00 00 1f 00 00 00 49 43 33 35 4c 30 33 30 10 41 56 56 4e 30 37 2d 30 20 20 20 20 20 20 20 20 20 00 30 00 30 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 00 00 11 00 00 00 07 00 00 00 00 00 00 00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00
10 00 00
status=2: sense_key=5 asc=24 ascq=0
Local Time is: Wed Nov 9 10:35:47 2005 CET
[test unit ready: 00 00 00 00 00 00 ]
scsi_status=0x0, host_status=0x0, driver_status=0x0 info=0x0 duration=0 milliseconds
status=0x0
Device does not support SMART [unsupported field in scsi command]
[log sense: 4d 00 40 00 00 00 00 00 04 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=0 milliseconds
Incoming data, len=4:
00 00 00 00 00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00
10 00 00
status=2: sense_key=5 asc=20 ascq=0
Log Sense for supported pages failed [unsupported scsi opcode]
[request sense: 03 00 00 00 12 00 ]
scsi_status=0x0, host_status=0x0, driver_status=0x0 info=0x0 duration=0 milliseconds
Incoming data, len=18:
00 70 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 00
10 00 00
status=0x0
[read defect list(10): 37 00 0c 00 00 00 00 00 04 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=0 milliseconds
Incoming data, len=4:
00 70 00 00 00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00
10 00 00
status=2: sense_key=5 asc=20 ascq=0
Read defect list (10) Failed: unsupported scsi opcode
Error Counter logging not supported
[mode sense: 1a 00 0a 00 40 00 ]
scsi_status=0x2, host_status=0x0, driver_status=0x8 info=0x1 duration=0 milliseconds
Incoming data, len=64:
00 70 00 00 00 00 00 00 0a 00 00 00 00 00 00 00 00 10 00 00 56 4e 30 37 2d 30 20 20 20 20 20 20 20 20 20 00 30 00 30 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 00 00 11 00 00 00 07 00 00 00 00 00 00 00
Quoted 1 line
Quoted 1 line
Quoted 1 line
Sense buffer, len=18:
00 70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00
10 00 00
status=2: sense_key=5 asc=24 ascq=0
Device does not support Self Test logging
tom1:/usr/src/sm5/debug#
no change with sdparm:
tom1:/usr/src/sm5/debug# sdparm -avl /dev/sda
/dev/sda: IC35L030 AVVN07-0
Read write error recovery [PS=0] mode page:
AWRE 0 [cha: n, def: 0, sav: 0] Automatic write reallocation enabled
ARRE 0 [cha: n, def: 0, sav: 0] Automatic read reallocation enabled
TB 0 [cha: n, def: 0, sav: 0] Transfer block
RC 0 [cha: n, def: 0, sav: 0] Read continuous
EER 0 [cha: n, def: 0, sav: 0] Enable early recover
PER 0 [cha: n, def: 0, sav: 0] Post error
DTE 0 [cha: n, def: 0, sav: 0] Data terminate on error
DCR 0 [cha: n, def: 0, sav: 0] Disable correction
RRC 0 [cha: n, def: 0, sav: 0] Read retry count
WRC 0 [cha: n, def: 0, sav: 0] Write retry count
RTL 0 [cha: n, def: 0, sav: 0] Recovery time limit (ms)Quoted 3 lines
Quoted 3 lines
Format (SBC) mode page not supported
Rigid disk (SBC) mode page not supported Verify error recovery (SBC) mode page not supported
Caching (SBC) [PS=0] mode page:
IC 0 [cha: n, def: 0, sav: 0] Initiator control ABPF 0 [cha: n, def: 0, sav: 0] Abort pre-fetch CAP 0 [cha: n, def: 0, sav: 0] Caching analysis permitted DISC 0 [cha: n, def: 0, sav: 0] Discontinuity SIZE 0 [cha: n, def: 0, sav: 0] Size (1->CSS valid, 0->NCS valid) WCE 0 [cha: n, def: 0, sav: 0] Write cache enable MF 0 [cha: n, def: 0, sav: 0] Multiplication factor RCD 0 [cha: n, def: 0, sav: 0] Read cache disable DRRP 0 [cha: n, def: 0, sav: 0] Demand read retension priority WRP 0 [cha: n, def: 0, sav: 0] Write retension priority DPTL 0 [cha: n, def: 0, sav: 0] Disable pre-fetch transfer length MIPF 0 [cha: n, def: 0, sav: 0] Minimum pre-fetch MAPF 0 [cha: n, def: 0, sav: 0] Maximum pre-fetch MAPFC 0 [cha: n, def: 0, sav: 0] Maximum pre-fetch ceiling
Quoted 8 lines
Quoted 8 lines
skipping rest as field position exceeds mode page length=12 Control mode page not supported
XOR control (SBC) mode page not supported
Protocol specific logical unit mode page not supported Protocol specific port mode page not supported Power condition mode page not supported Informational exceptions control mode page not supported Background control (SBC) mode subpage not supported
tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug# sdparm -avl /dev/sg0
/dev/sg0: IC35L030 AVVN07-0
Read write error recovery [PS=0] mode page:
AWRE 0 [cha: n, def: 0, sav: 0] Automatic write reallocation enabled
ARRE 0 [cha: n, def: 0, sav: 0] Automatic read reallocation enabled
TB 0 [cha: n, def: 0, sav: 0] Transfer block
RC 0 [cha: n, def: 0, sav: 0] Read continuous
EER 0 [cha: n, def: 0, sav: 0] Enable early recover
PER 0 [cha: n, def: 0, sav: 0] Post error
DTE 0 [cha: n, def: 0, sav: 0] Data terminate on error
DCR 0 [cha: n, def: 0, sav: 0] Disable correction
RRC 0 [cha: n, def: 0, sav: 0] Read retry count
WRC 0 [cha: n, def: 0, sav: 0] Write retry count
RTL 0 [cha: n, def: 0, sav: 0] Recovery time limit (ms)Quoted 3 lines
Quoted 3 lines
Format (SBC) mode page not supported
Rigid disk (SBC) mode page not supported Verify error recovery (SBC) mode page not supported
Caching (SBC) [PS=0] mode page:
IC 0 [cha: n, def: 0, sav: 0] Initiator control ABPF 0 [cha: n, def: 0, sav: 0] Abort pre-fetch CAP 0 [cha: n, def: 0, sav: 0] Caching analysis permitted DISC 0 [cha: n, def: 0, sav: 0] Discontinuity SIZE 0 [cha: n, def: 0, sav: 0] Size (1->CSS valid, 0->NCS valid) WCE 0 [cha: n, def: 0, sav: 0] Write cache enable MF 0 [cha: n, def: 0, sav: 0] Multiplication factor RCD 0 [cha: n, def: 0, sav: 0] Read cache disable DRRP 0 [cha: n, def: 0, sav: 0] Demand read retension priority WRP 0 [cha: n, def: 0, sav: 0] Write retension priority DPTL 0 [cha: n, def: 0, sav: 0] Disable pre-fetch transfer length MIPF 0 [cha: n, def: 0, sav: 0] Minimum pre-fetch MAPF 0 [cha: n, def: 0, sav: 0] Maximum pre-fetch MAPFC 0 [cha: n, def: 0, sav: 0] Maximum pre-fetch ceiling
Quoted 8 lines
Quoted 8 lines
skipping rest as field position exceeds mode page length=12 Control mode page not supported
XOR control (SBC) mode page not supported
Protocol specific logical unit mode page not supported Protocol specific port mode page not supported Power condition mode page not supported Informational exceptions control mode page not supported Background control (SBC) mode subpage not supported
tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug# sdparm -avl6 /dev/sg0
/dev/sg0: IC35L030 AVVN07-0
Read write error recovery [PS=0] mode page:
AWRE 0 [cha: n, def: 0, sav: 0] Automatic write reallocation enabled
ARRE 0 [cha: n, def: 0, sav: 0] Automatic read reallocation enabled
TB 0 [cha: n, def: 0, sav: 0] Transfer block
RC 0 [cha: n, def: 0, sav: 0] Read continuous
EER 0 [cha: n, def: 0, sav: 0] Enable early recover
PER 0 [cha: n, def: 0, sav: 0] Post error
DTE 0 [cha: n, def: 0, sav: 0] Data terminate on error
DCR 0 [cha: n, def: 0, sav: 0] Disable correction
RRC 0 [cha: n, def: 0, sav: 0] Read retry count
WRC 0 [cha: n, def: 0, sav: 0] Write retry count
RTL 0 [cha: n, def: 0, sav: 0] Recovery time limit (ms)Quoted 3 lines
Quoted 3 lines
Format (SBC) mode page not supported
Rigid disk (SBC) mode page not supported Verify error recovery (SBC) mode page not supported
Caching (SBC) [PS=0] mode page:
IC 0 [cha: n, def: 0, sav: 0] Initiator control ABPF 0 [cha: n, def: 0, sav: 0] Abort pre-fetch CAP 0 [cha: n, def: 0, sav: 0] Caching analysis permitted DISC 0 [cha: n, def: 0, sav: 0] Discontinuity SIZE 0 [cha: n, def: 0, sav: 0] Size (1->CSS valid, 0->NCS valid) WCE 0 [cha: n, def: 0, sav: 0] Write cache enable MF 0 [cha: n, def: 0, sav: 0] Multiplication factor RCD 0 [cha: n, def: 0, sav: 0] Read cache disable DRRP 0 [cha: n, def: 0, sav: 0] Demand read retension priority WRP 0 [cha: n, def: 0, sav: 0] Write retension priority DPTL 0 [cha: n, def: 0, sav: 0] Disable pre-fetch transfer length MIPF 0 [cha: n, def: 0, sav: 0] Minimum pre-fetch MAPF 0 [cha: n, def: 0, sav: 0] Maximum pre-fetch MAPFC 0 [cha: n, def: 0, sav: 0] Maximum pre-fetch ceiling
Quoted 8 lines
Quoted 8 lines
skipping rest as field position exceeds mode page length=12 Control mode page not supported
XOR control (SBC) mode page not supported
Protocol specific logical unit mode page not supported Protocol specific port mode page not supported Power condition mode page not supported Informational exceptions control mode page not supported Background control (SBC) mode subpage not supported
tom1:/usr/src/sm5/debug#
Quoted 21 lines · thomas schorpp
Quoted 19 lines · thomas schorpp
Quoted 11 lines · Timothy Thelin
Quoted 2 lines · James Bottomley
It was generated against Linus' git repo after
applying Alan's patch.With both patches applied I can now do passthru cdbs on the cypress part without issue, and I still don't see any IO issues.
Anyone out there have a better selection of hardware to test with?
first i need better software, the 2.6.14-git-11 snapshot wont boot, cause it tries to mount root without detecting partitions before :/
Quoted 8 lines
Quoted 2 lines
did i miss some patch since this snapshot?
ok, applies against 2.6.14.0. device: cypress -A- bridge.
no change with smartctl:
err, ok, surely not with missing ata-passthru code ;)
Quoted 2 lines
no change with smartctl:
tom1:/usr/src/sm5/debug# ./smartctl -a -r ioctl,2 -T verypermissive /dev/sda
Shouldn't there be a "-d ata" flag on those smartctl commands?
Quoted 6 lines · Mark Lord
Quoted 2 lines
no change with smartctl:
tom1:/usr/src/sm5/debug# ./smartctl -a -r ioctl,2 -T verypermissive
/dev/sdaShouldn't there be a "-d ata" flag on those smartctl commands? -
? i cant find any ata-passthrough in smartctl cvs, the device is treated pure ata then.
ok, will add the (preliminary) passthrough opcodes to linux/scsi.h, include it in hdparm, add an option "-d atacb", then try it out there, not?
tried -d ata too. result negative as expected:
tom1:/usr/src/sm5/debug# ./smartctl -a -d ata -r ioctl,2 -T verypermissive /dev/sg0 smartctl version 5.34 [i686-pc-linux-gnu] Copyright (C) 2002-5 Bruce Allen Home page is http://smartmontools.sourceforge.net/
REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY DEVICE
REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY DEVICE returned -1 errno=1 [Operation not permitted]
===== [IDENTIFY DEVICE] DATA START (BASE-16) ===== 000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ===== [IDENTIFY DEVICE] DATA END (512 Bytes) =====
REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY PACKET DEVICE
REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY PACKET DEVICE returned -1 errno=1 [Operation not permitted]
===== [IDENTIFY PACKET DEVICE] DATA START (BASE-16) ===== 000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ===== [IDENTIFY PACKET DEVICE] DATA END (512 Bytes) =====
Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)
=== START OF INFORMATION SECTION ===
Device Model: [No Information Found] Serial Number: [No Information Found] Firmware Version: [No Information Found] Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 1 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Wed Nov 9 14:53:22 2005 CET
SMART is only available in ATA Version 3 Revision 3 or greater.
We will try to proceed in spite of this.
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
Checking for SMART support by trying SMART ENABLE command.
REPORT-IOCTL: DeviceFD=3 Command=SMART ENABLE
REPORT-IOCTL: DeviceFD=3 Command=SMART ENABLE returned -1 errno=1 [Operation not permitted] Error SMART Enable failed: Operation not permitted
SMART ENABLE failed - this establishes that this device lacks SMART functionality.
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
Checking to be sure by trying SMART RETURN STATUS command.
REPORT-IOCTL: DeviceFD=3 Command=SMART STATUS
REPORT-IOCTL: DeviceFD=3 Command=SMART STATUS returned -1 errno=1 [Operation not permitted] SMART support is: Unavailable
REPORT-IOCTL: DeviceFD=3 Command=SMART STATUS
REPORT-IOCTL: DeviceFD=3 Command=SMART STATUS returned -1 errno=1 [Operation not permitted] SMART Disabled. Use option -s with argument 'on' to enable it. tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug#
tom1:/usr/src/sm5/debug# smartctl -a -d ata -r ioctl,2 -T verypermissive /dev/sda smartctl version 5.32 Copyright (C) 2002-4 Bruce Allen Home page is http://smartmontools.sourceforge.net/
REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY DEVICE
REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY DEVICE returned -1 errno=22 [Invalid argument]
===== [IDENTIFY DEVICE] DATA START (BASE-16) ===== 000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ===== [IDENTIFY DEVICE] DATA END (512 Bytes) =====
REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY PACKET DEVICE
REPORT-IOCTL: DeviceFD=3 Command=IDENTIFY PACKET DEVICE returned -1 errno=22 [Invalid argument]
===== [IDENTIFY PACKET DEVICE] DATA START (BASE-16) ===== 000-015: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 016-031: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 032-047: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 048-063: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 064-079: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 080-095: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 096-111: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 112-127: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 128-143: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 144-159: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 160-175: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 176-191: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 192-207: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 208-223: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 224-239: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 240-255: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 256-271: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 272-287: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 288-303: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 304-319: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 320-335: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 336-351: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 352-367: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 368-383: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 384-399: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 400-415: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 416-431: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 432-447: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 448-463: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 464-479: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 480-495: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 496-511: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ===== [IDENTIFY PACKET DEVICE] DATA END (512 Bytes) =====
Smartctl: Device Read Identity Failed (not an ATA/ATAPI device)
=== START OF INFORMATION SECTION ===
Device Model: [No Information Found] Serial Number: [No Information Found] Firmware Version: [No Information Found] Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 1 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Wed Nov 9 14:53:35 2005 CET
SMART is only available in ATA Version 3 Revision 3 or greater.
We will try to proceed in spite of this.
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.
Checking for SMART support by trying SMART ENABLE command.
REPORT-IOCTL: DeviceFD=3 Command=SMART ENABLE
REPORT-IOCTL: DeviceFD=3 Command=SMART ENABLE returned -1 errno=22 [Invalid argument] Error SMART Enable failed: Invalid argument
SMART ENABLE failed - this establishes that this device lacks SMART functionality.
SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 85-87 don't show if SMART is enabled.
Checking to be sure by trying SMART RETURN STATUS command.
REPORT-IOCTL: DeviceFD=3 Command=SMART STATUS
REPORT-IOCTL: DeviceFD=3 Command=SMART STATUS returned -1 errno=22 [Invalid argument] SMART support is: Unavailable
REPORT-IOCTL: DeviceFD=3 Command=SMART STATUS
REPORT-IOCTL: DeviceFD=3 Command=SMART STATUS returned -1 errno=22 [Invalid argument] SMART Disabled. Use option -s with argument 'on' to enable it. tom1:/usr/src/sm5/debug#
PATCH 1/1 T10/04-262r8
Quoted 3 lines · thomas schorpp
ok, will add the (preliminary) passthrough opcodes to
linux/scsi.h, include it in hdparm, add an option "-d atacb", then try it out there, not?
doc patch
include/scsi/scsi.h +1 -1
@@ -116,7 +116,7 @@/* values for service action in */ #define SAI_READ_CAPACITY_16 0x10 -/* Values for T10/04-262r7 */ +/* Values for T10/04-262r8 */ #define ATA_16 0x85/* 16-byte pass-thru */ #define ATA_12 0xa1/* 12-byte pass-thru */
Re: [DOC PATCH] T10/04-262r8
include/scsi/scsi.h line 121
Quoted 10 lines · thomas schorpp
include/scsi/scsi.h +1
-1@@ -116,7 +116,7 @@/* values for service action in */ #define SAI_READ_CAPACITY_16 0x10 -/* Values for T10/04-262r7 */ +/* Values for T10/04-262r8 */ #define ATA_16 0x85/* 16-byte pass-thru */ #define ATA_12 0xa1/* 12-byte pass-thru */
This is a bit silly. We should just remove the T10 doc reference, if people are going to be continually submitting patches to update this doc id.
Jeff
Re: [DOC PATCH] T10/04-262r8
Quoted 5 lines
Quoted 2 lines
#define
ATA_160x85/* 16-byte pass-thru */
#defineATA_120xa1/* 12-byte pass-thru */This is a bit silly. We should just remove the T10 doc reference, if people are going to be continually submitting patches to update this doc id.
Agreed ... especially since 04-262 is just a proposed update to SAT which is what actually defines these command opcodes, so the comment isn't even correct.
James
Re: [DOC PATCH] T10/04-262r8
Quoted 3 lines · James Bottomley
Quoted 3 lines
Quoted 2 lines
#define
ATA_160x85/* 16-byte pass-thru */
#defineATA_120xa1/* 12-byte pass-thru */
is this all, or do we have a preliminary SATL in kernel yet? cant find.
how about full definitions of the pasthru cdb's in kernel structs and approbiate ioctls?
for hdparm ata-security theres ide taskfile used, can scsi command sequences combined with ide taskfiles which use own ioctls?
are taskfiles needed for this in any case?
for smartctl theres sg_cmnd_io() with (user definable?) struct io_hdr.
so i would try passthru test first with smartctl by adding passthru opcode ATA_12 to smartctl struct scsi_cmd_io io_hdr. later combining scsi ioparm structs and passthru opcode with usable contents of ide taskfile parm structs in user space.
the passthru cdb is also not clear enough to me:
according to sat-r06 spec byte 0-2 is scsi, 3-9 are ata, 11 is scsi, yes?
thx
tom
Re: [DOC PATCH] T10/04-262r8
Quoted 7 lines · thomas schorpp
Quoted 3 lines · James Bottomley
Quoted 3 lines
Quoted 2 lines
#define
ATA_160x85/* 16-byte pass-thru */
#defineATA_120xa1/* 12-byte pass-thru */is this all, or do we have a preliminary SATL in kernel yet? cant find.
It's been there for more than a year: drivers/scsi/libata-scsi.c
Quoted 1 line
how about full definitions of the pasthru cdb's in kernel structs and approbiate ioctls?
upstream as of 2.6.14-git
Quoted 2 lines
for hdparm ata-security theres ide taskfile used, can scsi command sequences combined with ide taskfiles which use own ioctls? are taskfiles needed for this in any case?
in libata, the HDIO ioctls are implemented by creating issuing a SCSI command (ATA passthru).
Jeff
Re: [DOC PATCH] T10/04-262r8
In reply to thomas schorppQuoted 2 lines · thomas schorpp
for hdparm ata-security theres ide taskfile used, can scsi command sequences combined with ide taskfiles which use own ioctls?
As Jeff said, libata translates some of the HDIO_TASK* functions into SCSI passthru commands, which then get translated back into ATA commands at the time of issue to the device.
Once passthru makes it out into the wild (Linus kernels), I'll update hdparm to have it use SCSI passthru instead when available/appropriate.
There will have to be about a year or so of full overlap (hdparm, smartmontools, and kernel), to give distros time to update/release with all of the affected components.
After that, I imagine Jeff may want to remove the HDIO_TASK* calls again.
Cheers
(SAT) libata + hdparm/smartctl
Quoted 15 lines · Mark Lord
Quoted 3 lines · thomas schorpp
for hdparm ata-security theres ide taskfile used, can scsi command sequences combined with ide taskfiles which use own ioctls?
As Jeff said, libata translates some of the HDIO_TASK* functions into SCSI passthru commands, which then get translated back into ATA commands at the time of issue to the device.
Once passthru makes it out into the wild (Linus kernels), I'll update hdparm to have it use SCSI passthru instead when available/appropriate.
Quoted 8 lines
There will have to be about a year or so of full overlap (hdparm, smartmontools, and kernel), to give distros time to update/release with all of the affected components.
After that, I imagine Jeff may want to remove the HDIO_TASK* calls again.
Cheers
ive tried the whole day to make this driver helper libata or parts of it available to the user space and it didnt work out, sorry, you cant include the header in user-space apps and theres no interface to it.
but if You say so, i'll take a closer look at libatas HDIO_TASKs but this has to be utilized automatic then, at this time libata.ko does not get loaded or used by usbstorage devices.
when it is a driver library i will use it with drivers, as it should be:
so i look if i can modify sg, sd_mod or/and usb-storage to detect passthru needing devices automatic and to take action on passthru needing functionality, then none of the user space apps should need to be worked on.
(hopefully)
y
tom
Re: (SAT) libata + hdparm/smartctl
Quoted 30 lines · thomas schorpp
Quoted 15 lines · Mark Lord
Quoted 2 lines · thomas schorpp
for hdparm ata-security theres ide taskfile used, can scsi command sequences combined with ide taskfiles which use own ioctls?
As Jeff said, libata translates some of the HDIO_TASK* functions into SCSI passthru commands, which then get translated back into ATA commands at the time of issue to the device.
Once passthru makes it out into the wild (Linus kernels), I'll update hdparm to have it use SCSI passthru instead when available/appropriate.
Quoted 8 lines
There will have to be about a year or so of full overlap (hdparm, smartmontools, and kernel), to give distros time to update/release with all of the affected components.
After that, I imagine Jeff may want to remove the HDIO_TASK* calls again.
Cheers
ive tried the whole day to make this driver helper libata or parts of it available to the user space and it didnt work out, sorry, you cant include the header in user-space apps and theres no interface to it.
Quoted 7 lines
but if You say so, i'll take a closer look at libatas
HDIO_TASKsbut this has to be utilized automatic then, at this time libata.ko does not get loaded or used by usbstorage devices.when it is a driver library i will use it with drivers, as it should be:
so i look if i can modify sg,
sd_modor/and usb-storage to detect passthru needing devices automatic and to take action on passthru needing functionality, then none of the user space apps should need to be worked on.
BTW The ATA COMMAND PASS THROUGH (12) SCSI command shares its opcode (0xa1) with the MMC BLANK command. According to sat-r07
a SAT layer should identify itself by using "ATA " as
the vendor string of its standard INQUIRY response.
For those not aware in lk 2.6.15-rc1 smartctl (from smartmontools) works. First you see:
# smartctl -a /dev/sda smartctl version 5.34 [i686-pc-linux-gnu] Copyright (C) 2002-5 Bruce Allen Home page is http://smartmontools.sourceforge.net/
Device: ATA ST380013AS Version: 3.18
In Linux, SATA disks accessed via libata are not currently supported by smartmontools. By the time you read this, support may have been added in recent kernels. Try an additional '-d ata' argument.
Following that advice:
# smartctl -a -d ata /dev/sda <output just like an (p)ATA disk>
Recent versions of hdparm also work (e.g. "hdparm -I /dev/sda").
Doug Gilbert
Re: [DOC PATCH] T10/04-262r8
In reply to thomas schorppQuoted 1 line · thomas schorpp
how about full definitions of the pasthru cdb's in kernel structs and approbiate ioctls?
Why would we want to do that? The whole point about pass through is that it is designed to use the existing SCSI infrastructure transparently (hence use SG_IO to send an ATA command to a bridge that understands it---but the key point here is that the device so addressed must understand the opcodes).
Quoted 2 lines
the passthru cdb is also not clear enough to me:
according to sat-r06 spec byte 0-2 is scsi, 3-9 are ata, 11 is scsi, yes?
Actually, no; byte 0 is the opcode, so you could call that SCSI and byte 11 (or 15) is the control as defined by SAM; the rest all contain SAT specific fields.
James