svn commit: r203754 - head/sys/mips/rmi/dev/xlr

Randall Stewart rrs at
Wed Feb 10 13:48:34 UTC 2010

Author: rrs
Date: Wed Feb 10 13:48:34 2010
New Revision: 203754

  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 at


Modified: head/sys/mips/rmi/dev/xlr/rge.c
--- head/sys/mips/rmi/dev/xlr/rge.c	Wed Feb 10 12:20:08 2010	(r203753)
+++ head/sys/mips/rmi/dev/xlr/rge.c	Wed Feb 10 13:48:34 2010	(r203754)
@@ -577,6 +577,8 @@ build_frag_list(struct mbuf *m_head, str
 				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");

More information about the svn-src-all mailing list