diff options
| author | Hartmut Brandt <harti@FreeBSD.org> | 2003-12-17 10:01:46 +0000 |
|---|---|---|
| committer | Hartmut Brandt <harti@FreeBSD.org> | 2003-12-17 10:01:46 +0000 |
| commit | 70deac44776a26abbad3d6bcf59e2a7602bc84c1 (patch) | |
| tree | 8dd361bbf7242e2ddb89ac7f1358d4a5a3535988 /sys/dev/en | |
| parent | 6734ea9d7053978d808608475ac64fd23798c278 (diff) | |
Notes
Diffstat (limited to 'sys/dev/en')
| -rw-r--r-- | sys/dev/en/midway.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/en/midway.c b/sys/dev/en/midway.c index 48df206387f5..494a61e60285 100644 --- a/sys/dev/en/midway.c +++ b/sys/dev/en/midway.c @@ -1028,6 +1028,11 @@ en_start(struct ifnet *ifp) (int)M_TRAILINGSPACE(lastm))); /* + * From here on we need access to sc + */ + EN_LOCK(sc); + + /* * Allocate a map. We do this here rather then in en_txdma, * because en_txdma is also called from the interrupt handler * and we are going to have a locking problem then. We must @@ -1040,14 +1045,11 @@ en_start(struct ifnet *ifp) EN_COUNT(sc->stats.txnomap); if (map != NULL) uma_zfree(sc->map_zone, map); + EN_UNLOCK(sc); m_freem(m); continue; } - /* - * From here on we need access to sc - */ - EN_LOCK(sc); if ((ifp->if_flags & IFF_RUNNING) == 0) { EN_UNLOCK(sc); uma_zfree(sc->map_zone, map); |
