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: jgarzik@pobox.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH 2.6.21-rc7-mm2 2/2] sata_promise: move port reset from error intr to EH prereset
Date: Wed, 02 May 2007 03:15:20 +0200	[thread overview]
Message-ID: <4637E628.2030407@gmail.com> (raw)
In-Reply-To: <200705012029.l41KTmR5009121@harpo.it.uu.se>

Mikael Pettersson wrote:
>> You really don't wanna schedule ATA_EH_SOFTRESET and freeze the port on
>> every error.  If you do that, ATAPI devices will be reset after each
>> CHECK CONDITION and it probably won't work properly.
> 
> Would that be hal polling to see if media has been inserted?

Yes, it can be hal.  It can be anything.  Raising CHECK CONDITION and
reporting the details via sense data is part of normal operations for
ATAPI devices.

>>  FWIW, libata EH
>> automatically issues softreset if the port is frozen (as that's the only
>> way to thaw the port), so setting EH_SOFTRESET is optional if you freeze
>> the port.
>>
>> Another problem is that EH may issue other commands to while trying to
>> recover - e.g. PACKET - REQUEST SENSE or READ LOG PAGE.  This only
>> happens if the port is ready for commands, IOW, !frozen.  Before, the
>> pdc_reset_port() used to be called on entry to EH if it's not frozen but
>> it's not after this patch.  Is this safe?
> 
> Oh dear. I assumed EH would only want to inspect the standard
> status registers, and that's why I wanted to delay the reset.
> If EH wants to talk to the device then it's a very bad idea to
> not have issued a pdc_reset_port() first.

Yeap, if port reset clears some registers, they need to be saved into
appropriate fields in ehi/c or qc.  If something isn't there, please let
me know.

Thanks.

-- 
tejun


  reply	other threads:[~2007-05-02  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-01 20:29 [PATCH 2.6.21-rc7-mm2 2/2] sata_promise: move port reset from error intr to EH prereset Mikael Pettersson
2007-05-02  1:15 ` Tejun Heo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-04-29  2:03 Mikael Pettersson
2007-04-30  9:27 ` 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=4637E628.2030407@gmail.com \
    --to=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    /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).