Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/sys/dev/pci Pull up following revision(s) (requested by t...



details:   https://anonhg.NetBSD.org/src/rev/5c532788e78e
branches:  netbsd-9
changeset: 460443:5c532788e78e
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Oct 23 18:09:18 2019 +0000

description:
Pull up following revision(s) (requested by tnn in ticket #358):

        sys/dev/pci/ahcisata_pci.c: revision 1.56

ahcisata: make sure bus mastering and memory space are actually enabled
This makes the "ROCKPro64 PCI-e to Dual SATA-II Interface Card" work.

diffstat:

 sys/dev/pci/ahcisata_pci.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 43bf2edcff18 -r 5c532788e78e sys/dev/pci/ahcisata_pci.c
--- a/sys/dev/pci/ahcisata_pci.c        Wed Oct 23 18:06:46 2019 +0000
+++ b/sys/dev/pci/ahcisata_pci.c        Wed Oct 23 18:09:18 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahcisata_pci.c,v 1.55 2019/01/27 02:08:42 pgoyette Exp $       */
+/*     $NetBSD: ahcisata_pci.c,v 1.55.4.1 2019/10/23 18:09:18 martin Exp $     */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.55 2019/01/27 02:08:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.55.4.1 2019/10/23 18:09:18 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ahcisata_pci.h"
@@ -394,6 +394,7 @@
        struct ahci_softc *sc = &psc->ah_sc;
        bool ahci_cap_64bit;
        bool ahci_bad_64bit;
+       pcireg_t reg;
 
        sc->sc_atac.atac_dev = self;
 
@@ -447,6 +448,10 @@
                AHCIDEBUG_PRINT(("%s: SATA mode\n", AHCINAME(sc)), DEBUG_PROBE);
        }
 
+       reg = pci_conf_read(psc->sc_pc, psc->sc_pcitag, PCI_COMMAND_STATUS_REG);
+       reg |= (PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_MASTER_ENABLE);
+       pci_conf_write(psc->sc_pc, psc->sc_pcitag, PCI_COMMAND_STATUS_REG, reg);
+
        ahci_attach(sc);
 
        if (!pmf_device_register(self, NULL, ahci_pci_resume))



Home | Main Index | Thread Index | Old Index