OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14446f9
)
nvme-fabrics: parse nvme connect Linux error codes
author
Amit Engel
<amit.engel@dell.com>
Mon, 1 Aug 2022 18:40:39 +0000
(21:40 +0300)
committer
Christoph Hellwig
<hch@lst.de>
Wed, 10 Aug 2022 14:05:10 +0000
(16:05 +0200)
This fixes the assumption that errval is an unsigned nvme error
Signed-off-by: Amit Engel <amit.engel@dell.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fabrics.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/host/fabrics.c
b/drivers/nvme/host/fabrics.c
index
5207a23
..
83b5053
100644
(file)
--- a/
drivers/nvme/host/fabrics.c
+++ b/
drivers/nvme/host/fabrics.c
@@
-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) {