Subject: Re: wdc VS pciide
To: Samuel.Hornus <Samuel.Hornus@crans.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-macppc
Date: 06/12/2001 14:53:55
On Mon, Jun 11, 2001 at 10:21:48PM +0200, Samuel.Hornus wrote:
> Here is part of dmesg (/var/run/dmesg.boot) that seems(car je suis
> debutant !) relevant :
> (there is also a scsi card for a cd burner)
> ==================================================================
> ppb0 at pci1 dev 13 function 0: vendor 0x1011 product 0x0026 (rev. 0x05)
> pci2 at ppb0 bus 1
> pci2: i/o space, memory space enabled
> siop0 at pci2 dev 2 function 0: Symbios Logic 53c875 (ultra-wide scsi)
> siop0: using on-board RAM
> siop0: interrupting at irq 52
> scsibus0 at siop0: 16 targets, 8 luns per target
> obio0 at pci2 dev 7 function 0: addr 0x80000000
> [...]
> obio0 at pci2 dev 7 function 0: addr 0x80000000
> wdc0 at obio0 offset 0x1f000 irq 19: DMA transfer
> wd0 at wdc0 channel 0 drive 0: <IC35L040AVER07-0>
> wd0: drive supports 16-sector PIO transfers, LBA addressing
> wd0: 39266 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 80418240 sectors
> wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
> wd1 at wdc0 channel 0 drive 1: <QUANTUM FIREBALLP KX20.5>
> wd1: drive supports 16-sector PIO transfers, LBA addressing
> wd1: 19609 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 40160988 sectors
> wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
> wd0(wdc0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> wd1(wdc0:0:1): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> wdc1 at obio0 offset 0x20000 irq 20: DMA transfer
> atapibus0 at wdc1 channel 0: 2 targets
> cd0 at atapibus0 drive 0: <HITACHI DVD-ROM GD-3000, , 020S> type 5 cdrom removable
> cd0: drive supports PIO mode 4, DMA mode 2
> sd0 at atapibus0 drive 1: <IOMEGA  ZIP 100       ATAPI, , 14.A> type 0 direct removable
> sd0: drive offline
> cd0(wdc1:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> sd0(wdc1:0:1): using PIO mode 3
> wdc2 at obio0 offset 0x21000 irq 21: DMA transfer

OK, so it's not a pciide controller at all (it's not attached to the pci bus).
It seems that the wdc_obio front end doesn't exactly do the rigth thing
with mode settings. Can you try the attached patch ? It should be OK for DMA
but PIO timings setting are still missing (is it possible with this
controller ? ).

Also, it would be better to put each drive as master on its own channel,
and have the ATAPI devices as slave (or maybe move ATAPI devices to wdc2).
This may solve the lost interrupt problems (some drive combination are just
incompatible).

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--