nvme_fc: Add check of status_code in ERSP_IU
authorJames Smart <jsmart2021@gmail.com>
Fri, 24 Mar 2017 03:41:23 +0000 (20:41 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 4 Apr 2017 15:48:23 +0000 (09:48 -0600)
Add check of status_code in ERSP_IU

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/fc.c

index af196cac5ebe9f19ab12daa294bd48051c985f81..f55ef730472b79581801ed43e573e29fdc6b0d04 100644 (file)
@@ -1226,6 +1226,7 @@ nvme_fc_fcpio_done(struct nvmefc_fcp_req *req)
                                        (freq->rcv_rsplen / 4) ||
                             be32_to_cpu(op->rsp_iu.xfrd_len) !=
                                        freq->transferred_length ||
+                            op->rsp_iu.status_code ||
                             op->rqno != le16_to_cpu(cqe->command_id))) {
                        status = -EIO;
                        goto done;