Skip to content

Commit

Permalink
drivers: net: Call cpu_latency_qos_*() instead of pm_qos_*()
Browse files Browse the repository at this point in the history
Call cpu_latency_qos_add/update/remove_request() instead of
pm_qos_add/update/remove_request(), respectively, because the
latter are going to be dropped.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <[email protected]>
Acked-by: Jeff Kirsher <[email protected]
Acked-by: Kalle Valo <[email protected]>
Reviewed-by: Ulf Hansson <[email protected]>
Reviewed-by: Amit Kucheria <[email protected]>
Tested-by: Amit Kucheria <[email protected]>
  • Loading branch information
rafaeljw committed Feb 14, 2020
1 parent d1b9830 commit 81e95ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
13 changes: 6 additions & 7 deletions drivers/net/ethernet/intel/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3280,10 +3280,10 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)

dev_info(&adapter->pdev->dev,
"Some CPU C-states have been disabled in order to enable jumbo frames\n");
pm_qos_update_request(&adapter->pm_qos_req, lat);
cpu_latency_qos_update_request(&adapter->pm_qos_req, lat);
} else {
pm_qos_update_request(&adapter->pm_qos_req,
PM_QOS_DEFAULT_VALUE);
cpu_latency_qos_update_request(&adapter->pm_qos_req,
PM_QOS_DEFAULT_VALUE);
}

/* Enable Receives */
Expand Down Expand Up @@ -4636,8 +4636,7 @@ int e1000e_open(struct net_device *netdev)
e1000_update_mng_vlan(adapter);

/* DMA latency requirement to workaround jumbo issue */
pm_qos_add_request(&adapter->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
PM_QOS_DEFAULT_VALUE);
cpu_latency_qos_add_request(&adapter->pm_qos_req, PM_QOS_DEFAULT_VALUE);

/* before we allocate an interrupt, we must be ready to handle it.
* Setting DEBUG_SHIRQ in the kernel makes it fire an interrupt
Expand Down Expand Up @@ -4679,7 +4678,7 @@ int e1000e_open(struct net_device *netdev)
return 0;

err_req_irq:
pm_qos_remove_request(&adapter->pm_qos_req);
cpu_latency_qos_remove_request(&adapter->pm_qos_req);
e1000e_release_hw_control(adapter);
e1000_power_down_phy(adapter);
e1000e_free_rx_resources(adapter->rx_ring);
Expand Down Expand Up @@ -4743,7 +4742,7 @@ int e1000e_close(struct net_device *netdev)
!test_bit(__E1000_TESTING, &adapter->state))
e1000e_release_hw_control(adapter);

pm_qos_remove_request(&adapter->pm_qos_req);
cpu_latency_qos_remove_request(&adapter->pm_qos_req);

pm_runtime_put_sync(&pdev->dev);

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/wireless/ath/ath10k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,11 +1052,11 @@ static int ath10k_download_fw(struct ath10k *ar)
}

memset(&latency_qos, 0, sizeof(latency_qos));
pm_qos_add_request(&latency_qos, PM_QOS_CPU_DMA_LATENCY, 0);
cpu_latency_qos_add_request(&latency_qos, 0);

ret = ath10k_bmi_fast_download(ar, address, data, data_len);

pm_qos_remove_request(&latency_qos);
cpu_latency_qos_remove_request(&latency_qos);

return ret;
}
Expand Down
10 changes: 5 additions & 5 deletions drivers/net/wireless/intel/ipw2x00/ipw2100.c
Original file line number Diff line number Diff line change
Expand Up @@ -1730,7 +1730,7 @@ static int ipw2100_up(struct ipw2100_priv *priv, int deferred)
/* the ipw2100 hardware really doesn't want power management delays
* longer than 175usec
*/
pm_qos_update_request(&ipw2100_pm_qos_req, 175);
cpu_latency_qos_update_request(&ipw2100_pm_qos_req, 175);

/* If the interrupt is enabled, turn it off... */
spin_lock_irqsave(&priv->low_lock, flags);
Expand Down Expand Up @@ -1875,7 +1875,8 @@ static void ipw2100_down(struct ipw2100_priv *priv)
ipw2100_disable_interrupts(priv);
spin_unlock_irqrestore(&priv->low_lock, flags);

pm_qos_update_request(&ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE);
cpu_latency_qos_update_request(&ipw2100_pm_qos_req,
PM_QOS_DEFAULT_VALUE);

/* We have to signal any supplicant if we are disassociating */
if (associated)
Expand Down Expand Up @@ -6566,8 +6567,7 @@ static int __init ipw2100_init(void)
printk(KERN_INFO DRV_NAME ": %s, %s\n", DRV_DESCRIPTION, DRV_VERSION);
printk(KERN_INFO DRV_NAME ": %s\n", DRV_COPYRIGHT);

pm_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
PM_QOS_DEFAULT_VALUE);
cpu_latency_qos_add_request(&ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE);

ret = pci_register_driver(&ipw2100_pci_driver);
if (ret)
Expand All @@ -6594,7 +6594,7 @@ static void __exit ipw2100_exit(void)
&driver_attr_debug_level);
#endif
pci_unregister_driver(&ipw2100_pci_driver);
pm_qos_remove_request(&ipw2100_pm_qos_req);
cpu_latency_qos_remove_request(&ipw2100_pm_qos_req);
}

module_init(ipw2100_init);
Expand Down

0 comments on commit 81e95ad

Please sign in to comment.