summaryrefslogtreecommitdiffstats
path: root/sys/mips/rmi/dev/xlr/rge.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2010-02-10 13:48:34 +0000
committerrrs <rrs@FreeBSD.org>2010-02-10 13:48:34 +0000
commit1fff76b217fa8b4d2aafec16d566f60e6debc22c (patch)
treede4cbdf34b543bbf83f385c1719f10e575a2b11b /sys/mips/rmi/dev/xlr/rge.c
parent821d1f87320f5bea836b41f164881126e7d5dcb9 (diff)
downloadFreeBSD-src-1fff76b217fa8b4d2aafec16d566f60e6debc22c.zip
FreeBSD-src-1fff76b217fa8b4d2aafec16d566f60e6debc22c.tar.gz
If a mbuf is split across two pages, we
have code that detects this and makes two transmit descriptors. However its possible that the algorithm detects when the second page is not used (when the data aligns perfectly to the bottom of the page). This caused a 0 len descriptor to be added which locks up the rge device. Skip such things with a continue. JC provided this patch... Thanks JC :-) Obtained from: JC (c.jayachandran@gmail.com)
Diffstat (limited to 'sys/mips/rmi/dev/xlr/rge.c')
-rw-r--r--sys/mips/rmi/dev/xlr/rge.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/mips/rmi/dev/xlr/rge.c b/sys/mips/rmi/dev/xlr/rge.c
index 679987e..c62c0de 100644
--- a/sys/mips/rmi/dev/xlr/rge.c
+++ b/sys/mips/rmi/dev/xlr/rge.c
@@ -577,6 +577,8 @@ build_frag_list(struct mbuf *m_head, struct msgrng_msg *p2p_msg, struct p2d_tx_d
taddr = (vm_offset_t)m->m_data + len1;
p2 = vtophys(taddr);
len2 = m->m_len - len1;
+ if (len2 == 0)
+ continue;
if (nfrag >= XLR_MAX_TX_FRAGS)
panic("TX frags exceeded");
OpenPOWER on IntegriCloud