diff options
author | David S. Miller <davem@davemloft.net> | 2007-04-20 01:31:17 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-04-20 01:31:17 +0200 |
commit | ad65d701caf0937add48e1c54263850a6a382d27 (patch) | |
tree | 4270124dfc22a85f7ef8943723d8086334989306 /drivers | |
parent | eed22cdc141e11eacd8cd544bdc41432ceb506d1 (diff) |
[SCSI] QLOGICPTI: Do not unmap DMA unless we actually mapped something.
We only map DMA when cmd->request_bufflen is non-zero for non-sg
buffers, we thus should make the same check when unmapping.
Based upon a report from Pasi Pirhonen.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qlogicpti.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index 1fd5fc6d0fe..d3854ee537f 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c @@ -1451,7 +1451,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti) (struct scatterlist *)Cmnd->buffer, Cmnd->use_sg, Cmnd->sc_data_direction); - } else { + } else if (Cmnd->request_bufflen) { sbus_unmap_single(qpti->sdev, (__u32)((unsigned long)Cmnd->SCp.ptr), Cmnd->request_bufflen, |