Subject: Re: apm (Re: Anyone running NetBSD on an IBM ThinkPad [A|T]21?)
To: Steven M. Bellovin <smb@research.att.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-i386
Date: 01/22/2001 22:36:59
On Sun, Jan 21, 2001 at 09:27:59PM -0500, Steven M. Bellovin wrote:
> I installed the patches to npx_isa.c and apm.c, and suspend works much 
> better now on my Thinkpad 600E.  However, on two occasions, I also got 
> the following messages:
> 
> pciide0:0:0: lost interrupt
>         type: ata tc_bcount: 8192 tc_skip: 0
> pciide0:0:0: intr with DRQ (st=0x58)
> wd0: transfer error, downgrading to Ultra-DMA mode 1
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data transfers)
> wd0a: device timeout writing fsbn 30432 of 30432-30447 (wd0 bn 5156112; cn 5456 tn 3 sn 3), retrying
> wd0: soft error (corrected)
> 
> I assume that that happened because a disk operation was in progress 
> during the suspend request.
> 
> (a) is that guess correct?

That's possible.

> (b) was the recovery likely to have been successful?  should other 
> blocks in that range have been rewritten?

No, it properly recovered.

> (c) does the disk upgrade to whatever the previous Ultra-DMA mode was?  

No. I agree that something more intelligent could be done here, but better
be safe by default :) You can recompile a kenel with the DMA mode hardwrired,
which would avoid the downgrade.
> (d) should the apm support be changed to quiesce the disks before 
> suspending?  I believe that bsd/os does that.

I think this should be done, yes.

--
Manuel Bouyer <bouyer@antioche.eu.org>
--