lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 29 Sep 2008 13:27:11 -0700 (PDT)
From:	Trent Piepho <tpiepho@...escale.com>
To:	Lennert Buytenhek <buytenh@...tstofly.org>
cc:	netdev@...r.kernel.org, Byron Bradley <byron.bbradley@...il.com>,
	Jesper Dangaard Brouer <jdb@...x.dk>,
	Tim Ellis <tim.ellis@....com>,
	Andy Fleming <afleming@...escale.com>,
	Imre Kaloz <kaloz@...nwrt.org>, Nicolas Pitre <nico@....org>,
	Dirk Teurlings <dirk@...xia.nl>,
	Peter van Valderen <p.v.valderen@...il.com>
Subject: Re: [PATCH 1/6] phylib: add mdiobus_{read,write}

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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ