More info: ATA hang on resume
Hiroyuki Aizu
eyes at navi.org
Wed Dec 24 08:55:57 PST 2003
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
@@ -230,6 +230,7 @@
int
ata_reinit(struct ata_channel *ch)
{
+ int i;
struct ata_request *request = ch->running;
int devices, misdev, newdev;
@@ -241,7 +242,11 @@
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 */
More information about the freebsd-current
mailing list