nvme: log the error status on Identify Namespace failure
authorKenneth Heitke <kenneth.heitke@intel.com>
Thu, 4 Apr 2019 18:57:45 +0000 (12:57 -0600)
committerChristoph Hellwig <hch@lst.de>
Fri, 5 Apr 2019 06:07:58 +0000 (08:07 +0200)
Identify Namespace failures are logged as a warning but there is not
an indication of the cause for the failure. Update the log message to
include the error status.

Signed-off-by: Kenneth Heitke <kenneth.heitke@intel.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c

index b593911..ddb9433 100644 (file)
@@ -1105,7 +1105,7 @@ static struct nvme_id_ns *nvme_identify_ns(struct nvme_ctrl *ctrl,
 
        error = nvme_submit_sync_cmd(ctrl->admin_q, &c, id, sizeof(*id));
        if (error) {
-               dev_warn(ctrl->device, "Identify namespace failed\n");
+               dev_warn(ctrl->device, "Identify namespace failed (%d)\n", error);
                kfree(id);
                return NULL;
        }