Skip to content

Commit b1a1fdd

Browse files
huww98keithbusch
authored andcommitted
nvme: fix nvme_pr_* status code parsing
Fix the parsing if extra status bits (e.g. MORE) is present. Fixes: 7fb4278 ("nvme: Convert NVMe errors to PR errors") Signed-off-by: Weiwen Hu <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent 7dc3bfc commit b1a1fdd

File tree

1 file changed

+1
-1
lines changed
  • drivers/nvme/host

1 file changed

+1
-1
lines changed

drivers/nvme/host/pr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int nvme_sc_to_pr_err(int nvme_sc)
7777
if (nvme_is_path_error(nvme_sc))
7878
return PR_STS_PATH_FAILED;
7979

80-
switch (nvme_sc) {
80+
switch (nvme_sc & 0x7ff) {
8181
case NVME_SC_SUCCESS:
8282
return PR_STS_SUCCESS;
8383
case NVME_SC_RESERVATION_CONFLICT:

0 commit comments

Comments
 (0)