freebsd-dev/sys/cam/nvme
Warner Losh fd02926a68 cam: Properly mask out the status bits to get completion code
ccb_h.status has two parts: the actual status and some addition bits to
indicate additional information. It must be masked before comparing
against completion codes. Add new inline function cam_ccb_success to
simplify this to test whether or not the request succeeded. Most of the
code already does this, but a few places don't (the rest likely should
be converted to use cam_ccb_status and/or cam_ccb_success, but that's
for another day). This caused at least one bug in recognizing devices
behind a SATA port multiplexer, though some of these checks were
fine with the special knowledge of the code paths involved.

PR:			270459
Sponsored by:		Netflix
MFC After:		1 week (and maybe a EN requst)
Reviewed by:		ken, mav
Differential Revision:	https://reviews.freebsd.org/D39572
2023-04-15 16:32:41 -06:00
..
nvme_all.c cam: Use FreeBSD standard copyright 2022-10-07 23:37:46 -06:00
nvme_all.h cam: Use FreeBSD standard copyright 2022-10-07 23:37:46 -06:00
nvme_da.c cam: Properly mask out the status bits to get completion code 2023-04-15 16:32:41 -06:00
nvme_xpt.c cam: Use FreeBSD standard copyright 2022-10-07 23:37:46 -06:00