qla2xxx: Increase room in request queue for sending priority packets
authorHimanshu Madhani <himanshu.madhani@qlogic.com>
Thu, 25 Sep 2014 10:14:46 +0000 (06:14 -0400)
committerChristoph Hellwig <hch@lst.de>
Thu, 25 Sep 2014 12:25:06 +0000 (14:25 +0200)
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/qla2xxx/qla_iocb.c

index 6a6867d24d9fc85122b02e6b2bfb855454671f94..c787847b3a462c332e9f34f817a86281ce20fea6 100644 (file)
@@ -1901,7 +1901,7 @@ qla2x00_alloc_iocbs(scsi_qla_host_t *vha, srb_t *sp)
 
 skip_cmd_array:
        /* Check for room on request queue. */
-       if (req->cnt < req_cnt) {
+       if (req->cnt < req_cnt + 2) {
                if (ha->mqenable || IS_QLA83XX(ha) || IS_QLA27XX(ha))
                        cnt = RD_REG_DWORD(&reg->isp25mq.req_q_out);
                else if (IS_P3P_TYPE(ha))
@@ -1920,7 +1920,7 @@ skip_cmd_array:
                        req->cnt = req->length -
                            (req->ring_index - cnt);
        }
-       if (req->cnt < req_cnt)
+       if (req->cnt < req_cnt + 2)
                goto queuing_error;
 
        /* Prep packet */