linux/drivers/net/usb
Oleksij Rempel 1406e8cb4b net: usb: asix: do not call phy_disconnect() for ax88178
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<--- 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
| [<80650d04>] (phy_disconnect) from [<80741aa4>] (ax88772_unbind+0x14/0x20)
| [<80741aa4>] (ax88772_unbind) from [<8074e250>] (usbnet_disconnect+0x48/0xd8)
| [<8074e250>] (usbnet_disconnect) from [<807655e0>] (usb_unbind_interface+0x78/0x25c)
| [<807655e0>] (usb_unbind_interface) from [<805b03a0>] (__device_release_driver+0x154/0x20c)
| [<805b03a0>] (__device_release_driver) from [<805b0478>] (device_release_driver+0x20/0x2c)
| [<805b0478>] (device_release_driver) from [<805af944>] (bus_remove_device+0xcc/0xf8)
| [<805af944>] (bus_remove_device) from [<805ab26c>] (device_del+0x178/0x4b0)
| [<805ab26c>] (device_del) from [<807634a4>] (usb_disable_device+0xcc/0x178)
| [<807634a4>] (usb_disable_device) from [<8075a060>] (usb_disconnect+0xd8/0x238)
| [<8075a060>] (usb_disconnect) from [<8075a02c>] (usb_disconnect+0xa4/0x238)
| [<8075a02c>] (usb_disconnect) from [<8075a02c>] (usb_disconnect+0xa4/0x238)
| [<8075a02c>] (usb_disconnect) from [<80af3520>] (usb_remove_hcd+0xa0/0x198)
| [<80af3520>] (usb_remove_hcd) from [<807902e0>] (host_stop+0x38/0xa8)
| [<807902e0>] (host_stop) from [<8078d9e4>] (ci_hdrc_remove+0x3c/0x118)
| [<8078d9e4>] (ci_hdrc_remove) from [<805b27ec>] (platform_remove+0x20/0x50)
| [<805b27ec>] (platform_remove) from [<805b03a0>] (__device_release_driver+0x154/0x20c)
| [<805b03a0>] (__device_release_driver) from [<805b0478>] (device_release_driver+0x20/0x2c)
| [<805b0478>] (device_release_driver) from [<805af944>] (bus_remove_device+0xcc/0xf8)
| [<805af944>] (bus_remove_device) from [<805ab26c>] (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: e532a096be ("net: usb: asix: ax88772: add phylib support")
Reported-by: Robin van der Gracht <robin@protonic.nl>
Tested-by: Robin van der Gracht <robin@protonic.nl>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-08-23 12:39:42 +01:00
..
aqc111.c
aqc111.h
asix_common.c net: asix: fix uninit value bugs 2021-08-18 11:46:52 +01:00
asix_devices.c net: usb: asix: do not call phy_disconnect() for ax88178 2021-08-23 12:39:42 +01:00
asix.h net: usb: asix: ax88772: move embedded PHY detection as early as possible 2021-08-23 12:39:41 +01:00
ax88172a.c net: usb: asix: ax88772: Fix less than zero comparison of a u16 2021-06-09 14:54:03 -07:00
ax88179_178a.c
catc.c
cdc_eem.c net: cdc_eem: fix tx fixup skb leak 2021-06-17 11:30:25 -07:00
cdc_ether.c net: usb: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
cdc_mbim.c net: usb: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
cdc_ncm.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-18 19:47:02 -07:00
cdc_subset.c
cdc-phonet.c
ch9200.c
cx82310_eth.c
dm9601.c
gl620a.c
hso.c usb: hso: fix error handling code of hso_create_net_device 2021-07-15 12:36:21 -07:00
huawei_cdc_ncm.c usb: class: cdc-wdm: WWAN framework integration 2021-05-11 16:17:56 -07:00
int51x1.c net: usb: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
ipheth.c
kalmia.c
kaweth.c
Kconfig net: usb: asix: ax88772: add generic selftest support 2021-06-07 13:23:02 -07:00
lan78xx.c net: usb: lan78xx: don't modify phy_device state concurrently 2021-08-04 12:51:14 +01:00
lan78xx.h
lg-vl600.c net: usb: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
Makefile
mcs7830.c net: usb: remove leading spaces before tabs 2021-05-20 15:10:57 -07:00
net1080.c
pegasus.c net: usb: pegasus: fixes of set_register(s) return value evaluation; 2021-08-20 14:57:05 +01:00
pegasus.h
plusb.c
qmi_wwan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-18 19:47:02 -07:00
r8152.c r8152: fix the maximum number of PLA bp for RTL8153C 2021-08-19 12:19:30 +01:00
r8153_ecm.c
rndis_host.c net: usb: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
rtl8150.c
sierra_net.c
smsc75xx.c net: usb: fix possible use-after-free in smsc75xx_bind 2021-06-16 12:36:09 -07:00
smsc75xx.h
smsc95xx.c
smsc95xx.h
sr9700.c
sr9700.h
sr9800.c
sr9800.h
usbnet.c usbnet: add usbnet_event_names[] for kevent 2021-06-24 12:34:45 -07:00
zaurus.c