From nobody Mon Aug 14 18:06:18 2023 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 4RPj5846tcz4TntN; Mon, 14 Aug 2023 18:06:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4RPj58353Bz4Fjx; Mon, 14 Aug 2023 18:06:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692036380; 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=tJS7klJbyAlqp6x0fcpVM6IvLYmW1MYsxDCqWHaylBM=; b=OdrihMjULvyvDOHBU4xo4gnMUrcPCm3EFyze7UfQFwPGcP51JA1JqADUC5o2Tgn7BmnxY9 ebSHtctJAiVNzha/5nq0YMpcO6lKL9RGLNHClhQ7PPGE+xYc51l0UX4FzNaJ85ckJFiLE6 zELvTJuK3kVCP4KLDxTHGMSXrhCaoDMWNN+iHSR/31IHNPrtQJ8kwnmZR8F1tCFJISlZMt cO2/Pxi+ucDW78vjjns1nAEcXNivVTkP9tb6gsBvp0eEmYRtGv7JpWbMMDwg43ZNn0dYxs PAD9ulYi1FhwzpbVNQKmvLZqE+NtkhLC1UGKMznLov10BmRGsUBEdvxkqTQ2Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692036380; 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=tJS7klJbyAlqp6x0fcpVM6IvLYmW1MYsxDCqWHaylBM=; b=d1JBq3TSU+imn2RA7IxRNnJDTipTBg+vFUMHQCupL+XZ5dzri3FPl6PutrrGuWe39yvOoc vf11eHjXMmI+p3/hTB4ej6A1wZxhgwOqAGfwUZCDLe6Wwzt0vuWNZpP90B+kztIKM3gR+E VMmkAkVJpEhWeMEl/0zOmBKiyKevUNR1DZ9GJGn/T8gYGFIWXKWmfG08tL6yJJ9U1G9sAi T6wbgjmX6ZydeBAssOvIZxZnX79r1gLgFVRmifRKWBTfClaGyKn8aLD29t8d3qYbzT2VQN LNu1ZrSp2jR/UOI4uzjHwpgn4tmRHvEsWXox8eRt4IGNCOrq5BhiDan+Lzp70g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692036380; a=rsa-sha256; cv=none; b=TO9u4qp5JW/ErmdNLqWH5XjajwgoeNNYCsWE7kPfUKskixGRYHNKZe2zdwjyHmJwHfZllH IJn3ufAM6WnEeq84IFUtJDYWNy0YhLyXxQzOZ6G+mrv24xhuxwkFTmxbOa43fPZuON15xo X+AYaAdQY/qcs46+ZTlwd3OKyntkpoBqeMG/maCDYs7GFOAKsVxfDNw+VZrBM6/OJUBkYW ATSO/0DsN53eUwhPlpTQMntEcj34AURelssAYV+6rjRHzfyRNkBXTTnOwiGigA81IpNdGv iONELqYETsLQ/xATI/ZhS+9unwTHvwcnUlOiizYPC/ECV46woVW4zijo+CJIYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:648:8683:a9e0:245c:e6ba:2131:1b31] (unknown [IPv6:2601:648:8683:a9e0:245c:e6ba:2131:1b31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RPj5764HHz5n; Mon, 14 Aug 2023 18:06:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <885195f6-2dbd-4890-affc-5571404e9982@FreeBSD.org> Date: Mon, 14 Aug 2023 11:06:18 -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:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: git: 69f8cc60aa1e - main - ofw_firmware: Only match if there is no compatible Content-Language: en-US To: Emmanuel Vadot , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202308130919.37D9JtjW003148@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202308130919.37D9JtjW003148@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/13/23 2:19 AM, Emmanuel Vadot wrote: > The branch main has been updated by manu: > > URL: https://cgit.FreeBSD.org/src/commit/?id=69f8cc60aa1e3140f41a75c859333a3d56c947fb > > commit 69f8cc60aa1e3140f41a75c859333a3d56c947fb > Author: Emmanuel Vadot > AuthorDate: 2023-08-13 06:28:13 +0000 > Commit: Emmanuel Vadot > CommitDate: 2023-08-13 09:19:44 +0000 > > ofw_firmware: Only match if there is no compatible > > If there is a compatible string it likely means that the firmware needs > a dedicated driver (like on RPI*). > > PR: 273087 > Tested-by: Mark Millard > Sponsored by: Beckhoff Automation GmbH & Co. KG > Fixes: fdfd3a90b6ce ("ofw: Add a ofw_firmware driver") > --- > sys/dev/ofw/ofw_firmware.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/sys/dev/ofw/ofw_firmware.c b/sys/dev/ofw/ofw_firmware.c > index faba123c3e09..7d62fc317c1d 100644 > --- a/sys/dev/ofw/ofw_firmware.c > +++ b/sys/dev/ofw/ofw_firmware.c > @@ -100,11 +100,14 @@ ofw_firmware_add_device(device_t dev, phandle_t node, u_int order, > static int > ofw_firmware_probe(device_t dev) > { > - const char *name; > + const char *name, *compat; > > name = ofw_bus_get_name(dev); > if (name == NULL || strcmp(name, "firmware") != 0) > return (ENXIO); > + compat = ofw_bus_get_compat(dev); > + if (compat != NULL) > + return (ENXIO);> > device_set_desc(dev, "OFW Firmware Group"); > return (0); Returning 0 from probe should be discouraged in new drivers FWIW. I'm curious here why you don't instead just return BUS_PROBE_GENERIC here, and let the RPi-specific driver return BUS_PROBE_DEFAULT? -- John Baldwin