aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2011-06-03 10:57:29 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-06-29 13:09:53 -0400
commitc2dd32e02648d77466f320d6edd157b5080e7c99 (patch)
tree4a4b5e257960c5e0ed5a02cecd042e322da095d8
parent38553564dc1052640515ed86be3ccb76cda6eee7 (diff)
[SCSI] hpsa: fix dma unmap error in hpsa_passthru_ioctl
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/hpsa.c3
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)
2580 c->SG[0].Ext = 0; /* we are not chaining*/ 2580 c->SG[0].Ext = 0; /* we are not chaining*/
2581 } 2581 }
2582 hpsa_scsi_do_simple_cmd_core(h, c); 2582 hpsa_scsi_do_simple_cmd_core(h, c);
2583 hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL); 2583 if (iocommand.buf_size > 0)
2584 hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL);
2584 check_ioctl_unit_attention(h, c); 2585 check_ioctl_unit_attention(h, c);
2585 2586
2586 /* Copy the error information out */ 2587 /* Copy the error information out */