HomeFreeBSD

LinuxKPI: be more verbose on _bus_dmamap_load_phys failures if debug is on

Description

LinuxKPI: be more verbose on _bus_dmamap_load_phys failures if debug is on

With the [k]malloc adjustments in switching skbuff from using a tunable
and conditional contigmalloc with boundries to using __kmalloc as allocator
should just work. The allocations are now physically contiguous and
nseg=1 should be fine even if we have to bounce.

The problem now coming back is that busdma bounce code cannot deal with
larger contiguous nseg=1 allocations. I originally found that on arm64
more than two years ago but I am also seeing it for amd64 now.

Improve the debugging beyond the dump_stack() call and print the busdma
error (so we know if it is EFBIG or else), print the physical address
so we can see better if we should bounce and print the length so we
have an idea on what lengths we are failing. D45813 has some
observations and rtw88 seems to be a good driver to test with.

Sponsored by: The FreeBSD Foundation
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D49569

(cherry picked from commit a12a9c6c59764b876f06355f9f857e0018188d91)

Details

Provenance
bzAuthored on Sat, Mar 29, 2:31 PM
Reviewer
dumbbell
Differential Revision
D49569: LinuxKPI: be more verbose on _bus_dmamap_load_phys failures if debug is on
Parents
rG3494f4f5369d: LinuxKPI: always use contig allocations in linux_alloc_kmem()
Branches
Unknown
Tags
Unknown