From owner-p4-projects@FreeBSD.ORG Wed Jul 23 05:20:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 704C31065678; Wed, 23 Jul 2008 05:20:45 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34D211065677 for ; Wed, 23 Jul 2008 05:20:45 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 330848FC0C for ; Wed, 23 Jul 2008 05:20:45 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m6N5Kjru025306 for ; Wed, 23 Jul 2008 05:20:45 GMT (envelope-from weongyo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m6N5KjWc025304 for perforce@freebsd.org; Wed, 23 Jul 2008 05:20:45 GMT (envelope-from weongyo@FreeBSD.org) Date: Wed, 23 Jul 2008 05:20:45 GMT Message-Id: <200807230520.m6N5KjWc025304@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to weongyo@FreeBSD.org using -f From: Weongyo Jeong To: Perforce Change Reviews Cc: Subject: PERFORCE change 145671 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2008 05:20:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=145671 Change 145671 by weongyo@weongyo_ws on 2008/07/23 05:20:38 rename NDISSPIN_... to NDISMTX_... due to the change of locking mechanism from NDIS-specific spinlock to mtx. Affected files ... .. //depot/projects/ndisusb/sys/dev/if_ndis/if_ndis.c#7 edit .. //depot/projects/ndisusb/sys/dev/if_ndis/if_ndisvar.h#5 edit Differences ... ==== //depot/projects/ndisusb/sys/dev/if_ndis/if_ndis.c#7 (text+ko) ==== @@ -1552,7 +1552,7 @@ ndis_free_packet(packet); m_freem(m); - NDISSPIN_LOCK(sc); + NDISMTX_LOCK(sc); sc->ndis_txarray[idx] = NULL; sc->ndis_txpending++; @@ -1564,7 +1564,7 @@ sc->ndis_tx_timer = 0; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - NDISSPIN_UNLOCK(sc); + NDISMTX_UNLOCK(sc); IoQueueWorkItem(sc->ndis_startitem, (io_workitem_func)ndis_starttask_wrap, @@ -1589,9 +1589,9 @@ /* Event list is all full up, drop this one. */ - NDISSPIN_LOCK(sc); + NDISMTX_LOCK(sc); if (sc->ndis_evt[sc->ndis_evtpidx].ne_sts) { - NDISSPIN_UNLOCK(sc); + NDISMTX_UNLOCK(sc); return; } @@ -1601,7 +1601,7 @@ sc->ndis_evt[sc->ndis_evtpidx].ne_buf = malloc(slen, M_TEMP, M_NOWAIT); if (sc->ndis_evt[sc->ndis_evtpidx].ne_buf == NULL) { - NDISSPIN_UNLOCK(sc); + NDISMTX_UNLOCK(sc); return; } bcopy((char *)sbuf, @@ -1610,7 +1610,7 @@ sc->ndis_evt[sc->ndis_evtpidx].ne_sts = status; sc->ndis_evt[sc->ndis_evtpidx].ne_len = slen; NDIS_EVTINC(sc->ndis_evtpidx); - NDISSPIN_UNLOCK(sc); + NDISMTX_UNLOCK(sc); return; } ==== //depot/projects/ndisusb/sys/dev/if_ndis/if_ndisvar.h#5 (text+ko) ==== @@ -206,17 +206,17 @@ #define NDISUSB_STATUS_DETACH 0x1 }; -#define NDISSPIN_LOCK(_sc) mtx_lock(&(_sc)->ndis_mtx) -#define NDISSPIN_UNLOCK(_sc) mtx_unlock(&(_sc)->ndis_mtx) +#define NDISMTX_LOCK(_sc) mtx_lock(&(_sc)->ndis_mtx) +#define NDISMTX_UNLOCK(_sc) mtx_unlock(&(_sc)->ndis_mtx) #define NDISUSB_LOCK(_sc) mtx_lock(&Giant) #define NDISUSB_UNLOCK(_sc) mtx_unlock(&Giant) #define NDIS_LOCK(_sc) do { \ if ((_sc)->ndis_iftype == PNPBus) \ NDISUSB_LOCK(_sc); \ - NDISSPIN_LOCK(_sc); \ + NDISMTX_LOCK(_sc); \ } while (0) #define NDIS_UNLOCK(_sc) do { \ if ((_sc)->ndis_iftype == PNPBus) \ NDISUSB_UNLOCK(_sc); \ - NDISSPIN_UNLOCK(_sc); \ + NDISMTX_UNLOCK(_sc); \ } while (0)