Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d730e103 authored by Chas Williams's avatar Chas Williams Committed by David S. Miller
Browse files

[ATM]: [he] when transmit fails, unmap the dma regions

parent 5067f08a
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -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)));
				TPDRQ_MASK(he_readl(he_dev, TPDRQ_B_H)));


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

			hprintk("tpdrq full (cid 0x%x)\n", cid);
			hprintk("tpdrq full (cid 0x%x)\n", cid);
			/*
			/*
			 * FIXME
			 * FIXME
@@ -2289,6 +2291,13 @@ __enqueue_tpd(struct he_dev *he_dev, struct he_tpd *tpd, unsigned cid)
			 * after service_tbrq, service the backlog
			 * after service_tbrq, service the backlog
			 * for now, we just drop the pdu
			 * 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->skb) {
				if (tpd->vcc->pop)
				if (tpd->vcc->pop)
					tpd->vcc->pop(tpd->vcc, tpd->skb);
					tpd->vcc->pop(tpd->vcc, tpd->skb);