mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
nvme: fix nvme_pr_* status code parsing
[ Upstream commit b1a1fdd7096dd2d67911b07f8118ff113d815db4 ]
Fix the parsing if extra status bits (e.g. MORE) is present.
Fixes: 7fb42780d0 ("nvme: Convert NVMe errors to PR errors")
Signed-off-by: Weiwen Hu <huweiwen@linux.alibaba.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
beb2dde5e1
commit
ca060e2557
@@ -77,7 +77,7 @@ static int nvme_sc_to_pr_err(int nvme_sc)
|
||||
if (nvme_is_path_error(nvme_sc))
|
||||
return PR_STS_PATH_FAILED;
|
||||
|
||||
switch (nvme_sc) {
|
||||
switch (nvme_sc & 0x7ff) {
|
||||
case NVME_SC_SUCCESS:
|
||||
return PR_STS_SUCCESS;
|
||||
case NVME_SC_RESERVATION_CONFLICT:
|
||||
|
||||
Reference in New Issue
Block a user