e1000e: store EEPROM version number to prevent unnecessary NVM reads
Rather than reading the NVM to get the EEPROM version number everytime the ethool get_drvinfo function is called, read it once during probe and save it for future reference. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0285c8dcae
commit
8452759060
@@ -5025,6 +5025,9 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
|
||||
adapter->wol = adapter->eeprom_wol;
|
||||
device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
|
||||
|
||||
/* save off EEPROM version number */
|
||||
e1000_read_nvm(&adapter->hw, 5, 1, &adapter->eeprom_vers);
|
||||
|
||||
/* reset the hardware with the new settings */
|
||||
e1000e_reset(adapter);
|
||||
|
||||
|
Reference in New Issue
Block a user