Re: ata link not reset properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux