Subject: Re: fixes for wdc_obio.c [3]
To: None <port-macppc@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-macppc
Date: 07/30/2001 20:48:05
On Mon, Jul 30, 2001 at 12:29:21PM -0400, Nathan J. Williams wrote:
> Manuel Bouyer <bouyer@antioche.lip6.fr> writes:
> 
> > Please apply the attached patch to the wdc_obio.c I posted yesterday
> 
> Hm. This gives:
> 
> wdc0 at obio0 offset 0x1f000 irq 19: DMA transfer
> atapibus0 at wdc0 channel 0: 2 targets
> cd0 at atapibus0 drive 1: <MATSHITADVD-ROM SR-8176, , MA24> type 5 cdrom removable
> cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
> wd0 at wdc0 channel 0 drive 0: <IBM-DJSA-220>
> wd0: drive supports 16-sector PIO transfers, LBA addressing
> wd0: 19077 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 39070080 sectors
> wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
> ata4 conf = 0x10328ca, cyc = 8 (55 ns), act = 0 (0 ns), inact = 6
> wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
> cd0(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
> ...
> root on wd0a dumps on wd0b
> wdc0:0:0: lost interrupt
> 	type: ata tc_bcount: 512 tc_skip: 0
> wdc0:0:0: intr with DRQ (st=0x58)
> wd0: transfer error, downgrading to Ultra-DMA mode 1
> ata4 conf = 0x14328ca, cyc = 10 (75 ns), act = 0 (0 ns), inact = 6
> wd0(wdc0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 1 (using DMA data transfers)
> cd0(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 1 (using DMA data transfers)
> wd0c: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
> wdc0:0:0: lost interrupt
> 	type: ata tc_bcount: 512 tc_skip: 0
> wdc0:0:0: intr with DRQ (st=0x58)
> wd0: transfer error, downgrading to DMA mode 2
> ata4 conf = 0x14328ca, cyc = 10 (75 ns), act = 0 (0 ns), inact = 6
> wd0(wdc0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> cd0(wdc0:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 1 (using DMA data transfers)
> wd0c: device timeout reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), retrying
> wd0: soft error (corrected)
> 
> 
> ... but seems to work. Ejecting the cd gives:
> 
> wdc0:0:1: lost interrupt
>         type: atapi tc_bcount: 32 tc_skip: 0
> wdc0:0:1: device timeout, c_bcount=32, c_skip=0
> cd0: transfer error, downgrading to DMA mode 2
> ata4 conf = 0x328ca, cyc = 16 (120 ns), act = 10 (70 ns), inact = 6
> wd0(wdc0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> cd0(wdc0:0:1): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> cd0(wdc0:0:1): invalid return code from adapter: 3
> 
> but again works.

OK. This and Hans's older post shows that now the driver works in DMA mode 2.
UltraDMA is still not OK, but there's some progress. Thanks for your reports !

I tink I'll postpone this until wenesday evening, at which time I should have
access to a iboot to test things directly.

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