From 50ec1594384c2f784af0e54b9312443939479f82 Mon Sep 17 00:00:00 2001 From: kevlo Date: Thu, 15 Apr 2021 02:23:17 +0000 Subject: [PATCH] Match Linux path in r8153_set_rx_early_size(). The rx early size is used to reduce the loading of CPU by letting a transfer contain more data to reduce the number of transfers. ok deraadt@ --- sys/dev/usb/if_ure.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/usb/if_ure.c b/sys/dev/usb/if_ure.c index 9ade5cec0fc..2bde9f36443 100644 --- a/sys/dev/usb/if_ure.c +++ b/sys/dev/usb/if_ure.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ure.c,v 1.23 2021/04/07 06:52:22 dlg Exp $ */ +/* $OpenBSD: if_ure.c,v 1.24 2021/04/15 02:23:17 kevlo Exp $ */ /*- * Copyright (c) 2015, 2016, 2019 Kevin Lo * Copyright (c) 2020 Jonathon Fletcher @@ -761,8 +761,8 @@ ure_init(void *xsc) ure_write_1(sc, URE_PLA_CRWECR, URE_MCU_TYPE_PLA, URE_CRWECR_NORAML); if (!(sc->ure_flags & URE_FLAG_8152)) { - reg = sc->ure_rxbufsz - URE_FRAMELEN(ifp->if_mtu) + - sizeof(struct ure_rxpkt) + URE_RX_BUF_ALIGN; + reg = sc->ure_rxbufsz - URE_FRAMELEN(ifp->if_mtu) - + sizeof(struct ure_rxpkt) - URE_RX_BUF_ALIGN; if (sc->ure_flags & (URE_FLAG_8153B | URE_FLAG_8156)) { ure_write_2(sc, URE_USB_RX_EARLY_SIZE, URE_MCU_TYPE_USB, reg / 8); -- 2.20.1