Skip to contentSkip to conversation

hsm violation

PATCH Applied Robert Hancock 4 participants 12 messages Jun 24, 2007 – Jul 2, 2007 2 messages not in the archive libata

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): fa.sspu6LOivd/[email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 3 lines · Andrew Morton
Quoted 2 lines · On Sun, 24 Jun 2007 14:32:22 +0200 Enrico Sardi <[email protected]> wrote:
[   61.176000] ata1.00: exception Emask 0x2 SAct 0x2 SErr 0x0 action 0x2 frozen
[   61.176000] ata1.00: (spurious completions during NCQ issue=0x0 SAct=0x2 FIS=005040a1:00000004)

..

Quoted 4 lines

It's not obvious (to me) whether this is a driver bug, a hardware bug, expected-normal-behaviour or what - those diagnostics (which we get to see distressingly frequently) are pretty obscure.

The spurious completions during NCQ error is indicating that the drive has indicated it's completed NCQ command tags which weren't outstanding.
It's normally a result of a bad NCQ implementation on the drive.
Technically we can live with it, but it's rather dangerous (if it indicates completions for non-outstanding commands, how do we know it doesn't indicate completions for actually outstanding commands that aren't actually completed yet..)

Signature · 3 lines
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/
#3 lore raw
Quoted 12 lines · Robert Hancock
Quoted 10 lines · Andrew Morton
Quoted 4 lines · On Sun, 24 Jun 2007 14:32:22 +0200 Enrico Sardi <[email protected]> wrote:
[   61.176000] ata1.00: exception Emask 0x2 SAct 0x2 SErr 0x0 action
0x2 frozen
[   61.176000] ata1.00: (spurious completions during NCQ issue=0x0

SAct=0x2 FIS=005040a1:00000004)

It's not obvious (to me) whether this is a driver bug, a hardware bug, expected-normal-behaviour or what - those diagnostics (which we get to see distressingly frequently) are pretty obscure.

Quoted 7 lines

The spurious completions during NCQ error is indicating that the drive has indicated it's completed NCQ command tags which weren't outstanding.
It's normally a result of a bad NCQ implementation on the drive.
Technically we can live with it, but it's rather dangerous (if it indicates completions for non-outstanding commands, how do we know it doesn't indicate completions for actually outstanding commands that aren't actually completed yet..)

There is a small race window there. Please consider the following sequence.

1. drive sends SDB FIS with spurious completion in it.
2. block layer issues new r/w command to the drive. SDB FIS is still in flight.
3. ata driver issues the command (the pending bit is set prior to transmitting command FIS).
4. controller completes receiving FIS from #1. Driver reads the mask and completes all indicated commands. If spurious completion in #1 happens to match the slot allocated in #3, the driver just completed a command which hasn't been issued to the drive yet.

So, it actually is dangerous. We might even be seeing the real completion as spurious one (as the command is completed prematurely).

It seems all those HTS541* drives share this problem. Four of them are already on the blacklist and the other OS reportedly blacklists three of them too. I'll submit a patch to add HTS541616J9SA00.

Thanks.

Signature · 1 line
tejun
#4 lore raw

PATCH 1/1 libata: add HTS541616J9SA00 to NCQ blacklist

Another member of HTS5416* family doing spurious NCQ completion.

Cc Enrico Sardi <[email protected]>
---
 drivers/ata/libata-core.c |    1 +
 1 file changed, 1 insertion(+)
drivers/ata/libata-core.c +1 -0
index adfae9d..fbca8d8 100644
@@ -3803,6 +3803,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
 	/* Drives which do spurious command completion */
 	{ "HTS541680J9SA00",	"SB2IC7EP",	ATA_HORKAGE_NONCQ, },
 	{ "HTS541612J9SA00",	"SBDIC7JP",	ATA_HORKAGE_NONCQ, },
+	{ "Hitachi HTS541616J9SA00", "SB4OC70P", ATA_HORKAGE_NONCQ, },
 	{ "WDC WD740ADFD-00NLR1", NULL,		ATA_HORKAGE_NONCQ, },
 
 	/* Devices with NCQ limits */
#5 lore raw

Re: [PATCH 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist

Quoted 14 lines · Tejun Heo

Another member of HTS5416* family doing spurious NCQ completion.

Cc Enrico Sardi <[email protected]>
---
 drivers/ata/libata-core.c |    1 +
 1 file changed, 1 insertion(+)
drivers/ata/libata-core.c +0 -0
index adfae9d..fbca8d8 100644

drivers/ata/libata-core.c static const struct ata_blacklist_entry ata_device_blacklist [] = { · line 3809

Quoted 7 lines
drivers/ata/libata-core.c +1 -0
@@ -3803,6 +3803,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
 	/* Drives which do spurious command completion */
 	{ "HTS541680J9SA00",	"SB2IC7EP",	ATA_HORKAGE_NONCQ, },
 	{ "HTS541612J9SA00",	"SBDIC7JP",	ATA_HORKAGE_NONCQ, },
+	{ "Hitachi HTS541616J9SA00", "SB4OC70P", ATA_HORKAGE_NONCQ, },
 	{ "WDC WD740ADFD-00NLR1", NULL,		ATA_HORKAGE_NONCQ, },
 
 	/* Devices with NCQ limits */

Is that the right ID string? Strange that that one has Hitachi at the front and the others don't..

Signature · 3 lines
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/
#6 lore raw

Re: [PATCH 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist

Quoted 21 lines · Robert Hancock
Quoted 20 lines · Tejun Heo

Another member of HTS5416* family doing spurious NCQ completion.

Cc Enrico Sardi <[email protected]>
---
 drivers/ata/libata-core.c |    1 +
 1 file changed, 1 insertion(+)
drivers/ata/libata-core.c +1 -0
index adfae9d..fbca8d8 100644
@@ -3803,6 +3803,7 @@ static const struct ata_blacklist_entry
 ata_device_blacklist [] = {
     /* Drives which do spurious command completion */
     { "HTS541680J9SA00",    "SB2IC7EP",    ATA_HORKAGE_NONCQ, },
     { "HTS541612J9SA00",    "SBDIC7JP",    ATA_HORKAGE_NONCQ, },
+    { "Hitachi HTS541616J9SA00", "SB4OC70P", ATA_HORKAGE_NONCQ, },
     { "WDC WD740ADFD-00NLR1", NULL,        ATA_HORKAGE_NONCQ, },
 
Quoted 5 lines
Quoted 2 lines
     /* Devices with NCQ limits */

Is that the right ID string? Strange that that one has Hitachi at the front and the others don't..

Yeah, I realized that and asked Enrico about it. :-)

Signature · 1 line
tejun
#7 lore raw

Re: [PATCH 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist

Quoted 22 lines · Tejun Heo
Quoted 21 lines · Robert Hancock
Quoted 20 lines · Tejun Heo

Another member of HTS5416* family doing spurious NCQ completion.

Cc Enrico Sardi <[email protected]>
---
 drivers/ata/libata-core.c |    1 +
 1 file changed, 1 insertion(+)
drivers/ata/libata-core.c +1 -0
index adfae9d..fbca8d8 100644
@@ -3803,6 +3803,7 @@ static const struct ata_blacklist_entry
 ata_device_blacklist [] = {
     /* Drives which do spurious command completion */
     { "HTS541680J9SA00",    "SB2IC7EP",    ATA_HORKAGE_NONCQ, },
     { "HTS541612J9SA00",    "SBDIC7JP",    ATA_HORKAGE_NONCQ, },
+    { "Hitachi HTS541616J9SA00", "SB4OC70P", ATA_HORKAGE_NONCQ, },
     { "WDC WD740ADFD-00NLR1", NULL,        ATA_HORKAGE_NONCQ, },
 
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
     /* Devices with NCQ limits */

Is that the right ID string? Strange that that one has Hitachi at the front and the others don't..

Yeah, I realized that and asked Enrico about it. :-)

I think that "new" one is correct, while old ones are incorrect (unless it uses strstr()) - all my Hitachis claim to be Hitachis - like this one (which seems to work fine with NCQ):

gwy:~# hdparm -i /dev/sda

/dev/sda:

Model=Hitachi HDT725032VLA380 , FwRev=V54OA52A,
SerialNo= VFA200R208LH5J
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

Petr

#8 lore raw

Re: [PATCH 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist

Quoted 23 lines · Petr Vandrovec
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/ata/libata-core.c +1 -0
index adfae9d..fbca8d8 100644
@@ -3803,6 +3803,7 @@ static const struct ata_blacklist_entry
 ata_device_blacklist [] = {
     /* Drives which do spurious command completion */
     { "HTS541680J9SA00",    "SB2IC7EP",    ATA_HORKAGE_NONCQ, },
     { "HTS541612J9SA00",    "SBDIC7JP",    ATA_HORKAGE_NONCQ, },
+    { "Hitachi HTS541616J9SA00", "SB4OC70P", ATA_HORKAGE_NONCQ, },
     { "WDC WD740ADFD-00NLR1", NULL,        ATA_HORKAGE_NONCQ, },
 
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
     /* Devices with NCQ limits */

Is that the right ID string? Strange that that one has Hitachi at the front and the others don't..

Yeah, I realized that and asked Enrico about it. :-)

I think that "new" one is correct, while old ones are incorrect (unless it uses strstr()) - all my Hitachis claim to be Hitachis - like this one (which seems to work fine with NCQ):

Quoted 7 lines
gwy:~# hdparm -i /dev/sda

/dev/sda:

Model=Hitachi HDT725032VLA380 , FwRev=V54OA52A,
SerialNo= VFA200R208LH5J
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

Hmmm... The last one (HTS541612J9SA00) is taken directly from hdparm output, and I think I verified the patch with the reporter. Hmm... Can anyone verify these module strings?

Signature · 1 line
tejun
#9 lore raw

Re: [PATCH 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist

Quoted 26 lines · Tejun Heo
Quoted 25 lines · Petr Vandrovec
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/ata/libata-core.c +1 -0
index adfae9d..fbca8d8 100644
@@ -3803,6 +3803,7 @@ static const struct ata_blacklist_entry
 ata_device_blacklist [] = {
     /* Drives which do spurious command completion */
     { "HTS541680J9SA00",    "SB2IC7EP",    ATA_HORKAGE_NONCQ, },
     { "HTS541612J9SA00",    "SBDIC7JP",    ATA_HORKAGE_NONCQ, },
+    { "Hitachi HTS541616J9SA00", "SB4OC70P", ATA_HORKAGE_NONCQ, },
     { "WDC WD740ADFD-00NLR1", NULL,        ATA_HORKAGE_NONCQ, },
 
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
     /* Devices with NCQ limits */

Is that the right ID string? Strange that that one has Hitachi at the front and the others don't..

Yeah, I realized that and asked Enrico about it. :-)

I think that "new" one is correct, while old ones are incorrect (unless it uses strstr()) - all my Hitachis claim to be Hitachis - like this one (which seems to work fine with NCQ):

gwy:~# hdparm -i /dev/sda

/dev/sda:

Quoted 7 lines
Quoted 3 lines

Model=Hitachi HDT725032VLA380 , FwRev=V54OA52A,
SerialNo= VFA200R208LH5J
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

Hmmm... The last one (HTS541612J9SA00) is taken directly from hdparm output, and I think I verified the patch with the reporter. Hmm... Can anyone verify these module strings?

Could well be that they've started attaching Hitachi to the ID strings now.. In the past it hasn't seemed to have been Hitachi's (and IBM's before that) practice to have it there, but maybe they see the advantage of being able to figure out who made the drive now :-)

Signature · 3 lines
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from [email protected]
Home Page: http://www.roberthancock.com/
#10 lore raw

Re: [PATCH 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist

Quoted 31 lines · Robert Hancock
Quoted 30 lines · Tejun Heo
Quoted 28 lines · Petr Vandrovec
Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
drivers/ata/libata-core.c +1 -0
index adfae9d..fbca8d8 100644
@@ -3803,6 +3803,7 @@ static const struct ata_blacklist_entry
 ata_device_blacklist [] = {
     /* Drives which do spurious command completion */
     { "HTS541680J9SA00",    "SB2IC7EP",    ATA_HORKAGE_NONCQ, },
     { "HTS541612J9SA00",    "SBDIC7JP",    ATA_HORKAGE_NONCQ, },
+    { "Hitachi HTS541616J9SA00", "SB4OC70P", ATA_HORKAGE_NONCQ, },
     { "WDC WD740ADFD-00NLR1", NULL,        ATA_HORKAGE_NONCQ, },
 
Quoted 5 lines
Quoted 4 lines
Quoted 2 lines
     /* Devices with NCQ limits */

Is that the right ID string? Strange that that one has Hitachi at the front and the others don't..

Yeah, I realized that and asked Enrico about it. :-)

I think that "new" one is correct, while old ones are incorrect (unless it uses strstr()) - all my Hitachis claim to be Hitachis - like this one (which seems to work fine with NCQ):

gwy:~# hdparm -i /dev/sda

/dev/sda:

Model=Hitachi HDT725032VLA380 , FwRev=V54OA52A,
SerialNo= VFA200R208LH5J
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }

Quoted 5 lines
Quoted 3 lines

Hmmm... The last one (HTS541612J9SA00) is taken directly from hdparm output, and I think I verified the patch with the reporter. Hmm... Can anyone verify these module strings?

Could well be that they've started attaching Hitachi to the ID strings now.. In the past it hasn't seemed to have been Hitachi's (and IBM's before that) practice to have it there, but maybe they see the advantage of being able to figure out who made the drive now :-)

Perhaps ones sold directly by Hitachi are Hitachi, while ones sold through OEMs are no-name?
Petr

#11 lore raw

Re: [PATCH 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist

Quoted 11 lines · Petr Vandrovec
Quoted 8 lines
Quoted 3 lines

Hmmm... The last one (HTS541612J9SA00) is taken directly from hdparm output, and I think I verified the patch with the reporter. Hmm... Can anyone verify these module strings?

Could well be that they've started attaching Hitachi to the ID strings now.. In the past it hasn't seemed to have been Hitachi's (and IBM's before that) practice to have it there, but maybe they see the advantage of being able to figure out who made the drive now :-)

Perhaps ones sold directly by Hitachi are Hitachi, while ones sold through OEMs are no-name?

I dunno but I doubt they care that much about the model string but one way or the other we might have to do pattern matching on HTS541* anyway.

Signature · 1 line
tejun
Applied
#13 lore raw

Re: [PATCH 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist

In reply to Tejun Heo
Quoted 13 lines · Tejun Heo

Another member of HTS5416* family doing spurious NCQ completion.

Cc Enrico Sardi <[email protected]>
---
 drivers/ata/libata-core.c |    1 +
 1 file changed, 1 insertion(+)
drivers/ata/libata-core.c +0 -0
index adfae9d..fbca8d8 100644

drivers/ata/libata-core.c static const struct ata_blacklist_entry ata_device_blacklist [] = { · line 3807

Quoted 5 lines
drivers/ata/libata-core.c +1 -0
@@ -3803,6 +3803,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
 	/* Drives which do spurious command completion */
 	{ "HTS541680J9SA00",	"SB2IC7EP",	ATA_HORKAGE_NONCQ, },
 	{ "HTS541612J9SA00",	"SBDIC7JP",	ATA_HORKAGE_NONCQ, },
+	{ "Hitachi HTS541616J9SA00", "SB4OC70P", ATA_HORKAGE_NONCQ, },
 	{ "WDC WD740ADFD-00NLR1", NULL,		ATA_HORKAGE_NONCQ, },

applied