diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2008-10-01 20:18:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-01 20:31:25 -0400 |
commit | 4a7703582836f55a1cbad0e2c1c6ebbee3f9b3a7 (patch) | |
tree | 8ebe25b1ef16c8fd4ced6d356232ddca94ef97a2 /drivers/net/e1000e/netdev.c | |
parent | 20b918dc77b383e9779dafceee3f2198a6f7b0e5 (diff) |
e1000e: write protect ICHx NVM to prevent malicious write/erase
Set the hardware to ignore all write/erase cycles to the GbE region in
the ICHx NVM. This feature can be disabled by the WriteProtectNVM module
parameter (enabled by default) only after a hardware reset, but
the machine must be power cycled before trying to enable writes.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: arjan@linux.intel.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index d266510c8a94..1f767feda9a7 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | #include "e1000.h" | 48 | #include "e1000.h" |
49 | 49 | ||
50 | #define DRV_VERSION "0.3.3.3-k2" | 50 | #define DRV_VERSION "0.3.3.3-k4" |
51 | char e1000e_driver_name[] = "e1000e"; | 51 | char e1000e_driver_name[] = "e1000e"; |
52 | const char e1000e_driver_version[] = DRV_VERSION; | 52 | const char e1000e_driver_version[] = DRV_VERSION; |
53 | 53 | ||
@@ -4467,6 +4467,8 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
4467 | 4467 | ||
4468 | adapter->bd_number = cards_found++; | 4468 | adapter->bd_number = cards_found++; |
4469 | 4469 | ||
4470 | e1000e_check_options(adapter); | ||
4471 | |||
4470 | /* setup adapter struct */ | 4472 | /* setup adapter struct */ |
4471 | err = e1000_sw_init(adapter); | 4473 | err = e1000_sw_init(adapter); |
4472 | if (err) | 4474 | if (err) |
@@ -4482,6 +4484,10 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
4482 | if (err) | 4484 | if (err) |
4483 | goto err_hw_init; | 4485 | goto err_hw_init; |
4484 | 4486 | ||
4487 | if ((adapter->flags & FLAG_IS_ICH) && | ||
4488 | (adapter->flags & FLAG_READ_ONLY_NVM)) | ||
4489 | e1000e_write_protect_nvm_ich8lan(&adapter->hw); | ||
4490 | |||
4485 | hw->mac.ops.get_bus_info(&adapter->hw); | 4491 | hw->mac.ops.get_bus_info(&adapter->hw); |
4486 | 4492 | ||
4487 | adapter->hw.phy.autoneg_wait_to_complete = 0; | 4493 | adapter->hw.phy.autoneg_wait_to_complete = 0; |
@@ -4573,8 +4579,6 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
4573 | INIT_WORK(&adapter->reset_task, e1000_reset_task); | 4579 | INIT_WORK(&adapter->reset_task, e1000_reset_task); |
4574 | INIT_WORK(&adapter->watchdog_task, e1000_watchdog_task); | 4580 | INIT_WORK(&adapter->watchdog_task, e1000_watchdog_task); |
4575 | 4581 | ||
4576 | e1000e_check_options(adapter); | ||
4577 | |||
4578 | /* Initialize link parameters. User can change them with ethtool */ | 4582 | /* Initialize link parameters. User can change them with ethtool */ |
4579 | adapter->hw.mac.autoneg = 1; | 4583 | adapter->hw.mac.autoneg = 1; |
4580 | adapter->fc_autoneg = 1; | 4584 | adapter->fc_autoneg = 1; |