From 652efae78c00b812033ea162d76cd13bd40dcab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 9 Jun 2025 14:27:29 +0200 Subject: New upstream version 1.4.0 --- backend/hp5590_low.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'backend/hp5590_low.c') diff --git a/backend/hp5590_low.c b/backend/hp5590_low.c index 2d19dcf..7038f43 100644 --- a/backend/hp5590_low.c +++ b/backend/hp5590_low.c @@ -99,9 +99,15 @@ struct usb_in_usb_ctrl_setup { #define CORE_FLAG_NOT_READY 1 << 1 /* Bulk transfers are done in pages, below their respective sizes */ +/* + * Note that we limit the amount we can supply to sane_read() to avoid + * clashes with the size of the internal read buffer. + * + */ #define BULK_WRITE_PAGE_SIZE 0x0f000 #define BULK_READ_PAGE_SIZE 0x10000 -#define ALLOCATE_BULK_READ_PAGES 16 /* 16 * 65536 = 1Mb */ +#define ALLOCATE_BULK_READ_PAGES 17 /* 16 * 65536 = 1Mb */ +#define MAX_READ_PAGES 16 /* maximum that we will return to sane_read() */ /* Structure describing bulk read state, because bulk reads will be done in * pages, but function caller uses its own buffer, whose size is certainly -- cgit v1.2.3