aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/param.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-10-08 17:56:41 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-08 17:56:41 -0400
commit4dd565134ece7e5d528d4c5288879310c54419e9 (patch)
treee08910d2d0feae0c030f8f01acc9b03eb760ad9a /drivers/net/e1000e/param.c
parent071d7ab6649eb34a873a53e71635186e9117101d (diff)
parent69849375d6b13e94d08cdc94b49b11fbab454a0e (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/e1000e/ich8lan.c drivers/net/e1000e/netdev.c
Diffstat (limited to 'drivers/net/e1000e/param.c')
-rw-r--r--drivers/net/e1000e/param.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c
index f46db6cda487..77a3d7207a5f 100644
--- a/drivers/net/e1000e/param.c
+++ b/drivers/net/e1000e/param.c
@@ -142,6 +142,15 @@ E1000_PARAM(SmartPowerDownEnable, "Enable PHY smart power down");
142 */ 142 */
143E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround"); 143E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
144 144
145/*
146 * Write Protect NVM
147 *
148 * Valid Range: 0, 1
149 *
150 * Default Value: 1 (enabled)
151 */
152E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]");
153
145struct e1000_option { 154struct e1000_option {
146 enum { enable_option, range_option, list_option } type; 155 enum { enable_option, range_option, list_option } type;
147 const char *name; 156 const char *name;
@@ -415,4 +424,25 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
415 opt.def); 424 opt.def);
416 } 425 }
417 } 426 }
427 { /* Write-protect NVM */
428 const struct e1000_option opt = {
429 .type = enable_option,
430 .name = "Write-protect NVM",
431 .err = "defaulting to Enabled",
432 .def = OPTION_ENABLED
433 };
434
435 if (adapter->flags & FLAG_IS_ICH) {
436 if (num_WriteProtectNVM > bd) {
437 unsigned int write_protect_nvm = WriteProtectNVM[bd];
438 e1000_validate_option(&write_protect_nvm, &opt,
439 adapter);
440 if (write_protect_nvm)
441 adapter->flags |= FLAG_READ_ONLY_NVM;
442 } else {
443 if (opt.def)
444 adapter->flags |= FLAG_READ_ONLY_NVM;
445 }
446 }
447 }
418} 448}