Subject: Re: wdc0:0:0 lost interrupt on PowerBook G4
To: None <jtb@netbsd.org>
From: HAMAJIMA Katsuomi <hamajima@nagoya.ydc.co.jp>
List: port-macppc
Date: 06/19/2003 22:30:29
> On my PowerBook G4, 1GHz, 15" (current model) running -current I consistently get
> the following at boot time:
> 
> 
> wdc0:0:0: lost interrupt
> 	type: ata tc_bcount: 2048 tc_skip: 0
> wdc0:0:0: intr with DRQ (st=0x58)
> wd0: transfer error, downgrading to Ultra-DMA mode 2
> wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
> wd0a: device timeout writing fsbn 16 of 16-19 (wd0 bn 55263665; cn 54825 tn 1 sn 2), retrying

I hope for testing this patch.

Index: arch/macppc/dev/wdc_obio.c
===================================================================
RCS file: /home/hamajima/cvs/current/arch/macppc/dev/wdc_obio.c,v
retrieving revision 1.1.1.1.2.6
diff -u -r1.1.1.1.2.6 wdc_obio.c
--- arch/macppc/dev/wdc_obio.c	10 May 2003 17:08:44 -0000	1.1.1.1.2.6
+++ arch/macppc/dev/wdc_obio.c	19 Jun 2003 13:25:44 -0000
@@ -438,16 +438,17 @@
 }
 
 int
-wdc_obio_dma_init(v, channel, drive, databuf, datalen, read)
+wdc_obio_dma_init(v, channel, drive, databuf, datalen, flags)
 	void *v;
 	void *databuf;
 	size_t datalen;
-	int read;
+	int flags;
 {
 	struct wdc_obio_softc *sc = v;
 	vaddr_t va = (vaddr_t)databuf;
 	dbdma_command_t *cmdp;
 	u_int cmd, offset;
+	int read = flags & WDC_DMA_READ;
 
 	cmdp = sc->sc_dmacmd;
 	cmd = read ? DBDMA_CMD_IN_MORE : DBDMA_CMD_OUT_MORE;