[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] usb-serial: Increase receive buffer to 496
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 3/4] usb-serial: Increase receive buffer to 496 |
Date: |
Sat, 14 Mar 2020 22:40:43 +0100 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Jason Andryuk, le jeu. 12 mars 2020 08:55:22 -0400, a ecrit:
> A FTDI USB adapter on an xHCI controller can send 512 byte USB packets.
> These are 8 * ( 2 bytes header + 62 bytes data). A 384 byte receive
> buffer is insufficient to fill a 512 byte packet, so bump the receive
> size to 496 ( 512 - 2 * 8 ).
>
> Signed-off-by: Jason Andryuk <address@hidden>
Reviewed-by: Samuel Thibault <address@hidden>
> ---
> hw/usb/dev-serial.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
> index 96b6c34202..ef33bcd127 100644
> --- a/hw/usb/dev-serial.c
> +++ b/hw/usb/dev-serial.c
> @@ -29,7 +29,7 @@ do { printf("usb-serial: " fmt , ## __VA_ARGS__); } while
> (0)
> #define DPRINTF(fmt, ...) do {} while(0)
> #endif
>
> -#define RECV_BUF 384
> +#define RECV_BUF (512 - (2 * 8))
>
> /* Commands */
> #define FTDI_RESET 0
> --
> 2.24.1
>
--
Samuel
After watching my newly-retired dad spend two weeks learning how to make a new
folder, it became obvious that "intuitive" mostly means "what the writer or
speaker of intuitive likes".
(Bruce Ediger, address@hidden, in comp.os.linux.misc, on X the
intuitiveness of a Mac interface.)
- [PATCH 0/4] usb-serial: xHCI and timeout fixes, Jason Andryuk, 2020/03/12
- [PATCH 1/4] usb-serial: Move USB_TOKEN_IN into a helper function, Jason Andryuk, 2020/03/12
- [PATCH 2/4] usb-serial: chunk data to wMaxPacketSize, Jason Andryuk, 2020/03/12
- [PATCH 3/4] usb-serial: Increase receive buffer to 496, Jason Andryuk, 2020/03/12
- Re: [PATCH 3/4] usb-serial: Increase receive buffer to 496,
Samuel Thibault <=
- [PATCH 4/4] usb-serial: Fix timeout closing the device, Jason Andryuk, 2020/03/12
- Re: [PATCH 0/4] usb-serial: xHCI and timeout fixes, no-reply, 2020/03/12
- Re: [PATCH 0/4] usb-serial: xHCI and timeout fixes, no-reply, 2020/03/12