]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sparc: fix kernel panic caused by vio handshake
authorThomas Tai <thomas.tai@oracle.com>
Mon, 13 Feb 2017 14:50:05 +0000 (06:50 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 9 Mar 2017 03:30:17 +0000 (19:30 -0800)
commit787c729bd46ca449f6cb73f2e8bf5a9ce0247943
tree7cb41796bf0cab1b544dd350dae3c67e943c2e51
parent54cc45869238af877fc71e7700dc5b90fc33fc22
sparc: fix kernel panic caused by vio handshake

During hours long reboot test, the primary prints out multiple TX trigger
errors followed by a VIO handshake panic. The TX trigger error happens
because the primary ldmvsw detects that the ldc channel is down. In this
situation, the ldc operation is aborted, the tx and rx queue are then
flushed. The problem is that the rx queue may contain a LDC_EVENT_RESET
sent by the guest. It causes the primary to think that the ldc channel
is not in reset state. When the guest comes up again, the handshake is
out of sequence and thus causes handshake panic.

The TX trigger error would not have happened if the LDC_EVENT_RESET was
received before the TX checked the ldc link state. This is the reason
why the panic happens intermittently.

This patch checks for the connection reset and changes the ldc state to
reset. The reset logic is taken from existing vnet_event_napi() ldc_ctrl:
code path.

Orabug: 23476613
Orabug: 25064864

Signed-off-by: Thomas Tai <thomas.tai@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
drivers/net/ethernet/sun/sunvnet_common.c