diff options
author | Giridhar Malavali <giridhar.malavali@qlogic.com> | 2010-09-03 14:57:05 -0700 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-09-05 15:22:53 -0300 |
commit | 1bd58b89e84b15283aaa3148fee4969abe19af8d (patch) | |
tree | c5ee87f4c08c6716a582c3e8b896a037f2891db0 /drivers/scsi/qla2xxx | |
parent | 0374f55ed882a46cd4825dde16ca2392d4c367f6 (diff) | |
download | op-kernel-dev-1bd58b89e84b15283aaa3148fee4969abe19af8d.zip op-kernel-dev-1bd58b89e84b15283aaa3148fee4969abe19af8d.tar.gz |
[SCSI] qla2xxx: Check for empty slot in request queue before posting Command type 6 request.
For ISP82xx, the check for empty slot in request queue before posting command type 6
request was missing. This could lead to request queue entry corruptions causing
IO timeouts.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_nx.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c index ad290dc..0a71cc7 100644 --- a/drivers/scsi/qla2xxx/qla_nx.c +++ b/drivers/scsi/qla2xxx/qla_nx.c @@ -2672,6 +2672,19 @@ qla82xx_start_scsi(srb_t *sp) sufficient_dsds: req_cnt = 1; + if (req->cnt < (req_cnt + 2)) { + cnt = (uint16_t)RD_REG_DWORD_RELAXED( + ®->req_q_out[0]); + if (req->ring_index < cnt) + req->cnt = cnt - req->ring_index; + else + req->cnt = req->length - + (req->ring_index - cnt); + } + + if (req->cnt < (req_cnt + 2)) + goto queuing_error; + ctx = sp->ctx = mempool_alloc(ha->ctx_mempool, GFP_ATOMIC); if (!sp->ctx) { DEBUG(printk(KERN_INFO |