From: Tejun Heo <htejun@gmail.com>
To: Mark Lord <liml@rtr.ca>
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: Thu, 01 May 2008 21:24:24 +0900 [thread overview]
Message-ID: <4819B678.1010303@gmail.com> (raw)
In-Reply-To: <4819A85B.1090709@rtr.ca>
Mark Lord wrote:
>>> Does the bit get set for the host link or pmp fanout links?
>> It's only on the pmp fanout link. Dunno why it gets set, but it does.
> ..
>
> Oh, wait a sec.. I think I know what's going on.
> We're back to the original problem in this thread again:
Aieee...
> Mark Lord wrote:
>> With no port-multiplier attached, a media error during NCQ
>> results in an immediate READ_LOG_EXT_10H to retrieve the
>> task file for the failed I/O.
>>
>> With a port-multiplier, there is instead a flurry of sata_pmp_read()
>> attempts. I'm guessing that the READ_LOG_EXT_10H would normally
>> then follow those ?
>>
>> The problem is, on most of the Marvell chips, non-data commands
>> cannot succeed after any kind of error (until after the port is reset),
>> so they fail, and we never then get to the READ_LOG_EXT_10H stage.
>> Oddly, the READ_LOG_EXT_10H command itself is okay (with some errata
>> goodness tossed in).
>>
>> So, for sata_mv at least, I'd kinda like to have libata-eh attempt
>> the READ_LOG_EXT_10H before it tries to (unsuccessfully) access the
>> per-port SCRs on the PMP.
> ..
>
> So what is happening now, is that libata-eh is going and attempting
> to access the per-port SCRs *after* the READ_LOG_EXT commands.
> And those per-port SCRs are not actually accessible: the shadow
> registers are misbehaving -- known errata -- and cannot be accurately
> used without a port reset.
>
> Mmm.. gotta figure out a way to mark the port for RESET,
> without having that action taint the commands already analyzed.
>
> I suppose I'll have to just clone some code from libata-eh to
> do the READ_LOG_EXT and then qc_complete() those commands
> before continuing. Or something.
The usual way to handle this is to clear the controller state (not the
PHY) from ->error_handler() before calling the generic error_handler.
Many drivers do similar things - ahci restarts the engine, sil24 calls
sil24_init_port() and so on. Does mv need PHY reset to get it working
again?
--
tejun
next prev parent reply other threads:[~2008-05-01 12:24 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
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 [this message]
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=4819B678.1010303@gmail.com \
--to=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=liml@rtr.ca \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.