* RE: [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver
@ 2005-11-08 19:50 Timothy Thelin
2005-11-09 9:04 ` thomas schorpp
0 siblings, 1 reply; 12+ messages in thread
From: Timothy Thelin @ 2005-11-08 19:50 UTC (permalink / raw)
To: Alan Stern, James Bottomley
Cc: Patrick Mansfield, Matthew Dharm, thomas schorpp,
USB Storage list, Linux SCSI list, linux-ide
[-- Attachment #1: Type: text/plain, Size: 2441 bytes --]
> On Mon, 7 Nov 2005, James Bottomley wrote:
>
> > > 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
> > > it. Matt probably has the best selection of devices for
> testing...
> > >
> > > There is one problem we have with devices that report
> themselves as SCSI-3
> > > or SCSI-4 but hang when they receive a REPORT LUNS
> command. That's easily
> > > handled by making usb-storage set the NOREPORTLUN flag.
> Maybe that's all
> > > 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.
>
> 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?
Signed-off-by: Timothy Thelin <timothy.thelin@wdc.com>
---
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -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);
}
[-- Attachment #2: scsi-level-0-aware.patch --]
[-- Type: application/octet-stream, Size: 532 bytes --]
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -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);
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver
2005-11-08 19:50 [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver Timothy Thelin
@ 2005-11-09 9:04 ` thomas schorpp
2005-11-09 9:45 ` thomas schorpp
0 siblings, 1 reply; 12+ messages in thread
From: thomas schorpp @ 2005-11-09 9:04 UTC (permalink / raw)
To: Timothy Thelin
Cc: Alan Stern, James Bottomley, Patrick Mansfield, Matthew Dharm,
USB Storage list, Linux SCSI list, linux-ide
Timothy Thelin wrote:
>>On Mon, 7 Nov 2005, James Bottomley wrote:
>>
> 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?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver
2005-11-09 9:04 ` thomas schorpp
@ 2005-11-09 9:45 ` thomas schorpp
2005-11-09 10:05 ` thomas schorpp
2005-11-09 13:21 ` Mark Lord
0 siblings, 2 replies; 12+ messages in thread
From: thomas schorpp @ 2005-11-09 9:45 UTC (permalink / raw)
To: USB Storage list
Cc: Timothy Thelin, James Bottomley, linux-ide, Linux SCSI list,
Matthew Dharm, Patrick Mansfield
thomas schorpp wrote:
> Timothy Thelin wrote:
>
>>>On Mon, 7 Nov 2005, James Bottomley wrote:
>>>
>>
>>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?
>
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
>>> 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
>>> 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
>>> 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
>>> 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
>>> 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
>>> 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
>>> 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
>>> 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
>>> 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
>>> 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)
>> 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
>> 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)
>> 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
>> 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)
>> 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
>> 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#
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver
2005-11-09 9:45 ` thomas schorpp
@ 2005-11-09 10:05 ` thomas schorpp
2005-11-09 13:21 ` Mark Lord
1 sibling, 0 replies; 12+ messages in thread
From: thomas schorpp @ 2005-11-09 10:05 UTC (permalink / raw)
To: USB Storage list
Cc: James Bottomley, linux-ide, Timothy Thelin, Linux SCSI list,
Matthew Dharm, Patrick Mansfield
thomas schorpp wrote:
> thomas schorpp wrote:
>
>>Timothy Thelin wrote:
>>
>>
>>>>On Mon, 7 Nov 2005, James Bottomley wrote:
>>>>
>>>
>>>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?
>>
>
>
> ok, applies against 2.6.14.0. device: cypress -A- bridge.
>
> no change with smartctl:
>
err, ok, surely not with missing ata-passthru code ;)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver
2005-11-09 9:45 ` thomas schorpp
2005-11-09 10:05 ` thomas schorpp
@ 2005-11-09 13:21 ` Mark Lord
2005-11-09 14:05 ` thomas schorpp
1 sibling, 1 reply; 12+ messages in thread
From: Mark Lord @ 2005-11-09 13:21 UTC (permalink / raw)
To: t.schorpp
Cc: USB Storage list, Timothy Thelin, James Bottomley, linux-ide,
Linux SCSI list, Matthew Dharm, Patrick Mansfield
>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?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver
2005-11-09 13:21 ` Mark Lord
@ 2005-11-09 14:05 ` thomas schorpp
[not found] ` <4372172A.50003@gmx.de>
0 siblings, 1 reply; 12+ messages in thread
From: thomas schorpp @ 2005-11-09 14:05 UTC (permalink / raw)
To: Mark Lord; +Cc: USB Storage list, linux-ide, Linux SCSI list
Mark Lord wrote:
>>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?
> -
? 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#
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [DOC PATCH] T10/04-262r8
[not found] ` <1131553363.3271.1.camel@mulgrave>
@ 2005-11-10 6:19 ` thomas schorpp
2005-11-10 7:44 ` Jeff Garzik
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: thomas schorpp @ 2005-11-10 6:19 UTC (permalink / raw)
To: Linux SCSI list; +Cc: linux-ide
James Bottomley wrote:
>>> #define ATA_16 0x85 /* 16-byte pass-thru */
>>> #define ATA_12 0xa1 /* 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [DOC PATCH] T10/04-262r8
2005-11-10 6:19 ` [DOC PATCH] T10/04-262r8 thomas schorpp
@ 2005-11-10 7:44 ` Jeff Garzik
2005-11-10 14:27 ` Mark Lord
2005-11-10 15:58 ` [DOC PATCH] T10/04-262r8 James Bottomley
2 siblings, 0 replies; 12+ messages in thread
From: Jeff Garzik @ 2005-11-10 7:44 UTC (permalink / raw)
To: t.schorpp; +Cc: Linux SCSI list, linux-ide
thomas schorpp wrote:
> James Bottomley wrote:
>
>>>>#define ATA_16 0x85 /* 16-byte pass-thru */
>>>>#define ATA_12 0xa1 /* 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
> how about full definitions of the pasthru cdb's in kernel structs and approbiate ioctls?
upstream as of 2.6.14-git
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [DOC PATCH] T10/04-262r8
2005-11-10 6:19 ` [DOC PATCH] T10/04-262r8 thomas schorpp
2005-11-10 7:44 ` Jeff Garzik
@ 2005-11-10 14:27 ` Mark Lord
2005-11-10 15:05 ` (SAT) libata + hdparm/smartctl thomas schorpp
2005-11-10 15:58 ` [DOC PATCH] T10/04-262r8 James Bottomley
2 siblings, 1 reply; 12+ messages in thread
From: Mark Lord @ 2005-11-10 14:27 UTC (permalink / raw)
Cc: Linux SCSI list, linux-ide
thomas schorpp wrote:
>
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* (SAT) libata + hdparm/smartctl
2005-11-10 14:27 ` Mark Lord
@ 2005-11-10 15:05 ` thomas schorpp
2005-11-20 7:10 ` Douglas Gilbert
0 siblings, 1 reply; 12+ messages in thread
From: thomas schorpp @ 2005-11-10 15:05 UTC (permalink / raw)
To: Linux SCSI list; +Cc: linux-ide
Mark Lord wrote:
> thomas schorpp wrote:
>
>>
>> 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
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [DOC PATCH] T10/04-262r8
2005-11-10 6:19 ` [DOC PATCH] T10/04-262r8 thomas schorpp
2005-11-10 7:44 ` Jeff Garzik
2005-11-10 14:27 ` Mark Lord
@ 2005-11-10 15:58 ` James Bottomley
2 siblings, 0 replies; 12+ messages in thread
From: James Bottomley @ 2005-11-10 15:58 UTC (permalink / raw)
To: t.schorpp; +Cc: Linux SCSI list, linux-ide
On Thu, 2005-11-10 at 07:19 +0100, thomas schorpp wrote:
> 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).
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: (SAT) libata + hdparm/smartctl
2005-11-10 15:05 ` (SAT) libata + hdparm/smartctl thomas schorpp
@ 2005-11-20 7:10 ` Douglas Gilbert
0 siblings, 0 replies; 12+ messages in thread
From: Douglas Gilbert @ 2005-11-20 7:10 UTC (permalink / raw)
To: t.schorpp; +Cc: Linux SCSI list, linux-ide
thomas schorpp wrote:
> Mark Lord wrote:
>
>>thomas schorpp wrote:
>>
>>
>>>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
>
>
> 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.
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
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-11-20 7:09 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-08 19:50 [usb-storage] [Merging ATA passthru] on integrating SMART/ATA-Security in usb-storage driver Timothy Thelin
2005-11-09 9:04 ` thomas schorpp
2005-11-09 9:45 ` thomas schorpp
2005-11-09 10:05 ` thomas schorpp
2005-11-09 13:21 ` Mark Lord
2005-11-09 14:05 ` thomas schorpp
[not found] ` <4372172A.50003@gmx.de>
[not found] ` <43721C3C.1010103@pobox.com>
[not found] ` <1131553363.3271.1.camel@mulgrave>
2005-11-10 6:19 ` [DOC PATCH] T10/04-262r8 thomas schorpp
2005-11-10 7:44 ` Jeff Garzik
2005-11-10 14:27 ` Mark Lord
2005-11-10 15:05 ` (SAT) libata + hdparm/smartctl thomas schorpp
2005-11-20 7:10 ` Douglas Gilbert
2005-11-10 15:58 ` [DOC PATCH] T10/04-262r8 James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).