Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Aug 2014 18:48:28 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        "src-committers@freebsd.org" <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r270254 - head/sys/dev/ep
Message-ID:  <CAJ-Vmom9VBaJyTBu27J0BSdZD=FNX8zV9mvfaG%2BqBW8LpSt0Nw@mail.gmail.com>
In-Reply-To: <201408210057.s7L0vX95029823@svn.freebsd.org>
References:  <201408210057.s7L0vX95029823@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Also, I have no plans to MFC this, but it likely should be.

So if you're .. bored, please feel free to MFC this as appropriate.


-a


On 20 August 2014 17:57, Adrian Chadd <adrian@freebsd.org> wrote:
> Author: adrian
> Date: Thu Aug 21 00:57:32 2014
> New Revision: 270254
> URL: http://svnweb.freebsd.org/changeset/base/270254
>
> Log:
>   Add missing locking.
>
>   Whilst here, assert that the lock is held when calling epstop().
>
>   Tested:
>
>   ep0: <3com Megahertz 574B>
>
> Modified:
>   head/sys/dev/ep/if_ep.c
>
> Modified: head/sys/dev/ep/if_ep.c
> ==============================================================================
> --- head/sys/dev/ep/if_ep.c     Wed Aug 20 23:37:44 2014        (r270253)
> +++ head/sys/dev/ep/if_ep.c     Thu Aug 21 00:57:32 2014        (r270254)
> @@ -343,7 +343,9 @@ ep_attach(struct ep_softc *sc)
>         EP_FSET(sc, F_RX_FIRST);
>         sc->top = sc->mcur = 0;
>
> +       EP_LOCK(sc);
>         epstop(sc);
> +       EP_UNLOCK(sc);
>
>         return (0);
>  }
> @@ -1000,6 +1002,9 @@ epwatchdog(struct ep_softc *sc)
>  static void
>  epstop(struct ep_softc *sc)
>  {
> +
> +       EP_ASSERT_LOCKED(sc);
> +
>         CSR_WRITE_2(sc, EP_COMMAND, RX_DISABLE);
>         CSR_WRITE_2(sc, EP_COMMAND, RX_DISCARD_TOP_PACK);
>         EP_BUSY_WAIT(sc);
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmom9VBaJyTBu27J0BSdZD=FNX8zV9mvfaG%2BqBW8LpSt0Nw>