Print this page
2038 Add in I350 and ET2 support into igb
Reviewed by: Dan McDonald <danmcd@nexenta.com>
        
*** 18,38 ****
   *
   * CDDL HEADER END
   */
  
  /*
!  * Copyright(c) 2007-2010 Intel Corporation. All rights reserved.
   */
  
  /*
   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
   */
  
  #include "igb_sw.h"
  
  static char ident[] = "Intel 1Gb Ethernet";
! static char igb_version[] = "igb 1.1.17";
  
  /*
   * Local function protoypes
   */
  static int igb_register_mac(igb_t *);
--- 18,38 ----
   *
   * CDDL HEADER END
   */
  
  /*
!  * Copyright (c) 2007-2012 Intel Corporation. All rights reserved.
   */
  
  /*
   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
   */
  
  #include "igb_sw.h"
  
  static char ident[] = "Intel 1Gb Ethernet";
! static char igb_version[] = "igb 1.1.18";
  
  /*
   * Local function protoypes
   */
  static int igb_register_mac(igb_t *);
*** 283,292 ****
--- 283,316 ----
          IGB_FLAG_NEED_CTX_IDX),
  
          0xffe00000              /* mask for RXDCTL register */
  };
  
+ static adapter_info_t igb_i350_cap = {
+         /* limits */
+         8,              /* maximum number of rx queues */
+         1,              /* minimum number of rx queues */
+         4,              /* default number of rx queues */
+         8,              /* maximum number of tx queues */
+         1,              /* minimum number of tx queues */
+         4,              /* default number of tx queues */
+         65535,          /* maximum interrupt throttle rate */
+         0,              /* minimum interrupt throttle rate */
+         200,            /* default interrupt throttle rate */
+ 
+         /* function pointers */
+         igb_enable_adapter_interrupts_82580,
+         igb_setup_msix_82580,
+ 
+         /* capabilities */
+         (IGB_FLAG_HAS_DCA |     /* capability flags */
+         IGB_FLAG_VMDQ_POOL |
+         IGB_FLAG_NEED_CTX_IDX),
+ 
+         0xffe00000              /* mask for RXDCTL register */
+ };
+ 
  /*
   * Module Initialization Functions
   */
  
  int
*** 515,524 ****
--- 539,555 ----
          igb->attach_progress |= ATTACH_PROGRESS_ENABLE_INTR;
  
          igb_log(igb, "%s", igb_version);
          atomic_or_32(&igb->igb_state, IGB_INITIALIZED);
  
+         /*
+          * Newer models have Energy Efficient Ethernet, let's disable this by
+          * default.
+          */
+         if (igb->hw.mac.type == e1000_i350)
+                 (void) e1000_set_eee_i350(&igb->hw);
+ 
          return (DDI_SUCCESS);
  
  attach_fail:
          igb_unconfigure(devinfo, igb);
          return (DDI_FAILURE);
*** 834,843 ****
--- 865,877 ----
                  igb->capab = &igb_82576_cap;
                  break;
          case e1000_82580:
                  igb->capab = &igb_82580_cap;
                  break;
+         case e1000_i350:
+                 igb->capab = &igb_i350_cap;
+                 break;
          default:
                  return (IGB_FAILURE);
          }
  
          return (IGB_SUCCESS);
*** 1697,1706 ****
--- 1731,1743 ----
                  goto start_failure;
  
          if (igb_check_acc_handle(igb->osdep.reg_handle) != DDI_FM_OK)
                  goto start_failure;
  
+         if (igb->hw.mac.type == e1000_i350)
+                 (void) e1000_set_eee_i350(&igb->hw);
+ 
          for (i = igb->num_tx_rings - 1; i >= 0; i--)
                  mutex_exit(&igb->tx_rings[i].tx_lock);
          for (i = igb->num_rx_rings - 1; i >= 0; i--)
                  mutex_exit(&igb->rx_rings[i].rx_lock);