https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290793

--- Comment #2 from David BOYER <[email protected]> ---
The bad behavior was introduced by the commit ff31767e530ab.
The bar appears as not (yet?) valid 
I tried to find a function or a boolean such as "is_vf" to modify if condition,
but I failed.
The only working patch I could come up with is the following:


diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c
b/sys/compat/linuxkpi/common/src/linux_pci.c
index 8507a59a8df3..04ff817666a3 100644
--- a/sys/compat/linuxkpi/common/src/linux_pci.c
+++ b/sys/compat/linuxkpi/common/src/linux_pci.c
@@ -1223,12 +1223,6 @@ lkpi_pci_request_region(struct pci_dev *pdev, int bar,
const char *res_name,
        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)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to