From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: "Hans Christian Lønstad" <hcl@datarespons.no>,
"Ahmad Fatoum" <a.fatoum@pengutronix.de>
Subject: [PATCH master] imx-usb-loader: skip initial SDP_ERROR_STATUS query for SDPS
Date: Tue, 27 Sep 2022 19:31:01 +0200 [thread overview]
Message-ID: <20220927173101.1696673-1-a.fatoum@pengutronix.de> (raw)
We do an initial do_status() every time, which fails for i.MX8MP and
i.MX8MN:
found i.MX8MP USB device [1fc9:0146]
4 in err=-9, last_trans=0 00 00 00 00
status failed
If we instead skip it for SDPS (i.e. hid_endpoint), upload works as
expected (tested on i.MX8M Nano).
Reported-by: Hans Christian Lønstad <hcl@datarespons.no>
Fixes: 23e2203150b6 ("imx-usb-loader: Add i.MX8MP support")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
scripts/imx/imx-usb-loader.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c
index 1242f2dedda5..a98ab0e33f8a 100644
--- a/scripts/imx/imx-usb-loader.c
+++ b/scripts/imx/imx-usb-loader.c
@@ -1628,10 +1628,12 @@ int main(int argc, char *argv[])
goto out;
}
- err = do_status();
- if (err) {
- printf("status failed\n");
- goto out;
+ if (!mach_id->hid_endpoint) {
+ err = do_status();
+ if (err) {
+ printf("status failed\n");
+ goto out;
+ }
}
if (initfile) {
--
2.30.2
next reply other threads:[~2022-09-27 17:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 17:31 Ahmad Fatoum [this message]
2022-09-28 10:18 ` Info Skymem
2022-10-04 7:45 ` 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=20220927173101.1696673-1-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=hcl@datarespons.no \
/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