]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/e1000e/param.c
Merge branch 'for_rmk' of git://git.mnementh.co.uk/linux-2.6-im into devel
[linux-2.6-omap-h63xx.git] / drivers / net / e1000e / param.c
index d91dbf7ba4341665c403fe9491f81355098db80d..e909f96698e8cfb023105a765b00becd6d7e0ae6 100644 (file)
@@ -114,6 +114,15 @@ E1000_PARAM(InterruptThrottleRate, "Interrupt Throttling Rate");
 #define DEFAULT_ITR 3
 #define MAX_ITR 100000
 #define MIN_ITR 100
+/* IntMode (Interrupt Mode)
+ *
+ * Valid Range: 0 - 2
+ *
+ * Default Value: 2 (MSI-X)
+ */
+E1000_PARAM(IntMode, "Interrupt Mode");
+#define MAX_INTMODE    2
+#define MIN_INTMODE    0
 
 /*
  * Enable Smart Power Down of the PHY
@@ -142,6 +151,16 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");
  */
 E1000_PARAM(WriteProtectNVM, "Write-protect NVM [WARNING: disabling this can lead to corrupted NVM]");
 
+/*
+ * Enable CRC Stripping
+ *
+ * Valid Range: 0, 1
+ *
+ * Default Value: 1 (enabled)
+ */
+E1000_PARAM(CrcStripping, "Enable CRC Stripping, disable if your BMC needs " \
+                          "the CRC");
+
 struct e1000_option {
        enum { enable_option, range_option, list_option } type;
        const char *name;
@@ -361,6 +380,24 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                        adapter->itr = 20000;
                }
        }
+       { /* Interrupt Mode */
+               struct e1000_option opt = {
+                       .type = range_option,
+                       .name = "Interrupt Mode",
+                       .err  = "defaulting to 2 (MSI-X)",
+                       .def  = E1000E_INT_MODE_MSIX,
+                       .arg  = { .r = { .min = MIN_INTMODE,
+                                        .max = MAX_INTMODE } }
+               };
+
+               if (num_IntMode > bd) {
+                       unsigned int int_mode = IntMode[bd];
+                       e1000_validate_option(&int_mode, &opt, adapter);
+                       adapter->int_mode = int_mode;
+               } else {
+                       adapter->int_mode = opt.def;
+               }
+       }
        { /* Smart Power Down */
                const struct e1000_option opt = {
                        .type = enable_option,
@@ -377,6 +414,21 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
                                adapter->flags |= FLAG_SMART_POWER_DOWN;
                }
        }
+       { /* CRC Stripping */
+               const struct e1000_option opt = {
+                       .type = enable_option,
+                       .name = "CRC Stripping",
+                       .err  = "defaulting to enabled",
+                       .def  = OPTION_ENABLED
+               };
+
+               if (num_CrcStripping > bd) {
+                       unsigned int crc_stripping = CrcStripping[bd];
+                       e1000_validate_option(&crc_stripping, &opt, adapter);
+                       if (crc_stripping == OPTION_ENABLED)
+                               adapter->flags2 |= FLAG2_CRC_STRIPPING;
+               }
+       }
        { /* Kumeran Lock Loss Workaround */
                const struct e1000_option opt = {
                        .type = enable_option,