mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] imx-usb-loader: skip initial SDP_ERROR_STATUS query for SDPS
@ 2022-09-27 17:31 Ahmad Fatoum
  2022-09-28 10:18 ` Info Skymem
  2022-10-04  7:45 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2022-09-27 17:31 UTC (permalink / raw)
  To: barebox; +Cc: Hans Christian Lønstad, Ahmad Fatoum

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH master] imx-usb-loader: skip initial SDP_ERROR_STATUS query for SDPS
  2022-09-27 17:31 [PATCH master] imx-usb-loader: skip initial SDP_ERROR_STATUS query for SDPS Ahmad Fatoum
@ 2022-09-28 10:18 ` Info Skymem
  2022-10-04  7:45 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Info Skymem @ 2022-09-28 10:18 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox, Hans Christian Lønstad

Hi,
thank you for your information.

On our website you can find email addresses of companies and people.
https://www.skymem.info

In short, it’s like Google for emails.

Best regards,
Robert,
Skymem team

On Tue, Sep 27, 2022 at 7:33 PM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
>
> 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
>
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH master] imx-usb-loader: skip initial SDP_ERROR_STATUS query for SDPS
  2022-09-27 17:31 [PATCH master] imx-usb-loader: skip initial SDP_ERROR_STATUS query for SDPS Ahmad Fatoum
  2022-09-28 10:18 ` Info Skymem
@ 2022-10-04  7:45 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2022-10-04  7:45 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox, Hans Christian Lønstad

On Tue, Sep 27, 2022 at 07:31:01PM +0200, Ahmad Fatoum wrote:
> 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(-)

Applied, thanks

Sascha

> 
> 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
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-04  7:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 17:31 [PATCH master] imx-usb-loader: skip initial SDP_ERROR_STATUS query for SDPS Ahmad Fatoum
2022-09-28 10:18 ` Info Skymem
2022-10-04  7:45 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox