ionic: centralize queue reset code
authorShannon Nelson <snelson@pensando.io>
Tue, 7 Jul 2020 21:13:26 +0000 (14:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2020 06:13:23 +0000 (08:13 +0200)
commit31503de4dd384d550cf5e2e03d3d9ada49dc1700
treec9a1d4563ad1427efb34481f9a6e2be25065ce98
parent6ed1dabb18da0642b916cad7136ad5b5719d8bee
ionic: centralize queue reset code

[ Upstream commit 086c18f2452d0028f81e319f098bcb8e53133dbf ]

The queue reset pattern is used in a couple different places,
only slightly different from each other, and could cause
issues if one gets changed and the other didn't.  This puts
them together so that only one version is needed, yet each
can have slighty different effects by passing in a pointer
to a work function to do whatever configuration twiddling is
needed in the middle of the reset.

This specifically addresses issues seen where under loops
of changing ring size or queue count parameters we could
occasionally bump into the netdev watchdog.

v2: added more commit message commentary

Fixes: 4d03e00a2140 ("ionic: Add initial ethtool support")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
drivers/net/ethernet/pensando/ionic/ionic_lif.c
drivers/net/ethernet/pensando/ionic/ionic_lif.h