[PATCH net-next v14 0/5] net: wangxun: timeout and error
Jiawen Wu <[email protected]>
| Newsgroups | org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
It is about adding the Tx timeout process and pci_error_handlers. When a PCIe error occurs, the txgbe device is able to recover on platform that support AER interrupt. And for Tx timeout, the txgbe driver can recover the device by reset process. For ngbe devices, due to the absence of the current function, it cannot br fully recovered once there is a PCIe error or Tx timeout. Its function will be completed in the future. --- Changes log: v14: - Remove flag WX_FLAG_NEED_PF_RESET and reuse WX_FLAG_NEED_DO_RESET for it. - Remove redundant 'watchdog_timeo = 5 * HZ'. - Not clear flags when device has been detached in wx_reset_task(). v13: https://lore.kernel.org/all/[email protected] - Double check PCIe error in wx_reset_task(). v12: https://lore.kernel.org/all/[email protected] - Perform device teardown before pci_channel_io_perm_failure return. v11: https://lore.kernel.org/all/[email protected] - Destroy ptp_clock in wx_ptp_quiesce(). - Re-check down/resetting state flag after time sleep in module detection subtask. v10: https://lore.kernel.org/all/[email protected] - Remove pci_aer_clear_nonfatal_status(). v9: https://lore.kernel.org/all/[email protected] - Add calling ptp_cancel_worker_sync() in wx_ptp_quiesce(). - Fix the typo of 'out' for wx_control_hw(). v8: https://lore.kernel.org/all/[email protected] - Not destroying PTP clock in wx_soft_quiesce(), and keeping the PTP worker alive but idle during PCIe recovery. - Move wx_soft_quiesce() after wx_napi_disable_all(). - Use PCI_COMMAND_MEMORY and U16_MAX instead of magic number. - Fix the leak of wx_control_hw() when WX_STATE_RES_FREED is set. v7: https://lore.kernel.org/all/[email protected] - Move ptp_clock_unregister() to be executed before free wx->ptp_tx_skb. v6: https://lore.kernel.org/all/[email protected] - Move the check of device status inside wx_soft_quiesce(). - Reverse the error return of txgbe_disable_device(). - Add PCIe error check in tx_timeout. - Add WX_STATE_RES_FREED flag to avoid double-free of resources. v5: https://lore.kernel.org/all/[email protected] - Avoid the same name on two functions. - Encode the device identity into the name of reset work queue. - Change pr_err() to wx_err(). - Check WX_STATE_DOWN and WX_STATE_RESETTING at the entry of every work item. - Implement wx_ptp_quiesce(). - Add netif_carrier_off() and netif_tx_disable() in soft_quiesce. - Move resource free operations after PCIe recovery. - Return error code in down path. v4: https://lore.kernel.org/all/[email protected] - Create a separate work queue for the reset task. - Gate wx_watchdog_flush_tx() on netif_running(). - Add rtnl_lock() around wx->do_reset() in wx_io_slot_reset(). - Change .close_suspend() to .soft_quiesce() to avoid MMIO when PCI channel is frozen. v3: https://lore.kernel.org/all/[email protected] - Merge the multiple string line into one in wx_handle_tx_hang(). - Remove the redundant warn messages. - Use test_and_clear_bit() instead of checking the flag bit then clear it. - Drop the Tx hang check in tx_timeout. - Call wx_update_stats() before wx_check_tx_hang(). - Add Tx flush when link lost. - Move wx_ptp_stop() into wx->close_suspend(). - Drop V2 patch 5/6 because WOL packets are handled before DMA ring. - Check wx NULL pointer in wx_io_error_detected(). - Check perm failure before hardware teardown. v2: https://lore.kernel.org/all/[email protected] - Add the missing rtnl_unlock() at early return in wx_reset_subtask(). - Replace ngbe_close() with ngbe_close_suspend() in ngbe_dev_shutdown(). - Add a patch to clear stored DMA addresses. v1: https://lore.kernel.org/r/[email protected] --- Jiawen Wu (5): net: ngbe: implement libwx reset ops net: wangxun: add Tx timeout process net: wangxun: add reinit parameter to wx->do_reset callback net: wangxun: implement soft quiesce for PCIe error recovery net: wangxun: add pcie error handler drivers/net/ethernet/wangxun/libwx/Makefile | 2 +- drivers/net/ethernet/wangxun/libwx/wx_err.c | 332 ++++++++++++++++++ drivers/net/ethernet/wangxun/libwx/wx_err.h | 18 + .../net/ethernet/wangxun/libwx/wx_ethtool.c | 2 +- drivers/net/ethernet/wangxun/libwx/wx_hw.c | 17 +- drivers/net/ethernet/wangxun/libwx/wx_lib.c | 59 +++- drivers/net/ethernet/wangxun/libwx/wx_lib.h | 1 + drivers/net/ethernet/wangxun/libwx/wx_ptp.c | 27 ++ drivers/net/ethernet/wangxun/libwx/wx_ptp.h | 1 + drivers/net/ethernet/wangxun/libwx/wx_type.h | 24 +- .../net/ethernet/wangxun/ngbe/ngbe_ethtool.c | 1 - drivers/net/ethernet/wangxun/ngbe/ngbe_main.c | 82 ++++- drivers/net/ethernet/wangxun/ngbe/ngbe_type.h | 1 + .../net/ethernet/wangxun/txgbe/txgbe_main.c | 64 +++- .../net/ethernet/wangxun/txgbe/txgbe_type.h | 2 +- 15 files changed, 614 insertions(+), 19 deletions(-) create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_err.c create mode 100644 drivers/net/ethernet/wangxun/libwx/wx_err.h -- 2.51.0