linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Alex Vandiver <alex@chmrr.net>
Cc: linux-ide <linux-ide@vger.kernel.org>
Subject: Re: Intermittent SATA failures ("link offline, clearing class 1 to NONE")
Date: Tue, 01 Dec 2009 17:12:51 +0900	[thread overview]
Message-ID: <4B14D003.30407@kernel.org> (raw)
In-Reply-To: <1259652273-sup-686@utwig>

Hello,

On 12/01/2009 04:37 PM, Alex Vandiver wrote:
> My original post included both 'goodboot' and 'badboot' files, which
> were the dmesg output from a successful boot, and a failed boot with
> the event -- is that not what you are looking for?  Apologies if I'm
> misunderstanding.

Ooh... sorry, I missed them.  A problem with large screen is that
those attachments show up so far down in the screen that they become
pretty easy to miss.  :-)

> I tried 2.6.32-rc6 at the time as well -- it happened to have the
> fault much more often, and showed that both ata2.00 and ata2.01 could
> be affected.  I've attached dmesg output from a successful boot, as
> well as dmesg output from a boot which affected sdc, and a boot which
> affected sdd.

Hmmm... Okay, the problem is that, ata_piix has SCR regs but doesn't
have PHY event notification.  libata reset protocol does the following
during reset.

1. plug interrupts.
2. reset and determine device presence.
3. clear PHY events.
4. unplug interrupts.
5. check link status and retry if link status doesn't match device
   presence so that no hotplug event is lost.

The assumption is that a controller which reports link status will
notify EH if something happens after #4.  ata_piix doesn't have such
thing and #5 sees that the link is offline (this sometimes happens
after hardreset, links bounces between on and offline states) and
marks that the device is not present.  As the link was temporarily
down, when it gets back up, it would notify another link event and
libata will retry probing but that never happens with ata_piix so it
misses the devices.

Removing PIIX_FLAG_SIDPR from ich8_sata and ich8_2port_sata entries in
ata_piix.c::piix_port_info fixes the problem, right?

Thanks.

-- 
tejun

  reply	other threads:[~2009-12-01  8:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12 19:43 Intermittent SATA failures ("link offline, clearing class 1 to NONE") Alex Vandiver
2009-12-01  6:04 ` Tejun Heo
2009-12-01  7:37   ` Alex Vandiver
2009-12-01  8:12     ` Tejun Heo [this message]
2009-12-01  8:31       ` Tejun Heo
2009-12-01 22:02         ` Alex Vandiver
2009-12-02  1:43           ` Tejun Heo
2009-12-02 17:45             ` Alex Vandiver
2009-12-03  0:19               ` Tejun Heo
2009-12-03  0:42                 ` Tejun Heo
2009-12-18 23:26                   ` Alex Vandiver
2009-12-21  4:50                     ` Tejun Heo
2009-12-21 19:13                       ` Alex Vandiver
2009-12-22  0:06                         ` Tejun Heo
     [not found] <r2qf7a305db1004270252le438bd88vb3ca3d9b753651a9@mail.gmail.com>
     [not found] ` <g2lf7a305db1004270255t5d50de0n1dc21fdc7b191d92@mail.gmail.com>
2010-05-17  9:52   ` 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=4B14D003.30407@kernel.org \
    --to=tj@kernel.org \
    --cc=alex@chmrr.net \
    --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).