Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Fix a bug that BCM5785 write wrongly to the PCI ...
details: https://anonhg.NetBSD.org/src/rev/56053d7f81bb
branches: trunk
changeset: 352840:56053d7f81bb
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Apr 12 06:04:34 2017 +0000
description:
Fix a bug that BCM5785 write wrongly to the PCI config area.
diffstat:
sys/dev/pci/if_bge.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (40 lines):
diff -r ebdab22022c2 -r 56053d7f81bb sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c Wed Apr 12 05:59:43 2017 +0000
+++ b/sys/dev/pci/if_bge.c Wed Apr 12 06:04:34 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.302 2017/04/12 05:59:43 msaitoh Exp $ */
+/* $NetBSD: if_bge.c,v 1.303 2017/04/12 06:04:34 msaitoh Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.302 2017/04/12 05:59:43 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.303 2017/04/12 06:04:34 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -3421,9 +3421,8 @@
sc->bge_chipid = bge_chipid(pa);
sc->bge_phy_addr = bge_phy_addr(sc);
- if ((pci_get_capability(sc->sc_pc, sc->sc_pcitag, PCI_CAP_PCIEXPRESS,
- &sc->bge_pciecap, NULL) != 0)
- || (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5785)) {
+ if (pci_get_capability(sc->sc_pc, sc->sc_pcitag, PCI_CAP_PCIEXPRESS,
+ &sc->bge_pciecap, NULL) != 0) {
/* PCIe */
sc->bge_flags |= BGEF_PCIE;
/* Extract supported maximum payload size. */
@@ -3436,6 +3435,9 @@
else
sc->bge_expmrq = 4096;
bge_set_max_readrq(sc);
+ } else if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5785) {
+ /* PCIe without PCIe cap */
+ sc->bge_flags |= BGEF_PCIE;
} else if ((pci_conf_read(sc->sc_pc, sc->sc_pcitag, BGE_PCI_PCISTATE) &
BGE_PCISTATE_PCI_BUSMODE) == 0) {
/* PCI-X */
Home |
Main Index |
Thread Index |
Old Index