* RE: ATA Pass-Through support
@ 2006-03-02 18:41 Quat Le
2006-03-03 16:38 ` Brian King
0 siblings, 1 reply; 18+ messages in thread
From: Quat Le @ 2006-03-02 18:41 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Moore, Eric, dougg, linux-scsi, Brian King, linux-ide
> -----Original Message-----
> From: Jeff Garzik [mailto:jgarzik@pobox.com]
> Sent: Thursday, March 02, 2006 10:17 AM
> To: Quat Le
> Cc: Moore, Eric; dougg@torque.net; linux-scsi@vger.kernel.org; Brian
King;
> linux-ide@vger.kernel.org
> Subject: Re: ATA Pass-Through support
>
> Brian King, maintainer of the ipr driver, has posted patches which
> integrate libata SATA support into his driver. Merging those is on my
> todo list, though I'm currently waiting on Tejun Heo's error handling
> work before tackling that (and NCQ and hotplug...).
>
> Jeff
>
Jeff,
I'm not familiar with the ipr driver. Is this for IBM PowerPC RAID? How
will this work for me? I don't really need RAID. What I have is a
Pentium-based machine. I want to be able to talk to SATA drives on a
SAS expander.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-03-02 18:41 ATA Pass-Through support Quat Le
@ 2006-03-03 16:38 ` Brian King
0 siblings, 0 replies; 18+ messages in thread
From: Brian King @ 2006-03-03 16:38 UTC (permalink / raw)
To: Quat Le; +Cc: Jeff Garzik, Moore, Eric, dougg, linux-scsi, linux-ide
Quat Le wrote:
> I'm not familiar with the ipr driver. Is this for IBM PowerPC RAID? How
> will this work for me? I don't really need RAID. What I have is a
> Pentium-based machine. I want to be able to talk to SATA drives on a
> SAS expander.
There is really two parts to my patchset. One is some general libata changes
needed for any SAS HBA that wants to use libata to attach SATA devices, and
the second part is the changes to ipr to use that function.
Doug had mentioned a while back that he might look into using libata to attach
SATA devices to aic94xx adapters. Doug, are you still planning to look
at this, or is someone else working on this?
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: ATA Pass-Through support
@ 2006-06-07 18:48 Quat Le
0 siblings, 0 replies; 18+ messages in thread
From: Quat Le @ 2006-06-07 18:48 UTC (permalink / raw)
To: dougg; +Cc: linux-scsi
I thought you were talking about LSI SAS HBA. I am aware of all the
information you mentioned below. I believe the standard ATA Pass-Through
is the way to go for the applications.
Do you know if libata on Adaptec SAS HBA allows multiple operations
concurrently on the same HBA?
Best regards,
Quat Le
-----Original Message-----
From: Douglas Gilbert [mailto:dougg@torque.net]
Sent: Wednesday, June 07, 2006 11:22 AM
To: Quat Le
Cc: linux-scsi@vger.kernel.org
Subject: Re: ATA Pass-Through support
Quat Le wrote:
> Doug,
> Thanks for the info. I thought LSI SAS HBA is not using libata. What
> SAS HBA were you using?
The interesting part of libata for this discussion is
its SCSI to ATA Translation Layer (SATL). Since about
lk 2.6.15 it has implemented the ATA PASS THROUGH SCSI
commands (see sat-r08.pdf at www.t10.org).
My example code only assumed a SCSI pass through
(SG_IO in this case) and a SATL ** that implements
the ATA PASS THROUGH SCSI commands. The MPT Fusion SAS
HBAs have their own SATL (not libata based) but unfortunately
don't implement the ATA pass through commands. My information
is that they will in the future. They do have a proprietary
ATA command passthrough.
I also use an adaptec 48300 SAS HBA. There are several Linux
drivers for the the 94xx chipset inside the 48300. At least
one supports a working SATL with an ATA pass through.
Others may follow soon (or my information may be a little
out of date).
** the SATL doesn't have to be in the OS proper (like libata),
it could be in the HBA firmware, a FC switch or even on
the device. Some aspects of a SATL are transport dependent
so there may be advantages of having it somewhere other than
in libata.
Doug Gilbert
> Best regards,
> Quat Le
>
> -----Original Message-----
> From: Douglas Gilbert [mailto:dougg@torque.net]
> Sent: Saturday, June 03, 2006 12:32 PM
> To: Quat Le
> Cc: linux-scsi@vger.kernel.org
> Subject: Re: ATA Pass-Through support
>
> Quat Le wrote:
>
>>Sorry if this is not the right place to ask this question.
>>
>>I wrote some application code to send ATA Pass-Through SCSI commands
>
> via
>
>>SG_IO ioctl to SATA drives connected to a LSI Logic SAS HBA. What I
>
> got
>
>>was ILLEGAL REQUEST (INVALID COMAND OPERATION CODE) for both SCSI
>>OPCODE's A1H and 85H. I tried some other SCSI commands and saw that
>
> they
>
>>were translated to ATA commands correctly. I am running Linux kernel
>>2.6.15 and am under the impression that it supports ATA Pass-Through.
>
>
> Quat,
> I just did some testing in lk 2.6.17-rc5 and the ATA
> PASS THROUGH (16) SCSI command in libata (defined by SAT)
> worked in my tests.
>
> At http://www.torque.net/sg in the news sections the
> sg3_utils-1.21 beta has in its examples subdirectory:
> sg_sat_identify and sg_sat_chk_power. The latter one
> is interesting because it needs to read back the sector
> count register after the command is complete. That
> involves decoding the extended ATA status return
> (sense data) descriptor.
>
> Doug Gilbert
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: ATA Pass-Through support
@ 2006-06-07 17:15 Quat Le
2006-06-07 18:22 ` Douglas Gilbert
0 siblings, 1 reply; 18+ messages in thread
From: Quat Le @ 2006-06-07 17:15 UTC (permalink / raw)
To: dougg; +Cc: linux-scsi
Doug,
Thanks for the info. I thought LSI SAS HBA is not using libata. What
SAS HBA were you using?
Best regards,
Quat Le
-----Original Message-----
From: Douglas Gilbert [mailto:dougg@torque.net]
Sent: Saturday, June 03, 2006 12:32 PM
To: Quat Le
Cc: linux-scsi@vger.kernel.org
Subject: Re: ATA Pass-Through support
Quat Le wrote:
> Sorry if this is not the right place to ask this question.
>
> I wrote some application code to send ATA Pass-Through SCSI commands
via
> SG_IO ioctl to SATA drives connected to a LSI Logic SAS HBA. What I
got
> was ILLEGAL REQUEST (INVALID COMAND OPERATION CODE) for both SCSI
> OPCODE's A1H and 85H. I tried some other SCSI commands and saw that
they
> were translated to ATA commands correctly. I am running Linux kernel
> 2.6.15 and am under the impression that it supports ATA Pass-Through.
Quat,
I just did some testing in lk 2.6.17-rc5 and the ATA
PASS THROUGH (16) SCSI command in libata (defined by SAT)
worked in my tests.
At http://www.torque.net/sg in the news sections the
sg3_utils-1.21 beta has in its examples subdirectory:
sg_sat_identify and sg_sat_chk_power. The latter one
is interesting because it needs to read back the sector
count register after the command is complete. That
involves decoding the extended ATA status return
(sense data) descriptor.
Doug Gilbert
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-06-07 17:15 Quat Le
@ 2006-06-07 18:22 ` Douglas Gilbert
2006-06-07 18:26 ` Jeff Garzik
0 siblings, 1 reply; 18+ messages in thread
From: Douglas Gilbert @ 2006-06-07 18:22 UTC (permalink / raw)
To: Quat Le; +Cc: linux-scsi
Quat Le wrote:
> Doug,
> Thanks for the info. I thought LSI SAS HBA is not using libata. What
> SAS HBA were you using?
The interesting part of libata for this discussion is
its SCSI to ATA Translation Layer (SATL). Since about
lk 2.6.15 it has implemented the ATA PASS THROUGH SCSI
commands (see sat-r08.pdf at www.t10.org).
My example code only assumed a SCSI pass through
(SG_IO in this case) and a SATL ** that implements
the ATA PASS THROUGH SCSI commands. The MPT Fusion SAS
HBAs have their own SATL (not libata based) but unfortunately
don't implement the ATA pass through commands. My information
is that they will in the future. They do have a proprietary
ATA command passthrough.
I also use an adaptec 48300 SAS HBA. There are several Linux
drivers for the the 94xx chipset inside the 48300. At least
one supports a working SATL with an ATA pass through.
Others may follow soon (or my information may be a little
out of date).
** the SATL doesn't have to be in the OS proper (like libata),
it could be in the HBA firmware, a FC switch or even on
the device. Some aspects of a SATL are transport dependent
so there may be advantages of having it somewhere other than
in libata.
Doug Gilbert
> Best regards,
> Quat Le
>
> -----Original Message-----
> From: Douglas Gilbert [mailto:dougg@torque.net]
> Sent: Saturday, June 03, 2006 12:32 PM
> To: Quat Le
> Cc: linux-scsi@vger.kernel.org
> Subject: Re: ATA Pass-Through support
>
> Quat Le wrote:
>
>>Sorry if this is not the right place to ask this question.
>>
>>I wrote some application code to send ATA Pass-Through SCSI commands
>
> via
>
>>SG_IO ioctl to SATA drives connected to a LSI Logic SAS HBA. What I
>
> got
>
>>was ILLEGAL REQUEST (INVALID COMAND OPERATION CODE) for both SCSI
>>OPCODE's A1H and 85H. I tried some other SCSI commands and saw that
>
> they
>
>>were translated to ATA commands correctly. I am running Linux kernel
>>2.6.15 and am under the impression that it supports ATA Pass-Through.
>
>
> Quat,
> I just did some testing in lk 2.6.17-rc5 and the ATA
> PASS THROUGH (16) SCSI command in libata (defined by SAT)
> worked in my tests.
>
> At http://www.torque.net/sg in the news sections the
> sg3_utils-1.21 beta has in its examples subdirectory:
> sg_sat_identify and sg_sat_chk_power. The latter one
> is interesting because it needs to read back the sector
> count register after the command is complete. That
> involves decoding the extended ATA status return
> (sense data) descriptor.
>
> Doug Gilbert
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-06-07 18:22 ` Douglas Gilbert
@ 2006-06-07 18:26 ` Jeff Garzik
0 siblings, 0 replies; 18+ messages in thread
From: Jeff Garzik @ 2006-06-07 18:26 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: Quat Le, linux-scsi
On Wed, Jun 07, 2006 at 02:22:12PM -0400, Douglas Gilbert wrote:
> My example code only assumed a SCSI pass through
> (SG_IO in this case) and a SATL ** that implements
> the ATA PASS THROUGH SCSI commands. The MPT Fusion SAS
> HBAs have their own SATL (not libata based) but unfortunately
> don't implement the ATA pass through commands. My information
> is that they will in the future. They do have a proprietary
> ATA command passthrough.
Note that there will -always- be proprietary ATA passthrough to deal
with. 'sx8' driver firmware has such, for example.
Jeff
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: ATA Pass-Through support
@ 2006-03-02 18:00 Quat Le
0 siblings, 0 replies; 18+ messages in thread
From: Quat Le @ 2006-03-02 18:00 UTC (permalink / raw)
To: Quat Le, Moore, Eric, dougg; +Cc: linux-scsi
> Doug,
> SG_IO ioctl provides SCSI pass-through. It's the new SCSI extensions
ATA
> Pass-Through commands (A1H and 85H) that sort of encapsulate ATA
command
> in a SCSI CDB. My application is using this interface to perform SMART
> related functions to SATA drives. Could you please provide me with
more
> information on your MPT_COMMAND_IOCTL and
MPI_FUNCTION_SATA_PASSTHROUGH?
>
>
> Thanks,
> Quat Le
Sorry, I was addressing the above to Eric (not Doug).
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: ATA Pass-Through support
@ 2006-03-02 17:51 Quat Le
2006-03-02 18:17 ` Jeff Garzik
0 siblings, 1 reply; 18+ messages in thread
From: Quat Le @ 2006-03-02 17:51 UTC (permalink / raw)
To: Moore, Eric, dougg; +Cc: linux-scsi
> -----Original Message-----
> From: Moore, Eric [mailto:Eric.Moore@lsil.com]
> Sent: Wednesday, March 01, 2006 10:15 PM
> To: Quat Le; dougg@torque.net
> Cc: linux-scsi@vger.kernel.org
> Subject: Re: ATA Pass-Through support
>
>
> No, the mptsas driver is not using libata, however we are using
> scsi_transport_sas.
> This is firmware assist implementation, meaning SCSI-to-ATA
translation
> is done in firmware; via queue_command entry point, all commands
> to both SAS and SATA devices are sent via SCSI_IO passthru. Is the
SG_IO
> ATA passthru encapsalating an ATA command inside a SCSI CDB?
> If so, I don't think the firmware folks have not implemented that yet.
> When that is completed, I expect no change in driver, as its simply
> passthru, and the firmware will handle the request. There is an
> alternative,
> you can send an IOCTL=MPT_COMMAND IOCTL using
> the mptctl driver with the function set to
> MPI_FUNCTION_SATA_PASSTHROUGH.
>
>
> Eric Moore
> LSI Logic
Doug,
SG_IO ioctl provides SCSI pass-through. It's the new SCSI extensions ATA
Pass-Through commands (A1H and 85H) that sort of encapsulate ATA command
in a SCSI CDB. My application is using this interface to perform SMART
related functions to SATA drives. Could you please provide me with more
information on your MPT_COMMAND_IOCTL and MPI_FUNCTION_SATA_PASSTHROUGH?
Does anyone know of any SAS HBA vendor whose driver either uses libata
or supports SATA Pass-Through SCSI commands in their own layer?
Thanks,
Quat Le
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-03-02 17:51 Quat Le
@ 2006-03-02 18:17 ` Jeff Garzik
2006-03-03 16:50 ` Brian King
0 siblings, 1 reply; 18+ messages in thread
From: Jeff Garzik @ 2006-03-02 18:17 UTC (permalink / raw)
To: Quat Le
Cc: Moore, Eric, dougg, linux-scsi, Brian King,
linux-ide@vger.kernel.org
Quat Le wrote:
> Does anyone know of any SAS HBA vendor whose driver either uses libata
> or supports SATA Pass-Through SCSI commands in their own layer?
Brian King, maintainer of the ipr driver, has posted patches which
integrate libata SATA support into his driver. Merging those is on my
todo list, though I'm currently waiting on Tejun Heo's error handling
work before tackling that (and NCQ and hotplug...).
Jeff
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-03-02 18:17 ` Jeff Garzik
@ 2006-03-03 16:50 ` Brian King
2006-03-03 18:39 ` Tejun Heo
0 siblings, 1 reply; 18+ messages in thread
From: Brian King @ 2006-03-03 16:50 UTC (permalink / raw)
To: Jeff Garzik
Cc: Quat Le, Moore, Eric, dougg, linux-scsi,
linux-ide@vger.kernel.org, htejun
Jeff Garzik wrote:
> Quat Le wrote:
>> Does anyone know of any SAS HBA vendor whose driver either uses libata
>> or supports SATA Pass-Through SCSI commands in their own layer?
>
> Brian King, maintainer of the ipr driver, has posted patches which
> integrate libata SATA support into his driver. Merging those is on my
> todo list, though I'm currently waiting on Tejun Heo's error handling
> work before tackling that (and NCQ and hotplug...).
Tejen,
Is there anything I can do to help with the error handling work Jeff
is referring to?
Brian
--
Brian King
eServer Storage I/O
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-03-03 16:50 ` Brian King
@ 2006-03-03 18:39 ` Tejun Heo
0 siblings, 0 replies; 18+ messages in thread
From: Tejun Heo @ 2006-03-03 18:39 UTC (permalink / raw)
To: Brian King
Cc: Jeff Garzik, Quat Le, Moore, Eric, dougg, linux-scsi,
linux-ide@vger.kernel.org
On Fri, Mar 03, 2006 at 10:50:13AM -0600, Brian King wrote:
> Jeff Garzik wrote:
> >Quat Le wrote:
> >>Does anyone know of any SAS HBA vendor whose driver either uses libata
> >>or supports SATA Pass-Through SCSI commands in their own layer?
> >
> >Brian King, maintainer of the ipr driver, has posted patches which
> >integrate libata SATA support into his driver. Merging those is on my
> >todo list, though I'm currently waiting on Tejun Heo's error handling
> >work before tackling that (and NCQ and hotplug...).
>
> Tejen,
>
> Is there anything I can do to help with the error handling work Jeff
> is referring to?
>
Hello, Brian.
The EH work is in the process of being merged into libata-dev
#upstream branch. The merge process has slowed down a bit lately due
to bug fixes for 2.6.16 but it's still progressing pretty fast. I
think/hope whole EH stuff can be merged during 2.6.17 process or
post-2.6.17 #upstream. It shouldn't take too long. We're just two or
three patchsets away (and all changes are living in my repository
happily although they are a bit rough). So, please give it a few more
weeks. We will be there.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: ATA Pass-Through support
@ 2006-03-02 17:02 Moore, Eric
0 siblings, 0 replies; 18+ messages in thread
From: Moore, Eric @ 2006-03-02 17:02 UTC (permalink / raw)
To: dougg; +Cc: Quat Le, linux-scsi
On Thursday, March 02, 2006 8:46 AM, Douglas Gilbert wrote:
> Eric,
> Ok, that is the definitive answer when the LSI SAS HBA
> driver is in play. Perhaps you could refer the firmware
> folks to the SCSI ATA Translation (SAT) draft at:
> http://www.t10.org/ftp/t10/drafts/sat/sat-r08.pdf
> which is currently in letter ballot at t10 (LSI voted
> "no" but judging from their comments that will become
> a yes).
>
Yes, we are well aware of SAT. I sit in the cube right next
to John Lohmeyer, who heads the T10 committee. The firmware
folks have not implemented 0xA1 or 0x85, and its not clear
if and when they will. Today, the key people are at offsite meetings
so I don't have an answer. I believe they are leaning
more towards not, as we have the MPI_FUNCTION_SATA_PASSTHROUGH,
which is exported thru ioctl path. Probably if its important on
the Linux front, I could look into hooking the 0xA1, 0x85
opcodes in the driver, and porting them over to
MPI_FUNCTION_SATA_PASSTHROUGH.
How important is this? I can propose those alternatives inside LSI.
Eric
^ permalink raw reply [flat|nested] 18+ messages in thread
* RE: ATA Pass-Through support
@ 2006-03-01 23:51 Quat Le
2006-03-02 6:14 ` Moore, Eric
0 siblings, 1 reply; 18+ messages in thread
From: Quat Le @ 2006-03-01 23:51 UTC (permalink / raw)
To: dougg; +Cc: linux-scsi
Doug,
I cannot tell if the LSI SAS HBA driver uses libata or not. A week ago I
did send LSI tech support a question asking if the SCSI-to-ATA
Translation Layer is done in the HBA driver or in a different layer on
Linux. So far I have not gotten any response. That's a good idea to
try this on a SATA disk connected to a SATA HBA. I will try this.
Best regards,
Quat Le
-----Original Message-----
From: Douglas Gilbert [mailto:dougg@torque.net]
Sent: Wednesday, March 01, 2006 3:31 PM
To: Quat Le
Cc: linux-scsi@vger.kernel.org
Subject: Re: ATA Pass-Through support
Quat Le wrote:
> Sorry if this is not the right place to ask this question.
This is the right place to ask.
> I wrote some application code to send ATA Pass-Through SCSI commands
via
> SG_IO ioctl to SATA drives connected to a LSI Logic SAS HBA. What I
got
> was ILLEGAL REQUEST (INVALID COMAND OPERATION CODE) for both SCSI
> OPCODE's A1H and 85H. I tried some other SCSI commands and saw that
they
> were translated to ATA commands correctly. I am running Linux kernel
> 2.6.15 and am under the impression that it supports ATA Pass-Through.
I thought support for those two opcodes went into libata
for lk 2.6.15 as well but haven't written discrete code
to test it. Does the lsi SAS HBA use libata on its STP
(or direct connect) path? Eyeballing the libata code,
those opcodes are used internally. I know that
"smartctl -a -d ata /dev/sda" works when /dev/sda is a
SATA disk using libata on a regular SATA HBA. At present I
do not have any hardware nearby to test it. If you can direct
connect a SATA disk to a SATA controller on your motherboard
(i.e. bypassing the SAS HBA) does that make any difference?
Doug Gilbert
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-03-01 23:51 Quat Le
@ 2006-03-02 6:14 ` Moore, Eric
2006-03-02 15:46 ` Douglas Gilbert
0 siblings, 1 reply; 18+ messages in thread
From: Moore, Eric @ 2006-03-02 6:14 UTC (permalink / raw)
To: Quat Le, dougg; +Cc: linux-scsi
On Wednesday, March 01, 2006 4:51 PM, Quat Le wrote:
> I cannot tell if the LSI SAS HBA driver uses libata or not. A week ago I
> did send LSI tech support a question asking if the SCSI-to-ATA
> Translation Layer is done in the HBA driver or in a different layer on
> Linux. So far I have not gotten any response. That's a good idea to
> try this on a SATA disk connected to a SATA HBA. I will try this.
>
No, the mptsas driver is not using libata, however we are using
scsi_transport_sas.
This is firmware assist implementation, meaning SCSI-to-ATA translation
is done in firmware; via queue_command entry point, all commands
to both SAS and SATA devices are sent via SCSI_IO passthru. Is the SG_IO
ATA passthru encapsalating an ATA command inside a SCSI CDB?
If so, I don't think the firmware folks have not implemented that yet.
When that is completed, I expect no change in driver, as its simply
passthru, and the firmware will handle the request. There is an alternative,
you can send an IOCTL=MPT_COMMAND IOCTL using
the mptctl driver with the function set to
MPI_FUNCTION_SATA_PASSTHROUGH.
> I thought support for those two opcodes went into libata
> for lk 2.6.15 as well but haven't written discrete code
> to test it. Does the lsi SAS HBA use libata on its STP
> (or direct connect) path? Eyeballing the libata code,
> those opcodes are used internally. I know that
> "smartctl -a -d ata /dev/sda" works when /dev/sda is a
> SATA disk using libata on a regular SATA HBA. At present I
> do not have any hardware nearby to test it. If you can direct
> connect a SATA disk to a SATA controller on your motherboard
> (i.e. bypassing the SAS HBA) does that make any difference?
>
What is smartctl? Is that part of Doug's sg_tools, or something else.
Eric Moore
LSI Logic
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-03-02 6:14 ` Moore, Eric
@ 2006-03-02 15:46 ` Douglas Gilbert
0 siblings, 0 replies; 18+ messages in thread
From: Douglas Gilbert @ 2006-03-02 15:46 UTC (permalink / raw)
To: Moore, Eric; +Cc: Quat Le, linux-scsi
Moore, Eric wrote:
> On Wednesday, March 01, 2006 4:51 PM, Quat Le wrote:
>
>> I cannot tell if the LSI SAS HBA driver uses libata or not. A week ago I
>> did send LSI tech support a question asking if the SCSI-to-ATA
>> Translation Layer is done in the HBA driver or in a different layer on
>> Linux. So far I have not gotten any response. That's a good idea to
>> try this on a SATA disk connected to a SATA HBA. I will try this.
>>
>
> No, the mptsas driver is not using libata, however we are using
> scsi_transport_sas.
> This is firmware assist implementation, meaning SCSI-to-ATA translation
> is done in firmware; via queue_command entry point, all commands to both
> SAS and SATA devices are sent via SCSI_IO passthru. Is the SG_IO ATA
> passthru encapsalating an ATA command inside a SCSI CDB? If so, I don't
> think the firmware folks have not implemented that yet. When that is
> completed, I expect no change in driver, as its simply passthru, and the
> firmware will handle the request. There is an alternative, you can send
> an IOCTL=MPT_COMMAND IOCTL using the mptctl driver with the function set
> to MPI_FUNCTION_SATA_PASSTHROUGH.
Eric,
Ok, that is the definitive answer when the LSI SAS HBA
driver is in play. Perhaps you could refer the firmware
folks to the SCSI ATA Translation (SAT) draft at:
http://www.t10.org/ftp/t10/drafts/sat/sat-r08.pdf
which is currently in letter ballot at t10 (LSI voted
"no" but judging from their comments that will become
a yes).
You might also point out that SAT layers will
be (or maybe already are) inside FC enclosures that are
full of SATA disks. So applications like smartmontools
that know they are talking to a SATA device via SCSI
Block Commands (SBC) will expect to see those SCSI
ATA pass through commands working (no matter what the
"plumbing").
>> I thought support for those two opcodes went into libata
>> for lk 2.6.15 as well but haven't written discrete code
>> to test it. Does the lsi SAS HBA use libata on its STP
>> (or direct connect) path? Eyeballing the libata code,
>> those opcodes are used internally. I know that
>> "smartctl -a -d ata /dev/sda" works when /dev/sda is a
>> SATA disk using libata on a regular SATA HBA. At present I
>> do not have any hardware nearby to test it. If you can direct
>> connect a SATA disk to a SATA controller on your motherboard
>> (i.e. bypassing the SAS HBA) does that make any difference?
>>
>
> What is smartctl? Is that part of Doug's sg_tools, or something else.
smartctl is part of smartmontools. It fetches SMART
information from storage devices. See:
http://smartmontools.sourceforge.net
Bruce Allen is the chief maintainer (and Andre Hedrick should
also get a mention for the earlier smartsuite).
Doug Gilbert
^ permalink raw reply [flat|nested] 18+ messages in thread
* ATA Pass-Through support
@ 2006-03-01 17:08 Quat Le
2006-03-01 23:31 ` Douglas Gilbert
2006-06-03 19:32 ` Douglas Gilbert
0 siblings, 2 replies; 18+ messages in thread
From: Quat Le @ 2006-03-01 17:08 UTC (permalink / raw)
To: linux-scsi
Sorry if this is not the right place to ask this question.
I wrote some application code to send ATA Pass-Through SCSI commands via
SG_IO ioctl to SATA drives connected to a LSI Logic SAS HBA. What I got
was ILLEGAL REQUEST (INVALID COMAND OPERATION CODE) for both SCSI
OPCODE's A1H and 85H. I tried some other SCSI commands and saw that they
were translated to ATA commands correctly. I am running Linux kernel
2.6.15 and am under the impression that it supports ATA Pass-Through.
Thanks,
Quat
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-03-01 17:08 Quat Le
@ 2006-03-01 23:31 ` Douglas Gilbert
2006-06-03 19:32 ` Douglas Gilbert
1 sibling, 0 replies; 18+ messages in thread
From: Douglas Gilbert @ 2006-03-01 23:31 UTC (permalink / raw)
To: Quat Le; +Cc: linux-scsi
Quat Le wrote:
> Sorry if this is not the right place to ask this question.
This is the right place to ask.
> I wrote some application code to send ATA Pass-Through SCSI commands via
> SG_IO ioctl to SATA drives connected to a LSI Logic SAS HBA. What I got
> was ILLEGAL REQUEST (INVALID COMAND OPERATION CODE) for both SCSI
> OPCODE's A1H and 85H. I tried some other SCSI commands and saw that they
> were translated to ATA commands correctly. I am running Linux kernel
> 2.6.15 and am under the impression that it supports ATA Pass-Through.
I thought support for those two opcodes went into libata
for lk 2.6.15 as well but haven't written discrete code
to test it. Does the lsi SAS HBA use libata on its STP
(or direct connect) path? Eyeballing the libata code,
those opcodes are used internally. I know that
"smartctl -a -d ata /dev/sda" works when /dev/sda is a
SATA disk using libata on a regular SATA HBA. At present I
do not have any hardware nearby to test it. If you can direct
connect a SATA disk to a SATA controller on your motherboard
(i.e. bypassing the SAS HBA) does that make any difference?
Doug Gilbert
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: ATA Pass-Through support
2006-03-01 17:08 Quat Le
2006-03-01 23:31 ` Douglas Gilbert
@ 2006-06-03 19:32 ` Douglas Gilbert
1 sibling, 0 replies; 18+ messages in thread
From: Douglas Gilbert @ 2006-06-03 19:32 UTC (permalink / raw)
To: Quat Le; +Cc: linux-scsi
Quat Le wrote:
> Sorry if this is not the right place to ask this question.
>
> I wrote some application code to send ATA Pass-Through SCSI commands via
> SG_IO ioctl to SATA drives connected to a LSI Logic SAS HBA. What I got
> was ILLEGAL REQUEST (INVALID COMAND OPERATION CODE) for both SCSI
> OPCODE's A1H and 85H. I tried some other SCSI commands and saw that they
> were translated to ATA commands correctly. I am running Linux kernel
> 2.6.15 and am under the impression that it supports ATA Pass-Through.
Quat,
I just did some testing in lk 2.6.17-rc5 and the ATA
PASS THROUGH (16) SCSI command in libata (defined by SAT)
worked in my tests.
At http://www.torque.net/sg in the news sections the
sg3_utils-1.21 beta has in its examples subdirectory:
sg_sat_identify and sg_sat_chk_power. The latter one
is interesting because it needs to read back the sector
count register after the command is complete. That
involves decoding the extended ATA status return
(sense data) descriptor.
Doug Gilbert
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2006-06-07 18:48 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-02 18:41 ATA Pass-Through support Quat Le
2006-03-03 16:38 ` Brian King
-- strict thread matches above, loose matches on Subject: below --
2006-06-07 18:48 Quat Le
2006-06-07 17:15 Quat Le
2006-06-07 18:22 ` Douglas Gilbert
2006-06-07 18:26 ` Jeff Garzik
2006-03-02 18:00 Quat Le
2006-03-02 17:51 Quat Le
2006-03-02 18:17 ` Jeff Garzik
2006-03-03 16:50 ` Brian King
2006-03-03 18:39 ` Tejun Heo
2006-03-02 17:02 Moore, Eric
2006-03-01 23:51 Quat Le
2006-03-02 6:14 ` Moore, Eric
2006-03-02 15:46 ` Douglas Gilbert
2006-03-01 17:08 Quat Le
2006-03-01 23:31 ` Douglas Gilbert
2006-06-03 19:32 ` Douglas Gilbert
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).