Subject: Re: recent pciide.c change breaks ultra5 pciide.
To: matthew green <mrg@eterna.com.au>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-sparc
Date: 11/08/2000 14:30:06
On Wed, Nov 08, 2000 at 09:05:31PM +1100, matthew green wrote:
>
>
> hi matt.
>
> the recent change you made to pciide to avoid addreses > 0x10000 causes the
> ultrasparc support of this driver to fail. please fix your problem some
> other way that doesn't cause me to lose :-)
yes, this fix is wrong. At last it should limit I/O > 0x10000 only for
controllers that are known to be buggy.
Something like this would be more correct I think.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--
--- pciide.c.orig Wed Nov 8 14:25:54 2000
+++ pciide.c Wed Nov 8 14:29:21 2000
@@ -211,6 +211,7 @@
/* Flags for ide_flags */
#define IDE_PCI_CLASS_OVERRIDE 0x0001 /* accept even if class != pciide */
+#define IDE_LOWIO 0x0002 /* I/O addr > 0x10000 don't work */
/* Default product description for devices not known from this controller */
const struct pciide_product_desc default_product_desc = {
@@ -361,22 +362,22 @@
const struct pciide_product_desc pciide_promise_products[] = {
{ PCI_PRODUCT_PROMISE_ULTRA33,
- IDE_PCI_CLASS_OVERRIDE,
+ IDE_PCI_CLASS_OVERRIDE | IDE_LOWIO,
"Promise Ultra33/ATA Bus Master IDE Accelerator",
pdc202xx_chip_map,
},
{ PCI_PRODUCT_PROMISE_ULTRA66,
- IDE_PCI_CLASS_OVERRIDE,
+ IDE_PCI_CLASS_OVERRIDE | IDE_LOWIO,
"Promise Ultra66/ATA Bus Master IDE Accelerator",
pdc202xx_chip_map,
},
{ PCI_PRODUCT_PROMISE_ULTRA100,
- IDE_PCI_CLASS_OVERRIDE,
+ IDE_PCI_CLASS_OVERRIDE | IDE_LOWIO,
"Promise Ultra100/ATA Bus Master IDE Accelerator",
pdc202xx_chip_map,
},
{ PCI_PRODUCT_PROMISE_ULTRA100X,
- IDE_PCI_CLASS_OVERRIDE,
+ IDE_PCI_CLASS_OVERRIDE | IDE_LOWIO,
"Promise Ultra100/ATA Bus Master IDE Accelerator",
pdc202xx_chip_map,
},
@@ -708,7 +709,7 @@
printf(", but unused (couldn't query registers)");
break;
}
- if (addr >= 0x10000) {
+ if ((sc->sc_pp->ide_flags & IDE_LOWIO) && addr >= 0x10000) {
sc->sc_dma_ok = 0;
printf(", but unused (registers at unsafe address %#lx)", addr);
break;