diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-09 01:56:41 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-09 01:56:41 +0400 |
commit | 4dd565134ece7e5d528d4c5288879310c54419e9 (patch) | |
tree | e08910d2d0feae0c030f8f01acc9b03eb760ad9a /drivers/net/e1000e/param.c | |
parent | 071d7ab6649eb34a873a53e71635186e9117101d (diff) | |
parent | 69849375d6b13e94d08cdc94b49b11fbab454a0e (diff) | |
download | linux-4dd565134ece7e5d528d4c5288879310c54419e9.tar.xz |
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.c | 30 |
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"); */ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround"); +/* + * Write Protect NVM + * + * Valid Range: 0, 1 + * + * Default Value: 1 (enabled) + */ +E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]"); + struct e1000_option { enum { enable_option, range_option, list_option } type; const char *name; @@ -415,4 +424,25 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) opt.def); } } + { /* Write-protect NVM */ + const struct e1000_option opt = { + .type = enable_option, + .name = "Write-protect NVM", + .err = "defaulting to Enabled", + .def = OPTION_ENABLED + }; + + if (adapter->flags & FLAG_IS_ICH) { + if (num_WriteProtectNVM > bd) { + unsigned int write_protect_nvm = WriteProtectNVM[bd]; + e1000_validate_option(&write_protect_nvm, &opt, + adapter); + if (write_protect_nvm) + adapter->flags |= FLAG_READ_ONLY_NVM; + } else { + if (opt.def) + adapter->flags |= FLAG_READ_ONLY_NVM; + } + } + } } |