diff options
author | Kevin Lo <kevlo@cvs.openbsd.org> | 2022-05-19 00:52:38 +0000 |
---|---|---|
committer | Kevin Lo <kevlo@cvs.openbsd.org> | 2022-05-19 00:52:38 +0000 |
commit | ecc532c6b3668aa8eaff5cbaf83f6b1ae85ca160 (patch) | |
tree | 59305bd9e370aa663dcd1e4471eab79bce046057 /sys/dev/pci/if_alc.c | |
parent | c574094af1f3ec21ca5f16a2e745bbaf174b0de0 (diff) |
Force maximum payload size to 128 bytes for AR816X/AR817x as it triggers
dma write error rendering the network unusable.
Bug reported and patch tested by Scott C. MacCallum.
Diffstat (limited to 'sys/dev/pci/if_alc.c')
-rw-r--r-- | sys/dev/pci/if_alc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c index 39e4e9a1aa9..ae30a981042 100644 --- a/sys/dev/pci/if_alc.c +++ b/sys/dev/pci/if_alc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_alc.c,v 1.55 2022/03/11 18:00:45 mpi Exp $ */ +/* $OpenBSD: if_alc.c,v 1.56 2022/05/19 00:52:37 kevlo Exp $ */ /*- * Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org> * All rights reserved. @@ -1354,10 +1354,11 @@ alc_attach(struct device *parent, struct device *self, void *aux) sc->alc_dma_wr_burst = 3; /* * Force maximum payload size to 128 bytes for - * E2200/E2400/E2500. + * E2200/E2400/E2500/AR8162/AR8171/AR8172. * Otherwise it triggers DMA write error. */ - if ((sc->alc_flags & ALC_FLAG_E2X00) != 0) + if ((sc->alc_flags & + (ALC_FLAG_E2X00 | ALC_FLAG_AR816X_FAMILY)) != 0) sc->alc_dma_wr_burst = 0; alc_init_pcie(sc, base); } |