[Midnightbsd-cvs] src [8580] trunk/sys/dev/cxgbe: must holde a write lock on teht able while allocating an L2 entry.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Sep 19 12:17:11 EDT 2016
Revision: 8580
http://svnweb.midnightbsd.org/src/?rev=8580
Author: laffer1
Date: 2016-09-19 12:17:11 -0400 (Mon, 19 Sep 2016)
Log Message:
-----------
must holde a write lock on teht able while allocating an L2 entry. Add support for T440-LP-CR card in cxgbe(4)
Modified Paths:
--------------
trunk/sys/dev/cxgbe/t4_l2t.c
trunk/sys/dev/cxgbe/t4_main.c
Modified: trunk/sys/dev/cxgbe/t4_l2t.c
===================================================================
--- trunk/sys/dev/cxgbe/t4_l2t.c 2016-09-19 16:15:37 UTC (rev 8579)
+++ trunk/sys/dev/cxgbe/t4_l2t.c 2016-09-19 16:17:11 UTC (rev 8580)
@@ -149,7 +149,7 @@
{
struct l2t_entry *e;
- rw_rlock(&d->lock);
+ rw_wlock(&d->lock);
e = t4_alloc_l2e(d);
if (e) {
mtx_lock(&e->lock); /* avoid race with t4_l2t_free */
@@ -157,7 +157,7 @@
atomic_store_rel_int(&e->refcnt, 1);
mtx_unlock(&e->lock);
}
- rw_runlock(&d->lock);
+ rw_wunlock(&d->lock);
return e;
}
Modified: trunk/sys/dev/cxgbe/t4_main.c
===================================================================
--- trunk/sys/dev/cxgbe/t4_main.c 2016-09-19 16:15:37 UTC (rev 8579)
+++ trunk/sys/dev/cxgbe/t4_main.c 2016-09-19 16:17:11 UTC (rev 8580)
@@ -371,6 +371,7 @@
{0x4408, "Chelsio T420-CX"},
{0x4409, "Chelsio T420-BT"},
{0x440a, "Chelsio T404-BT"},
+ {0x440e, "Chelsio T440-LP-CR"},
};
#ifdef TCP_OFFLOAD
More information about the Midnightbsd-cvs
mailing list