1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

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@
This commit is contained in:
Navdeep Parhar 2012-07-09 21:53:50 +00:00
parent d706ec297a
commit c8d954ab75
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=238313

View File

@ -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
}