summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire/if_fwip.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2004-06-14 09:34:20 +0000
committerdfr <dfr@FreeBSD.org>2004-06-14 09:34:20 +0000
commitc8eeaa3f96986892a586a683b030200986cd5900 (patch)
treea02e0a69ed09f195feb4dfa378bc1ac1e48a9173 /sys/dev/firewire/if_fwip.c
parent354d3a90e8366f6bab6d947f39edb251cb2719e5 (diff)
downloadFreeBSD-src-c8eeaa3f96986892a586a683b030200986cd5900.zip
FreeBSD-src-c8eeaa3f96986892a586a683b030200986cd5900.tar.gz
If we run out of transmission labels, just re-queue the packet for later
instead of printing endless error messages on the console and discarding the packet.
Diffstat (limited to 'sys/dev/firewire/if_fwip.c')
-rw-r--r--sys/dev/firewire/if_fwip.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/firewire/if_fwip.c b/sys/dev/firewire/if_fwip.c
index 27af6e0..3ce186c 100644
--- a/sys/dev/firewire/if_fwip.c
+++ b/sys/dev/firewire/if_fwip.c
@@ -552,6 +552,7 @@ fwip_async_output(struct fwip_softc *fwip, struct ifnet *ifp)
struct fw_xferq *xferq;
struct fw_pkt *fp;
uint16_t nodeid;
+ int error;
int i = 0;
GIANT_REQUIRED;
@@ -666,7 +667,18 @@ fwip_async_output(struct fwip_softc *fwip, struct ifnet *ifp)
xfer->send.pay_len = m->m_pkthdr.len;
- if (fw_asyreq(fc, -1, xfer) != 0) {
+ error = fw_asyreq(fc, -1, xfer);
+ if (error == EAGAIN) {
+ /*
+ * We ran out of tlabels - requeue the packet
+ * for later transmission.
+ */
+ xfer->mbuf = 0;
+ STAILQ_INSERT_TAIL(&fwip->xferlist, xfer, link);
+ IF_PREPEND(&ifp->if_snd, m);
+ break;
+ }
+ if (error) {
/* error */
ifp->if_oerrors ++;
/* XXX set error code */
OpenPOWER on IntegriCloud