Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2526218rda; Wed, 25 Oct 2023 05:33:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQmLAhKCRoMZLQbJlk+N22hsIRojC19VAXvaxgQjh18S6lRqpNj7g+vxv4iec8H/a06o8H X-Received: by 2002:a25:8209:0:b0:da0:46e5:a7e3 with SMTP id q9-20020a258209000000b00da046e5a7e3mr4246471ybk.20.1698237184631; Wed, 25 Oct 2023 05:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698237184; cv=none; d=google.com; s=arc-20160816; b=yFR0eR1fnQKCm1LeXy2rQlGtmwTZ9T+VUFde+MxXtyiwZ9/7qJSCqHXkChQ4qT2aLO j9lXW+TUQynu9+QQ0Mc6gxLK1VBelSYS+6p22K/B9m7UlyxkAudcA58lAHzaTjG2JXlQ Mv3ii1xrMpw5yYsXfyrqGQTqIuz8tAniavVaIKgZtAcrGL//haZgKR7ALr8s7oQ4mfpk BHtoyNyV3e2wZIIBi3V/N2c6cLW/MZMqA4JS2J9iteSYOZgZscYi3BhanvRR0Dkj6a9W FC1ym6Y/Uly5TQGWKRFDkCYvNlz4a+uybLgWLdEy+krWuC32miOYa9IY49FVsrZXurd0 4pjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iLa6JgVd9CIQLFSQUSBpeFyWa9JHf/XjNOU0JSlnd9I=; fh=NQsTFgz074+F7vf1B4P4aQZxFHLMmlyS3hGoc+nyUK8=; b=TuXqXaPvlHzrhJNc7E98oGFTJJGDa+IZsdtB9D5nKYbyCEwTOBSHiX9ej/iN8d1mLJ XiyV/NhoUVpiOCinPih2Wz4djBJzCNuM4QNmsN0YCfkTiM/0WMEj+PdrsRW0kUPQsZYW D84XsAHlLCNAyiZjgMXgvk3nzWpwDCZcrhkpY9UUQv4wGNrjTDcjCZcLJyDd+wEA08KE YbCaI6bUGfvsIeVXeMW+H9DjKGVIfB7jDKAzMrtWY1pshqhOlKFAGgIdnKhqOGnP28RW cxbUzG2bTGX/Q7y1Mwad38UJqqLbHcd2tEH34bu4FXbmyin3Qac/xgoyC+p6azmOPVFO HXSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MpzRZNVi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id v2-20020a25ab82000000b00d9cb53e5194si10126162ybi.681.2023.10.25.05.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 05:33:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MpzRZNVi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id CEB8A80FCBE3; Wed, 25 Oct 2023 05:33:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343968AbjJYMcz (ORCPT + 99 others); Wed, 25 Oct 2023 08:32:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234838AbjJYMcy (ORCPT ); Wed, 25 Oct 2023 08:32:54 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D32FA129; Wed, 25 Oct 2023 05:32:49 -0700 (PDT) Received: from notapiano (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by madras.collabora.co.uk (Postfix) with ESMTPSA id 203A466057B6; Wed, 25 Oct 2023 13:32:47 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698237168; bh=/4dXk3Un/vaxtCsUQZxzPGs3gNA8QPr1cZShAvmvMvg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MpzRZNViuoPfy7pkhZLcZ03fqKpTu+dsSqM9MQFDtpjGQyMoOn9XNNgSR3yW5xeWJ VvlYQx4lfunbCLN45YIQDePd+aSfBWTbuBFCgsLnlpQH+Uy78/j1kxgfk1z725LrXb zgVxxfEFsTnBRas8zpPnoKMfD0DRYx3zER6C640CW1xL+u3fhUc9YVVKByT0f86vf1 KsAjoZLnve4eBIv3pf2AEwtWdVKg8KrnBklzts0mBAmsLo3XncB2sMQsD8b7NQHDg2 Nns0czgK5QvlF3sugJbQDTG6WRr5aiyVDlxMSADoR5BJRCsWimtLRr32Y5pxtMBOhI AgKvgG2i7zuKQ== Date: Wed, 25 Oct 2023 08:32:42 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Greg Kroah-Hartman Cc: Shuah Khan , Bjorn Helgaas , devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-usb@vger.kernel.org, Rob Herring , linux-kselftest@vger.kernel.org, kernel@collabora.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 2/2] kselftest: devices: Add board file for google,spherion Message-ID: References: <20231024211818.365844-1-nfraprado@collabora.com> <20231024211818.365844-3-nfraprado@collabora.com> <2023102546-filled-onboard-3dfb@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2023102546-filled-onboard-3dfb@gregkh> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 25 Oct 2023 05:33:02 -0700 (PDT) On Wed, Oct 25, 2023 at 12:32:15PM +0200, Greg Kroah-Hartman wrote: > On Tue, Oct 24, 2023 at 05:18:00PM -0400, N?colas F. R. A. Prado wrote: > > Add the list of devices expected to be probed from the USB and PCI > > busses on the google,spherion machine. The USB host controller at > > 11200000 is shared between two busses, for USB2 and USB3, so an > > additional match is used to select the USB2 bus. > > > > Signed-off-by: N?colas F. R. A. Prado > > --- > > > > tools/testing/selftests/devices/boards/google,spherion | 3 +++ > > 1 file changed, 3 insertions(+) > > create mode 100644 tools/testing/selftests/devices/boards/google,spherion > > > > diff --git a/tools/testing/selftests/devices/boards/google,spherion b/tools/testing/selftests/devices/boards/google,spherion > > new file mode 100644 > > index 000000000000..ba86ffcfe43c > > --- /dev/null > > +++ b/tools/testing/selftests/devices/boards/google,spherion > > @@ -0,0 +1,3 @@ > > +usb camera 11200000,PRODUCT=.*/2/.* 1.4.1 1 0,1 > > +usb bluetooth 11200000,PRODUCT=.*/2/.* 1.4.2 1 0,1 > > +pci wifi 11230000 0.0/0.0 > > USB busses (and PCI ids) are not determinisitic and can, and will, > change values randomly. So while it is nice to test "did the devices > show up properly", you can not do that based on bus ids at all, sorry. > > Unless I'm reading these values wrong? What are the fields > representing? Perhaps a comment at the top to describe them so that we > know how to parse them? Hi Greg, I have described the fields in the commit message of patch 1. Here they are: usb [,] pci I'm aware that bus IDs are assigned at runtime, and that's exactly why I've avoided those in the test definitions, instead describing the hardware topology, which won't ever change. And just to be extra clear, by hardware topology I mean: For USB, we find the USB bus based on the address of its controller (and optionally its productID if two busses share the same controller for USB2 and USB3), and then find the device by following the ports at each hub. The configuration number and interfaces then describe what interfaces to check for presence and driver binding. For PCI, we find the controller again based on its address, and follow the device-function pairs at each level in the topology until we arrive at the desired device. We don't rely on the USB bus number, nor on the PCI domain and bus number, since these are all assigned at runtime. Thanks, N?colas