Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
For PCI-X BCM5704, set maximum outstanding split transactions to 0. Same as Linux tg3 and FreeBSD (part of FreeBSD r204978).
This commit is contained in:
parent
27d21cc6e9
commit
66aec3e6de
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_bge.c,v 1.259 2013/09/12 21:11:37 martin Exp $ */
|
||||
/* $NetBSD: if_bge.c,v 1.260 2013/10/28 05:37:24 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.259 2013/09/12 21:11:37 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.260 2013/10/28 05:37:24 msaitoh Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -4166,10 +4166,23 @@ bge_reset(struct bge_softc *sc)
|
||||
pci_conf_write(sc->sc_pc, sc->sc_pcitag, BGE_PCI_CACHESZ, cachesize);
|
||||
pci_conf_write(sc->sc_pc, sc->sc_pcitag, BGE_PCI_CMD, command);
|
||||
|
||||
/* Step 11: disable PCI-X Relaxed Ordering. */
|
||||
/* 57xx step 11: disable PCI-X Relaxed Ordering. */
|
||||
if (sc->bge_flags & BGE_PCIX) {
|
||||
reg = pci_conf_read(sc->sc_pc, sc->sc_pcitag, sc->bge_pcixcap
|
||||
+ PCIX_CMD);
|
||||
/* Set max memory read byte count to 2K */
|
||||
if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5703) {
|
||||
reg &= ~PCIX_CMD_BYTECNT_MASK;
|
||||
reg |= PCIX_CMD_BCNT_2048;
|
||||
} else if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5704){
|
||||
/*
|
||||
* For 5704, set max outstanding split transaction
|
||||
* field to 0 (0 means it supports 1 request)
|
||||
*/
|
||||
reg &= ~(PCIX_CMD_SPLTRANS_MASK
|
||||
| PCIX_CMD_BYTECNT_MASK);
|
||||
reg |= PCIX_CMD_BCNT_2048;
|
||||
}
|
||||
pci_conf_write(sc->sc_pc, sc->sc_pcitag, sc->bge_pcixcap
|
||||
+ PCIX_CMD, reg & ~PCIX_CMD_RELAXED_ORDER);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user