diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2010-08-26 20:56:35 +0200 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-09-10 12:12:40 +0200 |
commit | fcfb5c0ce11fe474cd6b4f7e83e0cc25f220d911 (patch) | |
tree | 9b650860568f631fc36d0fdca15d1144bcedfb66 /drivers/block | |
parent | cciss: factor out cciss_big_passthru (diff) | |
download | linux-fcfb5c0ce11fe474cd6b4f7e83e0cc25f220d911.tar.xz linux-fcfb5c0ce11fe474cd6b4f7e83e0cc25f220d911.zip |
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')
-rw-r--r-- | drivers/block/cciss.c | 25 |
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) } c->cmd_type = CMD_IOCTL_PEND; c->Header.ReplyQueue = 0; - - if (ioc->buf_size > 0) { - c->Header.SGList = sg_used; - c->Header.SGTotal = sg_used; - } else { - c->Header.SGList = 0; - c->Header.SGTotal = 0; - } + c->Header.SGList = sg_used; + c->Header.SGTotal = sg_used; c->Header.LUN = ioc->LUN_info; c->Header.Tag.lower = c->busaddr; c->Request = ioc->Request; - if (ioc->buf_size > 0) { - for (i = 0; i < sg_used; i++) { - temp64.val = - pci_map_single(h->pdev, buff[i], buff_size[i], + for (i = 0; i < sg_used; i++) { + temp64.val = pci_map_single(h->pdev, buff[i], buff_size[i], PCI_DMA_BIDIRECTIONAL); - c->SG[i].Addr.lower = temp64.val32.lower; - c->SG[i].Addr.upper = temp64.val32.upper; - c->SG[i].Len = buff_size[i]; - c->SG[i].Ext = 0; /* we are not chaining */ - } + c->SG[i].Addr.lower = temp64.val32.lower; + c->SG[i].Addr.upper = temp64.val32.upper; + c->SG[i].Len = buff_size[i]; + c->SG[i].Ext = 0; /* we are not chaining */ } c->waiting = &wait; enqueue_cmd_and_start_io(h, c); |