]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
qlnxr: Properly initialize the Linux device structure
authorMark Johnston <markj@FreeBSD.org>
Mon, 12 Apr 2021 13:32:08 +0000 (09:32 -0400)
committerMark Johnston <markj@FreeBSD.org>
Mon, 12 Apr 2021 13:32:08 +0000 (09:32 -0400)
commit56cbd386fbaefc009541870ee013b2ff8d096bfc
tree6e678bccfaf96acdbc079fbbf2e6eea85c6dc818
parent9771af4942ec735d3f16d0697bb705a911a67266
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
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29595
sys/dev/qlnx/qlnxr/qlnxr_def.h
sys/dev/qlnx/qlnxr/qlnxr_os.c