Hello,
The following diff is really important because on some machines
bge(4) gets detached because of ASPM. The following diff is also
in the latest snapshots but you can also compile a kernel with it.
So if you have a bge(4) please update/compile a kernel and get
back to me if it works or fails in some way.
Thank you!
Index: if_bge.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_bge.c,v
retrieving revision 1.303
diff -u -r1.303 if_bge.c
--- if_bge.c 20 Sep 2010 07:40:38 -0000 1.303
+++ if_bge.c 15 Feb 2011 09:02:07 -0000
@@ -1794,7 +1794,7 @@
struct pci_attach_args *pa = aux;
pci_chipset_tag_t pc = pa->pa_pc;
const struct bge_revision *br;
- pcireg_t pm_ctl, memtype, subid;
+ pcireg_t pm_ctl, memtype, subid, reg;
pci_intr_handle_t ih;
const char *intrstr = NULL;
bus_size_t size;
@@ -1885,7 +1885,13 @@
* PCI Express or PCI-X controller check.
*/
if (pci_get_capability(pa->pa_pc, pa->pa_tag, PCI_CAP_PCIEXPRESS,
- NULL, NULL) != 0) {
+ &sc->bge_aspm_off, NULL) != 0) {
+ /* Disable PCIe Active State Power Management (ASPM). */
+ reg = pci_conf_read(pa->pa_pc, pa->pa_tag,
+ sc->bge_aspm_off + PCI_PCIE_LCSR);
+ reg &= ~(PCI_PCIE_LCSR_ASPM_L0S | PCI_PCIE_LCSR_ASPM_L1);
+ pci_conf_write(pa->pa_pc, pa->pa_tag,
+ sc->bge_aspm_off + PCI_PCIE_LCSR, reg);
sc->bge_flags |= BGE_PCIE;
} else {
if ((pci_conf_read(pa->pa_pc, pa->pa_tag, BGE_PCI_PCISTATE) &
Index: if_bgereg.h
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_bgereg.h,v
retrieving revision 1.103
diff -u -r1.103 if_bgereg.h
--- if_bgereg.h 20 Sep 2010 07:40:38 -0000 1.103
+++ if_bgereg.h 15 Feb 2011 09:02:07 -0000
@@ -2610,6 +2610,7 @@
#define BGE_5714_FAMILY 0x01000000
#define BGE_5700_FAMILY 0x02000000
+ int bge_aspm_off;
bus_dma_tag_t bge_dmatag;
u_int32_t bge_chipid;
struct bge_ring_data *bge_rdata; /* rings */