From owner-freebsd-mips@FreeBSD.ORG Wed Jul 20 07:39:20 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABDD61065673 for ; Wed, 20 Jul 2011 07:39:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6CEEE8FC0A for ; Wed, 20 Jul 2011 07:39:20 +0000 (UTC) Received: by ywf7 with SMTP id 7so2604443ywf.13 for ; Wed, 20 Jul 2011 00:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2DrTX+T16uUE4MfpXKj9HvZTUa4SNfJsnRfCOHxYiyk=; b=mqO/TEEAmOilWmeYLseqkgPcGEyktJPKVstE+tfmpR/NOuhwHGdA7TOJL8dA7/MIn2 t5R0xrt7PK+yxtGGJ3A8KenQ9kPeEz7Oi4wRd1nMMQJ5rerVSylE1DPhoRrFwnaAeHGG ZOaHQ/Nl7ptjZ4fpcPbFBlmyS8xN2VBYdKGq8= MIME-Version: 1.0 Received: by 10.150.74.3 with SMTP id w3mr7676794yba.329.1311147559584; Wed, 20 Jul 2011 00:39:19 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.150.197.5 with HTTP; Wed, 20 Jul 2011 00:39:19 -0700 (PDT) In-Reply-To: <20110715152210.88db1c98.ray@dlink.ua> References: <20110715152210.88db1c98.ray@dlink.ua> Date: Wed, 20 Jul 2011 15:39:19 +0800 X-Google-Sender-Auth: 4dgGjCCwQ_4dncyGi1NVgqvN6gg Message-ID: From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: dev/flash patch X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2011 07:39:20 -0000 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 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 > aka Alex RAY > _______________________________________________ > 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" >