usb-device: Use product name to find i2c bus The udev configuration sometimes doesn't work on the dauntless firmware and will break bifurcation. The product name is more stable and can also be used to determine the device. Fusion-Link: fusion2 N/A Tested: dbus objects are created as expected with bifurcation showing the correct information. I2c bus mapping is showing the right info. Google-Bug-Id: 339064693 Change-Id: I30893cd4c7597eb3190ec481b8a4d3549fbf9c43 Signed-off-by: Willy Tu <wltu@google.com> (cherry picked from commit a21341030b38c90da97dc7775653f9f69504b0c2)
diff --git a/recipes-phosphor/configuration/entity-manager/0005-Add-USB-Device-discovery-daemon.patch b/recipes-phosphor/configuration/entity-manager/0005-Add-USB-Device-discovery-daemon.patch index ebf4b98..cf0d864 100644 --- a/recipes-phosphor/configuration/entity-manager/0005-Add-USB-Device-discovery-daemon.patch +++ b/recipes-phosphor/configuration/entity-manager/0005-Add-USB-Device-discovery-daemon.patch
@@ -1,4 +1,4 @@ -From 3c018e9c8b1f245eebf8b8e2f2b1276403e6e1b6 Mon Sep 17 00:00:00 2001 +From 51920ff5b002c940e32b41f8b785a8ad8f9edc41 Mon Sep 17 00:00:00 2001 From: Harsh Tyagi <harshtya@google.com> Date: Tue, 14 Mar 2023 17:53:22 -0700 Subject: [PATCH] Add USB Device discovery daemon @@ -62,7 +62,7 @@ + ['xyz.openbmc_project.UsbDevice.service', 'usb-device'], ['xyz.openbmc_project.EntityManager.service', ''], ] - + diff --git a/service_files/xyz.openbmc_project.UsbDevice.service b/service_files/xyz.openbmc_project.UsbDevice.service new file mode 100644 index 0000000..c0e80a6 @@ -114,7 +114,7 @@ +endif diff --git a/src/usb_device.cpp b/src/usb_device.cpp new file mode 100644 -index 0000000..f777ff5 +index 0000000..59b81cd --- /dev/null +++ b/src/usb_device.cpp @@ -0,0 +1,428 @@ @@ -452,7 +452,7 @@ + sdbusplus::asio::PropertyPermission::readOnly); + iface->register_property( + "BUS", -+ usbMapping[vendorId][productId][configuration] ++ usbMapping[vendorId][productId][product] + [objPath.filename().substr(1)], + sdbusplus::asio::PropertyPermission::readOnly); + @@ -529,9 +529,8 @@ + sdbusplus::asio::PropertyPermission::readOnly); + iface->register_property( + "BUS", -+ manager -+ .usbMapping[device.vendorId][device.productId] -+ [device.configuration][objPath.filename().substr(1)], ++ manager.usbMapping[device.vendorId][device.productId] ++ [device.product][objPath.filename().substr(1)], + sdbusplus::asio::PropertyPermission::readOnly); + + iface->initialize(); @@ -546,6 +545,7 @@ + io.run(); + return 0; +} --- -2.43.0.472.g3155946c3a-goog ++ +-- +2.45.1.288.g0e0cd299f1-goog