Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jul 2012 05:24:20 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r238462 - stable/9/sys/dev/cxgbe
Message-ID:  <201207150524.q6F5OKV2028080@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Sun Jul 15 05:24:19 2012
New Revision: 238462
URL: http://svn.freebsd.org/changeset/base/238462

Log:
  MFC r238313:
  
  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).
  
  Approved by:	re (kib)

Modified:
  stable/9/sys/dev/cxgbe/t4_sge.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- stable/9/sys/dev/cxgbe/t4_sge.c	Sun Jul 15 04:15:27 2012	(r238461)
+++ stable/9/sys/dev/cxgbe/t4_sge.c	Sun Jul 15 05:24:19 2012	(r238462)
@@ -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?201207150524.q6F5OKV2028080>