[Bug 290793] iovctl on mlx5en won't work

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290793

--- Comment #22 from [email protected] ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=ed29ffd396e522a45ab1980c12a75b3409b51712

commit ed29ffd396e522a45ab1980c12a75b3409b51712
Author:     Bjoern A. Zeeb <[email protected]>
AuthorDate: 2025-12-02 16:04:22 +0000
Commit:     Bjoern A. Zeeb <[email protected]>
CommitDate: 2025-12-02 18:46:20 +0000

    LinuxKPI: pci: undo the pci_resource_len() check in
lkpi_pci_request_region()

    Creating non-passthru SR-IOV interfaces on a mlx5en(4) failed.
    The problem lies in the pci_resource_len() call but not that the BAR length
    is tmeporary 0 but in that we call lkpi_pci_get_bar() with a true argument
    which will create the BAR resource for us and report the approriate length
    back.  However, the later call to bus_alloc_resource_any() will then fail
    given the resource already exists.

    Restore the previous behaviour and let bus_alloc_resource_any() do the
    work.  Adjust the return values from -ENODEV to -EBUSY to match callers
    expectations.

    In linuxkpi_pcim_request_all_regions(), like in
linuxkpi_pci_request_regions(),
    filter out the -EBUSY errors as "not an error" and try the next bar.
    This also seems to be consistent with the expectations of the callers.

    PR:             290793
    Reported by:    David BOYER (jcduss13 gmail.com)
    Tested on:      mlx5en, iwlwifi, mt7921
    Reviewed by:    kib
    Fixes:          7e21158d44cd "implement
[linuxkpi_]pcim_request_all_regions()"
    Sponsored by:   The FreeBSD Foundation
    MFC after:      3 days
    Differential Revision: https://reviews.freebsd.org/D53902

 sys/compat/linuxkpi/common/src/linux_pci.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.