[RFC] USB: check for transmissible packet sizes when matching endpoints

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Looking for a bulk endpoint to transfer data over
we need something that can transmit data.

Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx>
---
 drivers/usb/core/usb.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 2a938cf47ccd..d163bd279021 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -80,6 +80,9 @@ static bool match_endpoint(struct usb_endpoint_descriptor *epd,
 {
 	switch (usb_endpoint_type(epd)) {
 	case USB_ENDPOINT_XFER_BULK:
+		if (!usb_endpoint_maxp(epd))
+			return false;
+
 		if (usb_endpoint_dir_in(epd)) {
 			if (bulk_in && !*bulk_in) {
 				*bulk_in = epd;
-- 
2.43.0





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux