Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121447
b: refs/heads/master
c: 890fccb
h: refs/heads/master
i:
  121445: a616560
  121443: 7b8b17f
  121439: a6ade1b
v: v3
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed Dec 5, 2008
1 parent 22e1730 commit d771066
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fab01fc56063dafcc083f481ac0f9e6b5a576dd6
refs/heads/master: 890fccb2427d53b48ab9d009fd87d55bcb173f62
21 changes: 16 additions & 5 deletions trunk/drivers/infiniband/hw/ipath/ipath_sdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,10 +698,8 @@ int ipath_sdma_verbs_send(struct ipath_devdata *dd,

addr = dma_map_single(&dd->pcidev->dev, tx->txreq.map_addr,
tx->map_len, DMA_TO_DEVICE);
if (dma_mapping_error(&dd->pcidev->dev, addr)) {
ret = -EIO;
goto unlock;
}
if (dma_mapping_error(&dd->pcidev->dev, addr))
goto ioerr;

dwoffset = tx->map_len >> 2;
make_sdma_desc(dd, sdmadesc, (u64) addr, dwoffset, 0);
Expand Down Expand Up @@ -741,6 +739,8 @@ int ipath_sdma_verbs_send(struct ipath_devdata *dd,
dw = (len + 3) >> 2;
addr = dma_map_single(&dd->pcidev->dev, sge->vaddr, dw << 2,
DMA_TO_DEVICE);
if (dma_mapping_error(&dd->pcidev->dev, addr))
goto unmap;
make_sdma_desc(dd, sdmadesc, (u64) addr, dw, dwoffset);
/* SDmaUseLargeBuf has to be set in every descriptor */
if (tx->txreq.flags & IPATH_SDMA_TXREQ_F_USELARGEBUF)
Expand Down Expand Up @@ -798,7 +798,18 @@ int ipath_sdma_verbs_send(struct ipath_devdata *dd,
list_add_tail(&tx->txreq.list, &dd->ipath_sdma_activelist);
if (tx->txreq.flags & IPATH_SDMA_TXREQ_F_VL15)
vl15_watchdog_enq(dd);

goto unlock;

unmap:
while (tail != dd->ipath_sdma_descq_tail) {
if (!tail)
tail = dd->ipath_sdma_descq_cnt - 1;
else
tail--;
unmap_desc(dd, tail);
}
ioerr:
ret = -EIO;
unlock:
spin_unlock_irqrestore(&dd->ipath_sdma_lock, flags);
fail:
Expand Down

0 comments on commit d771066

Please sign in to comment.