<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/phy, branch v4.9.142</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>net: phy: marvell: Limit 88m1101 autoneg errata to 88E1145 as well.</title>
<updated>2018-11-10T15:42:46+00:00</updated>
<author>
<name>Zhao Qiang</name>
<email>qiang.zhao@nxp.com</email>
</author>
<published>2017-12-18T02:26:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e35f290445948076088975a2578b015e46d33408'/>
<id>e35f290445948076088975a2578b015e46d33408</id>
<content type='text'>
[ Upstream commit c505873eaece2b4aefd07d339dc7e1400e0235ac ]

88E1145 also need this autoneg errata.

Fixes: f2899788353c ("net: phy: marvell: Limit errata to 88m1101")
Signed-off-by: Zhao Qiang &lt;qiang.zhao@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit c505873eaece2b4aefd07d339dc7e1400e0235ac ]

88E1145 also need this autoneg errata.

Fixes: f2899788353c ("net: phy: marvell: Limit errata to 88m1101")
Signed-off-by: Zhao Qiang &lt;qiang.zhao@nxp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: xgmiitorgmii: Check phy_driver ready before accessing</title>
<updated>2018-10-04T00:01:46+00:00</updated>
<author>
<name>Brandon Maier</name>
<email>brandon.maier@rockwellcollins.com</email>
</author>
<published>2018-06-26T17:50:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a5a849c9e8a6c357f84a5e249cb468f20da6d28f'/>
<id>a5a849c9e8a6c357f84a5e249cb468f20da6d28f</id>
<content type='text'>
[ Upstream commit ab4e6ee578e88a659938db8fbf33720bc048d29c ]

Since a phy_device is added to the global mdio_bus list during
phy_device_register(), but a phy_device's phy_driver doesn't get
attached until phy_probe(). It's possible of_phy_find_device() in
xgmiitorgmii will return a valid phy with a NULL phy_driver. Leading to
a NULL pointer access during the memcpy().

Fixes this Oops:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.40 #1
Hardware name: Xilinx Zynq Platform
task: ce4c8d00 task.stack: ce4ca000
PC is at memcpy+0x48/0x330
LR is at xgmiitorgmii_probe+0x90/0xe8
pc : [&lt;c074bc68&gt;]    lr : [&lt;c0529548&gt;]    psr: 20000013
sp : ce4cbb54  ip : 00000000  fp : ce4cbb8c
r10: 00000000  r9 : 00000000  r8 : c0c49178
r7 : 00000000  r6 : cdc14718  r5 : ce762800  r4 : cdc14710
r3 : 00000000  r2 : 00000054  r1 : 00000000  r0 : cdc14718
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 0000404a  DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0xce4ca210)
...
[&lt;c074bc68&gt;] (memcpy) from [&lt;c0529548&gt;] (xgmiitorgmii_probe+0x90/0xe8)
[&lt;c0529548&gt;] (xgmiitorgmii_probe) from [&lt;c0526a94&gt;] (mdio_probe+0x28/0x34)
[&lt;c0526a94&gt;] (mdio_probe) from [&lt;c04db98c&gt;] (driver_probe_device+0x254/0x414)
[&lt;c04db98c&gt;] (driver_probe_device) from [&lt;c04dbd58&gt;] (__device_attach_driver+0xac/0x10c)
[&lt;c04dbd58&gt;] (__device_attach_driver) from [&lt;c04d96f4&gt;] (bus_for_each_drv+0x84/0xc8)
[&lt;c04d96f4&gt;] (bus_for_each_drv) from [&lt;c04db5bc&gt;] (__device_attach+0xd0/0x134)
[&lt;c04db5bc&gt;] (__device_attach) from [&lt;c04dbdd4&gt;] (device_initial_probe+0x1c/0x20)
[&lt;c04dbdd4&gt;] (device_initial_probe) from [&lt;c04da8fc&gt;] (bus_probe_device+0x98/0xa0)
[&lt;c04da8fc&gt;] (bus_probe_device) from [&lt;c04d8660&gt;] (device_add+0x43c/0x5d0)
[&lt;c04d8660&gt;] (device_add) from [&lt;c0526cb8&gt;] (mdio_device_register+0x34/0x80)
[&lt;c0526cb8&gt;] (mdio_device_register) from [&lt;c0580b48&gt;] (of_mdiobus_register+0x170/0x30c)
[&lt;c0580b48&gt;] (of_mdiobus_register) from [&lt;c05349c4&gt;] (macb_probe+0x710/0xc00)
[&lt;c05349c4&gt;] (macb_probe) from [&lt;c04dd700&gt;] (platform_drv_probe+0x44/0x80)
[&lt;c04dd700&gt;] (platform_drv_probe) from [&lt;c04db98c&gt;] (driver_probe_device+0x254/0x414)
[&lt;c04db98c&gt;] (driver_probe_device) from [&lt;c04dbc58&gt;] (__driver_attach+0x10c/0x118)
[&lt;c04dbc58&gt;] (__driver_attach) from [&lt;c04d9600&gt;] (bus_for_each_dev+0x8c/0xd0)
[&lt;c04d9600&gt;] (bus_for_each_dev) from [&lt;c04db1fc&gt;] (driver_attach+0x2c/0x30)
[&lt;c04db1fc&gt;] (driver_attach) from [&lt;c04daa98&gt;] (bus_add_driver+0x50/0x260)
[&lt;c04daa98&gt;] (bus_add_driver) from [&lt;c04dc440&gt;] (driver_register+0x88/0x108)
[&lt;c04dc440&gt;] (driver_register) from [&lt;c04dd6b4&gt;] (__platform_driver_register+0x50/0x58)
[&lt;c04dd6b4&gt;] (__platform_driver_register) from [&lt;c0b31248&gt;] (macb_driver_init+0x24/0x28)
[&lt;c0b31248&gt;] (macb_driver_init) from [&lt;c010203c&gt;] (do_one_initcall+0x60/0x1a4)
[&lt;c010203c&gt;] (do_one_initcall) from [&lt;c0b00f78&gt;] (kernel_init_freeable+0x15c/0x1f8)
[&lt;c0b00f78&gt;] (kernel_init_freeable) from [&lt;c0763d10&gt;] (kernel_init+0x18/0x124)
[&lt;c0763d10&gt;] (kernel_init) from [&lt;c0112d74&gt;] (ret_from_fork+0x14/0x20)
Code: ba000002 f5d1f03c f5d1f05c f5d1f07c (e8b151f8)
---[ end trace 3e4ec21905820a1f ]---

Signed-off-by: Brandon Maier &lt;brandon.maier@rockwellcollins.com&gt;
Reviewed-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;

Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit ab4e6ee578e88a659938db8fbf33720bc048d29c ]

Since a phy_device is added to the global mdio_bus list during
phy_device_register(), but a phy_device's phy_driver doesn't get
attached until phy_probe(). It's possible of_phy_find_device() in
xgmiitorgmii will return a valid phy with a NULL phy_driver. Leading to
a NULL pointer access during the memcpy().

Fixes this Oops:

Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.40 #1
Hardware name: Xilinx Zynq Platform
task: ce4c8d00 task.stack: ce4ca000
PC is at memcpy+0x48/0x330
LR is at xgmiitorgmii_probe+0x90/0xe8
pc : [&lt;c074bc68&gt;]    lr : [&lt;c0529548&gt;]    psr: 20000013
sp : ce4cbb54  ip : 00000000  fp : ce4cbb8c
r10: 00000000  r9 : 00000000  r8 : c0c49178
r7 : 00000000  r6 : cdc14718  r5 : ce762800  r4 : cdc14710
r3 : 00000000  r2 : 00000054  r1 : 00000000  r0 : cdc14718
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 18c5387d  Table: 0000404a  DAC: 00000051
Process swapper/0 (pid: 1, stack limit = 0xce4ca210)
...
[&lt;c074bc68&gt;] (memcpy) from [&lt;c0529548&gt;] (xgmiitorgmii_probe+0x90/0xe8)
[&lt;c0529548&gt;] (xgmiitorgmii_probe) from [&lt;c0526a94&gt;] (mdio_probe+0x28/0x34)
[&lt;c0526a94&gt;] (mdio_probe) from [&lt;c04db98c&gt;] (driver_probe_device+0x254/0x414)
[&lt;c04db98c&gt;] (driver_probe_device) from [&lt;c04dbd58&gt;] (__device_attach_driver+0xac/0x10c)
[&lt;c04dbd58&gt;] (__device_attach_driver) from [&lt;c04d96f4&gt;] (bus_for_each_drv+0x84/0xc8)
[&lt;c04d96f4&gt;] (bus_for_each_drv) from [&lt;c04db5bc&gt;] (__device_attach+0xd0/0x134)
[&lt;c04db5bc&gt;] (__device_attach) from [&lt;c04dbdd4&gt;] (device_initial_probe+0x1c/0x20)
[&lt;c04dbdd4&gt;] (device_initial_probe) from [&lt;c04da8fc&gt;] (bus_probe_device+0x98/0xa0)
[&lt;c04da8fc&gt;] (bus_probe_device) from [&lt;c04d8660&gt;] (device_add+0x43c/0x5d0)
[&lt;c04d8660&gt;] (device_add) from [&lt;c0526cb8&gt;] (mdio_device_register+0x34/0x80)
[&lt;c0526cb8&gt;] (mdio_device_register) from [&lt;c0580b48&gt;] (of_mdiobus_register+0x170/0x30c)
[&lt;c0580b48&gt;] (of_mdiobus_register) from [&lt;c05349c4&gt;] (macb_probe+0x710/0xc00)
[&lt;c05349c4&gt;] (macb_probe) from [&lt;c04dd700&gt;] (platform_drv_probe+0x44/0x80)
[&lt;c04dd700&gt;] (platform_drv_probe) from [&lt;c04db98c&gt;] (driver_probe_device+0x254/0x414)
[&lt;c04db98c&gt;] (driver_probe_device) from [&lt;c04dbc58&gt;] (__driver_attach+0x10c/0x118)
[&lt;c04dbc58&gt;] (__driver_attach) from [&lt;c04d9600&gt;] (bus_for_each_dev+0x8c/0xd0)
[&lt;c04d9600&gt;] (bus_for_each_dev) from [&lt;c04db1fc&gt;] (driver_attach+0x2c/0x30)
[&lt;c04db1fc&gt;] (driver_attach) from [&lt;c04daa98&gt;] (bus_add_driver+0x50/0x260)
[&lt;c04daa98&gt;] (bus_add_driver) from [&lt;c04dc440&gt;] (driver_register+0x88/0x108)
[&lt;c04dc440&gt;] (driver_register) from [&lt;c04dd6b4&gt;] (__platform_driver_register+0x50/0x58)
[&lt;c04dd6b4&gt;] (__platform_driver_register) from [&lt;c0b31248&gt;] (macb_driver_init+0x24/0x28)
[&lt;c0b31248&gt;] (macb_driver_init) from [&lt;c010203c&gt;] (do_one_initcall+0x60/0x1a4)
[&lt;c010203c&gt;] (do_one_initcall) from [&lt;c0b00f78&gt;] (kernel_init_freeable+0x15c/0x1f8)
[&lt;c0b00f78&gt;] (kernel_init_freeable) from [&lt;c0763d10&gt;] (kernel_init+0x18/0x124)
[&lt;c0763d10&gt;] (kernel_init) from [&lt;c0112d74&gt;] (ret_from_fork+0x14/0x20)
Code: ba000002 f5d1f03c f5d1f05c f5d1f07c (e8b151f8)
---[ end trace 3e4ec21905820a1f ]---

Signed-off-by: Brandon Maier &lt;brandon.maier@rockwellcollins.com&gt;
Reviewed-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;

Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: xgmiitorgmii: Check read_status results</title>
<updated>2018-10-04T00:01:46+00:00</updated>
<author>
<name>Brandon Maier</name>
<email>brandon.maier@rockwellcollins.com</email>
</author>
<published>2018-06-26T17:50:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=72233116f96df97d822357a5b5f4ad38da444a7e'/>
<id>72233116f96df97d822357a5b5f4ad38da444a7e</id>
<content type='text'>
[ Upstream commit 8d0752d11312be830c33e84dfd1016e6a47c2938 ]

We're ignoring the result of the attached phy device's read_status().
Return it so we can detect errors.

Signed-off-by: Brandon Maier &lt;brandon.maier@rockwellcollins.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 8d0752d11312be830c33e84dfd1016e6a47c2938 ]

We're ignoring the result of the attached phy device's read_status().
Return it so we can detect errors.

Signed-off-by: Brandon Maier &lt;brandon.maier@rockwellcollins.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: Fix the register offsets in Broadcom iProc mdio mux driver</title>
<updated>2018-09-19T20:47:12+00:00</updated>
<author>
<name>Arun Parameswaran</name>
<email>arun.parameswaran@broadcom.com</email>
</author>
<published>2018-08-02T00:53:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9e1a874f527777df3ab10d6f9de4747cae054773'/>
<id>9e1a874f527777df3ab10d6f9de4747cae054773</id>
<content type='text'>
[ Upstream commit 77fefa93bfebe4df44f154f2aa5938e32630d0bf ]

Modify the register offsets in the Broadcom iProc mdio mux to start
from the top of the register address space.

Earlier, the base address pointed to the end of the block's register
space. The base address will now point to the start of the mdio's
address space. The offsets have been fixed to match this.

Signed-off-by: Arun Parameswaran &lt;arun.parameswaran@broadcom.com&gt;
Reviewed-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;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 77fefa93bfebe4df44f154f2aa5938e32630d0bf ]

Modify the register offsets in the Broadcom iProc mdio mux to start
from the top of the register address space.

Earlier, the base address pointed to the end of the block's register
space. The base address will now point to the start of the mdio's
address space. The offsets have been fixed to match this.

Signed-off-by: Arun Parameswaran &lt;arun.parameswaran@broadcom.com&gt;
Reviewed-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;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: mdio-mux: bcm-iproc: fix wrong getter and setter pair</title>
<updated>2018-08-06T14:23:01+00:00</updated>
<author>
<name>Anton Vasilyev</name>
<email>vasilyev@ispras.ru</email>
</author>
<published>2018-07-27T15:57:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=32363930dfd2eb8449d062cb590918021f8d7502'/>
<id>32363930dfd2eb8449d062cb590918021f8d7502</id>
<content type='text'>
[ Upstream commit b0753408aadf32c7ece9e6b765017881e54af833 ]

mdio_mux_iproc_probe() uses platform_set_drvdata() to store md pointer
in device, whereas mdio_mux_iproc_remove() restores md pointer by
dev_get_platdata(&amp;pdev-&gt;dev). This leads to wrong resources release.

The patch replaces getter to platform_get_drvdata.

Fixes: 98bc865a1ec8 ("net: mdio-mux: Add MDIO mux driver for iProc SoCs")
Signed-off-by: Anton Vasilyev &lt;vasilyev@ispras.ru&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit b0753408aadf32c7ece9e6b765017881e54af833 ]

mdio_mux_iproc_probe() uses platform_set_drvdata() to store md pointer
in device, whereas mdio_mux_iproc_remove() restores md pointer by
dev_get_platdata(&amp;pdev-&gt;dev). This leads to wrong resources release.

The patch replaces getter to platform_get_drvdata.

Fixes: 98bc865a1ec8 ("net: mdio-mux: Add MDIO mux driver for iProc SoCs")
Signed-off-by: Anton Vasilyev &lt;vasilyev@ispras.ru&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv</title>
<updated>2018-07-28T05:49:11+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2018-07-19T06:15:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c6ac36be72e46082bedd4433ccba9925bbf6a322'/>
<id>c6ac36be72e46082bedd4433ccba9925bbf6a322</id>
<content type='text'>
[ Upstream commit 215d08a85b9acf5e1fe9dbf50f1774cde333efef ]

The situation described in the comment can occur also with
PHY_IGNORE_INTERRUPT, therefore change the condition to include it.

Fixes: f555f34fdc58 ("net: phy: fix auto-negotiation stall due to unavailable interrupt")
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 215d08a85b9acf5e1fe9dbf50f1774cde333efef ]

The situation described in the comment can occur also with
PHY_IGNORE_INTERRUPT, therefore change the condition to include it.

Fixes: f555f34fdc58 ("net: phy: fix auto-negotiation stall due to unavailable interrupt")
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: fix flag masking in __set_phy_supported</title>
<updated>2018-07-25T09:24:01+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2018-07-03T20:34:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=77befb4bd1083bb2001851c6a4439b2467055423'/>
<id>77befb4bd1083bb2001851c6a4439b2467055423</id>
<content type='text'>
[ Upstream commit df8ed346d4a806a6eef2db5924285e839604b3f9 ]

Currently also the pause flags are removed from phydev-&gt;supported because
they're not included in PHY_DEFAULT_FEATURES. I don't think this is
intended, especially when considering that this function can be called
via phy_set_max_speed() anywhere in a driver. Change the masking to mask
out only the values we're going to change. In addition remove the
misleading comment, job of this small function is just to adjust the
supported and advertised speeds.

Fixes: f3a6bd393c2c ("phylib: Add phy_set_max_speed helper")
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit df8ed346d4a806a6eef2db5924285e839604b3f9 ]

Currently also the pause flags are removed from phydev-&gt;supported because
they're not included in PHY_DEFAULT_FEATURES. I don't think this is
intended, especially when considering that this function can be called
via phy_set_max_speed() anywhere in a driver. Change the masking to mask
out only the values we're going to change. In addition remove the
misleading comment, job of this small function is just to adjust the
supported and advertised speeds.

Fixes: f3a6bd393c2c ("phylib: Add phy_set_max_speed helper")
Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Reviewed-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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: micrel: fix crash when statistic requested for KSZ9031 phy</title>
<updated>2018-07-11T14:26:42+00:00</updated>
<author>
<name>Grygorii Strashko</name>
<email>grygorii.strashko@ti.com</email>
</author>
<published>2017-04-13T19:11:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7dafda5bf29f06c1d62f1a25bd4c1f13d0242b3f'/>
<id>7dafda5bf29f06c1d62f1a25bd4c1f13d0242b3f</id>
<content type='text'>
commit bfe72442578bb112626e476ffe1f276504d85b95 upstream.

Now the command:
	ethtool --phy-statistics eth0
will cause system crash with meassage "Unable to handle kernel NULL pointer
dereference at virtual address 00000010" from:

 (kszphy_get_stats) from [&lt;c069f1d8&gt;] (ethtool_get_phy_stats+0xd8/0x210)
 (ethtool_get_phy_stats) from [&lt;c06a0738&gt;] (dev_ethtool+0x5b8/0x228c)
 (dev_ethtool) from [&lt;c06b5484&gt;] (dev_ioctl+0x3fc/0x964)
 (dev_ioctl) from [&lt;c0679f7c&gt;] (sock_ioctl+0x170/0x2c0)
 (sock_ioctl) from [&lt;c02419d4&gt;] (do_vfs_ioctl+0xa8/0x95c)
 (do_vfs_ioctl) from [&lt;c02422c4&gt;] (SyS_ioctl+0x3c/0x64)
 (SyS_ioctl) from [&lt;c0107d60&gt;] (ret_fast_syscall+0x0/0x44)

The reason: phy_driver structure for KSZ9031 phy has no .probe() callback
defined. As result, struct phy_device *phydev-&gt;priv pointer will not be
initializes (null).
This issue will affect also following phys:
 KSZ8795, KSZ886X, KSZ8873MLL, KSZ9031, KSZ9021, KSZ8061, KS8737

Fix it by:
- adding .probe() = kszphy_probe() callback to KSZ9031, KSZ9021
phys. The kszphy_probe() can be re-used as it doesn't do any phy specific
settings.
- removing statistic callbacks from other phys (KSZ8795, KSZ886X,
KSZ8873MLL, KSZ8061, KS8737) as they doesn't have corresponding
statistic counters.

Fixes: 2b2427d06426 ("phy: micrel: Add ethtool statistics counters")
Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Reviewed-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;
Cc: Dan Rue &lt;dan.rue@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit bfe72442578bb112626e476ffe1f276504d85b95 upstream.

Now the command:
	ethtool --phy-statistics eth0
will cause system crash with meassage "Unable to handle kernel NULL pointer
dereference at virtual address 00000010" from:

 (kszphy_get_stats) from [&lt;c069f1d8&gt;] (ethtool_get_phy_stats+0xd8/0x210)
 (ethtool_get_phy_stats) from [&lt;c06a0738&gt;] (dev_ethtool+0x5b8/0x228c)
 (dev_ethtool) from [&lt;c06b5484&gt;] (dev_ioctl+0x3fc/0x964)
 (dev_ioctl) from [&lt;c0679f7c&gt;] (sock_ioctl+0x170/0x2c0)
 (sock_ioctl) from [&lt;c02419d4&gt;] (do_vfs_ioctl+0xa8/0x95c)
 (do_vfs_ioctl) from [&lt;c02422c4&gt;] (SyS_ioctl+0x3c/0x64)
 (SyS_ioctl) from [&lt;c0107d60&gt;] (ret_fast_syscall+0x0/0x44)

The reason: phy_driver structure for KSZ9031 phy has no .probe() callback
defined. As result, struct phy_device *phydev-&gt;priv pointer will not be
initializes (null).
This issue will affect also following phys:
 KSZ8795, KSZ886X, KSZ8873MLL, KSZ9031, KSZ9021, KSZ8061, KS8737

Fix it by:
- adding .probe() = kszphy_probe() callback to KSZ9031, KSZ9021
phys. The kszphy_probe() can be re-used as it doesn't do any phy specific
settings.
- removing statistic callbacks from other phys (KSZ8795, KSZ886X,
KSZ8873MLL, KSZ8061, KS8737) as they doesn't have corresponding
statistic counters.

Fixes: 2b2427d06426 ("phy: micrel: Add ethtool statistics counters")
Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Reviewed-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;
Cc: Dan Rue &lt;dan.rue@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>net: phy: broadcom: Fix bcm_write_exp()</title>
<updated>2018-06-13T14:16:43+00:00</updated>
<author>
<name>Florian Fainelli</name>
<email>f.fainelli@gmail.com</email>
</author>
<published>2018-05-23T00:04:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=0e0a027873cf3c9abdbb5dcbdbcbcacccdba69d7'/>
<id>0e0a027873cf3c9abdbb5dcbdbcbcacccdba69d7</id>
<content type='text'>
[ Upstream commit 79fb218d97980d4fee9a64f4c8ff05289364ba25 ]

On newer PHYs, we need to select the expansion register to write with
setting bits [11:8] to 0xf. This was done correctly by bcm7xxx.c prior
to being migrated to generic code under bcm-phy-lib.c which
unfortunately used the older implementation from the BCM54xx days.

Fix this by creating an inline stub: bcm_write_exp_sel() which adds the
correct value (MII_BCM54XX_EXP_SEL_ER) and update both the Cygnus PHY
and BCM7xxx PHY drivers which require setting these bits.

broadcom.c is unchanged because some PHYs even use a different selector
method, so let them specify it directly (e.g: SerDes secondary selector).

Fixes: a1cba5613edf ("net: phy: Add Broadcom phy library for common interfaces")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 79fb218d97980d4fee9a64f4c8ff05289364ba25 ]

On newer PHYs, we need to select the expansion register to write with
setting bits [11:8] to 0xf. This was done correctly by bcm7xxx.c prior
to being migrated to generic code under bcm-phy-lib.c which
unfortunately used the older implementation from the BCM54xx days.

Fix this by creating an inline stub: bcm_write_exp_sel() which adds the
correct value (MII_BCM54XX_EXP_SEL_ER) and update both the Cygnus PHY
and BCM7xxx PHY drivers which require setting these bits.

broadcom.c is unchanged because some PHYs even use a different selector
method, so let them specify it directly (e.g: SerDes secondary selector).

Fixes: a1cba5613edf ("net: phy: Add Broadcom phy library for common interfaces")
Signed-off-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dp83640: Ensure against premature access to PHY registers after reset</title>
<updated>2018-05-30T05:50:40+00:00</updated>
<author>
<name>Esben Haabendal</name>
<email>eha@deif.com</email>
</author>
<published>2018-04-08T20:17:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bb928fbe0f05d98570f6d10b5ab2961323ed1f89'/>
<id>bb928fbe0f05d98570f6d10b5ab2961323ed1f89</id>
<content type='text'>
[ Upstream commit 76327a35caabd1a932e83d6a42b967aa08584e5d ]

The datasheet specifies a 3uS pause after performing a software
reset. The default implementation of genphy_soft_reset() does not
provide this, so implement soft_reset with the needed pause.

Signed-off-by: Esben Haabendal &lt;eha@deif.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 76327a35caabd1a932e83d6a42b967aa08584e5d ]

The datasheet specifies a 3uS pause after performing a software
reset. The default implementation of genphy_soft_reset() does not
provide this, so implement soft_reset with the needed pause.

Signed-off-by: Esben Haabendal &lt;eha@deif.com&gt;
Reviewed-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
