HomeFreeBSD

qlnxr: Properly initialize the Linux device structure

Description

qlnxr: Properly initialize the Linux device structure

The driver needs to provide a LinuxKPI device structure to register
itself with the IB subsystem. It was erroneously using a copy of its
FreeBSD device structure for this purpose.

Use linux_pci_attach_device() instead, following the example of the
Chelsio iwarp driver. Also ensure that we don't leak the faked device
during detach.

Reviewed by: hselasky
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29595

(cherry picked from commit 56cbd386fbaefc009541870ee013b2ff8d096bfc)

Details

Provenance
markjAuthored on Apr 12 2021, 1:32 PM
Reviewer
hselasky
Differential Revision
D29595: qlnxr: Properly initialize the Linux device structure
Parents
rG07f3c3b50047: cxgb: Use device_t in preference to struct device *
Branches
Unknown
Tags
Unknown