Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2623866rdb; Wed, 4 Oct 2023 06:58:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENVrKuItoEJHfVo3067hJK53tOplHdJRU6RZmQssCMKDyUdrwtgLLiga3aJMV9wF9HJ1qh X-Received: by 2002:a05:6a20:7f84:b0:15d:53ad:22fe with SMTP id d4-20020a056a207f8400b0015d53ad22femr6966452pzj.3.1696427913578; Wed, 04 Oct 2023 06:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696427913; cv=none; d=google.com; s=arc-20160816; b=TeKQyp9kdDCN29NvESLWknFYCPkY/jYKW16BSvkgTMTVNhLkVV9IUXvkEJ4762WcFI sAFDRyMegN7TTX26yzZp34kJk+gfdlGf93/VkWDjWIQaHbHOzCziOSBJp6QuI2+ZE8PH BUkyJd+fIsHYn7jX1khQ9qH9nc0pjOmXzpfiZoRZufZyF/20GX5ksWts9Vou2D+YnhHh 69dAE3P1Xd4w+97xlEWz1MbvMff58tA5ABawpOz5aOFqswQxchJq8tjIjpvmx/eeKLwc gnwmsBRxbFgR60i+khzpJOtbP2anj8K5rLNmFDHul3sWEfk3aI3ogSfjP9/X5hJLNil4 n96w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7q9Voj6xnExXjZpCFunu8RK35UuSe9TM1H3jj7pOe3w=; fh=sadPmBVSkVjPjvHjHsZhp1ZU5cBjdMhusKyrRHbFnwo=; b=uvXXv/LWj6C3VYK7A3ebzi9zAkazaSB+DnAagspVCiDWZU8qRyJG/srg50S+Ht40/K pN4WIf4OSYrPJuPQnqc3y9i0+95GO7XvXDWnoF7ZhnCgGK5g4cUNigGtp+pO9xr7WE4K +CmBh2xRZKR3WHO0g9zaL0hEvBbdvaj4hcr7d198/WFQs17cvgd2ufQCe/BFXcuM0Otp Fb4XINqXIDizgGUrhWo3HXvGjX9BHzi8YoIqXJ/PHIzVqjwlTcxRKC48TBP0WJ5ZLipd g95u3uWJ+zg05OXx5BShDN0ZaXlqcyulrD1XpOLYcDKCIfMpJkFCFPia5iLhbUwgKgcU S6xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LbDsEN5B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id p123-20020a634281000000b005775a4a2961si3993202pga.657.2023.10.04.06.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 06:58:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LbDsEN5B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 84E998218201; Wed, 4 Oct 2023 06:58:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242710AbjJDN6a (ORCPT + 99 others); Wed, 4 Oct 2023 09:58:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242695AbjJDN62 (ORCPT ); Wed, 4 Oct 2023 09:58:28 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1350A1; Wed, 4 Oct 2023 06:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696427904; x=1727963904; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=3SSmzrdVmTT6GBfds2/816bKP42VZdCHe8cLBHXrSF0=; b=LbDsEN5BD8DSNQPhJ4cc2TH2vzN03NxKfGcExX3vNhlmhs6xjKK29Gob bALuygOTdK0NKDnRp/kwxpsraRdYKRgS0OcDnLRRthWvHMODTivXxkA4Q cZRIl7pLXSP0/i9FFh22EAcPZhydzdVYs4znYPQAaopeL1dST4ptF7scD dUA5r2nF7AYMpgS1dqRifvvoh5mLcueMBruQ8pz8cwyQ74yAYs5vKvj+Y 37ZsggouO3z5Ddwu9Tb9VfId+1KFj3hERwT/N0FvOWUlPFYlhJdA9sRBS lFP7OPRjILjkz18/dyKleGM899Ze6QMCY1LTmwYanS4IXSRWV9lxnj9JX Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10853"; a="363442889" X-IronPort-AV: E=Sophos;i="6.03,200,1694761200"; d="scan'208";a="363442889" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2023 06:58:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10853"; a="894959510" X-IronPort-AV: E=Sophos;i="6.03,200,1694761200"; d="scan'208";a="894959510" Received: from mfmousa-mobl1.amr.corp.intel.com (HELO [10.212.98.56]) ([10.212.98.56]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Oct 2023 06:56:24 -0700 Message-ID: <624b044a-1f0f-4961-8b57-cb5346e7b0d3@linux.intel.com> Date: Wed, 4 Oct 2023 09:57:49 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] soundwire: fix initializing sysfs for same devices on different buses Content-Language: en-US To: Greg Kroah-Hartman Cc: Krzysztof Kozlowski , Vinod Koul , Bard Liao , Sanyog Kale , Philippe Ombredanne , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20231004130243.493617-1-krzysztof.kozlowski@linaro.org> <6628a5f6-ed22-4039-b5c2-2301c05c7e3e@linux.intel.com> <2023100453-perfected-palm-3503@gregkh> From: Pierre-Louis Bossart In-Reply-To: <2023100453-perfected-palm-3503@gregkh> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 06:58:32 -0700 (PDT) On 10/4/23 09:38, Greg Kroah-Hartman wrote: > On Wed, Oct 04, 2023 at 09:16:47AM -0400, Pierre-Louis Bossart wrote: >> >> >> On 10/4/23 09:02, Krzysztof Kozlowski wrote: >>> If same devices with same device IDs are present on different soundwire >>> buses, the probe fails due to conflicting device names and sysfs >>> entries: >>> >>> sysfs: cannot create duplicate filename '/bus/soundwire/devices/sdw:0:0217:0204:00:0' >>> >>> The link ID is 0 for both devices, so they should be differentiated by >>> bus ID. Add the bus ID so, the device names and sysfs entries look >>> like: >> >> I am pretty sure this will break Intel platforms by changing the device >> names. >> >> sof_sdw.c: else if (is_unique_device(adr_link, sdw_version, mfg_id, >> part_id, >> sof_sdw.c: >> "sdw:%01x:%04x:%04x:%02x", link_id, >> sof_sdw.c: >> "sdw:%01x:%04x:%04x:%02x:%01x", link_id, > > device id name changes shouldn't break things, what is requring them to > look a specific way? it's the ASoC dailink creation that relies on strings, we have similar cases for I2C. There's no requirement that the name follows any specific convention, just that when you want to rely on a specific device for an ASoC card you need to use the string that matches its device name. I am not sure how we would modify the Intel machine driver though because the bus ID is IDA-based, so there's no way to predict what it might be.