cvs diff -u viaide.c
Index: viaide.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/viaide.c,v
retrieving revision 1.50
diff -u -r1.50 viaide.c
--- viaide.c 20 Dec 2007 22:24:40 -0000 1.50
+++ viaide.c 12 Jan 2008 08:51:08 -0000
@@ -799,6 +799,21 @@
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;
+ sc->sc_ba5_st = pa->pa_memt;
+ }
+ csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
+ 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;