[PATCH 3/4] usb: gadget: fsl_udc: lower state_complete constraints

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

 



Signal state_complete if the host send more data than specified first.
This may become crucial with different host usb loader tools and
different host OSes.

Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
---
 drivers/usb/gadget/udc/fsl_udc_pbl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/fsl_udc_pbl.c b/drivers/usb/gadget/udc/fsl_udc_pbl.c
index 6a4e0557fc..a5364decb1 100644
--- a/drivers/usb/gadget/udc/fsl_udc_pbl.c
+++ b/drivers/usb/gadget/udc/fsl_udc_pbl.c
@@ -136,7 +136,7 @@ static void dtd_complete_irq(struct usb_dr_device *dr)
 		actual += len - 1;
 		to_transfer -= len - 1;
 
-		if (to_transfer == 0)
+		if (to_transfer <= 0)
 			state = state_complete;
 	}
 
-- 
2.41.0





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux