Page MenuHomeFreeBSD

D35478.id.diff
No OneTemporary

D35478.id.diff

diff --git a/sys/compat/linuxkpi/common/src/linux_i2c.c b/sys/compat/linuxkpi/common/src/linux_i2c.c
--- a/sys/compat/linuxkpi/common/src/linux_i2c.c
+++ b/sys/compat/linuxkpi/common/src/linux_i2c.c
@@ -221,7 +221,9 @@
return (ENXIO);
}
+ bus_topo_lock();
error = bus_generic_attach(adapter->dev.parent->bsddev);
+ bus_topo_unlock();
if (error) {
device_printf(adapter->dev.parent->bsddev,
"failed to attach child: error %d\n", error);
@@ -249,7 +251,9 @@
while ((child = device_find_child(adapter->dev.parent->bsddev, "lkpi_iic", unit++)) != NULL) {
if (adapter == LKPI_IIC_GET_ADAPTER(child)) {
+ bus_topo_lock();
device_delete_child(adapter->dev.parent->bsddev, child);
+ bus_topo_unlock();
rv = 0;
goto out;
}
@@ -259,7 +263,9 @@
while ((child = device_find_child(adapter->dev.parent->bsddev, "lkpi_iicbb", unit++)) != NULL) {
if (adapter == LKPI_IIC_GET_ADAPTER(child)) {
+ bus_topo_lock();
device_delete_child(adapter->dev.parent->bsddev, child);
+ bus_topo_unlock();
rv = 0;
goto out;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 19, 5:18 AM (7 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14710954
Default Alt Text
D35478.id.diff (1 KB)

Event Timeline