From owner-freebsd-arm@freebsd.org Sun Jul 12 07:31:15 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 A8F7535B484; Sun, 12 Jul 2020 07:31:15 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B4JNy2RZPz4FWK; Sun, 12 Jul 2020 07:31:14 +0000 (UTC) (envelope-from melounmichal@gmail.com) Received: by mail-wm1-x341.google.com with SMTP id f18so9920858wml.3; Sun, 12 Jul 2020 00:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:reply-to:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UUB6qR05EYUhK+nl6j+/FveBlGjHcMTvWadtvbjevHo=; b=JdtNCEXtc8Qq2CujQPo6WGFsMzCf/fyfYQJe7Dw8WSw0kkAniI5ieiQEbzmLuL0n3S OJyA/BzQDsxhBfmFcR7dmjsrVXxqG/WRAWfonJRYz1LD6t67VIIKzdteTwTSsNVCPivj HtI1MxEYqLvaJwEnNkVhvzitpNaJmbWfMlnfI/CK8gJ/cWJI7HBFv4qRDW9dtk/ym7e/ gn9wSSfCgAuJ++Nl60E1cc/EcclA7lzsi69gEryeLvHMOSc0sKMUPSAf4OqKO8xrQQ9v OwiaYThwHQaO6BJhuysu99BmRrqHjLX3dBOgzpVrsQE0Na4d4IKk3yn7ylGPhxtpKjy8 zv8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:reply-to:subject:to:cc:references :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=UUB6qR05EYUhK+nl6j+/FveBlGjHcMTvWadtvbjevHo=; b=FSQTzrKbq8d+ErumxgDqzUfW8s7FuofH9e8lC7j5xgZlyl/VIzwuoz4PrEkfPWFmuw YdI4CscI7TLTZAo9kZvZSTfvGqCdA0I2/giioDYJ3JLizjiEHYxG4g1KWz0LcdZL/sOU HtyzxtHyPba3oPjml5KL3bfJzrNVRyPTU+QGEU/HHadKuh7P3/ik5MiAbTMdlsDeXRjG VR3QQoSyZn4BJH+uuPekFex7kMNBh7icQGy4V6WY5WJEBRpDxOgAIKooTYPov9uQgoZq zN55a6fWzcOuFFmceOB1aedWsIf2q4jTyoFIJYrR9cBZLZVmoWv3I3HPzRCBd/oF+FFE w86w== X-Gm-Message-State: AOAM531Y48S3mVwIt7ekg0gEZj7zZd+34FB797BV4L9sippLJ78wqACy Dztu2oIf8aCL/yC9j1tdj51hLO1hVCk= X-Google-Smtp-Source: ABdhPJzcFJIPN/e7WuntgRE0zJuUUvWkgCnoYHrjBl8MbWpa2Z8vSBcGs4iaZugaLLqXcASzzm6L0A== X-Received: by 2002:a1c:3bc1:: with SMTP id i184mr11516081wma.119.1594539072697; Sun, 12 Jul 2020 00:31:12 -0700 (PDT) Received: from [88.208.79.100] (halouny.humusoft.cz. [88.208.79.100]) by smtp.gmail.com with ESMTPSA id j6sm18556513wro.25.2020.07.12.00.31.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jul 2020 00:31:12 -0700 (PDT) Sender: Michal Meloun From: Michal Meloun X-Google-Original-From: Michal Meloun Reply-To: mmel@freebsd.org Subject: Re: OverDrive 1000 head -r360311 -> r363021 upgrade: USB & Ethernet disappeared, "usb_needs_explore_all: no devclass" (Now: artifact.ci bisect) To: Mark Millard , Robert Crowston Cc: Andrew Turner , freebsd-arm , FreeBSD Current 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> <4FACEC9A-4E07-4B5C-A184-7B8049CE3E1C@yahoo.com> Message-ID: Date: Sun, 12 Jul 2020 09:31:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <4FACEC9A-4E07-4B5C-A184-7B8049CE3E1C@yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4B4JNy2RZPz4FWK X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=JdtNCEXt; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of melounmichal@gmail.com designates 2a00:1450:4864:20::341 as permitted sender) smtp.mailfrom=melounmichal@gmail.com X-Spamd-Result: default: False [-3.11 / 15.00]; HAS_REPLYTO(0.00)[mmel@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.10)[-0.099]; FREEMAIL_TO(0.00)[yahoo.com,protonmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.02)[-1.018]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::341:from]; RCVD_TLS_ALL(0.00)[] 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 07:31:15 -0000 On 12.07.2020 8:37, Mark Millard via freebsd-arm wrote: > > >> On 2020-Jul-11, at 15:12, Mark Millard wrote: >> >> >>> >>> On 2020-Jul-11, at 14:45, Robert Crowston 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