Date: Sun, 12 Jul 2020 09:31:12 +0200 From: Michal Meloun <meloun.michal@gmail.com> To: Mark Millard <marklmi@yahoo.com>, Robert Crowston <crowston@protonmail.com> Cc: Andrew Turner <andrew@freebsd.org>, freebsd-arm <freebsd-arm@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: OverDrive 1000 head -r360311 -> r363021 upgrade: USB & Ethernet disappeared, "usb_needs_explore_all: no devclass" (Now: artifact.ci bisect) Message-ID: <d25c2e4e-5679-e914-10ef-a9e89a303a1e@freebsd.org> In-Reply-To: <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> <Abd9xeqh4ZgNFdiT18IY_5mTm9HPRdNneFmsfQLS495N91bPX6movFRqd9kEoEAlvqqHT7anHkgwlslKhyvM72wL6qMM8axpOVCx7pbQyHQ=@protonmail.com> <9FBC6DEB-23FA-4FA2-AB10-3D6BDC4CE010@yahoo.com> <4FACEC9A-4E07-4B5C-A184-7B8049CE3E1C@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12.07.2020 8:37, Mark Millard via freebsd-arm wrote: > > >> On 2020-Jul-11, at 15:12, Mark Millard <marklmi at yahoo.com> wrote: >> >> >>> >>> On 2020-Jul-11, at 14:45, Robert Crowston <crowston@protonmail.com> wrote: >>> >>> So what is the mistake I made here? >>> >>> 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. >>> >>> 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? >>> >>> Let me know how I can help fix it! >>> >>> -- RHC. >> >> 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. >> > > 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 > =================================================================== > --- /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); > > 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); > > > 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. > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > Fixed in r363121. Thanks for the report. Michal Meloun
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d25c2e4e-5679-e914-10ef-a9e89a303a1e>