aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@suse.de>2010-07-05 16:53:06 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2010-07-18 20:00:34 -0400
commit82f682514a5df89ffb3890627eebf0897b7a84ec (patch)
tree27a3dba7a179102ac5bfdd5935679bd2abd3f70f /drivers/net/e1000e
parent5f279845f9d684661563894d44729a0c706375b4 (diff)
pm_qos: Get rid of the allocation in pm_qos_add_request()
All current users of pm_qos_add_request() have the ability to supply the memory required by the pm_qos routines, so make them do this and eliminate the kmalloc() with pm_qos_add_request(). This has the double benefit of making the call never fail and allowing it to be called from atomic context. Signed-off-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: mark gross <markgross@thegnar.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r--drivers/net/e1000e/netdev.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 57a7e41da69e..9f13b660b801 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2901,10 +2901,10 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
2901 * dropped transactions. 2901 * dropped transactions.
2902 */ 2902 */
2903 pm_qos_update_request( 2903 pm_qos_update_request(
2904 adapter->netdev->pm_qos_req, 55); 2904 &adapter->netdev->pm_qos_req, 55);
2905 } else { 2905 } else {
2906 pm_qos_update_request( 2906 pm_qos_update_request(
2907 adapter->netdev->pm_qos_req, 2907 &adapter->netdev->pm_qos_req,
2908 PM_QOS_DEFAULT_VALUE); 2908 PM_QOS_DEFAULT_VALUE);
2909 } 2909 }
2910 } 2910 }
@@ -3196,9 +3196,9 @@ int e1000e_up(struct e1000_adapter *adapter)
3196 3196
3197 /* DMA latency requirement to workaround early-receive/jumbo issue */ 3197 /* DMA latency requirement to workaround early-receive/jumbo issue */
3198 if (adapter->flags & FLAG_HAS_ERT) 3198 if (adapter->flags & FLAG_HAS_ERT)
3199 adapter->netdev->pm_qos_req = 3199 pm_qos_add_request(&adapter->netdev->pm_qos_req,
3200 pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY, 3200 PM_QOS_CPU_DMA_LATENCY,
3201 PM_QOS_DEFAULT_VALUE); 3201 PM_QOS_DEFAULT_VALUE);
3202 3202
3203 /* hardware has been reset, we need to reload some things */ 3203 /* hardware has been reset, we need to reload some things */
3204 e1000_configure(adapter); 3204 e1000_configure(adapter);
@@ -3263,11 +3263,8 @@ void e1000e_down(struct e1000_adapter *adapter)
3263 e1000_clean_tx_ring(adapter); 3263 e1000_clean_tx_ring(adapter);
3264 e1000_clean_rx_ring(adapter); 3264 e1000_clean_rx_ring(adapter);
3265 3265
3266 if (adapter->flags & FLAG_HAS_ERT) { 3266 if (adapter->flags & FLAG_HAS_ERT)
3267 pm_qos_remove_request( 3267 pm_qos_remove_request(&adapter->netdev->pm_qos_req);
3268 adapter->netdev->pm_qos_req);
3269 adapter->netdev->pm_qos_req = NULL;
3270 }
3271 3268
3272 /* 3269 /*
3273 * TODO: for power management, we could drop the link and 3270 * TODO: for power management, we could drop the link and