All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: "Ortwin Glück" <odi@odi.ch>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: ata link not reset properly
Date: Wed, 23 Jun 2010 19:28:09 +0200	[thread overview]
Message-ID: <4C224429.6010705@kernel.org> (raw)
In-Reply-To: <4C223F8A.9030306@odi.ch>

Hello,

On 06/23/2010 07:08 PM, Ortwin Glück wrote:
>>From time to time this nVidia SATA controller chokes on a FLUSH CACHE.
> 
> 1. why does the kernel not try to HARD reset the link?

Because hardreset sometimes brings the link completely offline on
sata_nv's.  Hardreset on sata_nv controllers is quite fragile.

> 2. it would be nice to have the possibility to manually force a
> (hard) reset or to re-initialize the device. Other than rebooting I
> mean :-)

Maybe we can use hardreset as the last resort before ditching the
device.  Something like the following.  Can you please try it and post
the kernel log?  Thanks.

diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 2116113..5105951 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -1587,7 +1587,7 @@ static int nv_hardreset(struct ata_link *link, unsigned int *class,
         * comment above port ops for details.
         */
        if (!(link->ap->pflags & ATA_PFLAG_LOADING) &&
-           !ata_dev_enabled(link->device))
+           (!ata_dev_enabled(link->device) || ehc->tries[0] == 1))
                sata_link_hardreset(link, sata_deb_timing_hotplug, deadline,
                                    NULL, NULL);
        else {

-- 
tejun

  reply	other threads:[~2010-06-23 17:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 17:08 ata link not reset properly Ortwin Glück
2010-06-23 17:28 ` Tejun Heo [this message]
2010-06-23 17:31   ` Tejun Heo
2010-06-24  7:13     ` Ortwin Glück
2010-06-25 15:19       ` Tejun Heo
2010-06-25 18:00         ` Ortwin Glück
2010-06-26  4:07           ` Robert Hancock
2010-06-26  8:03             ` Tejun Heo
2010-06-26  9:00             ` Ortwin Glück
2010-06-27 18:27             ` Sergei Shtylyov

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=4C224429.6010705@kernel.org \
    --to=tj@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=odi@odi.ch \
    /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.