mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] usb: gadget: fsl_udc: lower state_complete constraints
Date: Tue, 17 Oct 2023 23:36:07 +0200	[thread overview]
Message-ID: <20231017213608.3494255-4-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20231017213608.3494255-1-m.felsch@pengutronix.de>

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@pengutronix.de>
---
 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




  parent reply	other threads:[~2023-10-17 21:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 21:36 [PATCH 0/4] i.MX USB Loader Windows Fixes Marco Felsch
2023-10-17 21:36 ` [PATCH 1/4] scripts: common: fix read_file_2 for windows Marco Felsch
2023-10-17 21:36 ` [PATCH 2/4] scripts: common: fix buffer freeing Marco Felsch
2023-10-17 21:36 ` Marco Felsch [this message]
2023-10-17 21:36 ` [PATCH 4/4] imx-usb-loader: fix windows usage Marco Felsch
2023-10-18 10:46   ` Ahmad Fatoum
2023-10-18 12:53     ` Marco Felsch
2023-10-18 13:07       ` Ahmad Fatoum
2023-10-18 14:32         ` Marco Felsch
2023-10-18  8:18 ` [PATCH 0/4] i.MX USB Loader Windows Fixes Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231017213608.3494255-4-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox