From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <tj@kernel.org>
Cc: Tim Connors <tconnors+linuxkml@astro.swin.edu.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org
Subject: Re: [PATCH #upstream-fixes] libata: fix attach error handling
Date: Mon, 11 May 2009 14:33:13 -0400 [thread overview]
Message-ID: <4A086F69.3060607@garzik.org> (raw)
In-Reply-To: <4A05AA1E.3070700@kernel.org>
Tejun Heo wrote:
> New device attach path in ata_eh_revalidate_and_attach() is divided
> into two separate loops because ATA requires IDENTIFY to be issued to
> slave first while the user expects to see device probe messages from
> the master device. new_mask is used to track which devices are the
> new ones between the first loop and the second.
>
> This usually works well but if an error occurs during configuration
> stage, ata_dev_revalidate_and_attach() returns with error code and
> forgets new_mask. On the retry run, dev->class is set and new_mask
> for the device is clear, so the device just gets revalidated and thus
> ends up skipping post-configuration procedure including scheduling of
> SCSI_HOTPLUG for the device. When this occurs, ATA part of probing
> works fine but SCSI probing usually doesn't happen and makes the
> device unreachable.
>
> The behavior has been around for a very long time but it has been
> uncovered with the recent addition of 1_5_GBPS horkage which uses
> -EAGAIN return value from ata_dev_configure() to restart the probing
> sequence after forcing cable speed.
>
> This can be fixed by making sure dev->class is permanently set only
> after all configurations are successfully complete. Fix it.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-by: Tim Connors <tconnors+linuxkml@astro.swin.edu.au>
> ---
> drivers/ata/libata-eh.c | 21 +++++++++++++++++----
> 1 file changed, 17 insertions(+), 4 deletions(-)
applied
prev parent reply other threads:[~2009-05-11 18:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 14:22 sata_sil24 EH complete Tim Connors
2009-05-06 0:32 ` Tejun Heo
2009-05-06 0:38 ` Tim Connors
2009-05-08 14:11 ` Tim Connors
2009-05-09 1:41 ` Tejun Heo
2009-05-09 16:06 ` [PATCH #upstream-fixes] libata: fix attach error handling Tejun Heo
2009-05-11 18:33 ` Jeff Garzik [this message]
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=4A086F69.3060607@garzik.org \
--to=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tconnors+linuxkml@astro.swin.edu.au \
--cc=tj@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.