Commit ec9e96b5 authored by Amit Engel's avatar Amit Engel Committed by Christoph Hellwig

nvme-fabrics: parse nvme connect Linux error codes

This fixes the assumption that errval is an unsigned nvme error
Signed-off-by: default avatarAmit Engel <amit.engel@dell.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 14446f9a
......@@ -270,6 +270,12 @@ static void nvmf_log_connect_error(struct nvme_ctrl *ctrl,
{
int err_sctype = errval & ~NVME_SC_DNR;
if (errval < 0) {
dev_err(ctrl->device,
"Connect command failed, errno: %d\n", errval);
return;
}
switch (err_sctype) {
case NVME_SC_CONNECT_INVALID_PARAM:
if (offset >> 16) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment