Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139425876
D53902.id167056.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.id167056.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,16 +1223,9 @@
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);
+ return (-ENODEV);
rid = PCIR_BAR(bar);
res = bus_alloc_resource_any(pdev->dev.bsddev, type, &rid,
@@ -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 != -ENODEV) {
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
Fri, Dec 12, 11:01 PM (20 h, 34 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26188970
Default Alt Text
D53902.id167056.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