Print this page
3534 Disable EEE support in igb for I350
        
*** 23,32 ****
--- 23,33 ----
   * Copyright(c) 2007-2010 Intel Corporation. All rights reserved.
   */
  
  /*
   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+  * Copyright 2013, Nexenta Systems, Inc. All rights reserved.
   */
  
  #include "igb_sw.h"
  
  int
*** 1383,1392 ****
--- 1384,1419 ----
          int err = 0;
          long result;
          struct e1000_hw *hw = &igb->hw;
          int i;
  
+         if (strcmp(pr_name, "_eee_support") == 0) {
+                 if (pr_val == NULL)
+                         return (EINVAL);
+                 (void) ddi_strtol(pr_val, (char **)NULL, 0, &result);
+                 switch (result) {
+                 case 0:
+                 case 1:
+                         if (hw->mac.type != e1000_i350) {
+                                 /*
+                                  * For now, only supported on I350.
+                                  * Add new mac.type values (or use < instead)
+                                  * as new cards offer up EEE.
+                                  */
+                                 return (ENXIO);
+                         }
+                         /* Must set this prior to the set call. */
+                         hw->dev_spec._82575.eee_disable = !result;
+                         if (e1000_set_eee_i350(hw) != E1000_SUCCESS)
+                                 err = EIO;
+                         break;
+                 default:
+                         err = EINVAL;
+                         /* FALLTHRU */
+                 }
+                 return (err);
+         }
          if (strcmp(pr_name, "_tx_copy_thresh") == 0) {
                  if (pr_val == NULL) {
                          err = EINVAL;
                          return (err);
                  }
*** 1505,1514 ****
--- 1532,1548 ----
  
          if (strcmp(pr_name, "_adv_pause_cap") == 0) {
                  value = igb->param_adv_pause_cap;
          } else if (strcmp(pr_name, "_adv_asym_pause_cap") == 0) {
                  value = igb->param_adv_asym_pause_cap;
+         } else if (strcmp(pr_name, "_eee_support") == 0) {
+                 /*
+                  * For now, only supported on I350.  Add new mac.type values
+                  * (or use < instead) as new cards offer up EEE.
+                  */
+                 value = (igb->hw.mac.type != e1000_i350) ? 0 :
+                     !(igb->hw.dev_spec._82575.eee_disable);
          } else if (strcmp(pr_name, "_tx_copy_thresh") == 0) {
                  value = igb->tx_copy_thresh;
          } else if (strcmp(pr_name, "_tx_recycle_thresh") == 0) {
                  value = igb->tx_recycle_thresh;
          } else if (strcmp(pr_name, "_tx_overload_thresh") == 0) {