Subject: Re: pciide question: wd0 as wd2 (Promise Ultra100)
To: Alexander Yurchenko <grange@rt.mipt.ru>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 12/16/2002 23:53:34
On Sun, Dec 15, 2002 at 08:43:17PM +0300, Alexander Yurchenko wrote:
> On Sun, Dec 15, 2002 at 07:16:50PM +0200, Teemu Rinta-aho wrote:
> [skipped]
> > eap0: interrupting at irq 10
> [skipped]
> > pciide1: using irq 10 for native-PCI interrupt
> 
> So your promise chip shares the same irq line with audio card. Try this
> patch:
> 
> Index: pciide.c
> ===================================================================
> RCS file: /cvsroot/syssrc/sys/dev/pci/pciide.c,v
> retrieving revision 1.175
> diff -u -r1.175 pciide.c
> --- pciide.c	2002/11/20 19:20:24	1.175
> +++ pciide.c	2002/12/15 17:45:08
> @@ -4158,6 +4158,15 @@
>  		/* If a compat channel skip. */
>  		if (cp->compat)
>  			continue;
> +
> +		if (PDC_IS_268(sc)) {
> +			bus_space_write_1(sc->sc_dma_iot, sc->sc_dma_ioh,
> +			    PDC268_INDEX(i), 0x0b);
> +			if ((bus_space_read_1(sc->sc_dma_iot, sc->sc_dma_ioh,
> +			    PDC268_DATA(i)) & 0x20) == 0)
> +				continue;
> +		}
> +

I've seen similar code in other drivers (I think linux), but I didn't
find it to be necessary: the bit in IDEDMA_CTL seems to be reliable.
At last for the promise controllers I have.
Did you find controllers that required this code ?

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 23 ans d'experience feront toujours la difference
--