atheros813x: apply fix from OpenBSD

* 10fd7e3817
"Force maximum payload size to 128 bytes for AR816X/AR817x as it triggers"
* could help for #16978

Change-Id: I626e364adcabaa9b3d7e4c1078067c1d82c7d4e3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5340
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Jérôme Duval 2022-05-24 17:57:51 +02:00 committed by waddlesplash
parent 748b488347
commit 6ba3c443a2

View File

@ -1495,10 +1495,11 @@ alc_attach(device_t dev)
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);
}