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
        }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to