linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: Robert Hancock <hancockrwd@gmail.com>,
	thomas.schorpp@gmail.com,
	thomas schorpp <thomas.schorpp@googlemail.com>,
	linux-ide@vger.kernel.org
Subject: Re: HSM violations from ATA PACKET cmd ABRT errors in initial comms with   LG GH22 SATA DVDRW
Date: Wed, 20 Jan 2010 12:00:42 +0900	[thread overview]
Message-ID: <4B5671DA.7000904@gmail.com> (raw)
In-Reply-To: <19265.3552.13209.914969@pilspetsen.it.uu.se>

Hello, Mikael.

On 01/04/2010 06:36 AM, Mikael Pettersson wrote:
> I've looked at the available AC_ERR_ values and how they're treated by
> libata-eh, and to avoid resets but allow for retries it seems that one
> should use AC_ERR_OTHER, or possibly AC_ERR_DEV, or possibly no AC_ERR_
> at all (i.e., zero). So please first try the patch below. If it doesn't
> eliminate the reset loop, change the AC_ERR_OTHER to AC_ERR_DEV and try
> again. And if that one still causes reset loops, try a plain 0.
> 
> /Mikael
> 
> --- linux-2.6.32/drivers/ata/sata_promise.c.~1~	2009-12-03 12:38:32.000000000 +0100
> +++ linux-2.6.32/drivers/ata/sata_promise.c	2010-01-03 22:08:08.000000000 +0100
> @@ -862,7 +862,7 @@ static void pdc_error_intr(struct ata_po
>  	if (port_status & PDC_DRIVE_ERR)
>  		ac_err_mask |= AC_ERR_DEV;
>  	if (port_status & (PDC_OVERRUN_ERR | PDC_UNDERRUN_ERR))
> -		ac_err_mask |= AC_ERR_HSM;
> +		ac_err_mask |= AC_ERR_OTHER; /* or AC_ERR_DEV, or zero */

I think AC_ERR_OTHER can still be too much.  AC_ERR_* bits should only
be set when the command failed for that reason.  Here, underrun is
expected, so not really an error condition.  But, for example, under
or overrun for an ATA R/W command should trigger HSM failure.  I think
the above error detection logic needs to be improved a bit.

Thanks.

-- 
tejun

  parent reply	other threads:[~2010-01-20  2:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-27 20:37 HSM violations from ATA PACKET cmd ABRT errors in initial comms with LG GH22 SATA DVDRW thomas schorpp
2009-12-27 21:43 ` Robert Hancock
2009-12-28 23:44   ` Mikael Pettersson
2009-12-29  9:06     ` thomas schorpp
2009-12-30 22:40     ` thomas schorpp
2009-12-31 11:55     ` thomas schorpp
2010-01-03 21:36     ` Mikael Pettersson
2010-01-04  2:00       ` thomas schorpp
2010-01-04  9:22         ` Mikael Pettersson
2010-01-04 21:06           ` thomas schorpp
2010-01-20  3:00       ` Tejun Heo [this message]
2010-01-20  7:57         ` thomas schorpp
2010-01-20  8:51           ` Tejun Heo

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=4B5671DA.7000904@gmail.com \
    --to=htejun@gmail.com \
    --cc=hancockrwd@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    --cc=thomas.schorpp@gmail.com \
    --cc=thomas.schorpp@googlemail.com \
    /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).