diff options
author | Minwoo Im <minwoo.im.dev@gmail.com> | 2020-11-30 13:47:46 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-12-01 20:36:37 +0100 |
commit | aa9d729592316e121110daa81604f71f82663167 (patch) | |
tree | 8ec4f46c5afb9104e0c28b2d691ae18328cd8fb4 /drivers/nvme | |
parent | nvme-fabrics: reject I/O to offline device (diff) | |
download | linux-aa9d729592316e121110daa81604f71f82663167.tar.xz linux-aa9d729592316e121110daa81604f71f82663167.zip |
nvme: improve an error message on Identify failure
Add the namespace ID to the error message when the Identify command used
to retrieve the Namespace Identification Descriptor list fails.
This avoids rather useless and duplicative messages like the following:
[ 1.321031] nvme nvme0: Identify Descriptors failed (16386)
[ 1.321948] nvme nvme0: Identify Descriptors failed (16386)
[ 1.322872] nvme nvme0: Identify Descriptors failed (16386)
[ 1.323775] nvme nvme0: Identify Descriptors failed (16386)
[ 1.324687] nvme nvme0: Identify Descriptors failed (16386)
...
Also, print the nvme status code in hexadecimal rather than decimal
format rather for better readability.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 9c1645f28a7a..73c6684aaee9 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1368,7 +1368,8 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl, unsigned nsid, NVME_IDENTIFY_DATA_SIZE); if (status) { dev_warn(ctrl->device, - "Identify Descriptors failed (%d)\n", status); + "Identify Descriptors failed (nsid=%u, status=0x%x)\n", + nsid, status); goto free_data; } |