Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150622674
D30519.id90049.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1015 B
Referenced Files
None
Subscribers
None
D30519.id90049.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/device.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/device.h
+++ sys/compat/linuxkpi/common/include/linux/device.h
@@ -483,6 +483,39 @@
device_unregister(device_get_softc(bsddev));
}
+static inline int
+device_reprobe(struct device *dev)
+{
+ int error;
+
+ mtx_lock(&Giant);
+ error = BUS_RESCAN(dev->bsddev);
+ mtx_unlock(&Giant);
+ if (error == 0)
+ return (0);
+ /* Should we clear the driver? */
+ return (-error);
+}
+
+static inline void
+device_release_driver(struct device *dev)
+{
+ int error;
+
+ mtx_lock(&Giant);
+ error = device_is_attached(dev->bsddev);
+ if (error) {
+ error = device_detach(dev->bsddev);
+ if (error)
+ goto unlock;
+ }
+ device_set_devclass(dev->bsddev, NULL);
+ /* Who or what clears dev internal flags? */
+ device_probe_and_attach(dev->bsddev);
+unlock:
+ mtx_unlock(&Giant);
+}
+
#define dev_pm_set_driver_flags(dev, flags) do { \
} while (0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 9:42 PM (11 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30780365
Default Alt Text
D30519.id90049.diff (1015 B)
Attached To
Mode
D30519: LinuxKPI: add device_reprobe() and device_release_driver()
Attached
Detach File
Event Timeline
Log In to Comment