Skip to content

Commit 61e0217

Browse files
jacob-kellerJeff Kirsher
authored andcommitted
fm10k: print error message when stop_hw fails
fm10k_stop_hw_generic calls fm10k_disable_queues_generic, which may return an error code indicating that the queues were not stopped within the time limit. Notify the user by displaying a message in the kernel message ring, in a similar way to how we notify the user when reset_hw fails. There isn't much we can do to recover from this error, so currently nothing else is done. Signed-off-by: Jacob Keller <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent b352569 commit 61e0217

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/intel/fm10k/fm10k_pci.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,7 @@ void fm10k_down(struct fm10k_intfc *interface)
16561656
{
16571657
struct net_device *netdev = interface->netdev;
16581658
struct fm10k_hw *hw = &interface->hw;
1659+
int err;
16591660

16601661
/* signal that we are down to the interrupt handler and service task */
16611662
set_bit(__FM10K_DOWN, &interface->state);
@@ -1680,7 +1681,9 @@ void fm10k_down(struct fm10k_intfc *interface)
16801681
fm10k_update_stats(interface);
16811682

16821683
/* Disable DMA engine for Tx/Rx */
1683-
hw->mac.ops.stop_hw(hw);
1684+
err = hw->mac.ops.stop_hw(hw);
1685+
if (err)
1686+
dev_err(&interface->pdev->dev, "stop_hw failed: %d\n", err);
16841687

16851688
/* free any buffers still on the rings */
16861689
fm10k_clean_all_tx_rings(interface);

0 commit comments

Comments
 (0)