Subject: Re: problem w/ nvidia-sata on amd64
To: None <current-users@netbsd.org>
From: Kurt Schreiner <ks@ub.uni-mainz.de>
List: current-users
Date: 08/10/2007 15:44:27
Hi,
following up to my mail from 08/09/2007...
The patch below (adapted from src/sys/dev/pci/if_hme.c) eliminates
the problem. Maybe it's not "The Rigth Thing" to do, but gets
things going... Worth a send-pr?
Kurt
>-1030: cvs diff -u viaide.c
Index: viaide.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/viaide.c,v
retrieving revision 1.41
diff -u -r1.41 viaide.c
--- viaide.c 27 Mar 2007 00:04:04 -0000 1.41
+++ viaide.c 10 Aug 2007 13:36:08 -0000
@@ -674,6 +674,23 @@
pciide_mapreg_dma(sc, pa);
aprint_verbose("\n");
+ /*
+ * enable memory-space access. sometimes memory space is
+ * _not_ enabled so "just do it" to get things going!
+ */
+ {
+ pcireg_t csr;
+ if (pa->pa_memt)
+ pa->pa_flags |= PCI_FLAGS_MEM_ENABLED;
+ csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
+ if (pa->pa_memt) {
+ csr |= PCI_COMMAND_MEM_ENABLE;
+ sc->sc_ba5_st = pa->pa_memt;
+ }
+ pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
+ csr | PCI_COMMAND_MEM_ENABLE);
+ }
+
if (sc->sc_dma_ok) {
sc->sc_wdcdev.sc_atac.atac_cap |= ATAC_CAP_UDMA | ATAC_CAP_DMA;
sc->sc_wdcdev.irqack = pciide_irqack;