diff options
| author | Stephen M. Cameron <[email protected]> | 2011-06-03 14:57:29 +0000 |
|---|---|---|
| committer | James Bottomley <[email protected]> | 2011-06-29 17:09:53 +0000 |
| commit | c2dd32e02648d77466f320d6edd157b5080e7c99 (patch) | |
| tree | 4a4b5e257960c5e0ed5a02cecd042e322da095d8 | |
| parent | [SCSI] ibmvfc: Fix Virtual I/O failover hang (diff) | |
| download | kernel-c2dd32e02648d77466f320d6edd157b5080e7c99.tar.gz kernel-c2dd32e02648d77466f320d6edd157b5080e7c99.zip | |
[SCSI] hpsa: fix dma unmap error in hpsa_passthru_ioctl
Signed-off-by: Stephen M. Cameron <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
| -rw-r--r-- | drivers/scsi/hpsa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index c6c0434d8034..a75122d1c710 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -2580,7 +2580,8 @@ static int hpsa_passthru_ioctl(struct ctlr_info *h, void __user *argp) c->SG[0].Ext = 0; /* we are not chaining*/ } hpsa_scsi_do_simple_cmd_core(h, c); - hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL); + if (iocommand.buf_size > 0) + hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL); check_ioctl_unit_attention(h, c); /* Copy the error information out */ |
