Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F141980982
D53902.id167163.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
D53902.id167163.diff
View Options
diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -1223,13 +1223,6 @@
if (!lkpi_pci_bar_id_valid(bar))
return (-EINVAL);
- /*
- * If the bar is not valid, return success without adding the BAR;
- * otherwise linuxkpi_pcim_request_all_regions() will error.
- */
- if (pci_resource_len(pdev, bar) == 0)
- return (0);
- /* Likewise if it is neither IO nor MEM, nothing to do for us. */
type = pci_resource_type(pdev, bar);
if (type < 0)
return (0);
@@ -1241,7 +1234,7 @@
device_printf(pdev->dev.bsddev, "%s: failed to alloc "
"bar %d type %d rid %d\n",
__func__, bar, type, PCIR_BAR(bar));
- return (-ENODEV);
+ return (-EBUSY);
}
/*
@@ -1285,7 +1278,7 @@
for (i = 0; i <= PCIR_MAX_BAR_0; i++) {
error = pci_request_region(pdev, i, res_name);
- if (error && error != -ENODEV) {
+ if (error && error != -EBUSY) {
pci_release_regions(pdev);
return (error);
}
@@ -1300,7 +1293,7 @@
for (bar = 0; bar <= PCIR_MAX_BAR_0; bar++) {
error = lkpi_pci_request_region(pdev, bar, res_name, true);
- if (error != 0) {
+ if (error != 0 && error != -EBUSY) {
device_printf(pdev->dev.bsddev, "%s: bar %d res_name '%s': "
"lkpi_pci_request_region returned %d\n", __func__,
bar, res_name, error);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 15, 11:46 AM (12 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26266906
Default Alt Text
D53902.id167163.diff (1 KB)
Attached To
Mode
D53902: LinuxKPI: pci: undo the pci_resource_len() check in lkpi_pci_request_region()
Attached
Detach File
Event Timeline
Log In to Comment