Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Ensure PCI_COMMAND_MASTER_ENABLE.



details:   https://anonhg.NetBSD.org/src/rev/3601654143e6
branches:  trunk
changeset: 764325:3601654143e6
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sat Apr 16 13:47:20 2011 +0000

description:
Ensure PCI_COMMAND_MASTER_ENABLE.

diffstat:

 sys/dev/pci/if_msk.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r c7e33fc90f84 -r 3601654143e6 sys/dev/pci/if_msk.c
--- a/sys/dev/pci/if_msk.c      Sat Apr 16 09:51:57 2011 +0000
+++ b/sys/dev/pci/if_msk.c      Sat Apr 16 13:47:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.35 2010/04/05 07:20:26 joerg Exp $ */
+/* $NetBSD: if_msk.c,v 1.36 2011/04/16 13:47:20 jakllsch Exp $ */
 /*     $OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $ */
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.35 2010/04/05 07:20:26 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.36 2011/04/16 13:47:20 jakllsch Exp $");
 
 #include "rnd.h"
 
@@ -1228,6 +1228,10 @@
 
        sc->sc_dmatag = pa->pa_dmat;
 
+       command = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
+       csr |= PCI_COMMAND_MASTER_ENABLE;
+       pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, command);
+
        sc->sk_type = sk_win_read_1(sc, SK_CHIPVER);
        sc->sk_rev = (sk_win_read_1(sc, SK_CONFIG) >> 4);
 



Home | Main Index | Thread Index | Old Index