]> git.karo-electronics.de Git - linux-beck.git/commitdiff
e1000e: Move pm_qos_req to e1000e adapter
authorThomas Graf <tgraf@suug.ch>
Fri, 10 Apr 2015 13:52:37 +0000 (15:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Apr 2015 17:15:14 +0000 (13:15 -0400)
e1000e is the only driver requiring pm_qos_req, instead of causing
every device to waste up to 240 bytes. Allocate it for the specific
driver.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/e1000e/e1000.h
drivers/net/ethernet/intel/e1000e/netdev.c
include/linux/netdevice.h

index a69f09e37b5893a02b2e0d521806769ea6f951c5..5d9ceb17b4cbad4f7e89cf0bb050e915f5b8d285 100644 (file)
@@ -343,6 +343,7 @@ struct e1000_adapter {
        struct timecounter tc;
        struct ptp_clock *ptp_clock;
        struct ptp_clock_info ptp_clock_info;
+       struct pm_qos_request pm_qos_req;
 
        u16 eee_advert;
 };
index 74ec185a697facce09174abda046db2b08495203..c509a5c900f5253973b24c9f966cb95f2fe1a2bc 100644 (file)
@@ -3297,9 +3297,9 @@ static void e1000_configure_rx(struct e1000_adapter *adapter)
                        ew32(RXDCTL(0), rxdctl | 0x3);
                }
 
-               pm_qos_update_request(&adapter->netdev->pm_qos_req, lat);
+               pm_qos_update_request(&adapter->pm_qos_req, lat);
        } else {
-               pm_qos_update_request(&adapter->netdev->pm_qos_req,
+               pm_qos_update_request(&adapter->pm_qos_req,
                                      PM_QOS_DEFAULT_VALUE);
        }
 
@@ -4403,7 +4403,7 @@ static int e1000_open(struct net_device *netdev)
                e1000_update_mng_vlan(adapter);
 
        /* DMA latency requirement to workaround jumbo issue */
-       pm_qos_add_request(&adapter->netdev->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
+       pm_qos_add_request(&adapter->pm_qos_req, PM_QOS_CPU_DMA_LATENCY,
                           PM_QOS_DEFAULT_VALUE);
 
        /* before we allocate an interrupt, we must be ready to handle it.
@@ -4514,7 +4514,7 @@ static int e1000_close(struct net_device *netdev)
            !test_bit(__E1000_TESTING, &adapter->state))
                e1000e_release_hw_control(adapter);
 
-       pm_qos_remove_request(&adapter->netdev->pm_qos_req);
+       pm_qos_remove_request(&adapter->pm_qos_req);
 
        pm_runtime_put_sync(&pdev->dev);
 
index 13acb3d8ecdd7c7bd2d85768c303119dc4b1f6b3..733d24f16cf8b5146d6f171ccf8e7143e1843344 100644 (file)
@@ -1751,7 +1751,6 @@ struct net_device {
 #endif
        struct phy_device *phydev;
        struct lock_class_key *qdisc_tx_busylock;
-       struct pm_qos_request   pm_qos_req;
 };
 #define to_net_dev(d) container_of(d, struct net_device, dev)