From: Mark Lord <liml@rtr.ca>
To: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: Re: libata-eh/pmp command sequence on NCQ media error
Date: Wed, 30 Apr 2008 17:52:46 -0400 [thread overview]
Message-ID: <4818EA2E.2050600@rtr.ca> (raw)
In-Reply-To: <4818E73D.9070201@rtr.ca>
Mark Lord wrote:
> Mark Lord wrote:
>> Tejun Heo wrote:
> ..
>>> w00t w00t I thought about that when I wrote NCQ EH. All you have to
>>> do is to export ata_eh_analyze_ncq_error() can call it right after
>>> error_handler starts and put the controller into a working state (so
>>> that SCR accesses work again). After it finishes, call the generic
>>> handler. The second time around ata_eh_analyze_ncq_error() will be
>>> no-op and you should get what you want.
>> ..
>>
>> Tejun, I've implemented this, and it sort of works now.
>>
>> But libata-eh is interfering in a different way.
>> It reads the SCR_ERROR register for the PMP link,
>> notices that the SERR_COMM_RECOVERED bit is set,
>> and then decides to perform a full reset.
>>
>> This bit seems to be always set whenever sata_mv tries
>> to report device-errors (media errors) in NCQ for a pmp.
>>
>> I'll have to dig some more, but it's probably just leftover
>> from the initial probe/reset time or something.
>> This is a Marvell PM.
>>
>> My understanding was, that this particular bit is supposed
>> to be for information purposes only, letting us know that
>> the hardware has automatically recovered from a soft error.
>>
>> So why are we taking a hammer to things there?
> ..
>
> FWIW, this patch fixes it for me (and fixes a misleading printk).
> Or I could just clear that bit from sata_mv before invoking EH.
..
Mmmm.. my first attempts to clear it from within sata_mv didn't work.
But the patch below is still fine. (?)
> ----------------- SNIP ------------------
>
> Prevent libata-eh from taking too drastic an action in response
> to a simple SATA "Recovered Communication Error".
> Fix a misleading (port vs. link) printk while we're at it.
>
> Signed-off-by: Mark Lord <mlord@pobox.com>
>
> --- upstream/drivers/ata/libata-eh.c 2008-04-30 17:35:36.000000000 -0400
> +++ linux/drivers/ata/libata-eh.c 2008-04-30 17:35:45.000000000 -0400
> @@ -1312,8 +1312,7 @@
> err_mask |= AC_ERR_ATA_BUS;
> action |= ATA_EH_RESET;
> }
> - if (serror &
> - (SERR_DATA_RECOVERED | SERR_COMM_RECOVERED | SERR_DATA)) {
> + if (serror & (SERR_DATA_RECOVERED | SERR_DATA)) {
> err_mask |= AC_ERR_ATA_BUS;
> action |= ATA_EH_RESET;
> }
> @@ -1924,7 +1923,7 @@
> }
>
> if (ehc->i.serror)
> - ata_port_printk(ap, KERN_ERR,
> + ata_link_printk(link, KERN_ERR,
> "SError: { %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s}\n",
> ehc->i.serror & SERR_DATA_RECOVERED ? "RecovData " : "",
> ehc->i.serror & SERR_COMM_RECOVERED ? "RecovComm " : "",
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ide" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-04-30 21:52 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 20:33 [PATCH] libata-eh copy result_tf flags from outgoing tf Mark Lord
2008-04-23 22:14 ` Tejun Heo
2008-04-23 23:37 ` Mark Lord
2008-04-24 1:02 ` Tejun Heo
2008-04-24 2:24 ` Mark Lord
2008-04-24 2:43 ` Tejun Heo
2008-04-24 2:36 ` Mark Lord
2008-04-24 2:42 ` Tejun Heo
2008-04-24 2:36 ` [PATCH] libata-eh set tf flags in NCQ EH result_tf Mark Lord
2008-04-24 2:43 ` Tejun Heo
2008-04-25 5:15 ` Jeff Garzik
2008-04-25 13:56 ` libata-eh/pmp command sequence on NCQ media error Mark Lord
2008-04-25 16:10 ` Tejun Heo
2008-04-25 16:34 ` Mark Lord
2008-04-30 21:33 ` Mark Lord
2008-04-30 21:40 ` Mark Lord
2008-04-30 21:52 ` Mark Lord [this message]
2008-05-01 0:51 ` Tejun Heo
2008-05-01 2:45 ` Mark Lord
2008-05-01 2:55 ` Tejun Heo
2008-05-01 3:47 ` Mark Lord
2008-05-01 11:24 ` Mark Lord
2008-05-01 12:24 ` Tejun Heo
2008-05-01 12:33 ` Mark Lord
2008-05-01 12:40 ` Tejun Heo
2008-05-01 2:48 ` Mark Lord
2008-05-01 2:54 ` 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=4818EA2E.2050600@rtr.ca \
--to=liml@rtr.ca \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.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).