Skip to content

Commit

Permalink
[ATM]: [he] when transmit fails, unmap the dma regions
Browse files Browse the repository at this point in the history
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Chas Williams authored and David S. Miller committed Sep 18, 2006
1 parent 5067f08 commit d730e10
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/atm/he.c
Original file line number Diff line number Diff line change
Expand Up @@ -2282,13 +2282,22 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H)));

if (new_tail == he_dev->tpdrq_head) {
int slot;

hprintk("tpdrq full (cid 0x%x)\n", cid);
/*
* FIXME
* push tpd onto a transmit backlog queue
* after service_tbrq, service the backlog
* for now, we just drop the pdu
*/
for (slot = 0; slot < TPD_MAXIOV; ++slot) {
if (tpd->iovec[slot].addr)
pci_unmap_single(he_dev->pci_dev,
tpd->iovec[slot].addr,
tpd->iovec[slot].len & TPD_LEN_MASK,
PCI_DMA_TODEVICE);
}
if (tpd->skb) {
if (tpd->vcc->pop)
tpd->vcc->pop(tpd->vcc, tpd->skb);
Expand Down

0 comments on commit d730e10

Please sign in to comment.