aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2010-08-26 14:56:35 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-09-10 06:12:40 -0400
commitfcfb5c0ce11fe474cd6b4f7e83e0cc25f220d911 (patch)
tree9b650860568f631fc36d0fdca15d1144bcedfb66 /drivers/block/cciss.c
parent0c9f5ba7cb7435ea4b99599de4af0729f0740647 (diff)
cciss: remove some superfluous tests from cciss_bigpassthru()
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index cff2fa1972cb..df2ed4d6684d 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1580,28 +1580,19 @@ static int cciss_bigpassthru(ctlr_info_t *h, void __user *argp)
1580 } 1580 }
1581 c->cmd_type = CMD_IOCTL_PEND; 1581 c->cmd_type = CMD_IOCTL_PEND;
1582 c->Header.ReplyQueue = 0; 1582 c->Header.ReplyQueue = 0;
1583 1583 c->Header.SGList = sg_used;
1584 if (ioc->buf_size > 0) { 1584 c->Header.SGTotal = sg_used;
1585 c->Header.SGList = sg_used;
1586 c->Header.SGTotal = sg_used;
1587 } else {
1588 c->Header.SGList = 0;
1589 c->Header.SGTotal = 0;
1590 }
1591 c->Header.LUN = ioc->LUN_info; 1585 c->Header.LUN = ioc->LUN_info;
1592 c->Header.Tag.lower = c->busaddr; 1586 c->Header.Tag.lower = c->busaddr;
1593 1587
1594 c->Request = ioc->Request; 1588 c->Request = ioc->Request;
1595 if (ioc->buf_size > 0) { 1589 for (i = 0; i < sg_used; i++) {
1596 for (i = 0; i < sg_used; i++) { 1590 temp64.val = pci_map_single(h->pdev, buff[i], buff_size[i],
1597 temp64.val =
1598 pci_map_single(h->pdev, buff[i], buff_size[i],
1599 PCI_DMA_BIDIRECTIONAL); 1591 PCI_DMA_BIDIRECTIONAL);
1600 c->SG[i].Addr.lower = temp64.val32.lower; 1592 c->SG[i].Addr.lower = temp64.val32.lower;
1601 c->SG[i].Addr.upper = temp64.val32.upper; 1593 c->SG[i].Addr.upper = temp64.val32.upper;
1602 c->SG[i].Len = buff_size[i]; 1594 c->SG[i].Len = buff_size[i];
1603 c->SG[i].Ext = 0; /* we are not chaining */ 1595 c->SG[i].Ext = 0; /* we are not chaining */
1604 }
1605 } 1596 }
1606 c->waiting = &wait; 1597 c->waiting = &wait;
1607 enqueue_cmd_and_start_io(h, c); 1598 enqueue_cmd_and_start_io(h, c);