From: jmatthew Date: Sun, 24 Apr 2022 00:04:10 +0000 (+0000) Subject: Increase rx buffer size to 62kB (same as linux). It turns out the device X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=21bc013100529b97a57f0afd646e088ba69b54f0;p=openbsd Increase rx buffer size to 62kB (same as linux). It turns out the device doesn't fit packets into the host's rx buffer until it's full, it keeps going as long as it has space in its own receive buffer, and then truncates to fit the usb transfer. The packet descriptors are at the end, so this means losing all the packets in the buffer. At 32kB, it's fairly easy to overrun, but 62kB seems fine. tested by and ok mlarkin@ --- diff --git a/sys/dev/usb/if_uaq.c b/sys/dev/usb/if_uaq.c index e814aea0f46..d7b9d6daa9a 100644 --- a/sys/dev/usb/if_uaq.c +++ b/sys/dev/usb/if_uaq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_uaq.c,v 1.2 2021/12/31 08:15:47 jmatthew Exp $ */ +/* $OpenBSD: if_uaq.c,v 1.3 2022/04/24 00:04:10 jmatthew Exp $ */ /*- * Copyright (c) 2021 Jonathan Matthew * All rights reserved. @@ -75,7 +75,7 @@ int uaqdebug = 0; #define UAQ_RX_BUF_ALIGN 8 #define UAQ_TX_BUFSZ 16384 -#define UAQ_RX_BUFSZ 32768 +#define UAQ_RX_BUFSZ (62 * 1024) #define UAQ_CTL_READ 1 #define UAQ_CTL_WRITE 2