Backout the change I made before 5.4-R since I wasn't aware that it was only
a problem with one particular switch module. Create a kernel option BGE_FAKE_AUTONEG that restores the 5.4 behavior, which should make the DNLK switch module work. IBM/Intel blades with Intel or AD switch modules should work without patching or kernel options with this commit. Hardware for testing provided by several folks, including Danny Braniss <danny@cs.huji.ac.il>, Achim Patzner <ap@bnc.net>, and OffMyServer. Approved by: re
This commit is contained in:
parent
de1c01ad37
commit
ff50922b16
@ -624,6 +624,9 @@ ED_HPP opt_ed.h
|
|||||||
ED_3C503 opt_ed.h
|
ED_3C503 opt_ed.h
|
||||||
ED_SIC opt_ed.h
|
ED_SIC opt_ed.h
|
||||||
|
|
||||||
|
# bge driver
|
||||||
|
BGE_FAKE_AUTONEG opt_bge.h
|
||||||
|
|
||||||
# wi driver
|
# wi driver
|
||||||
WI_SYMBOL_FIRMWARE opt_wi.h
|
WI_SYMBOL_FIRMWARE opt_wi.h
|
||||||
|
|
||||||
|
@ -108,6 +108,8 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include <dev/bge/if_bgereg.h>
|
#include <dev/bge/if_bgereg.h>
|
||||||
|
|
||||||
|
#include "opt_bge.h"
|
||||||
|
|
||||||
#define BGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP)
|
#define BGE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP)
|
||||||
|
|
||||||
MODULE_DEPEND(bge, pci, 1, 1, 1);
|
MODULE_DEPEND(bge, pci, 1, 1, 1);
|
||||||
@ -3454,6 +3456,25 @@ bge_ifmedia_upd(ifp)
|
|||||||
return(EINVAL);
|
return(EINVAL);
|
||||||
switch(IFM_SUBTYPE(ifm->ifm_media)) {
|
switch(IFM_SUBTYPE(ifm->ifm_media)) {
|
||||||
case IFM_AUTO:
|
case IFM_AUTO:
|
||||||
|
#ifndef BGE_FAKE_AUTONEG
|
||||||
|
/*
|
||||||
|
* The BCM5704 ASIC appears to have a special
|
||||||
|
* mechanism for programming the autoneg
|
||||||
|
* advertisement registers in TBI mode.
|
||||||
|
*/
|
||||||
|
if (sc->bge_asicrev == BGE_ASICREV_BCM5704) {
|
||||||
|
uint32_t sgdig;
|
||||||
|
CSR_WRITE_4(sc, BGE_TX_TBI_AUTONEG, 0);
|
||||||
|
sgdig = CSR_READ_4(sc, BGE_SGDIG_CFG);
|
||||||
|
sgdig |= BGE_SGDIGCFG_AUTO|
|
||||||
|
BGE_SGDIGCFG_PAUSE_CAP|
|
||||||
|
BGE_SGDIGCFG_ASYM_PAUSE;
|
||||||
|
CSR_WRITE_4(sc, BGE_SGDIG_CFG,
|
||||||
|
sgdig|BGE_SGDIGCFG_SEND);
|
||||||
|
DELAY(5);
|
||||||
|
CSR_WRITE_4(sc, BGE_SGDIG_CFG, sgdig);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case IFM_1000_SX:
|
case IFM_1000_SX:
|
||||||
if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
|
if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
.PATH: ${.CURDIR}/../../dev/bge
|
.PATH: ${.CURDIR}/../../dev/bge
|
||||||
|
|
||||||
KMOD= if_bge
|
KMOD= if_bge
|
||||||
SRCS= if_bge.c miibus_if.h miidevs.h opt_bdg.h device_if.h bus_if.h pci_if.h
|
SRCS= opt_bge.h if_bge.c miibus_if.h miidevs.h opt_bdg.h device_if.h bus_if.h pci_if.h
|
||||||
|
|
||||||
.include <bsd.kmod.mk>
|
.include <bsd.kmod.mk>
|
||||||
|
Loading…
Reference in New Issue
Block a user