Re: More info: ATA hang on resume

From: Hiroyuki Aizu <eyes_at_navi.org>
Date: Thu, 25 Dec 2003 01:56:33 +0900
Hi.

On Tue, 23 Dec 2003 17:38:39 -0800 (PST)
Nate Lawson <nate_at_root.org> wrote:

> I did some more tracing on this and found that the reset of ata0 is indeed
> hanging.  My machine does not have an APIC, just a simple PIC laptop (IBM
> T23).  I've disabled most devices and am not using atapi-cam.

I have same problem on TOSHIBA Libretto L5. Recently I found simple 
but effective solution. The ata controller is like this (from dmesg).

# atapci0: <AcerLabs Aladdin UDMA66 controller> port 0xe9f0-0xe9ff at device 16.0 on pci0

Try this patch.
(However I don't know this effect to ThinkPad' ata controller.)

--
Hiroyuki Aizu.


--- ata-all.c.orig	Mon Dec  1 20:24:13 2003
+++ ata-all.c	Thu Dec 25 00:00:44 2003
_at__at_ -230,6 +230,7 _at__at_
 int
 ata_reinit(struct ata_channel *ch)
 {
+    int i;
     struct ata_request *request = ch->running;
     int devices, misdev, newdev;
     
_at__at_ -241,7 +242,11 _at__at_
     ATA_FORCELOCK_CH(ch, ATA_CONTROL);
     ch->running = NULL;
     devices = ch->devices;
-    ch->hw.reset(ch);
+    for (i=0; i < 10; i++) {
+        ch->hw.reset(ch);
+        if (devices == ch->devices)
+            break;
+    }
     ATA_UNLOCK_CH(ch);
 
     /* detach what left the channel during reset */
Received on Wed Dec 24 2003 - 07:55:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:35 UTC