<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/net/usb, branch v5.14.7</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>net: hso: add failure handler for add_net_device</title>
<updated>2021-09-22T10:39:31+00:00</updated>
<author>
<name>Ziyang Xuan</name>
<email>william.xuanziyang@huawei.com</email>
</author>
<published>2021-09-02T08:36:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=98641c732e9563564cc05964280ba5fb50ec1a0f'/>
<id>98641c732e9563564cc05964280ba5fb50ec1a0f</id>
<content type='text'>
[ Upstream commit ecdc28defc46af476566fffd9e5cb4495a2f176e ]

If the network devices connected to the system beyond
HSO_MAX_NET_DEVICES. add_net_device() in hso_create_net_device()
will be failed for the network_table is full. It will lead to
business failure which rely on network_table, for example,
hso_suspend() and hso_resume(). It will also lead to memory leak
because resource release process can not search the hso_device
object from network_table in hso_free_interface().

Add failure handler for add_net_device() in hso_create_net_device()
to solve the above problems.

Fixes: 72dc1c096c70 ("HSO: add option hso driver")
Signed-off-by: Ziyang Xuan &lt;william.xuanziyang@huawei.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 ecdc28defc46af476566fffd9e5cb4495a2f176e ]

If the network devices connected to the system beyond
HSO_MAX_NET_DEVICES. add_net_device() in hso_create_net_device()
will be failed for the network_table is full. It will lead to
business failure which rely on network_table, for example,
hso_suspend() and hso_resume(). It will also lead to memory leak
because resource release process can not search the hso_device
object from network_table in hso_free_interface().

Add failure handler for add_net_device() in hso_create_net_device()
to solve the above problems.

Fixes: 72dc1c096c70 ("HSO: add option hso driver")
Signed-off-by: Ziyang Xuan &lt;william.xuanziyang@huawei.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: usb: cdc_mbim: avoid altsetting toggling for Telit LN920</title>
<updated>2021-09-22T10:39:27+00:00</updated>
<author>
<name>Daniele Palmas</name>
<email>dnlplm@gmail.com</email>
</author>
<published>2021-09-02T10:51:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=488e251c69871b1328731a68d840b14f42c495bb'/>
<id>488e251c69871b1328731a68d840b14f42c495bb</id>
<content type='text'>
[ Upstream commit aabbdc67f3485b5db27ab4eba01e5fbf1ffea62c ]

Add quirk CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE for Telit LN920
0x1061 composition in order to avoid bind error.

Signed-off-by: Daniele Palmas &lt;dnlplm@gmail.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 aabbdc67f3485b5db27ab4eba01e5fbf1ffea62c ]

Add quirk CDC_MBIM_FLAG_AVOID_ALTSETTING_TOGGLE for Telit LN920
0x1061 composition in order to avoid bind error.

Signed-off-by: Daniele Palmas &lt;dnlplm@gmail.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: usb: asix: ax88772: add missing stop</title>
<updated>2021-09-15T08:02:13+00:00</updated>
<author>
<name>Oleksij Rempel</name>
<email>o.rempel@pengutronix.de</email>
</author>
<published>2021-07-22T07:32:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=68b8b58abb5df91eb3addf8c393ae813e1d47b0e'/>
<id>68b8b58abb5df91eb3addf8c393ae813e1d47b0e</id>
<content type='text'>
[ Upstream commit 9c2670951ed03f8fc6c701d66f5c765929cf1f23 ]

Add missing stop and let phylib framework suspend attached PHY.

Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&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 9c2670951ed03f8fc6c701d66f5c765929cf1f23 ]

Add missing stop and let phylib framework suspend attached PHY.

Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&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: usb: asix: ax88772: fix boolconv.cocci warnings</title>
<updated>2021-08-25T23:35:51+00:00</updated>
<author>
<name>kernel test robot</name>
<email>lkp@intel.com</email>
</author>
<published>2021-08-25T18:35:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ec92e524ee91c98e6ee06807c7d69d9e2fd141bc'/>
<id>ec92e524ee91c98e6ee06807c7d69d9e2fd141bc</id>
<content type='text'>
drivers/net/usb/asix_devices.c:757:60-65: WARNING: conversion to bool not needed here

 Remove unneeded conversion to bool

Semantic patch information:
 Relational and logical operators evaluate to bool,
 explicit conversion is overly verbose and unneeded.

Generated by: scripts/coccinelle/misc/boolconv.cocci

Fixes: 7a141e64cf14 ("net: usb: asix: ax88772: move embedded PHY detection as early as possible")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: kernel test robot &lt;lkp@intel.com&gt;
Reviewed-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210825183538.13070-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/net/usb/asix_devices.c:757:60-65: WARNING: conversion to bool not needed here

 Remove unneeded conversion to bool

Semantic patch information:
 Relational and logical operators evaluate to bool,
 explicit conversion is overly verbose and unneeded.

Generated by: scripts/coccinelle/misc/boolconv.cocci

Fixes: 7a141e64cf14 ("net: usb: asix: ax88772: move embedded PHY detection as early as possible")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: kernel test robot &lt;lkp@intel.com&gt;
Reviewed-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20210825183538.13070-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: usb: asix: do not call phy_disconnect() for ax88178</title>
<updated>2021-08-23T11:39:42+00:00</updated>
<author>
<name>Oleksij Rempel</name>
<email>o.rempel@pengutronix.de</email>
</author>
<published>2021-08-23T07:37:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1406e8cb4b05fdc67692b1af2da39d7ca5278713'/>
<id>1406e8cb4b05fdc67692b1af2da39d7ca5278713</id>
<content type='text'>
Fix crash on reboot on a system with ASIX AX88178 USB adapter attached
to it:
| asix 1-1.4:1.0 eth0: unregister 'asix' usb-ci_hdrc.0-1.4, ASIX AX88178 USB 2.0 Ethernet
| 8&lt;--- cut here ---
| Unable to handle kernel NULL pointer dereference at virtual address 0000028c
| pgd = 5ec93aee
| [0000028c] *pgd=00000000
| Internal error: Oops: 5 [#1] PREEMPT SMP ARM
| Modules linked in:
| CPU: 1 PID: 1 Comm: systemd-shutdow Not tainted 5.14.0-rc1-20210811-1 #4
| Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
| PC is at phy_disconnect+0x8/0x48
| LR is at ax88772_unbind+0x14/0x20
| [&lt;80650d04&gt;] (phy_disconnect) from [&lt;80741aa4&gt;] (ax88772_unbind+0x14/0x20)
| [&lt;80741aa4&gt;] (ax88772_unbind) from [&lt;8074e250&gt;] (usbnet_disconnect+0x48/0xd8)
| [&lt;8074e250&gt;] (usbnet_disconnect) from [&lt;807655e0&gt;] (usb_unbind_interface+0x78/0x25c)
| [&lt;807655e0&gt;] (usb_unbind_interface) from [&lt;805b03a0&gt;] (__device_release_driver+0x154/0x20c)
| [&lt;805b03a0&gt;] (__device_release_driver) from [&lt;805b0478&gt;] (device_release_driver+0x20/0x2c)
| [&lt;805b0478&gt;] (device_release_driver) from [&lt;805af944&gt;] (bus_remove_device+0xcc/0xf8)
| [&lt;805af944&gt;] (bus_remove_device) from [&lt;805ab26c&gt;] (device_del+0x178/0x4b0)
| [&lt;805ab26c&gt;] (device_del) from [&lt;807634a4&gt;] (usb_disable_device+0xcc/0x178)
| [&lt;807634a4&gt;] (usb_disable_device) from [&lt;8075a060&gt;] (usb_disconnect+0xd8/0x238)
| [&lt;8075a060&gt;] (usb_disconnect) from [&lt;8075a02c&gt;] (usb_disconnect+0xa4/0x238)
| [&lt;8075a02c&gt;] (usb_disconnect) from [&lt;8075a02c&gt;] (usb_disconnect+0xa4/0x238)
| [&lt;8075a02c&gt;] (usb_disconnect) from [&lt;80af3520&gt;] (usb_remove_hcd+0xa0/0x198)
| [&lt;80af3520&gt;] (usb_remove_hcd) from [&lt;807902e0&gt;] (host_stop+0x38/0xa8)
| [&lt;807902e0&gt;] (host_stop) from [&lt;8078d9e4&gt;] (ci_hdrc_remove+0x3c/0x118)
| [&lt;8078d9e4&gt;] (ci_hdrc_remove) from [&lt;805b27ec&gt;] (platform_remove+0x20/0x50)
| [&lt;805b27ec&gt;] (platform_remove) from [&lt;805b03a0&gt;] (__device_release_driver+0x154/0x20c)
| [&lt;805b03a0&gt;] (__device_release_driver) from [&lt;805b0478&gt;] (device_release_driver+0x20/0x2c)
| [&lt;805b0478&gt;] (device_release_driver) from [&lt;805af944&gt;] (bus_remove_device+0xcc/0xf8)
| [&lt;805af944&gt;] (bus_remove_device) from [&lt;805ab26c&gt;] (device_del+0x178/0x4b0)

For this adapter we call ax88178_bind() and ax88772_unbind(), which is
related to different chip version and different counter part *bind()
function.

Since this chip is currently not ported to the PHYLIB, we do not need to
call phy_disconnect() here. So, to fix this crash, we need to add
ax88178_unbind().

Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Reported-by: Robin van der Gracht &lt;robin@protonic.nl&gt;
Tested-by: Robin van der Gracht &lt;robin@protonic.nl&gt;
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix crash on reboot on a system with ASIX AX88178 USB adapter attached
to it:
| asix 1-1.4:1.0 eth0: unregister 'asix' usb-ci_hdrc.0-1.4, ASIX AX88178 USB 2.0 Ethernet
| 8&lt;--- cut here ---
| Unable to handle kernel NULL pointer dereference at virtual address 0000028c
| pgd = 5ec93aee
| [0000028c] *pgd=00000000
| Internal error: Oops: 5 [#1] PREEMPT SMP ARM
| Modules linked in:
| CPU: 1 PID: 1 Comm: systemd-shutdow Not tainted 5.14.0-rc1-20210811-1 #4
| Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
| PC is at phy_disconnect+0x8/0x48
| LR is at ax88772_unbind+0x14/0x20
| [&lt;80650d04&gt;] (phy_disconnect) from [&lt;80741aa4&gt;] (ax88772_unbind+0x14/0x20)
| [&lt;80741aa4&gt;] (ax88772_unbind) from [&lt;8074e250&gt;] (usbnet_disconnect+0x48/0xd8)
| [&lt;8074e250&gt;] (usbnet_disconnect) from [&lt;807655e0&gt;] (usb_unbind_interface+0x78/0x25c)
| [&lt;807655e0&gt;] (usb_unbind_interface) from [&lt;805b03a0&gt;] (__device_release_driver+0x154/0x20c)
| [&lt;805b03a0&gt;] (__device_release_driver) from [&lt;805b0478&gt;] (device_release_driver+0x20/0x2c)
| [&lt;805b0478&gt;] (device_release_driver) from [&lt;805af944&gt;] (bus_remove_device+0xcc/0xf8)
| [&lt;805af944&gt;] (bus_remove_device) from [&lt;805ab26c&gt;] (device_del+0x178/0x4b0)
| [&lt;805ab26c&gt;] (device_del) from [&lt;807634a4&gt;] (usb_disable_device+0xcc/0x178)
| [&lt;807634a4&gt;] (usb_disable_device) from [&lt;8075a060&gt;] (usb_disconnect+0xd8/0x238)
| [&lt;8075a060&gt;] (usb_disconnect) from [&lt;8075a02c&gt;] (usb_disconnect+0xa4/0x238)
| [&lt;8075a02c&gt;] (usb_disconnect) from [&lt;8075a02c&gt;] (usb_disconnect+0xa4/0x238)
| [&lt;8075a02c&gt;] (usb_disconnect) from [&lt;80af3520&gt;] (usb_remove_hcd+0xa0/0x198)
| [&lt;80af3520&gt;] (usb_remove_hcd) from [&lt;807902e0&gt;] (host_stop+0x38/0xa8)
| [&lt;807902e0&gt;] (host_stop) from [&lt;8078d9e4&gt;] (ci_hdrc_remove+0x3c/0x118)
| [&lt;8078d9e4&gt;] (ci_hdrc_remove) from [&lt;805b27ec&gt;] (platform_remove+0x20/0x50)
| [&lt;805b27ec&gt;] (platform_remove) from [&lt;805b03a0&gt;] (__device_release_driver+0x154/0x20c)
| [&lt;805b03a0&gt;] (__device_release_driver) from [&lt;805b0478&gt;] (device_release_driver+0x20/0x2c)
| [&lt;805b0478&gt;] (device_release_driver) from [&lt;805af944&gt;] (bus_remove_device+0xcc/0xf8)
| [&lt;805af944&gt;] (bus_remove_device) from [&lt;805ab26c&gt;] (device_del+0x178/0x4b0)

For this adapter we call ax88178_bind() and ax88772_unbind(), which is
related to different chip version and different counter part *bind()
function.

Since this chip is currently not ported to the PHYLIB, we do not need to
call phy_disconnect() here. So, to fix this crash, we need to add
ax88178_unbind().

Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Reported-by: Robin van der Gracht &lt;robin@protonic.nl&gt;
Tested-by: Robin van der Gracht &lt;robin@protonic.nl&gt;
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: usb: asix: ax88772: move embedded PHY detection as early as possible</title>
<updated>2021-08-23T11:39:41+00:00</updated>
<author>
<name>Oleksij Rempel</name>
<email>o.rempel@pengutronix.de</email>
</author>
<published>2021-08-23T07:37:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=7a141e64cf14099d84e530db0e86fcb2c489e341'/>
<id>7a141e64cf14099d84e530db0e86fcb2c489e341</id>
<content type='text'>
Some HW revisions need additional MAC configuration before the embedded PHY
can be enabled. If this is not done, we won't be able to get response
from the internal PHY.

This issue was detected on chipcode == AX_AX88772_CHIPCODE variant,
where ax88772_hw_reset() was executed with missing embd_phy flag.

Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Reported-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Tested-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some HW revisions need additional MAC configuration before the embedded PHY
can be enabled. If this is not done, we won't be able to get response
from the internal PHY.

This issue was detected on chipcode == AX_AX88772_CHIPCODE variant,
where ax88772_hw_reset() was executed with missing embd_phy flag.

Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Reported-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Tested-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Oleksij Rempel &lt;o.rempel@pengutronix.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: usb: pegasus: fixes of set_register(s) return value evaluation;</title>
<updated>2021-08-20T13:57:05+00:00</updated>
<author>
<name>Petko Manolov</name>
<email>petko.manolov@konsulko.com</email>
</author>
<published>2021-08-20T06:57:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ffc9c3ebb4af870a121da99826e9ccb63dc8b3d7'/>
<id>ffc9c3ebb4af870a121da99826e9ccb63dc8b3d7</id>
<content type='text'>
- restore the behavior in enable_net_traffic() to avoid regressions - Jakub
    Kicinski;
  - hurried up and removed redundant assignment in pegasus_open() before yet
    another checker complains;

Fixes: 8a160e2e9aeb ("net: usb: pegasus: Check the return value of get_geristers() and friends;")
Reported-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Petko Manolov &lt;petko.manolov@konsulko.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- restore the behavior in enable_net_traffic() to avoid regressions - Jakub
    Kicinski;
  - hurried up and removed redundant assignment in pegasus_open() before yet
    another checker complains;

Fixes: 8a160e2e9aeb ("net: usb: pegasus: Check the return value of get_geristers() and friends;")
Reported-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Petko Manolov &lt;petko.manolov@konsulko.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>r8152: fix the maximum number of PLA bp for RTL8153C</title>
<updated>2021-08-19T11:19:30+00:00</updated>
<author>
<name>Hayes Wang</name>
<email>hayeswang@realtek.com</email>
</author>
<published>2021-08-19T03:05:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6633fb83f1faddbfcac09e35edcae96bd0468335'/>
<id>6633fb83f1faddbfcac09e35edcae96bd0468335</id>
<content type='text'>
The maximum PLA bp number of RTL8153C is 16, not 8. That is, the
bp 0 ~ 15 are at 0xfc28 ~ 0xfc46, and the bp_en is at 0xfc48.

Fixes: 195aae321c82 ("r8152: support new chips")
Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The maximum PLA bp number of RTL8153C is 16, not 8. That is, the
bp 0 ~ 15 are at 0xfc28 ~ 0xfc46, and the bp_en is at 0xfc48.

Fixes: 195aae321c82 ("r8152: support new chips")
Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>r8152: fix writing USB_BP2_EN</title>
<updated>2021-08-19T11:19:30+00:00</updated>
<author>
<name>Hayes Wang</name>
<email>hayeswang@realtek.com</email>
</author>
<published>2021-08-19T03:05:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a876a33d2a1102f99fc782fefb784f4dd4841d8c'/>
<id>a876a33d2a1102f99fc782fefb784f4dd4841d8c</id>
<content type='text'>
The register of USB_BP2_EN is 16 bits, so we should use
ocp_write_word(), not ocp_write_byte().

Fixes: 9370f2d05a2a ("support request_firmware for RTL8153")
Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The register of USB_BP2_EN is 16 bits, so we should use
ocp_write_word(), not ocp_write_byte().

Fixes: 9370f2d05a2a ("support request_firmware for RTL8153")
Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: asix: fix uninit value bugs</title>
<updated>2021-08-18T10:46:52+00:00</updated>
<author>
<name>Pavel Skripkin</name>
<email>paskripkin@gmail.com</email>
</author>
<published>2021-08-17T16:37:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a786e3195d6af183033e86f0518ffd2c51c0e8ac'/>
<id>a786e3195d6af183033e86f0518ffd2c51c0e8ac</id>
<content type='text'>
Syzbot reported uninit-value in asix_mdio_read(). The problem was in
missing error handling. asix_read_cmd() should initialize passed stack
variable smsr, but it can fail in some cases. Then while condidition
checks possibly uninit smsr variable.

Since smsr is uninitialized stack variable, driver can misbehave,
because smsr will be random in case of asix_read_cmd() failure.
Fix it by adding error handling and just continue the loop instead of
checking uninit value.

Added helper function for checking Host_En bit, since wrong loop was used
in 4 functions and there is no need in copy-pasting code parts.

Cc: Robert Foss &lt;robert.foss@collabora.com&gt;
Fixes: d9fe64e51114 ("net: asix: Add in_pm parameter")
Reported-by: syzbot+a631ec9e717fb0423053@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin &lt;paskripkin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Syzbot reported uninit-value in asix_mdio_read(). The problem was in
missing error handling. asix_read_cmd() should initialize passed stack
variable smsr, but it can fail in some cases. Then while condidition
checks possibly uninit smsr variable.

Since smsr is uninitialized stack variable, driver can misbehave,
because smsr will be random in case of asix_read_cmd() failure.
Fix it by adding error handling and just continue the loop instead of
checking uninit value.

Added helper function for checking Host_En bit, since wrong loop was used
in 4 functions and there is no need in copy-pasting code parts.

Cc: Robert Foss &lt;robert.foss@collabora.com&gt;
Fixes: d9fe64e51114 ("net: asix: Add in_pm parameter")
Reported-by: syzbot+a631ec9e717fb0423053@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin &lt;paskripkin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
