Module Name: src
Committed By: cegger
Date: Thu Jun 9 12:04:30 UTC 2011
Modified Files:
src/sys/dev/pci: if_bge.c
Log Message:
the BCM5785 is a PCIe chip but does not report PCIe capabilities.
Check for this chip explicitely and enable PCIe.
Fixes 'firmware handshake timeout'. Tested with root on nfs.
patch from msaitoh@
To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/dev/pci/if_bge.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.197 src/sys/dev/pci/if_bge.c:1.198
--- src/sys/dev/pci/if_bge.c:1.197 Fri Jun 3 09:51:40 2011
+++ src/sys/dev/pci/if_bge.c Thu Jun 9 12:04:29 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.197 2011/06/03 09:51:40 cegger Exp $ */
+/* $NetBSD: if_bge.c,v 1.198 2011/06/09 12:04:29 cegger Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.197 2011/06/03 09:51:40 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.198 2011/06/09 12:04:29 cegger Exp $");
#include "vlan.h"
#include "rnd.h"
@@ -2617,8 +2617,9 @@
BGE_PCI_PRODID_ASICREV);
}
- if (pci_get_capability(sc->sc_pc, sc->sc_pcitag, PCI_CAP_PCIEXPRESS,
- &sc->bge_pciecap, NULL) != 0) {
+ 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)) {
/* PCIe */
sc->bge_flags |= BGE_PCIE;
bge_set_max_readrq(sc);