Print this page
4431 igb support for I354
4616 igb has uninitialized kstats

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/igb/igb_main.c
          +++ new/usr/src/uts/common/io/igb/igb_main.c
↓ open down ↓ 327 lines elided ↑ open up ↑
 328  328          igb_setup_msix_82580,
 329  329  
 330  330          /* capabilities */
 331  331          (IGB_FLAG_HAS_DCA |     /* capability flags */
 332  332          IGB_FLAG_VMDQ_POOL |
 333  333          IGB_FLAG_NEED_CTX_IDX),
 334  334  
 335  335          0xfff00000              /* mask for RXDCTL register */
 336  336  };
 337  337  
      338 +static adapter_info_t igb_i354_cap = {
      339 +        /* limits */
      340 +        8,              /* maximum number of rx queues */
      341 +        1,              /* minimum number of rx queues */
      342 +        4,              /* default number of rx queues */
      343 +        8,              /* maximum number of tx queues */
      344 +        1,              /* minimum number of tx queues */
      345 +        4,              /* default number of tx queues */
      346 +        65535,          /* maximum interrupt throttle rate */
      347 +        0,              /* minimum interrupt throttle rate */
      348 +        200,            /* default interrupt throttle rate */
      349 +
      350 +        /* function pointers */
      351 +        igb_enable_adapter_interrupts_82580,
      352 +        igb_setup_msix_82580,
      353 +
      354 +        /* capabilities */
      355 +        (IGB_FLAG_HAS_DCA |     /* capability flags */
      356 +        IGB_FLAG_VMDQ_POOL |
      357 +        IGB_FLAG_NEED_CTX_IDX),
      358 +
      359 +        0xfff00000              /* mask for RXDCTL register */
      360 +};
      361 +
 338  362  /*
 339  363   * Module Initialization Functions
 340  364   */
 341  365  
 342  366  int
 343  367  _init(void)
 344  368  {
 345  369          int status;
 346  370  
 347  371          mac_init_ops(&igb_dev_ops, MODULE_NAME);
↓ open down ↓ 218 lines elided ↑ open up ↑
 566  590  
 567  591          igb_log(igb, "%s", igb_version);
 568  592          atomic_or_32(&igb->igb_state, IGB_INITIALIZED);
 569  593  
 570  594          /*
 571  595           * Newer models have Energy Efficient Ethernet, let's disable this by
 572  596           * default.
 573  597           */
 574  598          if (igb->hw.mac.type == e1000_i350)
 575  599                  (void) e1000_set_eee_i350(&igb->hw);
      600 +        else if (igb->hw.mac.type == e1000_i354)
      601 +                (void) e1000_set_eee_i354(&igb->hw);
 576  602  
 577  603          return (DDI_SUCCESS);
 578  604  
 579  605  attach_fail:
 580  606          igb_unconfigure(devinfo, igb);
 581  607          return (DDI_FAILURE);
 582  608  }
 583  609  
 584  610  /*
 585  611   * igb_detach - driver detach
↓ open down ↓ 307 lines elided ↑ open up ↑
 893  919          case e1000_82580:
 894  920                  igb->capab = &igb_82580_cap;
 895  921                  break;
 896  922          case e1000_i350:
 897  923                  igb->capab = &igb_i350_cap;
 898  924                  break;
 899  925          case e1000_i210:
 900  926          case e1000_i211:
 901  927                  igb->capab = &igb_i210_cap;
 902  928                  break;
      929 +        case e1000_i354:
      930 +                igb->capab = &igb_i354_cap;
      931 +                break;
 903  932          default:
 904  933                  return (IGB_FAILURE);
 905  934          }
 906  935  
 907  936          return (IGB_SUCCESS);
 908  937  }
 909  938  
 910  939  /*
 911  940   * igb_regs_map - Map the device registers
 912  941   */
↓ open down ↓ 398 lines elided ↑ open up ↑
1311 1340          switch (hw->mac.type) {
1312 1341          case e1000_82575:
1313 1342                  pba = E1000_PBA_32K;
1314 1343                  break;
1315 1344          case e1000_82576:
1316 1345                  pba = E1000_READ_REG(hw, E1000_RXPBS);
1317 1346                  pba &= E1000_RXPBS_SIZE_MASK_82576;
1318 1347                  break;
1319 1348          case e1000_82580:
1320 1349          case e1000_i350:
     1350 +        case e1000_i354:
1321 1351                  pba = E1000_READ_REG(hw, E1000_RXPBS);
1322 1352                  pba = e1000_rxpbs_adjust_82580(pba);
1323 1353                  break;
1324 1354          case e1000_i210:
1325 1355          case e1000_i211:
1326 1356                  pba = E1000_PBA_34K;
1327 1357          default:
1328 1358                  break;
1329 1359          }
1330 1360  
↓ open down ↓ 497 lines elided ↑ open up ↑
1828 1858          igb->capab->enable_intr(igb);
1829 1859  
1830 1860          if (igb_check_acc_handle(igb->osdep.cfg_handle) != DDI_FM_OK)
1831 1861                  goto start_failure;
1832 1862  
1833 1863          if (igb_check_acc_handle(igb->osdep.reg_handle) != DDI_FM_OK)
1834 1864                  goto start_failure;
1835 1865  
1836 1866          if (igb->hw.mac.type == e1000_i350)
1837 1867                  (void) e1000_set_eee_i350(&igb->hw);
     1868 +        else if (igb->hw.mac.type == e1000_i354)
     1869 +                (void) e1000_set_eee_i354(&igb->hw);
1838 1870  
1839 1871          for (i = igb->num_tx_rings - 1; i >= 0; i--)
1840 1872                  mutex_exit(&igb->tx_rings[i].tx_lock);
1841 1873          for (i = igb->num_rx_rings - 1; i >= 0; i--)
1842 1874                  mutex_exit(&igb->rx_rings[i].rx_lock);
1843 1875  
1844 1876          return (IGB_SUCCESS);
1845 1877  
1846 1878  start_failure:
1847 1879          for (i = igb->num_tx_rings - 1; i >= 0; i--)
↓ open down ↓ 3478 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX