From: mglocker Date: Sun, 25 Jul 2021 06:43:04 +0000 (+0000) Subject: Enable LEDs for the LAN7800 chip, as e.g. found on the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=43a723fb64dce7efff152b6d6ee732eb3c9ba87f;p=openbsd Enable LEDs for the LAN7800 chip, as e.g. found on the Raspberry Pi 3 Model B+. ok kevlo@ --- diff --git a/sys/dev/usb/if_mue.c b/sys/dev/usb/if_mue.c index 2ae0e7b8a3c..331d30f7bf2 100644 --- a/sys/dev/usb/if_mue.c +++ b/sys/dev/usb/if_mue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mue.c,v 1.10 2020/07/31 10:49:32 mglocker Exp $ */ +/* $OpenBSD: if_mue.c,v 1.11 2021/07/25 06:43:04 mglocker Exp $ */ /* * Copyright (c) 2018 Kevin Lo @@ -656,6 +656,13 @@ mue_chip_init(struct mue_softc *sc) MUE_SETBIT(sc, (sc->mue_flags & LAN7500) ? MUE_FCT_RX_CTL : MUE_7800_FCT_RX_CTL, MUE_FCT_RX_CTL_EN); + /* Enable LEDs. */ + if (sc->mue_product == USB_PRODUCT_SMC2_LAN7800 && + sc->mue_eeprom_present == 0) { + MUE_SETBIT(sc, MUE_HW_CFG, + MUE_HW_CFG_LED0_EN | MUE_HW_CFG_LED1_EN); + } + return (0); }