From owner-freebsd-arm@freebsd.org Sun Jul 12 06:37:12 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BFA9B359B6C for ; Sun, 12 Jul 2020 06:37:12 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-23.consmr.mail.gq1.yahoo.com (sonic304-23.consmr.mail.gq1.yahoo.com [98.137.68.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4HBb4GZmz4BV2 for ; Sun, 12 Jul 2020 06:37:11 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: UBh7QREVM1lykxwMs7RxZ2Py_c4HovBhUQXuIjSI2LWAG1OuLiPtUw1fVi0fG5n tsScTBXZPL3ST8GdvRJcJVAwompHzdvBJmccNu0LFLG0zQBNibfZTvEjWATheKUmD6S3N_uPfvfC TVxZSV1usqhCO1otVjCVFrrATXWKXE4eMGZBi53gZz_dvMB1ZrAGBtFo73dgq5ohSZfauzySRNe_ U8G_8Uz8T79ZJXQZPI0nAeX65BxswzN8pZOGyEQc9QuZLqqGt9FqyaYzZ2eNRObOxWl7w.pUQS_. WzwQgolqJh0pJMNw.1cnk7oczbTRumsDKjxvnQn6WLBy0eCVDB9__g_YsZZ757QSon1b.nPjS3Oh OUYyxgRrJcfKrf93W8HJ9OQTnlnJ6FM4izGIj0ee4FZNTPgz_A5qj098PosN_4V3fpXVuVmfM_eq nnL8D2WWCqQdEDNYNrcfKb7r_6NCAVRMaFLBX7K56UK6RCOivewiP6pocD.k9VpHSMQJ9D2Ng8Pz YNiW9zqo4xT4448EhmcNoAZ6uJOcVSjRbyfaYXi7sbKEka7r.joSfZb3ockUKZS1nKH8LNWNn9sJ lXuIjrnyiOn8lc9dn.UrqIUZJXVgbYJ0JJVg8U97nP41DY46wM0rEp_aLtFjO68ta.5QyAzYBI8Y 9uq82Vl1.kN4hLmZ5beaJIFfI8G9gJimcCAcnekjlJpKW9qgeW.51HVCawFg0kaAdHC_595ctwuE V_Qkl2I28GS921aukS8DISSeRMDMFdqZcNB9qZyC3lkiRpHmQ5_5KPdA0Ajmk1Ap.P1hMdgU6QSL Qk_L.lDdt.VaoSNbwaZieW8L8NWYvIxdAT_Che0R9gf88Z2jbk96fe2QuQWy_tXt83M0emi.6GFH UTeQgaHsTQu5ncCNuIZeGDCE6gsvCaw_sPjGwUzuCBsiW2trZEpgCaj3Lb6.7kbEWw9Q_eS4i7E8 S3qzHqMd4ofv1ZrUWwhqxn6X8gRxrOkQ8qXOSwEObBEofhqv36vTGwjExysOEy6QWWxwZuLKU2DV UqAyuKLRUEunnj95WUpVoR0tykyKcuoSoM.ifXHCiQKY7tB8mYUrkBqlYWf82gr.33xK8P7QLzEb Ooa7FSiK3z5jqsqgpjBFx7.NfVIbKVa8PbzSWn5FPHZ5ZQC0oTTrUUjvqkmfNcmxElT9fd4uoS4_ We5Y1UTHoKfoF8HMZUu_4LGNv0FQQOVKR6kcPfZq4bRG54efSyNVZuRGEpAi6KxwWpWDpqeSiqze n.xJFKvPRH7cInnqRrJRQWOFAXv7tTOqDuST_HWvfGYDMCwUFC5t8oq.0pSSG7V1MAv4TTwSezYd sgqfrUnLIpzz3JSWhFQXPryS5kxmyG0vV2nMOc1Mu4B0.mM9hrgLi7qLbXNgEfjOKvibyYaLxWq5 Qm48o5oImiXiARETklhPWpLZDAqO7pzxC44RROueWP6fkxyuRmf8dZXl903J3lJU- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Sun, 12 Jul 2020 06:37:10 +0000 Received: by smtp422.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 1c795fcc920c17f9012ac80620effc32; Sun, 12 Jul 2020 06:37:08 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: OverDrive 1000 head -r360311 -> r363021 upgrade: USB & Ethernet disappeared, "usb_needs_explore_all: no devclass" (Now: artifact.ci bisect) From: Mark Millard In-Reply-To: <9FBC6DEB-23FA-4FA2-AB10-3D6BDC4CE010@yahoo.com> Date: Sat, 11 Jul 2020 23:37:07 -0700 Cc: Andrew Turner , freebsd-arm , FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <4FACEC9A-4E07-4B5C-A184-7B8049CE3E1C@yahoo.com> References: <6E0B6750-273C-468A-9233-E868B0674F34@yahoo.com> <8AA99118-C9C5-4CC7-83C6-2A85DFF9CBE1@yahoo.com> <334D89BD-2F7A-4BF1-AB96-2D6B273BBCD3@yahoo.com> <8CA66D0C-BA19-41D1-A67C-B54ED1B6EE79@yahoo.com> <9FBC6DEB-23FA-4FA2-AB10-3D6BDC4CE010@yahoo.com> To: Robert Crowston X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 4B4HBb4GZmz4BV2 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.80 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.27)[-0.272]; FREEMAIL_TO(0.00)[protonmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.01)[-1.013]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.01)[-1.013]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.204:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.204:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2020 06:37:12 -0000 > On 2020-Jul-11, at 15:12, Mark Millard wrote: >=20 >=20 >>=20 >> On 2020-Jul-11, at 14:45, Robert Crowston = wrote: >>=20 >> So what is the mistake I made here? >>=20 >> Should I have given a globally unique name as the first argument to = DRIVER_MODULE()? I didn't see that in the man page, and other examples = of pcib drivers apparently get away with it. >>=20 >> I did notice the weird message about "driver already loaded from = kernel". I wondered if that meant I was dragging in code to the core = kernel, that would otherwise live in an external module? >>=20 >> Let me know how I can help fix it! >>=20 >> -- RHC. >=20 > It is not an area of expertise for me. I've spent hours just > getting to the point of sending the notes that I have sent. >=20 Having found no evidence of any likely disaster from trying the experiment, I've tried: # svnlite diff /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c Index: /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c (revision = 363021) +++ /usr/src/sys/arm/broadcom/bcm2835/bcm2838_pci.c (working copy) @@ -739,5 +739,5 @@ sizeof(struct bcm_pcib_softc), generic_pcie_fdt_driver); =20 static devclass_t bcm_pcib_devclass; -DRIVER_MODULE(pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, 0, = 0); +DRIVER_MODULE(bcm_pcib, simplebus, bcm_pcib_driver, bcm_pcib_devclass, = 0, 0); =20 This was enough of a change for Ethernet and USB to become available again on the OverDrive 1000. Apparently one must search all existing DRIVER_MODULE use and then pick naming to have the new DRIVER_MODULE(NAME,BUSNAME,... end up with the NAME,BUSNAME as a unique combination of names (or combinations for when there is BUSNAME0, BUSNAME1, . . .). I also updated the USB3 SSD I use for booting either RPi4 or Rock64. Be warned that the RPi4 boots are via UEFI v1.16 use instead of by sysutils/u-boot-rpi4 use. I do not have things set up for sysutils/u-boot-rpi4 as stands. The SSD booted both contexts fine and the USB worked like normal. On the Rock64, the built-in EtherNet also worked fine. For the RPi4, a USB3 EtherNet adapter is used and it worked fine. If someone checks sysutils/u-boot-rpi4 operation and finds that it works, then I expect that such a patch as above is all that is required. Note: If future bcmDDDDD's need similar code, care will need to be taken naming ???? in DRIVER_MODULE(????,... for them so that uniqueness is maintained. My use of "bcm_" to match the context is not the only prefix that would lead to unique naming currently. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)