Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Dec 2016 02:41:16 -0800
From:      Mark Millard <markmi@dsl-only.net>
To:        Michael Sperber <sperber@deinprogramm.de>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Can't get 11.0-RELEASE to boot on Banana PI M3
Message-ID:  <DFC35888-2FAF-4E50-9876-C0DBC8139410@dsl-only.net>
In-Reply-To: <53608BFE-4653-4407-AFBE-7AB5E45AF2C1@dsl-only.net>
References:  <y9l7f7t2smo.fsf@jellaby.local> <20161124222152.dfd02dcafdc25182b6b46e50@bidouilliste.com> <66508AA3-436A-4D9E-AAB5-B85D0B4FC40C@dsl-only.net> <y9leg1w11yy.fsf@jellaby.local> <A218DF6A-4EFA-4EB7-99EC-8DA2E077DE3F@dsl-only.net> <y9lzikfbl8x.fsf@jellaby.local> <9C8B313C-A058-44DF-8673-D23B481CE312@dsl-only.net> <y9loa0ua6ge.fsf@jellaby.local> <1E9515A0-06D5-4CF9-9D29-D6FF591686F4@dsl-only.net> <y9loa0t87um.fsf@jellaby.local> <53608BFE-4653-4407-AFBE-7AB5E45AF2C1@dsl-only.net>

next in thread | previous in thread | raw e-mail | index | archive | help
[I've now gotten some of those=20
"soft reset timed out"/"awg0 attach returned 60"
notices.]

On 2016-Dec-3, at 1:01 PM, Mark Millard <markmi at dsl-only.net> wrote:

> On 2016-Dec-3, at 5:23 AM, Michael Sperber <sperber at =
deinprogramm.de> wrote:
>=20
>> Mark Millard <markmi at dsl-only.net> writes:
>>=20
>>> /dev/da0 is not the same as /dev/mmcsd0 . /dev/da0 is the
>>> interface to the SATA port. That hardware is accessed over
>>> USB on the BPi-M3.
>>=20
>> Ah, now I understand.  Sorry for my being stupid about this!
>>=20
>> I finally noticed this:
>>=20
>> eval: cannot open /etc/fstab: No such file or directory
>>=20
>> And indeed /etc/fstab is not there - creating one fixed that problem.
>=20
> In . . ./crochet/board/BananaPi-M3/overlay/etc/ there should be:
>=20
> # ls
> fstab   rc.conf rc.d
>=20
> When things work right these are simply copied.
>=20
> If one of these files was not copied over then it may be that
> some other(s) were not copied over as well.
>=20
>> (Shouldn't Crochet have created one?)  So that leaves the Ethernet
>> problem.  I get this:
>>=20
>> awg0: <Allwinner Gigabit Ethernet> mem 0x1c30000-0x1c300ff on =
simplebus0
>> awg0: soft reset timed out
>> device_attach: awg0 attach returned 60

I moved the BPi-M3 into a new environment and it now gets
this sequence much of the time --but not always.

It seems to help to have cut the power before rebooting:
"shutdown -p now" and then unplugging and re-plugging the
power when it is done. (So far anyway: I may be reading
too much into what I've seen so far.)

All  this suggests that some environmental condition is
sufficient to lead to the notices and to the associated
lack of a normal Ethernet configuration when booting
completes.

Note: in the old context and the new one the rest of the
Ethernet-capable equipment around seems to be working fine.

>> Any ideas on that one?  Broken hardware?  I see the awg driver is =
fairly
>> new - is 11.0-RELEASE recent enough?
>=20
> awg Ethernet support was added about 2 months before head
> -r304406 was turned into stable/11 -r304408 based on the
> svn history: Ethernet added for A83T back on 2016-May-4
> ( -r299084 ).
>=20
>> --=20
>> Regards,
>> Mike
>=20
> While I do not know anything about the details I can find the
> source code for the "soft reset timed out":
>=20
> 1122	static int
> 1123	awg_reset(device_t dev)
> 1124	{
> 1125	        struct awg_softc *sc;
> 1126	        int retry;
> 1127=09
> 1128	        sc =3D device_get_softc(dev);
> 1129=09
> 1130	        /* Soft reset all registers and logic */
> 1131	        WR4(sc, EMAC_BASIC_CTL_1, BASIC_CTL_SOFT_RST);
> 1132=09
> 1133	        /* Wait for soft reset bit to self-clear */
> 1134	        for (retry =3D SOFT_RST_RETRY; retry > 0; retry--) {
> 1135	                if ((RD4(sc, EMAC_BASIC_CTL_1) & =
BASIC_CTL_SOFT_RST) =3D=3D 0)
> 1136	                        break;
> 1137	                DELAY(10);
> 1138	        }
> 1139	        if (retry =3D=3D 0) {
> 1140	                device_printf(dev, "soft reset timed out\n");
> 1141	#ifdef AWG_DEBUG
> 1142	                awg_dump_regs(dev);
> 1143	#endif
> 1144	                return (ETIMEDOUT);
> 1145	        }
> 1146=09
> 1147	        return (0);
> 1148	}
>=20
> I'd guess that the message indicates a hardware problem.

That is no longer my guess.

> As I've suggested before: you could see of an official
> Linux also fails to initialize the Ethernet interface.
> Once checked:
>=20
> A) If Linux did fail as well then blame the hardware.

Likely the wrong blame. . .

> B) If Linux worked then get the FreeBSD folks that work
>   on the A83T/ALLWINNER support to look into the issue.

But this procedure is still useful: Linux might handle
a condition that FreeBSD does not well handle in this
case.

> My guess is the that FreeBSD folks would want a build
> with that AWG_DEBUG enabled and information from the
> "dump" that it makes if Linux worked.

Stil true.

If the issue persists in my context I might be able to
get such a awg register dump.

=3D=3D=3D
Mark Millard
markmi at dsl-only.net





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DFC35888-2FAF-4E50-9876-C0DBC8139410>