Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Explicitly enable bus masterling in case BIOS, U...
details: https://anonhg.NetBSD.org/src/rev/fb38a4ef3523
branches: trunk
changeset: 838706:fb38a4ef3523
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Jan 28 04:09:51 2019 +0000
description:
Explicitly enable bus masterling in case BIOS, UEFI or firmware don't enable
it. Might fix PR kern/53811.
diffstat:
sys/dev/pci/ppb.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 3a4cc2755262 -r fb38a4ef3523 sys/dev/pci/ppb.c
--- a/sys/dev/pci/ppb.c Mon Jan 28 03:37:52 2019 +0000
+++ b/sys/dev/pci/ppb.c Mon Jan 28 04:09:51 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ppb.c,v 1.65 2019/01/27 02:08:42 pgoyette Exp $ */
+/* $NetBSD: ppb.c,v 1.66 2019/01/28 04:09:51 msaitoh Exp $ */
/*
* Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.65 2019/01/27 02:08:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.66 2019/01/28 04:09:51 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_ppb.h"
@@ -358,6 +358,11 @@
}
#endif /* PPB_USEINTR */
+ /* Enable bus master. */
+ reg = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
+ pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG,
+ reg | PCI_COMMAND_MASTER_ENABLE);
+
if (!pmf_device_register(self, ppb_suspend, ppb_resume))
aprint_error_dev(self, "couldn't establish power handler\n");
Home |
Main Index |
Thread Index |
Old Index