Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102868234
D35478.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D35478.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D35478: linuxkpi: Acquire giant when adding/removing i2c adapters
Attached
Detach File
Event Timeline
Log In to Comment