Print this page
Import some changes from FreeBSD (details later, this is quick-n-dirty for now).

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/ixgbe/ixgbe_main.c
          +++ new/usr/src/uts/common/io/ixgbe/ixgbe_main.c
↓ open down ↓ 3310 lines elided ↑ open up ↑
3311 3311                  ixgbe_notice(ixgbe, "Invalid link settings. Setup link "
3312 3312                      "to autonegotiation with full link capabilities.");
3313 3313  
3314 3314                  autoneg_advertised = IXGBE_LINK_SPEED_10GB_FULL |
3315 3315                      IXGBE_LINK_SPEED_1GB_FULL |
3316 3316                      IXGBE_LINK_SPEED_100_FULL;
3317 3317          }
3318 3318  
3319 3319          if (setup_hw) {
3320 3320                  if (ixgbe_setup_link(&ixgbe->hw, autoneg_advertised,
3321      -                    ixgbe->param_adv_autoneg_cap, B_TRUE) != IXGBE_SUCCESS) {
     3321 +                   B_TRUE) != IXGBE_SUCCESS) {
3322 3322                          ixgbe_notice(ixgbe, "Setup link failed on this "
3323 3323                              "device.");
3324 3324                          return (IXGBE_FAILURE);
3325 3325                  }
3326 3326          }
3327 3327  
3328 3328          return (IXGBE_SUCCESS);
3329 3329  }
3330 3330  
3331 3331  /*
↓ open down ↓ 78 lines elided ↑ open up ↑
3410 3410          uint32_t eicr = ixgbe->eicr;
3411 3411          struct ixgbe_hw *hw = &ixgbe->hw;
3412 3412  
3413 3413          mutex_enter(&ixgbe->gen_lock);
3414 3414          if (eicr & IXGBE_EICR_GPI_SDP1) {
3415 3415                  /* clear the interrupt */
3416 3416                  IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1);
3417 3417  
3418 3418                  /* if link up, do multispeed fiber setup */
3419 3419                  (void) ixgbe_setup_link(hw, IXGBE_LINK_SPEED_82599_AUTONEG,
3420      -                    B_TRUE, B_TRUE);
     3420 +                    B_TRUE);
3421 3421                  ixgbe_driver_link_check(ixgbe);
3422 3422                  ixgbe_get_hw_state(ixgbe);
3423 3423          } else if (eicr & IXGBE_EICR_GPI_SDP2) {
3424 3424                  /* clear the interrupt */
3425 3425                  IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP2);
3426 3426  
3427 3427                  /* if link up, do sfp module setup */
3428 3428                  (void) hw->mac.ops.setup_sfp(hw);
3429 3429  
3430 3430                  /* do multispeed fiber setup */
3431 3431                  (void) ixgbe_setup_link(hw, IXGBE_LINK_SPEED_82599_AUTONEG,
3432      -                    B_TRUE, B_TRUE);
     3432 +                    B_TRUE);
3433 3433                  ixgbe_driver_link_check(ixgbe);
3434 3434                  ixgbe_get_hw_state(ixgbe);
3435 3435          }
3436 3436          mutex_exit(&ixgbe->gen_lock);
3437 3437  
3438 3438          /*
3439 3439           * We need to fully re-check the link later.
3440 3440           */
3441 3441          ixgbe->link_check_complete = B_FALSE;
3442 3442          ixgbe->link_check_hrtime = gethrtime() +
↓ open down ↓ 618 lines elided ↑ open up ↑
4061 4061                  break;
4062 4062  
4063 4063          case ixgbe_mac_82599EB:
4064 4064          case ixgbe_mac_X540:
4065 4065                  reg = IXGBE_READ_REG(&ixgbe->hw, IXGBE_AUTOC);
4066 4066                  reg |= (IXGBE_AUTOC_FLU |
4067 4067                      IXGBE_AUTOC_10G_KX4);
4068 4068                  IXGBE_WRITE_REG(&ixgbe->hw, IXGBE_AUTOC, reg);
4069 4069  
4070 4070                  (void) ixgbe_setup_link(&ixgbe->hw, IXGBE_LINK_SPEED_10GB_FULL,
4071      -                    B_FALSE, B_TRUE);
     4071 +                    B_TRUE);
4072 4072                  break;
4073 4073  
4074 4074          default:
4075 4075                  break;
4076 4076          }
4077 4077  }
4078 4078  
4079 4079  #pragma inline(ixgbe_intr_rx_work)
4080 4080  /*
4081 4081   * ixgbe_intr_rx_work - RX processing of ISR.
↓ open down ↓ 1763 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX