Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Dec 2025 15:45:21 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 290793] iovctl on mlx5en won't work
Message-ID:  <bug-290793-7501-riJk6qJN6P@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-290793-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-290793-7501@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

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

--- Comment #23 from commit-hook@FreeBSD.org ---
A commit in branch stable/15 references this bug:

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

commit 2032abb31cbe067d41067a81e529d91f1bace4c9
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-12-02 16:04:22 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-12-08 15:43:51 +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
    Differential Revision: https://reviews.freebsd.org/D53902

    (cherry picked from commit ed29ffd396e522a45ab1980c12a75b3409b51712)

 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.

help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-290793-7501-riJk6qJN6P>