brcm2708: update to latest patches from the RPi foundation
[openwrt/staging/lynxis.git] / target / linux / brcm2708 / patches-4.14 / 961-lan78xx-enable-LED.patch
1 --- a/drivers/net/usb/lan78xx.c
2 +++ b/drivers/net/usb/lan78xx.c
3 @@ -2462,6 +2462,15 @@ static int lan78xx_reset(struct lan78xx_
4
5 ret = lan78xx_read_reg(dev, HW_CFG, &buf);
6 buf |= HW_CFG_MEF_;
7 + if (dev->chipid == ID_REV_CHIP_ID_7800_) {
8 + ret = lan78xx_read_raw_eeprom(dev, 0, 1, &sig);
9 + if (!ret && sig != EEPROM_INDICATOR) {
10 + /* Implies there is no external eeprom. Enable LEDS */
11 + netdev_info(dev->net,
12 + "No External EEPROM. Enabling LEDS\n");
13 + buf |= HW_CFG_LED0_EN_ | HW_CFG_LED1_EN_;
14 + }
15 + }
16 ret = lan78xx_write_reg(dev, HW_CFG, buf);
17
18 ret = lan78xx_read_reg(dev, USB_CFG0, &buf);