linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sct erc does not work with megaraid
@ 2011-02-15 10:20 Artem Bokhan
  2011-02-15 15:46 ` Douglas Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Artem Bokhan @ 2011-02-15 10:20 UTC (permalink / raw)
  To: linux-scsi, IDE/ATA development list

Hello!

I'm trying to get/set sctserc (SMART Command Transport Error Recovery  Control) 
data from sata disk attached to lsi megaraid controller with smartmontools, but 
this function does not work.

I want to figure out: is this driver or firmware issue? May someone to help to 
fix this?

The issue can be described as follows:

The ATA PASS-THROUGH(16) implementation in the SAT layer of the megaraid driver 
or firmware does not return the ATA output registers if requested. This violates 
SAT standard (http://www.t10.org/drafts.htm#SAT).

Expected: If CK_COND (bit 5 of CDB[2]) is set, ATA PASS-THROUGH(16) (CDB[0] = 
0x85) shall return a CHECK CONDITION even if the ATA command completed 
successfully, and return the ATA output registers in the sense data using ATA 
return descriptor format (descriptor code 0x09).

Observed: If CK_COND is set and the ATA command completed successfully, ATA 
PASS-THROUGH(16) does not return a CHECK CONDITION or the sense data does not 
contain an ATA return descriptor.

See also the smartmontools SAT implementation 
(http://sourceforge.net/apps/trac/smartmontools/browser/trunk/smartmontools/scsiata.cpp?rev=3258#L146) 
for further info.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sct erc does not work with megaraid
  2011-02-15 10:20 sct erc does not work with megaraid Artem Bokhan
@ 2011-02-15 15:46 ` Douglas Gilbert
  2011-02-15 16:00   ` Bokhan Artem
  2011-02-15 17:17   ` Douglas Gilbert
  0 siblings, 2 replies; 6+ messages in thread
From: Douglas Gilbert @ 2011-02-15 15:46 UTC (permalink / raw)
  To: Artem Bokhan; +Cc: linux-scsi, IDE/ATA development list

On 11-02-15 05:20 AM, Artem Bokhan wrote:
> Hello!
>
> I'm trying to get/set sctserc (SMART Command Transport Error Recovery Control)
> data from sata disk attached to lsi megaraid controller with smartmontools, but
> this function does not work.
>
> I want to figure out: is this driver or firmware issue? May someone to help to
> fix this?
>
> The issue can be described as follows:
>
> The ATA PASS-THROUGH(16) implementation in the SAT layer of the megaraid driver
> or firmware does not return the ATA output registers if requested. This violates
> SAT standard (http://www.t10.org/drafts.htm#SAT).
>
> Expected: If CK_COND (bit 5 of CDB[2]) is set, ATA PASS-THROUGH(16) (CDB[0] =
> 0x85) shall return a CHECK CONDITION even if the ATA command completed
> successfully, and return the ATA output registers in the sense data using ATA
> return descriptor format (descriptor code 0x09).
>
> Observed: If CK_COND is set and the ATA command completed successfully, ATA
> PASS-THROUGH(16) does not return a CHECK CONDITION or the sense data does not
> contain an ATA return descriptor.
>
> See also the smartmontools SAT implementation
> (http://sourceforge.net/apps/trac/smartmontools/browser/trunk/smartmontools/scsiata.cpp?rev=3258#L146)
> for further info.

That code looked familiar but I'm not sure what your
point was referring to it. Anyway ...

Haven't worked much with Megaraid controllers but mptsas
controllers implement SAT (or at least did) in their
firmware. So upgrading the firmware on the controller fixed
the problems I had (some years back) with SAT compliance.

Doug Gilbert





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sct erc does not work with megaraid
  2011-02-15 15:46 ` Douglas Gilbert
@ 2011-02-15 16:00   ` Bokhan Artem
  2011-02-15 17:17   ` Douglas Gilbert
  1 sibling, 0 replies; 6+ messages in thread
From: Bokhan Artem @ 2011-02-15 16:00 UTC (permalink / raw)
  To: dgilbert; +Cc: linux-scsi, IDE/ATA development list

Only sct erc does not work. General communication using sat is functional.

15.02.2011 21:46, Douglas Gilbert пишет:
> That code looked familiar but I'm not sure what your
> point was referring to it. Anyway ...
>
> Haven't worked much with Megaraid controllers but mptsas
> controllers implement SAT (or at least did) in their
> firmware. So upgrading the firmware on the controller fixed
> the problems I had (some years back) with SAT compliance.
>
> Doug Gilbert 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sct erc does not work with megaraid
  2011-02-15 15:46 ` Douglas Gilbert
  2011-02-15 16:00   ` Bokhan Artem
@ 2011-02-15 17:17   ` Douglas Gilbert
  2011-02-15 17:40     ` Bokhan Artem
  1 sibling, 1 reply; 6+ messages in thread
From: Douglas Gilbert @ 2011-02-15 17:17 UTC (permalink / raw)
  To: Artem Bokhan; +Cc: linux-scsi, IDE/ATA development list

On 11-02-15 10:46 AM, Douglas Gilbert wrote:
> On 11-02-15 05:20 AM, Artem Bokhan wrote:
>> Hello!
>>
>> I'm trying to get/set sctserc (SMART Command Transport Error Recovery Control)
>> data from sata disk attached to lsi megaraid controller with smartmontools, but
>> this function does not work.
>>
>> I want to figure out: is this driver or firmware issue? May someone to help to
>> fix this?
>>
>> The issue can be described as follows:
>>
>> The ATA PASS-THROUGH(16) implementation in the SAT layer of the megaraid driver
>> or firmware does not return the ATA output registers if requested. This violates
>> SAT standard (http://www.t10.org/drafts.htm#SAT).
>>
>> Expected: If CK_COND (bit 5 of CDB[2]) is set, ATA PASS-THROUGH(16) (CDB[0] =
>> 0x85) shall return a CHECK CONDITION even if the ATA command completed
>> successfully, and return the ATA output registers in the sense data using ATA
>> return descriptor format (descriptor code 0x09).
>>
>> Observed: If CK_COND is set and the ATA command completed successfully, ATA
>> PASS-THROUGH(16) does not return a CHECK CONDITION or the sense data does not
>> contain an ATA return descriptor.
>>
>> See also the smartmontools SAT implementation
>> (http://sourceforge.net/apps/trac/smartmontools/browser/trunk/smartmontools/scsiata.cpp?rev=3258#L146)
>>
>> for further info.
>
> That code looked familiar but I'm not sure what your
> point was referring to it. Anyway ...
>
> Haven't worked much with Megaraid controllers but mptsas
> controllers implement SAT (or at least did) in their
> firmware. So upgrading the firmware on the controller fixed
> the problems I had (some years back) with SAT compliance.

Just doing some tests comparing SAT compliance in libata
and a LSI SAS 9212-4i4e controller with the latest firmware.
I would expect a Megaraid controller with recent firmware to
behave in the same way as a the 9212 (mpt2sas driver).

The test is to send an ATA IDENTIFY DEVICE command through the
SCSI ATA PASS-THROUGH (16) command with the CK_COND bit set:

First libata:

# sg_sat_identify --ck_cond /dev/sg1 -vvv
open /dev/sg1 with flags=0x802
     ATA pass through (16) cdb: 85 08 2e 00 00 00 01 00 00 00 00 00 00 00 ec 00
       duration=1 ms
ATA pass through:  Descriptor format, current;  Sense key: No Sense
  Additional sense: No additional sense information
   Descriptor type: ATA Status Return
     extend=0  error=0x0  sector_count=0x1
     lba=0x000000
     device=0x0  status=0x50
  Raw sense data (in hex):
         72 00 00 00 00 00 00 0e  09 0c 00 00 00 01 00 00
         00 00 00 00 00 50 00 00  00 00 00 00 00 00 00 00
         00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
         00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
Seem to have got ATA Result Descriptor but it was not indicated
#

So libata is broken in its SAT compliance in lk 2.6.37 .


And this is what should happen (SATA disk connected to a
SAS 9212-4i4e controller):

# sg_sat_identify --ck_cond /dev/sg4 -vvv
open /dev/sg4 with flags=0x802
     ATA pass through (16) cdb: 85 08 2e 00 00 00 01 00 00 00 00 00 00 00 ec 00
       duration=2 ms
ATA pass through:  Descriptor format, current;  Sense key: Recovered Error
  Additional sense: ATA pass through information available
   Descriptor type: ATA Status Return
     extend=0  error=0x0  sector_count=0x0
     lba=0x000000
     device=0x0  status=0x50
  Raw sense data (in hex):
         72 01 00 1d 00 00 00 0e  09 0c 00 00 00 00 00 00
         00 00 00 00 00 50 00 00  00 00 00 00 00 00 00 00
         00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
         00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
Response for IDENTIFY DEVICE ATA command:
  00     0c5a 3fff c837 0010 0000 0000 003f 0000     .Z ?. .7 .. .. .. .? ..
  08     0000 0000 2020 2020 2020 2020 2020 2020     .. ..
.....


The sense key of Recovered Error is correct for no error
to report (as per SAT and SAT-2 standards) and of course
the response to the IDENTIFY DEVICE should be forwarded
(libata doesn't do that either).

Doug Gilbert


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sct erc does not work with megaraid
  2011-02-15 17:17   ` Douglas Gilbert
@ 2011-02-15 17:40     ` Bokhan Artem
  2011-02-15 18:33       ` Douglas Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Bokhan Artem @ 2011-02-15 17:40 UTC (permalink / raw)
  To: dgilbert; +Cc: linux-scsi, IDE/ATA development list


> Just doing some tests comparing SAT compliance in libata
> and a LSI SAS 9212-4i4e controller with the latest firmware.
> I would expect a Megaraid controller with recent firmware to
> behave in the same way as a the 9212 (mpt2sas driver).
>
LSISAS2008based cards are totally different product, so there no any 
need to compare it with megaraid...


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: sct erc does not work with megaraid
  2011-02-15 17:40     ` Bokhan Artem
@ 2011-02-15 18:33       ` Douglas Gilbert
  0 siblings, 0 replies; 6+ messages in thread
From: Douglas Gilbert @ 2011-02-15 18:33 UTC (permalink / raw)
  To: Bokhan Artem; +Cc: linux-scsi, IDE/ATA development list

On 11-02-15 12:40 PM, Bokhan Artem wrote:
>
>> Just doing some tests comparing SAT compliance in libata
>> and a LSI SAS 9212-4i4e controller with the latest firmware.
>> I would expect a Megaraid controller with recent firmware to
>> behave in the same way as a the 9212 (mpt2sas driver).
>>
> LSISAS2008based cards are totally different product, so there no any need to
> compare it with megaraid...

In regard to the SAT layer in both products, I believe
you are wrong.

Anyway please try the same sg_sat_identify utility (from
the sg3_utils package) as shown in my previous post on
your Megaraid and send me the result.

Also please send me the output from the failing smartctl
command after adding '-r ioctl,3' to the invocation.

Doug Gilbert

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-02-15 18:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-15 10:20 sct erc does not work with megaraid Artem Bokhan
2011-02-15 15:46 ` Douglas Gilbert
2011-02-15 16:00   ` Bokhan Artem
2011-02-15 17:17   ` Douglas Gilbert
2011-02-15 17:40     ` Bokhan Artem
2011-02-15 18:33       ` 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).