FAILED: patch "[PATCH] soundwire: fix initializing sysfs for same devices on" failed to apply to 6.6-stable tree
Subsystems (5)
[email protected]
maintainerThe patch below does not apply to the 6.6-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 <[email protected]>.
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-6.6.y
git checkout FETCH_HEAD
git cherry-pick -x 8a8a9ac8a4972ee69d3dd3d1ae43963ae39cee18
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024012206-halogen-scarcity-a223@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^..
Possible dependencies:
8a8a9ac8a497 ("soundwire: fix initializing sysfs for same devices on different buses")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8a8a9ac8a4972ee69d3dd3d1ae43963ae39cee18 Mon Sep 17 00:00:00 2001
From: Krzysztof Kozlowski <[email protected]>
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]
drivers/soundwire/slave.c +6 -6
@@ -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); }
sound/soc/intel/boards/sof_sdw.c +2 -2
@@ -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)