Print this page
Update i40e for new devices, prototype changes

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/i40e/i40e_main.c
          +++ new/usr/src/uts/common/io/i40e/i40e_main.c
↓ open down ↓ 7 lines elided ↑ open up ↑
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13   13   * Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
  14   14   * Copyright 2019 Joyent, Inc.
  15   15   * Copyright 2017 Tegile Systems, Inc.  All rights reserved.
  16   16   * Copyright 2020 RackTop Systems, Inc.
  17   17   * Copyright 2020 Ryan Zezeski
       18 + * Copyright 2021 Oxide Computer Company
  18   19   */
  19   20  
  20   21  /*
  21   22   * i40e - Intel 10/40 Gb Ethernet driver
  22   23   *
  23   24   * The i40e driver is the main software device driver for the Intel 40 Gb family
  24   25   * of devices. Note that these devices come in many flavors with both 40 GbE
  25   26   * ports and 10 GbE ports. This device is the successor to the 82599 family of
  26   27   * devices (ixgbe).
  27   28   *
↓ open down ↓ 555 lines elided ↑ open up ↑
 583  584                  /*
 584  585                   * Translate from an i40e value to a value in Mbits/s.
 585  586                   */
 586  587                  switch (speed) {
 587  588                  case I40E_LINK_SPEED_100MB:
 588  589                          i40e->i40e_link_speed = 100;
 589  590                          break;
 590  591                  case I40E_LINK_SPEED_1GB:
 591  592                          i40e->i40e_link_speed = 1000;
 592  593                          break;
      594 +                case I40E_LINK_SPEED_2_5GB:
      595 +                        i40e->i40e_link_speed = 2500;
      596 +                        break;
      597 +                case I40E_LINK_SPEED_5GB:
      598 +                        i40e->i40e_link_speed = 5000;
      599 +                        break;
 593  600                  case I40E_LINK_SPEED_10GB:
 594  601                          i40e->i40e_link_speed = 10000;
 595  602                          break;
 596  603                  case I40E_LINK_SPEED_20GB:
 597  604                          i40e->i40e_link_speed = 20000;
 598  605                          break;
 599  606                  case I40E_LINK_SPEED_40GB:
 600  607                          i40e->i40e_link_speed = 40000;
 601  608                          break;
 602  609                  case I40E_LINK_SPEED_25GB:
↓ open down ↓ 737 lines elided ↑ open up ↑
1340 1347                  return (B_FALSE);
1341 1348          }
1342 1349  
1343 1350          rc = i40e_configure_lan_hmc(hw, I40E_HMC_MODEL_DIRECT_ONLY);
1344 1351          if (rc != 0) {
1345 1352                  i40e_error(i40e, "failed to configure hardware memory cache: "
1346 1353                      "%d", rc);
1347 1354                  return (B_FALSE);
1348 1355          }
1349 1356  
1350      -        (void) i40e_aq_stop_lldp(hw, TRUE, NULL);
     1357 +        (void) i40e_aq_stop_lldp(hw, TRUE, FALSE, NULL);
1351 1358  
1352 1359          rc = i40e_get_mac_addr(hw, hw->mac.addr);
1353 1360          if (rc != I40E_SUCCESS) {
1354 1361                  i40e_error(i40e, "failed to retrieve hardware mac address: %d",
1355 1362                      rc);
1356 1363                  return (B_FALSE);
1357 1364          }
1358 1365  
1359 1366          rc = i40e_validate_mac_addr(hw->mac.addr);
1360 1367          if (rc != 0) {
↓ open down ↓ 1810 lines elided ↑ open up ↑
3171 3178           * That's handle exclusively through MAC's mc_multicst routines.
3172 3179           */
3173 3180          err = i40e_aq_set_vsi_broadcast(hw, I40E_DEF_VSI_SEID(i40e), B_TRUE,
3174 3181              NULL);
3175 3182          if (err != I40E_SUCCESS) {
3176 3183                  i40e_error(i40e, "failed to set default VSI: %d", err);
3177 3184                  rc = B_FALSE;
3178 3185                  goto done;
3179 3186          }
3180 3187  
3181      -        err = i40e_aq_set_mac_config(hw, i40e->i40e_frame_max, B_TRUE, 0, NULL);
     3188 +        err = i40e_aq_set_mac_config(hw, i40e->i40e_frame_max, B_TRUE, 0,
     3189 +            B_FALSE, NULL);
3182 3190          if (err != I40E_SUCCESS) {
3183 3191                  i40e_error(i40e, "failed to set MAC config: %d", err);
3184 3192                  rc = B_FALSE;
3185 3193                  goto done;
3186 3194          }
3187 3195  
3188 3196          /*
3189 3197           * Finally, make sure that we're happy from an FM perspective.
3190 3198           */
3191 3199          if (i40e_check_acc_handle(i40e->i40e_osdep_space.ios_reg_handle) !=
↓ open down ↓ 381 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX