<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/phy/phy_device.c, branch v4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-12-07T18:27:14Z</updated>
<entry>
<title>phy: Don't increment MDIO bus refcount unless it's a different owner</title>
<updated>2016-12-07T18:27:14Z</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2016-12-07T04:54:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ec988ad78ed6d184a7f4ca6b8e962b0e8f1de461'/>
<id>urn:sha1:ec988ad78ed6d184a7f4ca6b8e962b0e8f1de461</id>
<content type='text'>
Commit 3e3aaf649416 ("phy: fix mdiobus module safety") fixed the way we
dealt with MDIO bus module reference count, but sort of introduced a
regression in that, if an Ethernet driver registers its own MDIO bus
driver, as is common, we will end up with the Ethernet driver's
module-&gt;refnct set to 1, thus preventing this driver from any removal.

Fix this by comparing the network device's device driver owner against
the MDIO bus driver owner, and only if they are different, increment the
MDIO bus module refcount.

Fixes: 3e3aaf649416 ("phy: fix mdiobus module safety")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: fix device reference leaks</title>
<updated>2016-11-07T18:17:29Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2016-11-03T17:40:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=17ae1c650c1ecf8dc8e16d54b0f68a345965f43f'/>
<id>urn:sha1:17ae1c650c1ecf8dc8e16d54b0f68a345965f43f</id>
<content type='text'>
Make sure to drop the reference taken by bus_find_device_by_name()
before returning from phy_connect() and phy_attach().

Note that both function still take a reference to the phy device
through phy_attach_direct().

Fixes: e13934563db0 ("[PATCH] PHY Layer fixup")
Cc: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "phy: add support for a reset-gpio specification"</title>
<updated>2016-05-20T21:56:59Z</updated>
<author>
<name>Fabio Estevam</name>
<email>fabio.estevam@nxp.com</email>
</author>
<published>2016-05-18T16:05:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=948350140ef060a42621de0de5c396807f7ec1fc'/>
<id>urn:sha1:948350140ef060a42621de0de5c396807f7ec1fc</id>
<content type='text'>
Commit da47b4572056 ("phy: add support for a reset-gpio specification")
causes the following xtensa qemu crash according to Guenter Roeck:

[    9.366256] libphy: ethoc-mdio: probed
[    9.367389]  (null): could not attach to PHY
[    9.368555]  (null): failed to probe MDIO bus
[    9.371540] Unable to handle kernel paging request at virtual address 0000001c
[    9.371540]  pc = d0320926, ra = 903209d1
[    9.375358] Oops: sig: 11 [#1]

This reverts commit da47b4572056487fd7941c26f73b3e8815ff712a.

Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Fabio Estevam &lt;fabio.estevam@nxp.com&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Tested-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: add support for a reset-gpio specification</title>
<updated>2016-05-16T17:22:53Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2016-05-12T10:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da47b4572056487fd7941c26f73b3e8815ff712a'/>
<id>urn:sha1:da47b4572056487fd7941c26f73b3e8815ff712a</id>
<content type='text'>
The framework only asserts (for now) that the reset gpio is not active.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Reviewed-by: Roger Quadros &lt;rogerq@ti.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phylib: don't return NULL from get_phy_device()</title>
<updated>2016-04-26T19:41:19Z</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sergei.shtylyov@cogentembedded.com</email>
</author>
<published>2016-04-24T17:25:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b74766a0a0feeef5c779709cc5d109451c0d5b17'/>
<id>urn:sha1:b74766a0a0feeef5c779709cc5d109451c0d5b17</id>
<content type='text'>
Arnd Bergmann asked that get_phy_device() returns either NULL or the error
value,  not both on error.  Do as he said, return ERR_PTR(-ENODEV) instead
of NULL when the PHY ID registers read as  all ones.

Suggested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Sergei Shtylyov &lt;sergei.shtylyov@cogentembedded.com&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: make some bits preserved while setup forced mode</title>
<updated>2016-04-16T00:10:00Z</updated>
<author>
<name>wangweidong</name>
<email>wangweidong1@huawei.com</email>
</author>
<published>2016-04-14T07:43:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f48256efededaa87f475c0d6330d83f853cb064a'/>
<id>urn:sha1:f48256efededaa87f475c0d6330d83f853cb064a</id>
<content type='text'>
When tested the PHY SGMII Loopback:
1.set the LOOPBACK bit,
2.set the autoneg to AUTONEG_DISABLE, it calls the
genphy_setup_forced which will clear the bit.

The BMCR_LOOPBACK bit should be preserved.

As Florian pointed out that other bits should be preserved too.
So I make the BMCR_ISOLATE and BMCR_PDOWN as well.

Signed-off-by: Weidong Wang &lt;wangweidong1@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: keep pause flags in phy driver features</title>
<updated>2016-02-17T15:48:07Z</updated>
<author>
<name>Woojung.Huh@microchip.com</name>
<email>Woojung.Huh@microchip.com</email>
</author>
<published>2016-02-11T17:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd772de358d6e001d308292c542f7908511287a4'/>
<id>urn:sha1:cd772de358d6e001d308292c542f7908511287a4</id>
<content type='text'>
genphy_config_init() masked out pause flags set in phy driver structure.
Pause flags needs to be preserved in phydev-&gt;supported &amp;
phydev-&gt;advertising.

Signed-off-by: Woojung Huh &lt;woojung.huh@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: phy: turn carrier off on phy attach</title>
<updated>2016-01-15T19:49:11Z</updated>
<author>
<name>Sjoerd Simons</name>
<email>sjoerd.simons@collabora.co.uk</email>
</author>
<published>2016-01-14T20:57:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=113c74d83eef870e43a0d9279044e9d5435f0d07'/>
<id>urn:sha1:113c74d83eef870e43a0d9279044e9d5435f0d07</id>
<content type='text'>
The operstate of a networking device initially IF_OPER_UNKNOWN aka
"unknown", updated on carrier state changes (with carrier state being on
by default). This means it will stay unknown unless the carrier state
goes to off at some point, which is not the case if the phy is already
up/connected at startup.

Explicitly turn off the carrier on phy attach, leaving the phy state
machine to turn the carrier on when it has done the initial negotiation.

Signed-off-by: Sjoerd Simons &lt;sjoerd.simons@collabora.co.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>phy: remove an unneeded condition</title>
<updated>2016-01-12T16:51:58Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2016-01-12T09:36:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=47b356e499f26d330ab6ae4019e8c05f994be62d'/>
<id>urn:sha1:47b356e499f26d330ab6ae4019e8c05f994be62d</id>
<content type='text'>
It used to be that bus-&gt;irq was a pointer but after e7f4dc3536a4
('mdio: Move allocation of interrupts into core') it's an array inside
the mdio struct, so it can never be NULL.  Let's remove the check.

Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>mdio: Abstract device_remove() and device_free()</title>
<updated>2016-01-07T19:31:27Z</updated>
<author>
<name>Andrew Lunn</name>
<email>andrew@lunn.ch</email>
</author>
<published>2016-01-06T19:11:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=711fdba37a3dd7ee487e28767f9f0e67144cbf80'/>
<id>urn:sha1:711fdba37a3dd7ee487e28767f9f0e67144cbf80</id>
<content type='text'>
Make device_free and device_remove operations in the mdio device
structure, so the core code does not need to differentiate between
phy devices and generic mdio devices.

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Reviewed-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
