Commit 28e3a8f3 authored by Eddie Wai's avatar Eddie Wai Committed by David S. Miller

cnic: Add missing error checking for RAMROD_CMD_ID_CLOSE

Completion status field should also be checked for non-zero error
condition.
Signed-off-by: default avatarEddie Wai <eddie.wai@broadcom.com>
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3bd2d65
...@@ -4022,15 +4022,18 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe) ...@@ -4022,15 +4022,18 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe)
cnic_cm_upcall(cp, csk, opcode); cnic_cm_upcall(cp, csk, opcode);
break; break;
case L5CM_RAMROD_CMD_ID_CLOSE: case L5CM_RAMROD_CMD_ID_CLOSE: {
if (l4kcqe->status != 0) { struct iscsi_kcqe *l5kcqe = (struct iscsi_kcqe *) kcqe;
netdev_warn(dev->netdev, "RAMROD CLOSE compl with "
"status 0x%x\n", l4kcqe->status); if (l4kcqe->status != 0 || l5kcqe->completion_status != 0) {
netdev_warn(dev->netdev, "RAMROD CLOSE compl with status 0x%x completion status 0x%x\n",
l4kcqe->status, l5kcqe->completion_status);
opcode = L4_KCQE_OPCODE_VALUE_CLOSE_COMP; opcode = L4_KCQE_OPCODE_VALUE_CLOSE_COMP;
/* Fall through */ /* Fall through */
} else { } else {
break; break;
} }
}
case L4_KCQE_OPCODE_VALUE_RESET_RECEIVED: case L4_KCQE_OPCODE_VALUE_RESET_RECEIVED:
case L4_KCQE_OPCODE_VALUE_CLOSE_COMP: case L4_KCQE_OPCODE_VALUE_CLOSE_COMP:
case L4_KCQE_OPCODE_VALUE_RESET_COMP: case L4_KCQE_OPCODE_VALUE_RESET_COMP:
......
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