linux/drivers/net
Mugunthan V N 16e5c57da6 drivers: net: cpsw: discard all packets received when interface is down
When the Ethernet interface is brought down during high Ethernet traffic,
then cpsw creates the following warn dump. When cpdma has already processed
the packet then the status will be greater than 0, so the cpsw_rx_handler
considers that the interface is up and try to resubmit one more rx buffer
to cpdma which fails as the DMA is in teardown process. This can be avoided
by checking the interface state and then process the received packet, if the
interface is down just discard and free the skb and return.

[ 2823.104591] WARNING: CPU: 0 PID: 1823 at drivers/net/ethernet/ti/cpsw.c:711 cpsw_rx_handler+0x148/0x164()
[ 2823.114654] Modules linked in:
[ 2823.117872] CPU: 0 PID: 1823 Comm: ifconfig Tainted: G        W     3.14.0-11992-gf34c4a3 #11
[ 2823.126860] [<c0014b5c>] (unwind_backtrace) from [<c00117e4>] (show_stack+0x10/0x14)
[ 2823.135030] [<c00117e4>] (show_stack) from [<c0533a9c>] (dump_stack+0x80/0x9c)
[ 2823.142619] [<c0533a9c>] (dump_stack) from [<c003f0e0>] (warn_slowpath_common+0x6c/0x90)
[ 2823.151141] [<c003f0e0>] (warn_slowpath_common) from [<c003f120>] (warn_slowpath_null+0x1c/0x24)
[ 2823.160336] [<c003f120>] (warn_slowpath_null) from [<c03caeb0>] (cpsw_rx_handler+0x148/0x164)
[ 2823.169314] [<c03caeb0>] (cpsw_rx_handler) from [<c03c730c>] (__cpdma_chan_free+0x90/0xa8)
[ 2823.178028] [<c03c730c>] (__cpdma_chan_free) from [<c03c7418>] (__cpdma_chan_process+0xf4/0x134)
[ 2823.187279] [<c03c7418>] (__cpdma_chan_process) from [<c03c7560>] (cpdma_chan_stop+0xb4/0x17c)
[ 2823.196349] [<c03c7560>] (cpdma_chan_stop) from [<c03c766c>] (cpdma_ctlr_stop+0x44/0x9c)
[ 2823.204872] [<c03c766c>] (cpdma_ctlr_stop) from [<c03cb708>] (cpsw_ndo_stop+0x154/0x188)
[ 2823.213321] [<c03cb708>] (cpsw_ndo_stop) from [<c046f0ec>] (__dev_close_many+0x84/0xc8)
[ 2823.221761] [<c046f0ec>] (__dev_close_many) from [<c046f158>] (__dev_close+0x28/0x3c)
[ 2823.230012] [<c046f158>] (__dev_close) from [<c0474ca8>] (__dev_change_flags+0x88/0x160)
[ 2823.238483] [<c0474ca8>] (__dev_change_flags) from [<c0474da0>] (dev_change_flags+0x18/0x48)
[ 2823.247316] [<c0474da0>] (dev_change_flags) from [<c04d12c4>] (devinet_ioctl+0x61c/0x6e0)
[ 2823.255884] [<c04d12c4>] (devinet_ioctl) from [<c045c660>] (sock_ioctl+0x68/0x2a4)
[ 2823.263789] [<c045c660>] (sock_ioctl) from [<c0125fe4>] (do_vfs_ioctl+0x78/0x61c)
[ 2823.271629] [<c0125fe4>] (do_vfs_ioctl) from [<c01265ec>] (SyS_ioctl+0x64/0x74)
[ 2823.279284] [<c01265ec>] (SyS_ioctl) from [<c000e580>] (ret_fast_syscall+0x0/0x48)

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-04-11 16:27:41 -04:00
..
appletalk
arcnet
bonding bonding: Remove debug_fs files when module init fails 2014-04-11 15:04:40 -04:00
caif caif: delete unnecessary field initialization 2014-02-17 00:29:23 -05:00
can Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAP 2014-04-07 16:36:11 -07:00
cris
dsa
ethernet drivers: net: cpsw: discard all packets received when interface is down 2014-04-11 16:27:41 -04:00
fddi
hamradio yam: replace del_timer by del_timer_sync 2014-03-27 15:28:06 -04:00
hippi
hyperv Drivers: net: hyperv: Address UDP checksum issues 2014-04-11 15:15:12 -04:00
ieee802154 at86rf230: fix MAX_CSMA_RETRIES parameter 2014-04-07 14:59:26 -04:00
irda irtty-sir.c: Do not set_termios() on irtty_close() 2014-02-17 16:27:51 -05:00
phy net phylib: Remove unnecessary condition check in phy 2014-04-09 13:03:53 -04:00
plip
ppp net: ppp: use sk_unattached_filter api 2014-03-31 00:45:09 -04:00
slip
team netpoll: Remove gfp parameter from __netpoll_setup 2014-03-29 17:58:37 -04:00
usb qmi_wwan/cdc_ether: move Novatel E371 (1410:9011) to qmi_wwan 2014-03-31 16:06:11 -04:00
vmxnet3 vmxnet3: Call dev_kfree_skb_any instead of dev_kfree_skb. 2014-03-24 21:19:23 -07:00
wan wan: dlci: Remove unused netdev_priv pointer 2014-02-09 18:40:56 -08:00
wimax wimax/i2400m: remove open-coded skb_cow_head. 2014-03-29 17:49:47 -04:00
wireless Merge branch 'for-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2014-03-31 15:08:51 -07:00
xen-netback xen-netback: Trivial format string fix 2014-04-04 10:49:53 -04:00
dummy.c net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq 2014-03-14 22:41:36 -04:00
eql.c
ifb.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-29 18:48:54 -04:00
Kconfig netpoll: Remove dead packet receive code (CONFIG_NETPOLL_TRAP) 2014-03-17 15:48:12 -04:00
LICENSE.SRC
loopback.c net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq 2014-03-14 22:41:36 -04:00
macvlan.c net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq 2014-03-14 22:41:36 -04:00
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c net: nlmon: flag nlmon devs with LLTX/SG 2014-03-28 16:49:47 -04:00
ntb_netdev.c
rionet.c rapidio: rework device hierarchy and introduce mport class of devices 2014-04-07 16:36:07 -07:00
sb1000.c
Space.c
sungem_phy.c
tun.c drivers/net: Use RCU_INIT_POINTER(x, NULL) in tun.c 2014-03-27 00:18:09 -04:00
veth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-29 18:48:54 -04:00
virtio_net.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
vxlan.c net: vxlan: fix crash when interface is created with no group 2014-04-03 11:16:47 -04:00
xen-netfront.c xen-netfront: Call dev_kfree_skb_any instead of dev_kfree_skb. 2014-03-24 21:19:23 -07:00