Subject: Re: kern/3753: cyclades driver is broken
To: None <torppa@cute.fi, cgd@pa.dec.com>
From: Wolfgang Solfrank <ws@kurt.tools.de>
List: netbsd-bugs
Date: 06/17/1997 18:03:55
> > cy driver has the following bugs/problems:
> > it doesnt like pci cards of type PCI_MAPREG_MEM_TYPE_32BIT_1M
> > [ ... ]
> > --- cy.orig/pci/cy_pci.c Mon Jun 16 19:30:20 1997
> > +++ cy/pci/cy_pci.c Mon Jun 16 19:35:39 1997
> > @@ -53,7 +53,7 @@
> > PCI_MAPREG_TYPE_IO, 0,
> > iotp, iohp, NULL, iosizep) == 0);
> > memh_valid = (pci_mapreg_map(pap, 0x18,
> > - PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0,
> > + PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT | PCI_MAPREG_MEM_TYPE_32BIT_1M, 0,
> > memtp, memhp, NULL, memsizep) == 0);
> >
> > if (ioh_valid && memh_valid)
>
> That patch will cause the driver to work _only_ on the 32BIT_1M cards,
> i.e. it _won't_ work on the ones which can map their memory higher
> than 1MB.
>
> I _think_ the right solution is to or in that bit depending on the PCI
> device ID; could you verify that?
Hmm, I think that since the low 4 bits of memory mapping registers are by
definition read-only, the right solution is to fix pci_mapreg_map to accept the
unmodified call and ignore the sense of the PCI_MAPREG_MEM_TYPE_32BIT_1M bit.
--
ws@TooLs.DE (Wolfgang Solfrank, TooLs GmbH) +49-228-985800