From: Tejun Heo <htejun@gmail.com>
To: Nicolas STRANSKY <Nico@stransky.cx>
Cc: linux-ide@vger.kernel.org, Albert Lee <albertcc@tw.ibm.com>
Subject: Re: libata-tj and SMART
Date: Thu, 18 May 2006 13:00:07 +0900 [thread overview]
Message-ID: <446BF147.4040904@gmail.com> (raw)
In-Reply-To: <e4g3or$jbm$1@sea.gmane.org>
Nicolas STRANSKY wrote:
> Le 05/16/2006 10:11 AM, Tejun Heo a écrit :
>
> Hi,
>
>> If you've got some time though, I'd like to see what's really going on.
>> Can you modify #undef ATA_DEBUT to #define ATA_DEBUG in
>> include/linux/libata.h and post the kernel messages after issuing above
>> command? Be warned that it will produce a LOT of messages while booting
>> if you're using SATA disks for your system, and it can considerably slow
>> down booting.
>
> Here it is.
> I first did a "smartctl -d ata -a -o on /dev/sda" and then a "smartctl
> -d ata -a -S on /dev/sda" which are the two commands triggering errors
> on this drive with you patch.
>
> BTW the system is running very well with your patch apart from this
> smartctl problem.
[CC'ing Albert Lee].
Hello, Albert.
Nicolas reported that when smartd starts kernel complains about HSM
violation and full EH kicks in (reset and all that), which it didn't
used to before the recent libata changes. Upon further examination the
offending part seems to be the HSM_ST handling code of ata_hsm_move().
/* ATA PIO protocol */
if (unlikely((status & ATA_DRQ) == 0)) {
/* handle BSY=0, DRQ=0 as error */
qc->err_mask |= AC_ERR_HSM;
ap->hsm_task_state = HSM_ST_ERR;
goto fsm_start;
}
The above is the first test done on entrance to HSM_ST for non-ATAPI
devices. On startup, smartd issues some obsolete commands (feat: 0xd1
and 0xdb) which use PIO data-in protocol, some drives don't implement
the obsolete command and aborts them (stat: 0x51 err: 0x4), which is the
correct behavior if the drive doesn't implement specific command.
However, the above code triggers and the error is handled as HSM
violation not device abortion.
It seems that HSM_ST needs to handle !DRQ && ERR case before the first
iteration (or maybe it should be pushed into HSM_ST_FIRST?). Does my
analysis make sense?
Thanks.
--
tejun
next prev parent reply other threads:[~2006-05-18 4:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-15 22:41 libata-tj and SMART Nicolas STRANSKY
2006-05-15 23:13 ` Tejun Heo
2006-05-16 7:44 ` Nicolas STRANSKY
2006-05-16 8:11 ` Tejun Heo
2006-05-16 8:36 ` Nicolas STRANSKY
2006-05-17 21:15 ` Nicolas STRANSKY
2006-05-18 4:00 ` Tejun Heo [this message]
2006-05-18 15:54 ` Jeff Garzik
2006-05-19 3:43 ` [PATCH 1/1] libata: Fix the HSM error_mask mapping (was: Re: libata-tj and SMART) Albert Lee
2006-05-19 5:22 ` [PATCH 1/1] libata: Fix the HSM error_mask mapping Albert Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=446BF147.4040904@gmail.com \
--to=htejun@gmail.com \
--cc=Nico@stransky.cx \
--cc=albertcc@tw.ibm.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).