Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102943888
D40122.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
D40122.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -260,6 +260,7 @@
struct pci_bus {
struct pci_dev *self;
+ /* struct pci_bus *parent */
int domain;
int number;
};
@@ -1411,6 +1412,29 @@
{
}
+static inline int
+pci_rescan_bus(struct pci_bus *pbus)
+{
+ device_t *devlist, parent;
+ int devcount, error;
+
+ if (!device_is_attached(pbus->self->dev.bsddev))
+ return (0);
+ /* pci_rescan_method() will work on the pcib (parent). */
+ error = BUS_RESCAN(pbus->self->dev.bsddev);
+ if (error != 0)
+ return (0);
+
+ parent = device_get_parent(pbus->self->dev.bsddev);
+ error = device_get_children(parent, &devlist, &devcount);
+ if (error != 0)
+ return (0);
+ if (devcount != 0)
+ free(devlist, M_TEMP);
+
+ return (devcount);
+}
+
/*
* The following functions can be used to attach/detach the LinuxKPI's
* PCI device runtime. The pci_driver and pci_device_id pointer is
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 1:33 AM (14 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14727240
Default Alt Text
D40122.diff (1 KB)
Attached To
Mode
D40122: LinuxKPI: implement pci_rescan_bus()
Attached
Detach File
Event Timeline
Log In to Comment