diff options
author | Chas Williams <chas@cmf.nrl.navy.mil> | 2006-09-14 05:33:40 +0200 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-18 08:21:11 +0200 |
commit | d730e1033f81fefd3176f53e070b2b64cd146db0 (patch) | |
tree | 3370c9194e2d35165a5dca3e1ae394b0f6b98d47 | |
parent | [TCP] tcp-lp: update information to MAINTAINERS (diff) | |
download | linux-d730e1033f81fefd3176f53e070b2b64cd146db0.tar.xz linux-d730e1033f81fefd3176f53e070b2b64cd146db0.zip |
[ATM]: [he] when transmit fails, unmap the dma regions
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/atm/he.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index d369130f4235..dd96123a2b7f 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c @@ -2282,6 +2282,8 @@ __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 @@ -2289,6 +2291,13 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid) * 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); |