@@ -17,7 +17,8 @@ static inline __u8 nvme_generic_status_to_errno(__u16 status)
1717 case NVME_SC_SGL_INVALID_METADATA :
1818 case NVME_SC_SGL_INVALID_TYPE :
1919 case NVME_SC_SGL_INVALID_OFFSET :
20- case NVME_SC_SGL_INVALID_SUBTYPE :
20+ case NVME_SC_CMB_INVALID_USE :
21+ case NVME_SC_PRP_INVALID_OFFSET :
2122 return EINVAL ;
2223 case NVME_SC_CMDID_CONFLICT :
2324 return EADDRINUSE ;
@@ -34,6 +35,7 @@ static inline __u8 nvme_generic_status_to_errno(__u16 status)
3435 case NVME_SC_CMD_SEQ_ERROR :
3536 return EILSEQ ;
3637 case NVME_SC_SANITIZE_IN_PROGRESS :
38+ case NVME_SC_FORMAT_IN_PROGRESS :
3739 return EINPROGRESS ;
3840 case NVME_SC_NS_WRITE_PROTECTED :
3941 case NVME_SC_NS_NOT_READY :
@@ -43,6 +45,8 @@ static inline __u8 nvme_generic_status_to_errno(__u16 status)
4345 return EREMOTEIO ;
4446 case NVME_SC_CAP_EXCEEDED :
4547 return ENOSPC ;
48+ case NVME_SC_OPERATION_DENIED :
49+ return EPERM ;
4650 }
4751
4852 return EIO ;
@@ -65,6 +69,11 @@ static inline __u8 nvme_cmd_specific_status_to_errno(__u16 status)
6569 case NVME_SC_CTRL_LIST_INVALID :
6670 case NVME_SC_BAD_ATTRIBUTES :
6771 case NVME_SC_INVALID_PI :
72+ case NVME_SC_INVALID_CTRL_ID :
73+ case NVME_SC_INVALID_SECONDARY_CTRL_STATE :
74+ case NVME_SC_INVALID_NUM_CTRL_RESOURCE :
75+ case NVME_SC_INVALID_RESOURCE_ID :
76+ case NVME_SC_ANA_INVALID_GROUP_ID :
6877 return EINVAL ;
6978 case NVME_SC_ABORT_LIMIT :
7079 case NVME_SC_ASYNC_LIMIT :
@@ -90,6 +99,8 @@ static inline __u8 nvme_cmd_specific_status_to_errno(__u16 status)
9099 case NVME_SC_THIN_PROV_NOT_SUPP :
91100 case NVME_SC_ONCS_NOT_SUPPORTED :
92101 return EOPNOTSUPP ;
102+ case NVME_SC_DEVICE_SELF_TEST_IN_PROGRESS :
103+ return EINPROGRESS ;
93104 }
94105
95106 return EIO ;
0 commit comments