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.
This commit is contained in:
parent
89e04eca44
commit
ee2f2ccc2f
@ -248,8 +248,8 @@ fw_asyreq(struct firewire_comm *fc, int sub, struct fw_xfer *xfer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (info->flag & FWTI_TLABEL) {
|
if (info->flag & FWTI_TLABEL) {
|
||||||
if((tl = fw_get_tlabel(fc, xfer)) == -1 )
|
if ((tl = fw_get_tlabel(fc, xfer)) == -1)
|
||||||
return EIO;
|
return EAGAIN;
|
||||||
fp->mode.hdr.tlrt = tl << 2;
|
fp->mode.hdr.tlrt = tl << 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1739,7 +1739,8 @@ fw_get_tlabel(struct firewire_comm *fc, struct fw_xfer *xfer)
|
|||||||
}
|
}
|
||||||
splx(s);
|
splx(s);
|
||||||
|
|
||||||
printf("fw_get_tlabel: no free tlabel\n");
|
if (firewire_debug > 1)
|
||||||
|
printf("fw_get_tlabel: no free tlabel\n");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -552,6 +552,7 @@ fwip_async_output(struct fwip_softc *fwip, struct ifnet *ifp)
|
|||||||
struct fw_xferq *xferq;
|
struct fw_xferq *xferq;
|
||||||
struct fw_pkt *fp;
|
struct fw_pkt *fp;
|
||||||
uint16_t nodeid;
|
uint16_t nodeid;
|
||||||
|
int error;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
GIANT_REQUIRED;
|
GIANT_REQUIRED;
|
||||||
@ -666,7 +667,18 @@ fwip_async_output(struct fwip_softc *fwip, struct ifnet *ifp)
|
|||||||
|
|
||||||
xfer->send.pay_len = m->m_pkthdr.len;
|
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 */
|
/* error */
|
||||||
ifp->if_oerrors ++;
|
ifp->if_oerrors ++;
|
||||||
/* XXX set error code */
|
/* XXX set error code */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user