ata1: failed to reset engine (errno=-95)

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

 



Hi, ALL
 
      I patch these code for my 2.6.23 kernel.
 
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1142,12 +1142,15 @@ static int ahci_reset_controller(struct ata_host *host)
                        readl(mmio + HOST_CTL); /* flush */
                }
 
-               /* reset must complete within 1 second, or
+               /*
+                * to perform host reset, OS should set HOST_RESET
+                * and poll until this bit is read to be "0".
+                * reset must complete within 1 second, or
                 * the hardware should be considered fried.
                 */
-               ssleep(1);
+               tmp = ata_wait_register(mmio + HOST_CTL, HOST_RESET,
+                                       HOST_RESET, 10, 1000);
 
-               tmp = readl(mmio + HOST_CTL);
                if (tmp & HOST_RESET) {
                        dev_printk(KERN_ERR, host->dev,
                                   "controller reset failed (0x%x)\n", tmp);

 
      Then everything is ok, except the below error:
      "ata1: failed to reset engine (errno=-95)."  
 
      Is someone know the reason? I think maybe i must patch more patches.But I don't know which.
         
      Thank you very much!

---

Best regards


Bo Liu
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux