PERFORCE change 127388 for review
Kip Macy
kmacy at FreeBSD.org
Thu Oct 11 11:22:38 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=127388
Change 127388 by kmacy at kmacy_home:ethng on 2007/10/11 18:22:25
put busdma failure under cxgb_debug to prevent spamming the console
add more diagnostic printfs to determine why we're seeing a failure
Affected files ...
.. //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#29 edit
.. //depot/projects/ethng/src/sys/dev/cxgb/sys/uipc_mvec.c#11 edit
Differences ...
==== //depot/projects/ethng/src/sys/dev/cxgb/cxgb_sge.c#29 (text+ko) ====
@@ -1315,7 +1315,8 @@
return (err);
nsegs = count;
} else if ((err = busdma_map_sg_collapse(&m0, segs, &nsegs))) {
- printf("failed ... err=%d\n", err);
+ if (cxgb_debug)
+ printf("failed ... err=%d\n", err);
return (err);
}
if (m0->m_type == MT_DATA) {
==== //depot/projects/ethng/src/sys/dev/cxgb/sys/uipc_mvec.c#11 (text+ko) ====
@@ -217,8 +217,15 @@
n = *m;
goto retry;
}
- if (seg_count == 0 || seg_count >= TX_MAX_SEGS)
+ if (seg_count == 0) {
+ if (cxgb_debug)
+ printf("empty segment chain\n");
+ return (EFBIG);
+ } else if (seg_count >= TX_MAX_SEGS) {
+ if (cxgb_debug)
+ printf("mbuf chain too long: %d max allowed %d\n", seg_count, TX_MAX_SEGS);
return (EFBIG);
+ }
if (seg_count > MAX_MIOVEC_IOV) {
DPRINTF("seg count=%d ", seg_count);
More information about the p4-projects
mailing list