From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F34CA3B790 for ; Mon, 22 Jan 2024 20:01:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705953703; cv=none; b=P8Q5Mp2JAHFUkMkYjWxTrCTjT5dg4ZsY268E9chyGPWAcaaPK6qncRn+w1TLV52Fe3wtz1znJK/N53okTayPkWzZg0d0TzXyGRDIm3O/us1/zet9zHZFggoRrEwjZVSSo6jL2ldI3Cj2L9ruKM574OMBmwvDnvfNkLq6+XtYeQI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705953703; c=relaxed/simple; bh=JXj1n6L5T4DXAMfg/WMGcZ6zKdkP5Ac06uTJWmxZa3U=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=qE/fffgo7tRCex7jpLlHwlERW/PJR3zqxE9g4YzE0HneeWSqschStDlHFovLARe515F4qg2dz60LMHSMWxzLN6ARcCW7yH/UYMchgtP2VwIXbjonvKvPu2V4p68Z+gFiI2s0eZ0qLpfsMPNe6Zd5vKAULCMNavnKqZ3bqY2Lrrw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mqiF3qOO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mqiF3qOO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50FCCC43390; Mon, 22 Jan 2024 20:01:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705953702; bh=JXj1n6L5T4DXAMfg/WMGcZ6zKdkP5Ac06uTJWmxZa3U=; h=Subject:To:Cc:From:Date:From; b=mqiF3qOOXIKA4mbJjNY46g3uNcyS3+Shxi36RZ4BtytvIMavQUb3dY04I76dXJdhH 7QZnO2mr2VCbuKpAkWf4oiUwYmrmoqqNwOtJ2m2LsvCjBZsR9VMouiAFmsT1YQsHWQ nVmVYY3AimN9qUOrQJHRsLAv8KZ1j6E4ONDzY/Ms= Subject: FAILED: patch "[PATCH] soundwire: fix initializing sysfs for same devices on" failed to apply to 5.10-stable tree To: krzysztof.kozlowski@linaro.org,Vijendar.Mukunda@amd.com,broonie@kernel.org,pierre-louis.bossart@linux.intel.com,srinivas.kandagatla@linaro.org,vkoul@kernel.org,yung-chuan.liao@linux.intel.com Cc: From: Date: Mon, 22 Jan 2024 12:01:38 -0800 Message-ID: <2024012238-versus-audacious-57af@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 8a8a9ac8a4972ee69d3dd3d1ae43963ae39cee18 # git commit -s git send-email --to '' --in-reply-to '2024012238-versus-audacious-57af@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: 8a8a9ac8a497 ("soundwire: fix initializing sysfs for same devices on different buses") 92e9f10a0935 ("ASoC: intel: sof_sdw: Add helper to create a single codec DLC") 009582008182 ("ASoC: intel: sof_sdw: Allow direct specification of CODEC name") 656dd91a3a1c ("ASoC: Intel: sof_sdw: break earlier when a adr link contains different codecs") 1d1062382b18 ("ASoC: intel: sof_sdw: Use consistent variable naming for links") 0281b02e1913 ("ASoC: Intel: sof_sdw: add dai_link_codec_ch_map") d3fc5c4da599 ("ASoC: Intel: sof_sdw: add multi dailink support for a codec") 5714aabdf971 ("ASoC: Intel: sdw_sof: append dai_type and remove codec_type") cededa5a6486 ("ASoC: Intel: sof_sdw: add codec_info pointer") b274586533f5 ("ASoC: Intel: sof_sdw: use predefine dailink id") 07140abbbf9e ("ASoC: Intel: sof_sdw: add dai info") ba032909bb2d ("ASoC: Intel: sof_sdw: add missing exit callback") f0c8d83ab1a3 ("ASoC: Intel: sof_sdw: start set codec init function with an adr index") 1785af9ff65d ("ASoC: intel: sof: use asoc_dummy_dlc") dc5a3e60a4b5 ("ASoC: Intel: sof_sdw: append codec type to dai link name") c8db7b50128b ("ASoC: Intel: sof_sdw: support different devices on the same sdw link") 06b830bd73ec ("ASoC: Intel: sof_sdw: remove late_probe flag in struct sof_sdw_codec_info") ba7523bb0f49 ("ASoC: Intel: sof_nau8825: add variant with nau8318 amplifier.") 5c10da436ebd ("ASoC: Intel: sof_sdw: use common helpers for all Realtek amps") 8c4b3a8ea2c0 ("ASoC: intel: sof_sdw: add rt1318 codec support.") thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 8a8a9ac8a4972ee69d3dd3d1ae43963ae39cee18 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Tue, 17 Oct 2023 11:09:33 -0500 Subject: [PATCH] soundwire: fix initializing sysfs for same devices on different buses 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 the controller ID. Add the controller ID so, the device names and sysfs entries look like: sdw:1:0:0217:0204:00:0 -> ../../../devices/platform/soc@0/6ab0000.soundwire-controller/sdw-master-1-0/sdw:1:0:0217:0204:00:0 sdw:3:0:0217:0204:00:0 -> ../../../devices/platform/soc@0/6b10000.soundwire-controller/sdw-master-3-0/sdw:3:0:0217:0204:00:0 [PLB changes: use bus->controller_id instead of bus->id] Fixes: 7c3cd189b86d ("soundwire: Add Master registration") Cc: stable@vger.kernel.org Reviewed-by: Bard Liao Reviewed-by: Vijendar Mukunda Co-developed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Signed-off-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Acked-by: Mark Brown Tested-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20231017160933.12624-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul diff --git a/drivers/soundwire/slave.c b/drivers/soundwire/slave.c index c1c1a2ac293a..060c2982e26b 100644 --- a/drivers/soundwire/slave.c +++ b/drivers/soundwire/slave.c @@ -39,14 +39,14 @@ int sdw_slave_add(struct sdw_bus *bus, slave->dev.fwnode = fwnode; if (id->unique_id == SDW_IGNORED_UNIQUE_ID) { - /* name shall be sdw:link:mfg:part:class */ - dev_set_name(&slave->dev, "sdw:%01x:%04x:%04x:%02x", - bus->link_id, id->mfg_id, id->part_id, + /* name shall be sdw:ctrl:link:mfg:part:class */ + dev_set_name(&slave->dev, "sdw:%01x:%01x:%04x:%04x:%02x", + bus->controller_id, bus->link_id, id->mfg_id, id->part_id, id->class_id); } else { - /* name shall be sdw:link:mfg:part:class:unique */ - dev_set_name(&slave->dev, "sdw:%01x:%04x:%04x:%02x:%01x", - bus->link_id, id->mfg_id, id->part_id, + /* name shall be sdw:ctrl:link:mfg:part:class:unique */ + dev_set_name(&slave->dev, "sdw:%01x:%01x:%04x:%04x:%02x:%01x", + bus->controller_id, bus->link_id, id->mfg_id, id->part_id, id->class_id, id->unique_id); } diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 3312ad8a563b..690c279bbb88 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1232,11 +1232,11 @@ static int fill_sdw_codec_dlc(struct device *dev, else if (is_unique_device(adr_link, sdw_version, mfg_id, part_id, class_id, adr_index)) codec->name = devm_kasprintf(dev, GFP_KERNEL, - "sdw:%01x:%04x:%04x:%02x", link_id, + "sdw:0:%01x:%04x:%04x:%02x", link_id, mfg_id, part_id, class_id); else codec->name = devm_kasprintf(dev, GFP_KERNEL, - "sdw:%01x:%04x:%04x:%02x:%01x", link_id, + "sdw:0:%01x:%04x:%04x:%02x:%01x", link_id, mfg_id, part_id, class_id, unique_id); if (!codec->name)