Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Sep 2022 12:58:52 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        bob prohaska <fbsd@www.zefox.net>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>, =?utf-8?Q?Klaus_K=C3=BCchemann?= <maciphone2@googlemail.com>
Subject:   Re: u-boot debug, was: Re: U-boot on RPI3, sees disk but won't boot it
Message-ID:  <38721E60-40DD-41F4-9E2E-73D6239ED268@yahoo.com>
In-Reply-To: <939C6F7E-4B92-4F72-9AFD-C29C8B59B42A@googlemail.com>
References:  <A8C2BA4E-4520-4B34-9614-DDC4D8BEB097@yahoo.com> <6AA65AE6-41F1-405F-A592-7D641EA4C9CF@yahoo.com> <E3A1C678-8C47-4283-9F9F-4C9011DB8A2B@yahoo.com> <20220929054120.GA77803@www.zefox.net> <D7A62820-4928-49F0-8387-C1E6D998B121@yahoo.com> <ABFBD0E6-8A9B-4C99-84DF-BF398F23678A@yahoo.com> <20220929151926.GA80020@www.zefox.net> <F316420B-C7AF-4131-9734-06117FFE212D@yahoo.com> <20220929170927.GB80020@www.zefox.net> <6C5019EC-B4A8-448F-9A85-4A98BC46F7DD@yahoo.com> <20220930002742.GA81169@www.zefox.net> <7A431698-1A8C-44BA-AFA2-EF5BAA69574F@googlemail.com> <924ED901-F9EB-4CFE-8376-1C2653FB6EBE@yahoo.com> <97AB11F6-2F4D-4026-8A96-50FC68B6EF8C@googlemail.com> <ED81813C-6F25-4751-BBCA-BC711684B219@yahoo.com> <5F180C78-BC07-4605-A042-0BEC8A6FD185@googlemail.com> <8CE490A2-B512-4170-95BC-D0584F2B254A@yahoo.com> <CB60B88E-982B-4EFE-9E40-9CD0C688E64A@googlemail.com> <939C6F7E-4B92-4F72-9AFD-C29C8B59B42A@googlemail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_A59A7C89-AA51-46CB-96C3-C756A893A854
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

On 2022-Sep-30, at 12:36, Klaus K=C3=BCchemann =
<maciphone2@googlemail.com> wrote:

> =E2=80=A6`found  someone in the WWW who fixed similar issues of an =
even earlier rpi-model=20
> by increasing/adding mdelay values,  no clue if something like that =
would be a valid test worth=E2=80=A6
> Like this :
> * requests in the first microframe, the stick crashes. Wait about
>         * one microframe duration here (1mS for USB 1.x , 125uS for =
USB 2.0).
>         */
> -       mdelay(1);
> +       mdelay(300);
>=20
> /* only support for one config for now */
>        err =3D usb_get_configuration_len(dev, 0);
> +       mdelay(100);
>=20
> usb_set_maxpacket(dev);
> +       mdelay(100);

I've included a patch-common_usb.c update with these lines
adjusted/added (with a suffix comment for each).

Reverting to the official rpi_arm64_fragment could be used
to also test without the debug output.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com

--Apple-Mail=_A59A7C89-AA51-46CB-96C3-C756A893A854
Content-Disposition: attachment;
	filename=patch-common_usb.c
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="patch-common_usb.c"
Content-Transfer-Encoding: 7bit

--- common/usb.c.orig	2022-04-04 07:31:32.000000000 -0700
+++ common/usb.c	2022-09-30 12:49:31.876729000 -0700
@@ -16,6 +16,8 @@
  * (C) Copyright 2001 Denis Peter, MPL AG Switzerland
  */
 
+#define LOG_DEBUG
+#define DEBUG
 /*
  * How it works:
  *
@@ -1098,10 +1100,11 @@
 	 * requests in the first microframe, the stick crashes. Wait about
 	 * one microframe duration here (1mS for USB 1.x , 125uS for USB 2.0).
 	 */
-	mdelay(1);
+	mdelay(300); //MMJNK: was: 1, comment above not adusted
 
 	/* only support for one config for now */
 	err = usb_get_configuration_len(dev, 0);
+	mdelay(100); //MMJNK: new mdelay
 	if (err >= 0) {
 		tmpbuf = (unsigned char *)malloc_cache_aligned(err);
 		if (!tmpbuf)
@@ -1119,6 +1122,7 @@
 	usb_parse_config(dev, tmpbuf, 0);
 	free(tmpbuf);
 	usb_set_maxpacket(dev);
+	mdelay(100); //MMJNK: new mdelay
 	/*
 	 * we set the default configuration here
 	 * This seems premature. If the driver wants a different configuration

--Apple-Mail=_A59A7C89-AA51-46CB-96C3-C756A893A854--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38721E60-40DD-41F4-9E2E-73D6239ED268>