Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jul 2012 21:53:50 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238313 - head/sys/dev/cxgbe
Message-ID:  <201207092153.q69LroMC042087@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Mon Jul  9 21:53:50 2012
New Revision: 238313
URL: http://svn.freebsd.org/changeset/base/238313

Log:
  Fix a bug in code that calculates the number of the first interrupt
  vector for a port.  This affected the gigabit ports of T422 cards (the
  ones with 2x10G ports and 2x1G ports).
  
  MFC after:	will check with re@

Modified:
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c	Mon Jul  9 21:46:07 2012	(r238312)
+++ head/sys/dev/cxgbe/t4_sge.c	Mon Jul  9 21:53:50 2012	(r238313)
@@ -401,14 +401,16 @@ first_vector(struct port_info *pi)
 		return (0);
 
 	for_each_port(sc, i) {
+		struct port_info *p = sc->port[i];
+
 		if (i == pi->port_id)
 			break;
 
 #ifdef TCP_OFFLOAD
 		if (sc->flags & INTR_DIRECT)
-			rc += pi->nrxq + pi->nofldrxq;
+			rc += p->nrxq + p->nofldrxq;
 		else
-			rc += max(pi->nrxq, pi->nofldrxq);
+			rc += max(p->nrxq, p->nofldrxq);
 #else
 		/*
 		 * Not compiled with offload support and intr_count > 1.  Only
@@ -419,7 +421,7 @@ first_vector(struct port_info *pi)
 		    ("%s: intr_count %d, !INTR_DIRECT", __func__,
 		    sc->intr_count));
 
-		rc += pi->nrxq;
+		rc += p->nrxq;
 #endif
 	}
 



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