From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=DATE_IN_PAST_06_12,DKIM_SIGNED, DKIM_VALID autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 15585 invoked from network); 26 Jan 2021 11:13:33 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 26 Jan 2021 11:13:33 -0000 Received: from a11-75.smtp-out.amazonses.com ([54.240.11.75]) by 1ess; Mon Jan 25 22:40:38 -0500 2021 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1611632109; h=From:Content-Type:Content-Transfer-Encoding:Mime-Version:Subject:Date:References:To:In-Reply-To:Message-Id:Feedback-ID; bh=6jU5/SHfKr6bQSGPyjiOsffed92P6UsA+lo1d+8EEck=; b=jTVa6/+44z6u9R6l3OYbVdF4BkN2+Q2HUYNEK6f9BO2KSLnBrbvGwn4HXrltVi5p 3Q9oiVKXzfQ2oxW4u39aByqR9+AlsAsAyJCBF1vbkO1PTOVmrPak7HvEBz13OVObRvt u2dF2CWKGEwBy4aIgbEwyX0sgTdMQc3D7GrvUVDI= X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=98.216.163.228; envelope-from=; From: Mack Wallace Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.1\)) Date: Tue, 26 Jan 2021 03:35:08 +0000 References: <5B3B970A411ADBCC5D32FFDFAB1E4D3E@felloff.net> To: 9front@9front.org In-Reply-To: <5B3B970A411ADBCC5D32FFDFAB1E4D3E@felloff.net> Message-ID: <010001773cc26554-a456b631-4a33-4832-a4b0-ee187a34411d-000000@email.amazonses.com> X-Mailer: Apple Mail (2.3608.120.23.2.1) X-Authenticated-User: mackbw@mapinternet.com X-SES-Outgoing: 2021.01.26-54.240.11.75 Feedback-ID: 1.us-east-1.X+xhoL9JiEQ8K0gzGjV36WZnSewOzOs8YCWuakKsLBY=:AmazonSES List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: ACPI self-signing map/reduce hardware Subject: Re: [9front] 9front on Raspberry Pi 400 Reply-To: 9front@9front.org Precedence: bulk I tried the kernel this. evening,=20 After detection of CPU 1, 2, and 3 (not necessarily in that order), I = get the following lines xhci 600000000: controller not ready before reset: 00000815 xhci 600000000: controller not halted after reset: 00000815 xhci 600000000: controller not ready after run: 0000080d #l0: phy1 id 600d84a2 oui 80361 xhci 600000000: controller not ready before reset: 0000080d sdhc: read error intr 2008002 stat 1fff0000 ... sdhc: read error intr 2008002 stat 1fff0000 emmc: cmd 123a0033 arg 0 error intr 2008003 stat 1fff0000 sdhc: read error intr 2008002 stat 1fff0000 ... sdhc: read error intr 2008002 stat 1fff0000 bootargs is (tcp, tls, il, local!device)[]xhci 600000000: controller not = halted after reset: 00000811 xhci 600000000: controller not ready after run: 0000080d xhci 600000000: controller not ready before reset: 0000080d xhci 600000000: controller not halted after reset: 00000811 xhci 600000000: controller not ready after run: 0000080d xhci 600000000: controller not ready before reset: 0000080d xhci 600000000: controller not halted after reset: 00000811 =E2=80=A6 {repeats} I unfortunately forgot my jumper wires at home, so I wasn=E2=80=99t able = to set up the serial port. Will try tomorrow. Thanks, Mack > On Jan 24, 2021, at 10:01 AM, cinap_lenrek@felloff.net wrote: >=20 > Ok, i also added a bunch of debug prints into the > xhci driver (in addition to the GIC debug prints) > and updated the pi9 kernels in these url locations: >=20 > http://felloff.net/usr/cinap_lenrek/9pi4 (kernel = for sdcard) > http://felloff.net/usr/cinap_lenrek/s9pi4 (a.out = for debug symbols) > http://felloff.net/usr/cinap_lenrek/usbxhci.c (changed file) >=20 > sha1 checksums: >=20 > 0ddfe8a7c00164dc8a07c71219b3ab5eba48da6e 9pi4 > 2f7bc6b6f6ae514b977c6411f27d548eb183d5b1 s9pi4 >=20 > and the diff: >=20 > diff -r 5c327eddc496 sys/src/9/port/usbxhci.c > --- a/sys/src/9/port/usbxhci.c Sat Jan 23 20:36:09 2021 -0800 > +++ b/sys/src/9/port/usbxhci.c Sun Jan 24 15:53:30 2021 +0100 > @@ -397,18 +397,32 @@ > return nil; > } >=20 > +static int > +pollwait(u32int *reg, u32int mask, u32int val, int timeout) > +{ > + while((*reg & mask) !=3D val) { > + if(timeout <=3D 0) > + return -1; > + timeout -=3D 10; > + if(up !=3D nil && islo()) > + tsleep(&up->sleep, return0, nil, 10); > + else > + delay(10); > + } > + return 0; > +} > + > static void > handoff(Ctlr *ctlr) > { > u32int *r; > - int i; >=20 > if((r =3D xecp(ctlr, 1, nil)) =3D=3D nil) > return; > if(getconf("*noxhcihandoff") =3D=3D nil){ > r[0] |=3D 1<<24; /* request ownership */ > - for(i =3D 0; (r[0] & (1<<16)) !=3D 0 && i<100; i++) > - tsleep(&up->sleep, return0, nil, 10); > + if(pollwait(&r[0], 1<<16, 0, 1000) < 0) > + print("xhci %llux: handoff timeout\n", = ctlr->base); > } > /* disable SMI interrupts */ > r[1] &=3D 7<<1 | 255<<5 | 7<<17 | 7<<29; > @@ -421,11 +435,9 @@ > shutdown(Hci *hp) > { > Ctlr *ctlr =3D hp->aux; > - int i; >=20 > ctlr->opr[USBCMD] =3D 0; > - for(i=3D0; (ctlr->opr[USBSTS] & HCH) =3D=3D 0 && i < 10; i++) > - delay(10); > + pollwait(&ctlr->opr[USBSTS], HCH, HCH, 100); > intrdisable(ctlr->pcidev->intl, hp->interrupt, hp, = ctlr->pcidev->tbdf, hp->type); > pcidisable(ctlr->pcidev); > } > @@ -477,13 +489,16 @@ > ctlr->hccparams =3D ctlr->mmio[HCCPARAMS]; > handoff(ctlr); >=20 > - for(i=3D0; (ctlr->opr[USBSTS] & CNR) !=3D 0 && i<100; i++) > - tsleep(&up->sleep, return0, nil, 10); > + if(pollwait(&ctlr->opr[USBSTS], CNR, 0, 1000) < 0) > + print("xhci %llux: controller not ready before reset: = %.8ux\n", > + ctlr->base, ctlr->opr[USBSTS]); >=20 > ctlr->opr[USBCMD] =3D HCRST; > delay(1); > - for(i=3D0; (ctlr->opr[USBSTS] & (CNR|HCH)) !=3D HCH && i<100; = i++) > - tsleep(&up->sleep, return0, nil, 10); > + > + if(pollwait(&ctlr->opr[USBSTS], CNR|HCH, HCH, 1000) < 0) > + print("xhci %llux: controller not halted after reset: = %.8ux\n", > + ctlr->base, ctlr->opr[USBSTS]); >=20 > pcisetbme(ctlr->pcidev); > intrenable(ctlr->pcidev->intl, hp->interrupt, hp, = ctlr->pcidev->tbdf, hp->type); > @@ -593,8 +608,10 @@ > coherence(); >=20 > ctlr->opr[USBCMD] =3D RUNSTOP|INTE|HSEE|EWE; > - for(i=3D0; (ctlr->opr[USBSTS] & (CNR|HCH)) !=3D 0 && i<100; i++) > - tsleep(&up->sleep, return0, nil, 10); > + > + if(pollwait(&ctlr->opr[USBSTS], CNR|HCH, 0, 1000) < 0) > + print("xhci %llux: controller not ready after run: = %.8ux\n", > + ctlr->base, ctlr->opr[USBSTS]); >=20 > kproc("xhcirecover", recover, hp); > } >=20 > -- > cinap >=20