net: ena: remove legacy suspend suspend/resume support
Remove ena_device_io_suspend/resume() methods Those methods were intend to be used by the device to trigger suspend/resume but eventually it was dropped. Signed-off-by: Netanel Belgazal <netanel@amazon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
88aef2f51c
commit
dbeaf1e3c2
|
@ -60,8 +60,6 @@ struct ena_stats {
|
|||
|
||||
static const struct ena_stats ena_stats_global_strings[] = {
|
||||
ENA_STAT_GLOBAL_ENTRY(tx_timeout),
|
||||
ENA_STAT_GLOBAL_ENTRY(io_suspend),
|
||||
ENA_STAT_GLOBAL_ENTRY(io_resume),
|
||||
ENA_STAT_GLOBAL_ENTRY(wd_expired),
|
||||
ENA_STAT_GLOBAL_ENTRY(interface_up),
|
||||
ENA_STAT_GLOBAL_ENTRY(interface_down),
|
||||
|
|
|
@ -2361,38 +2361,6 @@ static const struct net_device_ops ena_netdev_ops = {
|
|||
#endif /* CONFIG_NET_POLL_CONTROLLER */
|
||||
};
|
||||
|
||||
static void ena_device_io_suspend(struct work_struct *work)
|
||||
{
|
||||
struct ena_adapter *adapter =
|
||||
container_of(work, struct ena_adapter, suspend_io_task);
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
|
||||
/* ena_napi_disable_all disables only the IO handling.
|
||||
* We are still subject to AENQ keep alive watchdog.
|
||||
*/
|
||||
u64_stats_update_begin(&adapter->syncp);
|
||||
adapter->dev_stats.io_suspend++;
|
||||
u64_stats_update_begin(&adapter->syncp);
|
||||
ena_napi_disable_all(adapter);
|
||||
netif_tx_lock(netdev);
|
||||
netif_device_detach(netdev);
|
||||
netif_tx_unlock(netdev);
|
||||
}
|
||||
|
||||
static void ena_device_io_resume(struct work_struct *work)
|
||||
{
|
||||
struct ena_adapter *adapter =
|
||||
container_of(work, struct ena_adapter, resume_io_task);
|
||||
struct net_device *netdev = adapter->netdev;
|
||||
|
||||
u64_stats_update_begin(&adapter->syncp);
|
||||
adapter->dev_stats.io_resume++;
|
||||
u64_stats_update_end(&adapter->syncp);
|
||||
|
||||
netif_device_attach(netdev);
|
||||
ena_napi_enable_all(adapter);
|
||||
}
|
||||
|
||||
static int ena_device_validate_params(struct ena_adapter *adapter,
|
||||
struct ena_com_dev_get_features_ctx *get_feat_ctx)
|
||||
{
|
||||
|
@ -3275,8 +3243,6 @@ static int ena_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
goto err_rss;
|
||||
}
|
||||
|
||||
INIT_WORK(&adapter->suspend_io_task, ena_device_io_suspend);
|
||||
INIT_WORK(&adapter->resume_io_task, ena_device_io_resume);
|
||||
INIT_WORK(&adapter->reset_task, ena_fw_reset_device);
|
||||
|
||||
adapter->last_keep_alive_jiffies = jiffies;
|
||||
|
@ -3310,8 +3276,6 @@ err_free_msix:
|
|||
err_worker_destroy:
|
||||
ena_com_destroy_interrupt_moderation(ena_dev);
|
||||
del_timer(&adapter->timer_service);
|
||||
cancel_work_sync(&adapter->suspend_io_task);
|
||||
cancel_work_sync(&adapter->resume_io_task);
|
||||
err_netdev_destroy:
|
||||
free_netdev(netdev);
|
||||
err_device_destroy:
|
||||
|
@ -3381,10 +3345,6 @@ static void ena_remove(struct pci_dev *pdev)
|
|||
|
||||
cancel_work_sync(&adapter->reset_task);
|
||||
|
||||
cancel_work_sync(&adapter->suspend_io_task);
|
||||
|
||||
cancel_work_sync(&adapter->resume_io_task);
|
||||
|
||||
/* Reset the device only if the device is running. */
|
||||
if (test_bit(ENA_FLAG_DEVICE_RUNNING, &adapter->flags))
|
||||
ena_com_dev_reset(ena_dev, adapter->reset_reason);
|
||||
|
@ -3503,16 +3463,6 @@ static void ena_notification(void *adapter_data,
|
|||
ENA_ADMIN_NOTIFICATION);
|
||||
|
||||
switch (aenq_e->aenq_common_desc.syndrom) {
|
||||
case ENA_ADMIN_SUSPEND:
|
||||
/* Suspend just the IO queues.
|
||||
* We deliberately don't suspend admin so the timer and
|
||||
* the keep_alive events should remain.
|
||||
*/
|
||||
queue_work(ena_wq, &adapter->suspend_io_task);
|
||||
break;
|
||||
case ENA_ADMIN_RESUME:
|
||||
queue_work(ena_wq, &adapter->resume_io_task);
|
||||
break;
|
||||
case ENA_ADMIN_UPDATE_HINTS:
|
||||
hints = (struct ena_admin_ena_hw_hints *)
|
||||
(&aenq_e->inline_data_w4);
|
||||
|
|
|
@ -257,8 +257,6 @@ struct ena_ring {
|
|||
|
||||
struct ena_stats_dev {
|
||||
u64 tx_timeout;
|
||||
u64 io_suspend;
|
||||
u64 io_resume;
|
||||
u64 wd_expired;
|
||||
u64 interface_up;
|
||||
u64 interface_down;
|
||||
|
@ -326,8 +324,6 @@ struct ena_adapter {
|
|||
|
||||
/* timer service */
|
||||
struct work_struct reset_task;
|
||||
struct work_struct suspend_io_task;
|
||||
struct work_struct resume_io_task;
|
||||
struct timer_list timer_service;
|
||||
|
||||
bool wd_state;
|
||||
|
|
Loading…
Reference in New Issue