diff options
author | Eddie Wai <eddie.wai@broadcom.com> | 2013-07-29 06:03:59 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-30 09:03:07 +0400 |
commit | 28e3a8f38b503579cc788748af698f9347228cc4 (patch) | |
tree | 7a3f246de814d6f1e9bbf67c6cc5e75bb97ddf60 /drivers/net/ethernet/broadcom/cnic.c | |
parent | b3bd2d65e6faf4f6fe6f87d6a5163859af391109 (diff) | |
download | linux-28e3a8f38b503579cc788748af698f9347228cc4.tar.xz |
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: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/cnic.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/cnic.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c index 24f2a0970a64..07ec4cec0866 100644 --- a/drivers/net/ethernet/broadcom/cnic.c +++ b/drivers/net/ethernet/broadcom/cnic.c @@ -4022,15 +4022,18 @@ static void cnic_cm_process_kcqe(struct cnic_dev *dev, struct kcqe *kcqe) cnic_cm_upcall(cp, csk, opcode); break; - case L5CM_RAMROD_CMD_ID_CLOSE: - if (l4kcqe->status != 0) { - netdev_warn(dev->netdev, "RAMROD CLOSE compl with " - "status 0x%x\n", l4kcqe->status); + case L5CM_RAMROD_CMD_ID_CLOSE: { + struct iscsi_kcqe *l5kcqe = (struct iscsi_kcqe *) kcqe; + + 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; /* Fall through */ } else { break; } + } case L4_KCQE_OPCODE_VALUE_RESET_RECEIVED: case L4_KCQE_OPCODE_VALUE_CLOSE_COMP: case L4_KCQE_OPCODE_VALUE_RESET_COMP: |