diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-10-22 14:28:55 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2021-10-22 14:28:55 +0000 |
commit | 0a29cc2fb738db04e2d1a5d9f5566fd7395ea12e (patch) | |
tree | 2270a0f69fcb8de9f857095d1813789703cb1883 /sys/dev/fdt | |
parent | aba8a201f884f8d29e3525c2e13e33a6fc0f84f5 (diff) |
Mask LPI interrupts. This fixes an interrupt storm on dwge(4) variants
that support Energy Efficient Ethernet when connected to a switch that
also supports Energy Effient Ethernet. For example on the odroid-hc4.
ok patrick@
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r-- | sys/dev/fdt/if_dwge.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/fdt/if_dwge.c b/sys/dev/fdt/if_dwge.c index 5695d85fd50..70dc8a9cabf 100644 --- a/sys/dev/fdt/if_dwge.c +++ b/sys/dev/fdt/if_dwge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_dwge.c,v 1.10 2021/07/28 13:43:11 patrick Exp $ */ +/* $OpenBSD: if_dwge.c,v 1.11 2021/10/22 14:28:54 kettenis Exp $ */ /* * Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org> * Copyright (c) 2017 Patrick Wildt <patrick@blueri.se> @@ -92,6 +92,7 @@ #define GMAC_VERSION 0x0020 #define GMAC_VERSION_SNPS_MASK 0xff #define GMAC_INT_MASK 0x003c +#define GMAC_INT_MASK_LPIIM (1 << 10) #define GMAC_INT_MASK_PIM (1 << 3) #define GMAC_INT_MASK_RIM (1 << 0) #define GMAC_MAC_ADDR0_HI 0x0040 @@ -528,7 +529,8 @@ dwge_attach(struct device *parent, struct device *self, void *aux) /* Disable interrupts. */ dwge_write(sc, GMAC_INT_ENA, 0); - dwge_write(sc, GMAC_INT_MASK, GMAC_INT_MASK_PIM | GMAC_INT_MASK_RIM); + dwge_write(sc, GMAC_INT_MASK, + GMAC_INT_MASK_LPIIM | GMAC_INT_MASK_PIM | GMAC_INT_MASK_RIM); dwge_write(sc, GMAC_MMC_RX_INT_MSK, 0xffffffff); dwge_write(sc, GMAC_MMC_TX_INT_MSK, 0xffffffff); dwge_write(sc, GMAC_MMC_IPC_INT_MSK, 0xffffffff); |