Special-case the LED twiddling code so that it doesn't do anything
on the NEC VersaPro NoteBook PC. This 21143 implementation has no LEDs, and flipping the LED control bits somehow stops it from establishing a link. We check the subsystem ID and don't flip the LED control bits for the NEC NIC.
This commit is contained in:
parent
feadccca5d
commit
e7db16f407
@ -1759,6 +1759,15 @@ static int dc_attach(dev)
|
||||
sc->dc_flags |= DC_21143_NWAY;
|
||||
mii_phy_probe(dev, &sc->dc_miibus,
|
||||
dc_ifmedia_upd, dc_ifmedia_sts);
|
||||
/*
|
||||
* For non-MII cards, we need to have the 21143
|
||||
* drive the LEDs. Except there are some systems
|
||||
* like the NEC VersaPro NoteBook PC which have no
|
||||
* LEDs, and twiddling these bits has adverse effects
|
||||
* on them. (I.e. you suddenly can't get a link.)
|
||||
*/
|
||||
if (pci_read_config(dev, DC_PCI_CSID, 4) != 0x80281033)
|
||||
sc->dc_flags |= DC_TULIP_LEDS;
|
||||
error = 0;
|
||||
}
|
||||
|
||||
@ -2730,10 +2739,10 @@ static void dc_init(xsc)
|
||||
* MII port, program the LED control pins so we get
|
||||
* link and activity indications.
|
||||
*/
|
||||
if (DC_IS_INTEL(sc) && sc->dc_pmode == DC_PMODE_SYM) {
|
||||
if (sc->dc_flags & DC_TULIP_LEDS) {
|
||||
CSR_WRITE_4(sc, DC_WATCHDOG,
|
||||
DC_WDOG_CTLWREN|DC_WDOG_LINK|DC_WDOG_ACTIVITY);
|
||||
CSR_WRITE_4(sc, DC_WATCHDOG, DC_WDOG_LINK|DC_WDOG_ACTIVITY);
|
||||
CSR_WRITE_4(sc, DC_WATCHDOG, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -679,6 +679,7 @@ struct dc_softc {
|
||||
#define DC_21143_NWAY 0x00000800
|
||||
#define DC_128BIT_HASH 0x00001000
|
||||
#define DC_64BIT_HASH 0x00002000
|
||||
#define DC_TULIP_LEDS 0x00004000
|
||||
|
||||
/*
|
||||
* register space access macros
|
||||
|
@ -1759,6 +1759,15 @@ static int dc_attach(dev)
|
||||
sc->dc_flags |= DC_21143_NWAY;
|
||||
mii_phy_probe(dev, &sc->dc_miibus,
|
||||
dc_ifmedia_upd, dc_ifmedia_sts);
|
||||
/*
|
||||
* For non-MII cards, we need to have the 21143
|
||||
* drive the LEDs. Except there are some systems
|
||||
* like the NEC VersaPro NoteBook PC which have no
|
||||
* LEDs, and twiddling these bits has adverse effects
|
||||
* on them. (I.e. you suddenly can't get a link.)
|
||||
*/
|
||||
if (pci_read_config(dev, DC_PCI_CSID, 4) != 0x80281033)
|
||||
sc->dc_flags |= DC_TULIP_LEDS;
|
||||
error = 0;
|
||||
}
|
||||
|
||||
@ -2730,10 +2739,10 @@ static void dc_init(xsc)
|
||||
* MII port, program the LED control pins so we get
|
||||
* link and activity indications.
|
||||
*/
|
||||
if (DC_IS_INTEL(sc) && sc->dc_pmode == DC_PMODE_SYM) {
|
||||
if (sc->dc_flags & DC_TULIP_LEDS) {
|
||||
CSR_WRITE_4(sc, DC_WATCHDOG,
|
||||
DC_WDOG_CTLWREN|DC_WDOG_LINK|DC_WDOG_ACTIVITY);
|
||||
CSR_WRITE_4(sc, DC_WATCHDOG, DC_WDOG_LINK|DC_WDOG_ACTIVITY);
|
||||
CSR_WRITE_4(sc, DC_WATCHDOG, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -679,6 +679,7 @@ struct dc_softc {
|
||||
#define DC_21143_NWAY 0x00000800
|
||||
#define DC_128BIT_HASH 0x00001000
|
||||
#define DC_64BIT_HASH 0x00002000
|
||||
#define DC_TULIP_LEDS 0x00004000
|
||||
|
||||
/*
|
||||
* register space access macros
|
||||
|
Loading…
Reference in New Issue
Block a user