Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2011 15:39:19 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Aleksandr Rybalko <ray@dlink.ua>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: dev/flash patch
Message-ID:  <CAJ-VmonkoRnyzRYcbzYLyUGzZWgMmeEz-G5Xog7LPOrbx-3sUg@mail.gmail.com>
In-Reply-To: <20110715152210.88db1c98.ray@dlink.ua>
References:  <20110715152210.88db1c98.ray@dlink.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
That's fine to me.

Just read this:

http://wiki.freebsd.org/Releng/ChangeRequestGuidelines

Then write up what is required, email re@ to get approval.

Thanks,



Adrian

On 15 July 2011 20:22, Aleksandr Rybalko <ray@dlink.ua> wrote:
> Hi all,
>
> I have proposal to tidy mx25l driver, since he have macro's that called
> M25PXX_*. That name match a real(world known) name, but seems renaming
> whole driver is bigger pain than use well known for our users.
>
> Please let me know, if someone have objections or opinion differ from
> my.
>
> Patch:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Index: sys/dev/flash/mx25l.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- sys/dev/flash/mx25l.c =A0 =A0 =A0 (revision 223926)
> +++ sys/dev/flash/mx25l.c =A0 =A0 =A0 (working copy)
> @@ -79,14 +79,14 @@
> =A0 =A0 =A0 =A0unsigned int =A0 =A0sc_flags;
> =A0};
>
> -#define M25PXX_LOCK(_sc) =A0 =A0 =A0 =A0 =A0 =A0 =A0 mtx_lock(&(_sc)->sc=
_mtx)
> -#define =A0 =A0 =A0 =A0M25PXX_UNLOCK(_sc) =A0 =A0 =A0 =A0 =A0 =A0 =A0mtx=
_unlock(&
> (_sc)->sc_mtx) -#define M25PXX_LOCK_INIT(_sc) \
> +#define MX25L_LOCK(_sc) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0mtx_lock(&(_sc)->=
sc_mtx)
> +#define =A0 =A0 =A0 =A0MX25L_UNLOCK(_sc) =A0 =A0 =A0 =A0 =A0 =A0 =A0 mtx=
_unlock(&
> (_sc)->sc_mtx) +#define MX25L_LOCK_INIT(_sc) \
> =A0 =A0 =A0 =A0mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->sc_dev), \
> =A0 =A0 =A0 =A0 =A0 =A0"mx25l", MTX_DEF)
> -#define M25PXX_LOCK_DESTROY(_sc) =A0 =A0 =A0 mtx_destroy(&_sc->sc_mtx);
> -#define M25PXX_ASSERT_LOCKED(_sc) =A0 =A0 =A0mtx_assert(&_sc->sc_mtx,
> MA_OWNED); -#define M25PXX_ASSERT_UNLOCKED(_sc) mtx_assert
> (&_sc->sc_mtx, MA_NOTOWNED); +#define MX25L_LOCK_DESTROY(_sc)
> mtx_destroy(&_sc->sc_mtx); +#define MX25L_ASSERT_LOCKED(_sc)
> mtx_assert(&_sc->sc_mtx, MA_OWNED); +#define MX25L_ASSERT_UNLOCKED(_sc)
> mtx_assert(&_sc->sc_mtx, MA_NOTOWNED);
> =A0/* disk routines */
> =A0static int mx25l_open(struct disk *dp);
> @@ -356,7 +356,7 @@
>
> =A0 =A0 =A0 =A0sc =3D device_get_softc(dev);
> =A0 =A0 =A0 =A0sc->sc_dev =3D dev;
> - =A0 =A0 =A0 M25PXX_LOCK_INIT(sc);
> + =A0 =A0 =A0 MX25L_LOCK_INIT(sc);
>
> =A0 =A0 =A0 =A0ident =3D mx25l_get_device_ident(sc);
> =A0 =A0 =A0 =A0if (ident =3D=3D NULL)
> @@ -427,10 +427,10 @@
> =A0 =A0 =A0 =A0struct mx25l_softc *sc;
>
> =A0 =A0 =A0 =A0sc =3D (struct mx25l_softc *)bp->bio_disk->d_drv1;
> - =A0 =A0 =A0 M25PXX_LOCK(sc);
> + =A0 =A0 =A0 MX25L_LOCK(sc);
> =A0 =A0 =A0 =A0bioq_disksort(&sc->sc_bio_queue, bp);
> =A0 =A0 =A0 =A0wakeup(sc);
> - =A0 =A0 =A0 M25PXX_UNLOCK(sc);
> + =A0 =A0 =A0 MX25L_UNLOCK(sc);
> =A0}
>
> =A0static void
> @@ -442,14 +442,14 @@
>
> =A0 =A0 =A0 =A0for (;;) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0dev =3D sc->sc_dev;
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 M25PXX_LOCK(sc);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 MX25L_LOCK(sc);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0do {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bp =3D bioq_first(&sc->sc_=
bio_queue);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (bp =3D=3D NULL)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0msleep(sc,=
 &sc->sc_mtx, PRIBIO,
> "jobqueue", 0); } while (bp =3D=3D NULL);
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bioq_remove(&sc->sc_bio_queue, bp);
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 M25PXX_UNLOCK(sc);
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 MX25L_UNLOCK(sc);
>
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0switch (bp->bio_cmd) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0case BIO_READ:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> --
> Alexandr Rybalko <ray@dlink.ua>
> aka Alex RAY <ray@ddteam.net>
> _______________________________________________
> freebsd-mips@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonkoRnyzRYcbzYLyUGzZWgMmeEz-G5Xog7LPOrbx-3sUg>