Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Oct 2007 18:22:37 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 127388 for review
Message-ID:  <200710111822.l9BIMb08085171@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127388

Change 127388 by kmacy@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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710111822.l9BIMb08085171>