Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Nov 2007 19:40:14 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 129839 for review
Message-ID:  <200711301940.lAUJeEJ1073012@repoman.freebsd.org>

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

Change 129839 by kmacy@kmacy:storage:toestack on 2007/11/30 19:40:08

	initialize adapter pointer in tdev
	make remove tid panic more informative

Affected files ...

.. //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#20 edit

Differences ...

==== //depot/projects/toestack/sys/dev/cxgb/cxgb_offload.c#20 (text+ko) ====

@@ -602,7 +602,9 @@
 {
 	struct tid_info *t = &(T3C_DATA (tdev))->tid_maps;
 
-	BUG_ON(tid >= t->ntids);
+	if (tid >= t->ntids)
+		panic("tid=%d >= t->ntids=%d", tid, t->ntids);
+	
 	if (tdev->type == T3A)
 		atomic_cmpset_ptr((uintptr_t *)&t->tid_tab[tid].ctx, (long)NULL, (long)ctx);
 	else {
@@ -1229,6 +1231,8 @@
 	if (!t)
 		return (ENOMEM);
 
+	dev->adapter = adapter;
+
 	err = (EOPNOTSUPP);
 	if (dev->ctl(dev, GET_TX_MAX_CHUNK, &t->tx_max_chunk) < 0 ||
 	    dev->ctl(dev, GET_MAX_OUTSTANDING_WR, &t->max_wrs) < 0 ||



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