<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/phy/phy_device.c, branch v3.10.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/phy/phy_device.c?h=v3.10.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/phy/phy_device.c?h=v3.10.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-02-28T20:37:30Z</updated>
<entry>
<title>phy: Fix phy_device_free memory leak</title>
<updated>2013-02-28T20:37:30Z</updated>
<author>
<name>Petr Malat</name>
<email>oss@malat.biz</email>
</author>
<published>2013-02-28T01:01:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b2a431915d19893f047e0dd149d0c1b9d2a0b960'/>
<id>urn:sha1:b2a431915d19893f047e0dd149d0c1b9d2a0b960</id>
<content type='text'>
Fix memory leak in phy_device_free() for the case when phy_device*
returned by phy_device_create() is not registered in the system.

Bug description:
phy_device_create() sets name of kobject using dev_set_name(), which
allocates memory using kvasprintf(), but this memory isn't freed if
the underlying device isn't registered properly, because kobject_cleanup()
is not called in that case. This can happen (and actually is happening on
our machines) if phy_device_register(), called by mdiobus_scan(), fails.

Patch description:
Embedded struct device is initialized in phy_device_create() and it
counterpart phy_device_free() just drops one reference to the device,
which leads to proper deinitialization including releasing the kobject
name memory.

Signed-off-by: Petr Malat &lt;oss@malat.biz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: remove flags argument from phy_{attach, connect, connect_direct}</title>
<updated>2013-01-14T20:11:50Z</updated>
<author>
<name>Florian Fainelli</name>
<email>florian@openwrt.org</email>
</author>
<published>2013-01-14T00:52:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f9a8f83b04e0c362a2fc660dbad980d24af209fc'/>
<id>urn:sha1:f9a8f83b04e0c362a2fc660dbad980d24af209fc</id>
<content type='text'>
The flags argument of the phy_{attach,connect,connect_direct} functions
is then used to assign a struct phy_device dev_flags with its value.
All callers but the tg3 driver pass the flag 0, which results in the
underlying PHY drivers in drivers/net/phy/ not being able to actually
use any of the flags they would set in dev_flags. This patch gets rid of
the flags argument, and passes phydev-&gt;dev_flags to the internal PHY
library call phy_attach_direct() such that drivers which actually modify
a phy device dev_flags get the value preserved for use by the underlying
phy driver.

Acked-by: Kosta Zertsekel &lt;konszert@marvell.com&gt;
Signed-off-by: Florian Fainelli &lt;florian@openwrt.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: Support registering a bunch of drivers</title>
<updated>2012-07-09T07:10:56Z</updated>
<author>
<name>Christian Hohnstaedt</name>
<email>chohnstaedt@innominate.com</email>
</author>
<published>2012-07-04T05:44:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d5bf9071e71a4db85a0eea6236ef94a29fc3eec9'/>
<id>urn:sha1:d5bf9071e71a4db85a0eea6236ef94a29fc3eec9</id>
<content type='text'>
If registering of one of them fails, all already registered drivers
of this module will be unregistered.

Use the new register/unregister functions in all drivers
registering more than one driver.

amd.c, realtek.c: Simplify: directly return registration result.

Tested with broadcom.c
All others compile-tested.

Signed-off-by: Christian Hohnstaedt &lt;chohnstaedt@innominate.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: Fix warning in get_phy_device().</title>
<updated>2012-06-28T04:28:14Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-06-28T04:28:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=160c85f0e050d92c0e42321aab2ffc343594e1c0'/>
<id>urn:sha1:160c85f0e050d92c0e42321aab2ffc343594e1c0</id>
<content type='text'>
drivers/net/phy/phy_device.c: In function ‘get_phy_device’:
drivers/net/phy/phy_device.c:340:14: warning: ‘phy_id’ may be used uninitialized in this function [-Wmaybe-uninitialized]

GCC can't see that when we return zero we always initialize
phy_id and that's the only path where we use it.

Initialize phy_id to zero to shut it up.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netdev/phy: Handle IEEE802.3 clause 45 Ethernet PHYs</title>
<updated>2012-06-28T04:23:24Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2012-06-27T07:33:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ac28b9f8cd66d6bc54f8063df59e99abd62173a4'/>
<id>urn:sha1:ac28b9f8cd66d6bc54f8063df59e99abd62173a4</id>
<content type='text'>
The IEEE802.3 clause 45 MDIO bus protocol allows for directly
addressing PHY registers using a 21 bit address, and is used by many
10G Ethernet PHYS.  Already existing is the ability of MDIO bus
drivers to use clause 45, with the MII_ADDR_C45 flag.  Here we add
struct phy_c45_device_ids to hold the device identifier registers
present in clause 45. struct phy_device gets a couple of new fields:
c45_ids to hold the identifiers and is_c45 to signal that it is clause
45.

get_phy_device() gets a new parameter is_c45 to indicate that the PHY
device should use the clause 45 protocol, and its callers are adjusted
to pass false.  The follow-on patch to of_mdio.c will pass true where
appropriate.

EXPORT phy_device_create() so that the follow-on patch to of_mdio.c
can use it to create phy devices for PHYs, that have non-standard
device identifier registers, based on the device tree bindings.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: Use pr_&lt;level&gt;</title>
<updated>2012-06-11T23:58:24Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2012-06-09T07:49:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8d242488ce4627dd7e6333caab56df11ea25e239'/>
<id>urn:sha1:8d242488ce4627dd7e6333caab56df11ea25e239</id>
<content type='text'>
Use a more current logging style.

Add pr_fmt and missing newlines.
Remove embedded prefixes.
Neaten phy_print_status to avoid using KERN_CONT.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netdev/phy: Make get_phy_id() static and quit EXPORTing it.</title>
<updated>2012-05-16T04:59:12Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2012-05-15T10:46:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=82251de2a2b7b84987dde104d48a765b63170149'/>
<id>urn:sha1:82251de2a2b7b84987dde104d48a765b63170149</id>
<content type='text'>
This function is only referenced from within phy_device.c, so there is
no reason to export it.  In fact, we can make it static.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Acked-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Remove useless get_driver()/put_driver() calls</title>
<updated>2012-01-25T00:00:35Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-01-24T18:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f3ff9247088a0af0c192a28908dab76ff3d8871f'/>
<id>urn:sha1:f3ff9247088a0af0c192a28908dab76ff3d8871f</id>
<content type='text'>
As part of the removal of get_driver()/put_driver(), this patch
(as1512) gets rid of various useless and unnecessary calls in several
drivers.  In some cases it may be desirable to pin the driver by
calling try_module_get(), but that can be done later.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
CC: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
CC: Michael Buesch &lt;m@bues.ch&gt;
CC: Joerg Roedel &lt;joerg.roedel@amd.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>net: Change mii to ethtool advertisement function names</title>
<updated>2011-11-21T20:27:19Z</updated>
<author>
<name>Matt Carlson</name>
<email>mcarlson@broadcom.com</email>
</author>
<published>2011-11-17T14:30:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=37f07023d30708b5da091fe6d6be9b60783c6d82'/>
<id>urn:sha1:37f07023d30708b5da091fe6d6be9b60783c6d82</id>
<content type='text'>
This patch implements advice by Ben Hutchings to change the mii side of
the function names to look more like the register whose values they
convert.  New LPA translation functions have been added as well.

Signed-off-by: Matt Carlson &lt;mcarlson@broadcom.com&gt;
Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Add ethtool to mii advertisment conversion helpers</title>
<updated>2011-11-16T23:36:59Z</updated>
<author>
<name>Matt Carlson</name>
<email>mcarlson@broadcom.com</email>
</author>
<published>2011-11-16T23:36:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=28011cf19b75df9d3f35489a7599a97ec0b3f1a0'/>
<id>urn:sha1:28011cf19b75df9d3f35489a7599a97ec0b3f1a0</id>
<content type='text'>
Translating between ethtool advertisement settings and MII
advertisements are common operations for ethernet drivers.  This patch
adds a set of helper functions that implements the conversion.  The
patch then modifies a couple of the drivers to use the new functions.

Signed-off-by: Matt Carlson &lt;mcarlson@broadcom.com&gt;
Signed-off-by: Michael Chan &lt;mchan@broadcom.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
