From nobody Thu Jun 23 18:22:19 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 3141285A774; Thu, 23 Jun 2022 18:22:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LTTB65Ykqz3l5N; Thu, 23 Jun 2022 18:22:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656008543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cmlu0vh7uSyMdZH+ZeZXgm7U/2BTrQV1i2dOpYqutxU=; b=P3sjneLpnG1mORJ7Vfn7FmgLG8PYfPXaloKyH/ayJDoOykwGzrKu4py+P6tg79JFkO+HAG QOpaphSyn9q2APFrupGb7kfS/BlHA5RQM7B3Lx88TVPtNn8ijtmTR+WSI6sJ2lFev+oACX 04b6eVV4YTDZKdvd8oa+9zyYGQgsJpD3xflU5XEhb7BSygBS+SY2THVH60IW9S8dj7r1bj J6KHSt8CRt62E4XA44V/LJAk2Cd4/veIurdViggDxGg7R+asLp5Ag5kStx7RFrh15M7ofG TTmDh33mggaKeOBOuwJ0Ip91s0drQqQPa4vU8dLjZjgjAkv1iEm0QY6OP3dR/Q== Received: from [10.0.1.4] (ralph.baldwin.cx [66.234.199.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 02F3E1504; Thu, 23 Jun 2022 18:22:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <04bd822f-5edc-56e0-c45f-1f3d88a421d7@FreeBSD.org> Date: Thu, 23 Jun 2022 11:22:19 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: git: 36a8572ee8f5 - main - bus_if: provide a default null rescan method Content-Language: en-US To: Mitchell Horne , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202206231816.25NIG5aL014878@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202206231816.25NIG5aL014878@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656008543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cmlu0vh7uSyMdZH+ZeZXgm7U/2BTrQV1i2dOpYqutxU=; b=F/jmIbizNrsvRdIL+X8y8MYq72VT4vSdLkbb45iYV1+2Wyz4No9eJ54hFhlrgFHtP3gCGB dfRjwTFXFyVGtxLRkDKZj14rz1/YLdQ31Sut1mOSe1QnS7JV63A1GSMSgPsFkjQHNAX+o1 oE7UOdlHa4g6I/6BjVzRuVFtx2aUd17Amb+w/z/OE5wUsuiZc8o/ThCTwgHchoVB5ll5NR d0MhZImK0xwK8oTwQNDJc9DJdeOgwB3fshmOl76LcyOL8DsKOij62nejiz1yP3FxNGdz0N DXq1i+v3YE25rtcdCfE3o8RHxXTUJOqPS54SpjfZGFx6fhAPkTljqvUFuNk8+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656008543; a=rsa-sha256; cv=none; b=LfwYmWFLbBH79fYLNCmw3qINEcbQ9Gg20Qabj0yRpr32+4bREgP3RmKXrIGqYu0OXHJM6P KcTROUHsN7gmj3zv2Xu+V4PbVx2GheQuPtcrKrk1nZFBYlrACP9O7OH0qDgbPwP82PWwxa 4rfktTPHLLBOeIdR5RTnDb1DWQQZ0JuRtVM0OsgW7t9RTmTZ5CV3x2qxVZTqPWlh3g63Uw YOT3QML5Z2g60SZ13svlJFA+7d2AGPcGNd6i8RbOzcs/I9y9OgQaiO0ioW+jZTdW0crr5X pbruVU79tO/4DYbBEmDSP9EEFmBZjkMrASEm75NcSVCpnaVadxs73RPSnpm1Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 6/23/22 11:16 AM, Mitchell Horne wrote: > The branch main has been updated by mhorne: > > URL: https://cgit.FreeBSD.org/src/commit/?id=36a8572ee8f5db7ecb64bedc5738a363ec7cad36 > > commit 36a8572ee8f5db7ecb64bedc5738a363ec7cad36 > Author: Mitchell Horne > AuthorDate: 2022-06-21 13:29:53 +0000 > Commit: Mitchell Horne > CommitDate: 2022-06-23 18:15:10 +0000 > > bus_if: provide a default null rescan method > > There is an existing helper method in subr_bus.c, but almost no drivers > know to use it. It also returns the same error as an empty method, > making it not very useful. Move this to bus_if.m and return a more > sensible error code. > > This gives a slightly more meaningful error message when attempting > 'devctl rescan' on buses and devices alike: > "Device not configured" --> "Operation not supported by device" > > Reviewed by: imp > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D35501 The cardbus.c and ofw_pcibus.c changes are bugs. These drivers inherit from the PCI bus so inherit the PCI bus method by default. The null rescan was on purpose as an override of the inherited method. I'm fine with changing the default to bus_null_rescan, but the method needs to stay so that subclasses of bus drivers can override it back to null. -- John Baldwin