From: Trent Piepho <tpiepho@freescale.com>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: netdev@vger.kernel.org, Byron Bradley <byron.bbradley@gmail.com>,
Jesper Dangaard Brouer <jdb@comx.dk>,
Tim Ellis <tim.ellis@mac.com>,
Andy Fleming <afleming@freescale.com>,
Imre Kaloz <kaloz@openwrt.org>, Nicolas Pitre <nico@cam.org>,
Dirk Teurlings <dirk@upexia.nl>,
Peter van Valderen <p.v.valderen@gmail.com>
Subject: Re: [PATCH 1/6] phylib: add mdiobus_{read,write}
Date: Mon, 29 Sep 2008 13:27:11 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0809291325460.7680@t2.domain.actdsltmp> (raw)
In-Reply-To: <20080929023748.GG21560@xi.wantstofly.org>
On Mon, 29 Sep 2008, Lennert Buytenhek wrote:
> Add mdiobus_{read,write} routines to allow direct reading/writing
> of registers on an mii bus without having to go through the PHY
> abstraction, and make phy_{read,write} use these primitives.
>
> int phy_read(struct phy_device *phydev, u16 regnum)
> {
> - int retval;
> - struct mii_bus *bus = phydev->bus;
> -
> - BUG_ON(in_interrupt());
> -
> - mutex_lock(&bus->mdio_lock);
> - retval = bus->read(bus, phydev->addr, regnum);
> - mutex_unlock(&bus->mdio_lock);
> -
> - return retval;
> + return mdiobus_read(phydev->bus, phydev->addr, regnum);
> }
> EXPORT_SYMBOL(phy_read);
Might want to make these function static inline. Since they are external, gcc
won't be able to inline them automatically.
next prev parent reply other threads:[~2008-09-29 20:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-29 2:37 [PATCH 1/6] phylib: add mdiobus_{read,write} Lennert Buytenhek
2008-09-29 20:27 ` Trent Piepho [this message]
2008-09-29 21:10 ` Lennert Buytenhek
2008-09-29 23:30 ` Andy Fleming
2008-09-30 3:12 ` Lennert Buytenhek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0809291325460.7680@t2.domain.actdsltmp \
--to=tpiepho@freescale.com \
--cc=afleming@freescale.com \
--cc=buytenh@wantstofly.org \
--cc=byron.bbradley@gmail.com \
--cc=dirk@upexia.nl \
--cc=jdb@comx.dk \
--cc=kaloz@openwrt.org \
--cc=netdev@vger.kernel.org \
--cc=nico@cam.org \
--cc=p.v.valderen@gmail.com \
--cc=tim.ellis@mac.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox