From: Thomas Falcon <hidden> Date: 2017-06-15 04:50:33
This series of small patches is meant to resolve a number of
bugs, mostly occurring during an ibmvnic driver reset when
recovering from a logical partition migration (LPM).
The first patch ensures that RX buffer pools are properly
activated following an adapter reset by setting the proper
flag in the pool data structure.
The second patch uses netif_tx_disable to stop TX queues when
closing the device during a reset.
Third, fixup a typo that resulted in partial sanitization of
TX/RX descriptor queues following a device reset.
Fourth, remove an ambiguous conditional check that was resulting
in a kernel panic as null RX/TX completion descriptors were being
processed during napi polling while the device is closing.
Finally, fix a condition where the napi polling routine exits
before it has completed its work budget without notifying the
upper network layers. This omission could result in the
napi_disable function sleeping indefinitely under certain conditions.
v2: Attempt to provide a proper cover letter
Thomas Falcon (5):
ibmvnic: Activate disabled RX buffer pools on reset
ibmvnic: Ensure that TX queues are disabled in __ibmvnic_close
ibmvnic: Sanitize entire SCRQ buffer on reset
ibmvnic: Remove VNIC_CLOSING check from pending_scrq
ibmvnic: Exit polling routine correctly during adapter reset
drivers/net/ethernet/ibm/ibmvnic.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
--
1.8.3.1
From: Thomas Falcon <hidden> Date: 2017-06-15 04:50:34
RX buffer pools are disabled while awaiting a device
reset if firmware indicates that the resource is closed.
This patch fixes a bug where pools were not being
subsequently enabled after the device reset, causing
the device to become inoperable.
Signed-off-by: Thomas Falcon <redacted>
---
drivers/net/ethernet/ibm/ibmvnic.c | 1 +
1 file changed, 1 insertion(+)
From: Thomas Falcon <hidden> Date: 2017-06-15 04:50:35
Use netif_tx_disable to guarantee that TX queues are disabled
when __ibmvnic_close is called by the device reset routine.
Signed-off-by: Thomas Falcon <redacted>
---
drivers/net/ethernet/ibm/ibmvnic.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
@@ -886,7 +886,13 @@ static int __ibmvnic_close(struct net_device *netdev)inti;adapter->state=VNIC_CLOSING;-netif_tx_stop_all_queues(netdev);++/* ensure that transmissions are stopped if called by do_reset */+if(adapter->resetting)+netif_tx_disable(netdev);+else+netif_tx_stop_all_queues(netdev);+ibmvnic_napi_disable(adapter);if(adapter->tx_scrq){
From: Thomas Falcon <hidden> Date: 2017-06-15 04:50:36
Fixup a typo so that the entire SCRQ buffer is cleaned.
Signed-off-by: Thomas Falcon <redacted>
---
drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Thomas Falcon <hidden> Date: 2017-06-15 04:50:39
Fix a kernel panic resulting from data access of a NULL
pointer during device close. The pending_scrq routine is
meant to determine whether there is a valid sub-CRQ message
awaiting processing. When the device is closing, however,
there is a possibility that NULL messages can be processed
because pending_scrq will always return 1 even if there
no valid message in the queue.
It's not clear what this closing state check was originally
meant to accomplish, so just remove it.
Signed-off-by: Thomas Falcon <redacted>
---
drivers/net/ethernet/ibm/ibmvnic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Thomas Falcon <hidden> Date: 2017-06-15 04:50:40
This patch fixes a bug where, in the case of a device reset,
the polling routine will never complete, causing napi_disable
to sleep indefinitely when attempting to close the device.
Signed-off-by: Thomas Falcon <redacted>
---
drivers/net/ethernet/ibm/ibmvnic.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
From: David Miller <davem@davemloft.net> Date: 2017-06-15 18:31:30
From: Thomas Falcon <redacted>
Date: Wed, 14 Jun 2017 23:50:04 -0500
This series of small patches is meant to resolve a number of
bugs, mostly occurring during an ibmvnic driver reset when
recovering from a logical partition migration (LPM).
The first patch ensures that RX buffer pools are properly
activated following an adapter reset by setting the proper
flag in the pool data structure.
The second patch uses netif_tx_disable to stop TX queues when
closing the device during a reset.
Third, fixup a typo that resulted in partial sanitization of
TX/RX descriptor queues following a device reset.
Fourth, remove an ambiguous conditional check that was resulting
in a kernel panic as null RX/TX completion descriptors were being
processed during napi polling while the device is closing.
Finally, fix a condition where the napi polling routine exits
before it has completed its work budget without notifying the
upper network layers. This omission could result in the
napi_disable function sleeping indefinitely under certain conditions.
v2: Attempt to provide a proper cover letter