diff mbox

ata link not reset properly

Message ID 4C224429.6010705@kernel.org
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Tejun Heo June 23, 2010, 5:28 p.m. UTC
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.

Comments

Tejun Heo June 23, 2010, 5:31 p.m. UTC | #1
On 06/23/2010 07:28 PM, Tejun Heo wrote:
> 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.

Meh, it won't work.  It's failing softreset so we should be checking
reset try counts.  I'll try to write up something tomorrow.

Thanks.
Ortwin Glück June 24, 2010, 7:13 a.m. UTC | #2
On 23.06.2010 19:31, Tejun Heo wrote:
> Meh, it won't work.  It's failing softreset so we should be checking
> reset try counts.  I'll try to write up something tomorrow.

I am happy to try patches. The problem shows up maybe once a month only,
however. Interestingly it only occurs on ata2 with a IBM hdd, never on the first
channel with a maxtor. I can also try and attach the dvd on the first channel
and see if that makes any difference.

ata1.00: ATA-5: MAXTOR 6L020J1, A93.0500, max UDMA/133
ata2.00: ATA-5: IC25N030ATCS04-0, CA3OA71A, max UDMA/100
ata2.01: ATAPI: Pioneer DVD-ROM ATAPIModel DVD-115  0127, E1.27, max UDMA/33

Thanks.
 Ortwin
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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 {