Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108538137
D35501.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D35501.diff
View Options
diff --git a/sys/dev/cardbus/cardbus.c b/sys/dev/cardbus/cardbus.c
--- a/sys/dev/cardbus/cardbus.c
+++ b/sys/dev/cardbus/cardbus.c
@@ -351,7 +351,6 @@
DEVMETHOD(bus_get_dma_tag, bus_generic_get_dma_tag),
DEVMETHOD(bus_read_ivar, cardbus_read_ivar),
DEVMETHOD(bus_driver_added, cardbus_driver_added),
- DEVMETHOD(bus_rescan, bus_null_rescan),
/* Card Interface */
DEVMETHOD(card_attach_card, cardbus_attach_card),
diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m
--- a/sys/kern/bus_if.m
+++ b/sys/kern/bus_if.m
@@ -67,16 +67,23 @@
panic("bus_add_child is not implemented");
}
- static int null_reset_post(device_t bus, device_t dev)
+ static int
+ null_reset_post(device_t bus, device_t dev)
{
return (0);
}
- static int null_reset_prepare(device_t bus, device_t dev)
+ static int
+ null_reset_prepare(device_t bus, device_t dev)
{
return (0);
}
+ static int
+ null_rescan(device_t dev)
+ {
+ return (ENODEV);
+ }
};
/**
@@ -253,7 +260,7 @@
*/
METHOD int rescan {
device_t _dev;
-}
+} DEFAULT null_rescan;
/**
* @brief Allocate a system resource
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -4708,19 +4708,6 @@
return (0);
}
-
-/**
- * @brief Helper function for implementing BUS_RESCAN().
- *
- * This null implementation of BUS_RESCAN() always fails to indicate
- * the bus does not support rescanning.
- */
-int
-bus_null_rescan(device_t dev)
-{
- return (ENXIO);
-}
-
/*
* Some convenience functions to make it easier for drivers to use the
* resource-management functions. All these really do is hide the
diff --git a/sys/powerpc/ofw/ofw_pcibus.c b/sys/powerpc/ofw/ofw_pcibus.c
--- a/sys/powerpc/ofw/ofw_pcibus.c
+++ b/sys/powerpc/ofw/ofw_pcibus.c
@@ -81,7 +81,6 @@
/* Bus interface */
DEVMETHOD(bus_child_deleted, ofw_pcibus_child_deleted),
DEVMETHOD(bus_child_pnpinfo, ofw_pcibus_child_pnpinfo_method),
- DEVMETHOD(bus_rescan, bus_null_rescan),
DEVMETHOD(bus_get_cpus, ofw_pcibus_get_cpus),
DEVMETHOD(bus_get_domain, ofw_pcibus_get_domain),
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -513,7 +513,6 @@
struct sbuf *sb);
int bus_helper_reset_post(device_t dev, int flags);
int bus_helper_reset_prepare(device_t dev, int flags);
-int bus_null_rescan(device_t dev);
/*
* Wrapper functions for the BUS_*_RESOURCE methods to make client code
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 1:54 AM (8 m, 8 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16179789
Default Alt Text
D35501.diff (2 KB)
Attached To
Mode
D35501: bus_if: provide a default null rescan method
Attached
Detach File
Event Timeline
Log In to Comment