Print this page
6064 ixgbe needs X550 support

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 ↓ 21 lines elided ↑ open up ↑
  22   22  /*
  23   23   * Copyright(c) 2007-2010 Intel Corporation. All rights reserved.
  24   24   */
  25   25  
  26   26  /*
  27   27   * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  28   28   * Copyright (c) 2012, Joyent, Inc. All rights reserved.
  29   29   * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  30   30   * Copyright (c) 2013 Saso Kiselkov. All rights reserved.
  31   31   * Copyright (c) 2013 OSN Online Service Nuernberg GmbH. All rights reserved.
       32 + * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
  32   33   */
  33   34  
  34   35  #include "ixgbe_sw.h"
  35   36  
  36   37  static char ixgbe_ident[] = "Intel 10Gb Ethernet";
       38 +/* LINTED E_STATIC_UNUSED */
  37   39  static char ixgbe_version[] = "ixgbe 1.1.7";
  38   40  
  39   41  /*
  40   42   * Local function protoypes
  41   43   */
  42   44  static int ixgbe_register_mac(ixgbe_t *);
  43   45  static int ixgbe_identify_hardware(ixgbe_t *);
  44   46  static int ixgbe_regs_map(ixgbe_t *);
  45   47  static void ixgbe_init_properties(ixgbe_t *);
  46   48  static int ixgbe_init_driver_settings(ixgbe_t *);
↓ open down ↓ 260 lines elided ↑ open up ↑
 307  309          1,              /* minimum number of tx queues */
 308  310          8,              /* default number of tx queues */
 309  311          15500,          /* maximum MTU size */
 310  312          0xFF8,          /* maximum interrupt throttle rate */
 311  313          0,              /* minimum interrupt throttle rate */
 312  314          200,            /* default interrupt throttle rate */
 313  315          64,             /* maximum total msix vectors */
 314  316          16,             /* maximum number of ring vectors */
 315  317          2,              /* maximum number of other vectors */
 316  318          (IXGBE_EICR_LSC
 317      -        | IXGBE_EICR_GPI_SDP1
 318      -        | IXGBE_EICR_GPI_SDP2), /* "other" interrupt types handled */
      319 +        | IXGBE_EICR_GPI_SDP1_X540
      320 +        | IXGBE_EICR_GPI_SDP2_X540), /* "other" interrupt types handled */
 319  321  
 320      -        (IXGBE_SDP1_GPIEN
 321      -        | IXGBE_SDP2_GPIEN), /* "other" interrupt types enable mask */
      322 +        (IXGBE_SDP1_GPIEN_X540
      323 +        | IXGBE_SDP2_GPIEN_X540), /* "other" interrupt types enable mask */
 322  324  
 323  325          (IXGBE_FLAG_DCA_CAPABLE
 324  326          | IXGBE_FLAG_RSS_CAPABLE
 325  327          | IXGBE_FLAG_VMDQ_CAPABLE
 326  328          | IXGBE_FLAG_RSC_CAPABLE) /* capability flags */
 327  329  };
 328  330  
      331 +static adapter_info_t ixgbe_X550_cap = {
      332 +        128,            /* maximum number of rx queues */
      333 +        1,              /* minimum number of rx queues */
      334 +        128,            /* default number of rx queues */
      335 +        64,             /* maximum number of rx groups */
      336 +        1,              /* minimum number of rx groups */
      337 +        1,              /* default number of rx groups */
      338 +        128,            /* maximum number of tx queues */
      339 +        1,              /* minimum number of tx queues */
      340 +        8,              /* default number of tx queues */
      341 +        15500,          /* maximum MTU size */
      342 +        0xFF8,          /* maximum interrupt throttle rate */
      343 +        0,              /* minimum interrupt throttle rate */
      344 +        200,            /* default interrupt throttle rate */
      345 +        64,             /* maximum total msix vectors */
      346 +        16,             /* maximum number of ring vectors */
      347 +        2,              /* maximum number of other vectors */
      348 +        (IXGBE_EICR_LSC
      349 +        | IXGBE_SDP1_GPIEN_X550
      350 +        | IXGBE_SDP2_GPIEN_X550), /* "other" interrupt types handled */
      351 +
      352 +        (IXGBE_SDP1_GPIEN_X550
      353 +        | IXGBE_SDP2_GPIEN_X550), /* "other" interrupt types enable mask */
      354 +
      355 +        (IXGBE_FLAG_RSS_CAPABLE
      356 +        | IXGBE_FLAG_VMDQ_CAPABLE
      357 +        | IXGBE_FLAG_RSC_CAPABLE) /* capability flags */
      358 +};
      359 +
 329  360  /*
 330  361   * Module Initialization Functions.
 331  362   */
 332  363  
 333  364  int
 334  365  _init(void)
 335  366  {
 336  367          int status;
 337  368  
 338  369          mac_init_ops(&ixgbe_dev_ops, MODULE_NAME);
↓ open down ↓ 259 lines elided ↑ open up ↑
 598  629          /*
 599  630           * Now that mutex locks are initialized, and the chip is also
 600  631           * initialized, enable interrupts.
 601  632           */
 602  633          if (ixgbe_enable_intrs(ixgbe) != IXGBE_SUCCESS) {
 603  634                  ixgbe_error(ixgbe, "Failed to enable DDI interrupts");
 604  635                  goto attach_fail;
 605  636          }
 606  637          ixgbe->attach_progress |= ATTACH_PROGRESS_ENABLE_INTR;
 607  638  
 608      -        ixgbe_log(ixgbe, "%s, %s", ixgbe_ident, ixgbe_version);
      639 +        ixgbe_log(ixgbe, "%s", ixgbe_ident);
 609  640          atomic_or_32(&ixgbe->ixgbe_state, IXGBE_INITIALIZED);
 610  641  
 611  642          return (DDI_SUCCESS);
 612  643  
 613  644  attach_fail:
 614  645          ixgbe_unconfigure(devinfo, ixgbe);
 615  646          return (DDI_FAILURE);
 616  647  }
 617  648  
 618  649  /*
↓ open down ↓ 331 lines elided ↑ open up ↑
 950  981  
 951  982          case ixgbe_mac_X540:
 952  983                  IXGBE_DEBUGLOG_0(ixgbe, "identify X540 adapter\n");
 953  984                  ixgbe->capab = &ixgbe_X540_cap;
 954  985                  /*
 955  986                   * For now, X540 is all set in its capab structure.
 956  987                   * As other X540 variants show up, things can change here.
 957  988                   */
 958  989                  break;
 959  990  
      991 +        case ixgbe_mac_X550:
      992 +        case ixgbe_mac_X550EM_x:
      993 +                IXGBE_DEBUGLOG_0(ixgbe, "identify X550 adapter\n");
      994 +                ixgbe->capab = &ixgbe_X550_cap;
      995 +
      996 +                if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP)
      997 +                        ixgbe->capab->flags |= IXGBE_FLAG_SFP_PLUG_CAPABLE;
      998 +
      999 +                break;
     1000 +
 960 1001          default:
 961 1002                  IXGBE_DEBUGLOG_1(ixgbe,
 962 1003                      "adapter not supported in ixgbe_identify_hardware(): %d\n",
 963 1004                      hw->mac.type);
 964 1005                  return (IXGBE_FAILURE);
 965 1006          }
 966 1007  
 967 1008          return (IXGBE_SUCCESS);
 968 1009  }
 969 1010  
↓ open down ↓ 1214 lines elided ↑ open up ↑
2184 2225  
2185 2226          /*
2186 2227           * Setup the Receive Descriptor Control Register (RXDCTL)
2187 2228           * PTHRESH=32 descriptors (half the internal cache)
2188 2229           * HTHRESH=0 descriptors (to minimize latency on fetch)
2189 2230           * WTHRESH defaults to 1 (writeback each descriptor)
2190 2231           */
2191 2232          reg_val = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rx_ring->hw_index));
2192 2233          reg_val |= IXGBE_RXDCTL_ENABLE; /* enable queue */
2193 2234  
2194      -        /* Not a valid value for 82599 or X540 */
     2235 +        /* Not a valid value for 82599, X540 or X550 */
2195 2236          if (hw->mac.type == ixgbe_mac_82598EB) {
2196 2237                  reg_val |= 0x0020;      /* pthresh */
2197 2238          }
2198 2239          IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rx_ring->hw_index), reg_val);
2199 2240  
2200 2241          if (hw->mac.type == ixgbe_mac_82599EB ||
2201      -            hw->mac.type == ixgbe_mac_X540) {
     2242 +            hw->mac.type == ixgbe_mac_X540 ||
     2243 +            hw->mac.type == ixgbe_mac_X550 ||
     2244 +            hw->mac.type == ixgbe_mac_X550EM_x) {
2202 2245                  reg_val = IXGBE_READ_REG(hw, IXGBE_RDRXCTL);
2203 2246                  reg_val |= (IXGBE_RDRXCTL_CRCSTRIP | IXGBE_RDRXCTL_AGGDIS);
2204 2247                  IXGBE_WRITE_REG(hw, IXGBE_RDRXCTL, reg_val);
2205 2248          }
2206 2249  
2207 2250          /*
2208 2251           * Setup the Split and Replication Receive Control Register.
2209 2252           * Set the rx buffer size and the advanced descriptor type.
2210 2253           */
2211 2254          reg_val = (ixgbe->rx_buf_size >> IXGBE_SRRCTL_BSIZEPKT_SHIFT) |
↓ open down ↓ 277 lines elided ↑ open up ↑
2489 2532                  ring_mapping |= (i & 0xF) << (8 * (i & 0x3));
2490 2533                  if ((i & 0x3) == 0x3) {
2491 2534                          switch (hw->mac.type) {
2492 2535                          case ixgbe_mac_82598EB:
2493 2536                                  IXGBE_WRITE_REG(hw, IXGBE_TQSMR(i >> 2),
2494 2537                                      ring_mapping);
2495 2538                                  break;
2496 2539  
2497 2540                          case ixgbe_mac_82599EB:
2498 2541                          case ixgbe_mac_X540:
     2542 +                        case ixgbe_mac_X550:
     2543 +                        case ixgbe_mac_X550EM_x:
2499 2544                                  IXGBE_WRITE_REG(hw, IXGBE_TQSM(i >> 2),
2500 2545                                      ring_mapping);
2501 2546                                  break;
2502 2547  
2503 2548                          default:
2504 2549                                  break;
2505 2550                          }
2506 2551  
2507 2552                          ring_mapping = 0;
2508 2553                  }
2509 2554          }
2510 2555          if (i & 0x3) {
2511 2556                  switch (hw->mac.type) {
2512 2557                  case ixgbe_mac_82598EB:
2513 2558                          IXGBE_WRITE_REG(hw, IXGBE_TQSMR(i >> 2), ring_mapping);
2514 2559                          break;
2515 2560  
2516 2561                  case ixgbe_mac_82599EB:
2517 2562                  case ixgbe_mac_X540:
     2563 +                case ixgbe_mac_X550:
     2564 +                case ixgbe_mac_X550EM_x:
2518 2565                          IXGBE_WRITE_REG(hw, IXGBE_TQSM(i >> 2), ring_mapping);
2519 2566                          break;
2520 2567  
2521 2568                  default:
2522 2569                          break;
2523 2570                  }
2524 2571          }
2525 2572  
2526 2573          /*
2527 2574           * Enable CRC appending and TX padding (for short tx frames)
2528 2575           */
2529 2576          reg_val = IXGBE_READ_REG(hw, IXGBE_HLREG0);
2530 2577          reg_val |= IXGBE_HLREG0_TXCRCEN | IXGBE_HLREG0_TXPADEN;
2531 2578          IXGBE_WRITE_REG(hw, IXGBE_HLREG0, reg_val);
2532 2579  
2533 2580          /*
2534      -         * enable DMA for 82599 and X540 parts
     2581 +         * enable DMA for 82599, X540 and X550 parts
2535 2582           */
2536 2583          if (hw->mac.type == ixgbe_mac_82599EB ||
2537      -            hw->mac.type == ixgbe_mac_X540) {
     2584 +            hw->mac.type == ixgbe_mac_X540 ||
     2585 +            hw->mac.type == ixgbe_mac_X550 ||
     2586 +            hw->mac.type == ixgbe_mac_X550EM_x) {
2538 2587                  /* DMATXCTL.TE must be set after all Tx config is complete */
2539 2588                  reg_val = IXGBE_READ_REG(hw, IXGBE_DMATXCTL);
2540 2589                  reg_val |= IXGBE_DMATXCTL_TE;
2541 2590                  IXGBE_WRITE_REG(hw, IXGBE_DMATXCTL, reg_val);
2542 2591  
2543 2592                  /* Disable arbiter to set MTQC */
2544 2593                  reg_val = IXGBE_READ_REG(hw, IXGBE_RTTDCS);
2545 2594                  reg_val |= IXGBE_RTTDCS_ARBDIS;
2546 2595                  IXGBE_WRITE_REG(hw, IXGBE_RTTDCS, reg_val);
2547 2596                  IXGBE_WRITE_REG(hw, IXGBE_MTQC, IXGBE_MTQC_64Q_1PB);
↓ open down ↓ 92 lines elided ↑ open up ↑
2640 2689                   * VMDq Enable = 1;
2641 2690                   * VMDq Filter = 0; MAC filtering
2642 2691                   * Default VMDq output index = 0;
2643 2692                   */
2644 2693                  vmdctl = IXGBE_VMD_CTL_VMDQ_EN;
2645 2694                  IXGBE_WRITE_REG(hw, IXGBE_VMD_CTL, vmdctl);
2646 2695                  break;
2647 2696  
2648 2697          case ixgbe_mac_82599EB:
2649 2698          case ixgbe_mac_X540:
     2699 +        case ixgbe_mac_X550:
     2700 +        case ixgbe_mac_X550EM_x:
2650 2701                  /*
2651 2702                   * Enable VMDq-only.
2652 2703                   */
2653 2704                  vmdctl = IXGBE_MRQC_VMDQEN;
2654 2705                  IXGBE_WRITE_REG(hw, IXGBE_MRQC, vmdctl);
2655 2706  
2656 2707                  for (i = 0; i < hw->mac.num_rar_entries; i++) {
2657 2708                          IXGBE_WRITE_REG(hw, IXGBE_MPSAR_LO(i), 0);
2658 2709                          IXGBE_WRITE_REG(hw, IXGBE_MPSAR_HI(i), 0);
2659 2710                  }
↓ open down ↓ 74 lines elided ↑ open up ↑
2734 2785                   * Enable and Setup VMDq
2735 2786                   * VMDq Filter = 0; MAC filtering
2736 2787                   * Default VMDq output index = 0;
2737 2788                   */
2738 2789                  vmdctl = IXGBE_VMD_CTL_VMDQ_EN;
2739 2790                  IXGBE_WRITE_REG(hw, IXGBE_VMD_CTL, vmdctl);
2740 2791                  break;
2741 2792  
2742 2793          case ixgbe_mac_82599EB:
2743 2794          case ixgbe_mac_X540:
     2795 +        case ixgbe_mac_X550:
     2796 +        case ixgbe_mac_X550EM_x:
2744 2797                  /*
2745 2798                   * Enable RSS & Setup RSS Hash functions
2746 2799                   */
2747 2800                  mrqc = IXGBE_MRQC_RSS_FIELD_IPV4 |
2748 2801                      IXGBE_MRQC_RSS_FIELD_IPV4_TCP |
2749 2802                      IXGBE_MRQC_RSS_FIELD_IPV4_UDP |
2750 2803                      IXGBE_MRQC_RSS_FIELD_IPV6_EX_TCP |
2751 2804                      IXGBE_MRQC_RSS_FIELD_IPV6_EX |
2752 2805                      IXGBE_MRQC_RSS_FIELD_IPV6 |
2753 2806                      IXGBE_MRQC_RSS_FIELD_IPV6_TCP |
↓ open down ↓ 26 lines elided ↑ open up ↑
2780 2833           * Disable Packet Checksum to enable RSS for multiple receive queues.
2781 2834           * It is an adapter hardware limitation that Packet Checksum is
2782 2835           * mutually exclusive with RSS.
2783 2836           */
2784 2837          rxcsum = IXGBE_READ_REG(hw, IXGBE_RXCSUM);
2785 2838          rxcsum |= IXGBE_RXCSUM_PCSD;
2786 2839          rxcsum &= ~IXGBE_RXCSUM_IPPCSE;
2787 2840          IXGBE_WRITE_REG(hw, IXGBE_RXCSUM, rxcsum);
2788 2841  
2789 2842          if (hw->mac.type == ixgbe_mac_82599EB ||
2790      -            hw->mac.type == ixgbe_mac_X540) {
     2843 +            hw->mac.type == ixgbe_mac_X540 ||
     2844 +            hw->mac.type == ixgbe_mac_X550 ||
     2845 +            hw->mac.type == ixgbe_mac_X550EM_x) {
2791 2846                  /*
2792 2847                   * Enable Virtualization and Replication.
2793 2848                   */
2794 2849                  vtctl = IXGBE_VT_CTL_VT_ENABLE | IXGBE_VT_CTL_REPLEN;
2795 2850                  IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vtctl);
2796 2851  
2797 2852                  /*
2798 2853                   * Enable receiving packets to all VFs
2799 2854                   */
2800 2855                  IXGBE_WRITE_REG(hw, IXGBE_VFRE(0), IXGBE_VFRE_ENABLE_ALL);
↓ open down ↓ 191 lines elided ↑ open up ↑
2992 3047                          ixgbe->num_rx_rings = ixgbe->num_rx_groups;
2993 3048                  } else {
2994 3049                          ixgbe->num_rx_rings = ixgbe->num_rx_groups *
2995 3050                              min(8, ring_per_group);
2996 3051                  }
2997 3052  
2998 3053                  break;
2999 3054  
3000 3055          case ixgbe_mac_82599EB:
3001 3056          case ixgbe_mac_X540:
     3057 +        case ixgbe_mac_X550:
     3058 +        case ixgbe_mac_X550EM_x:
3002 3059                  /*
3003 3060                   * 82599 supports the following combination:
3004 3061                   * vmdq no. x rss no.
3005 3062                   * [33..64] x [1..2]
3006 3063                   * [2..32]  x [1..4]
3007 3064                   * 1 x [1..16]
3008 3065                   * However 8 rss queue per pool (vmdq) is sufficient for
3009 3066                   * most cases.
3010 3067                   *
3011      -                 * For now, treat X540 like the 82599.
     3068 +                 * For now, treat X540 and X550 like the 82599.
3012 3069                   */
3013 3070                  ring_per_group = ixgbe->num_rx_rings / ixgbe->num_rx_groups;
3014 3071                  if (ixgbe->num_rx_groups == 1) {
3015 3072                          ixgbe->num_rx_rings = min(8, ring_per_group);
3016 3073                  } else if (ixgbe->num_rx_groups <= 32) {
3017 3074                          ixgbe->num_rx_rings = ixgbe->num_rx_groups *
3018 3075                              min(4, ring_per_group);
3019 3076                  } else if (ixgbe->num_rx_groups <= 64) {
3020 3077                          ixgbe->num_rx_rings = ixgbe->num_rx_groups *
3021 3078                              min(2, ring_per_group);
↓ open down ↓ 142 lines elided ↑ open up ↑
3164 3221              0, 1, DEFAULT_RX_HCKSUM_ENABLE);
3165 3222          ixgbe->lso_enable = ixgbe_get_prop(ixgbe, PROP_LSO_ENABLE,
3166 3223              0, 1, DEFAULT_LSO_ENABLE);
3167 3224          ixgbe->lro_enable = ixgbe_get_prop(ixgbe, PROP_LRO_ENABLE,
3168 3225              0, 1, DEFAULT_LRO_ENABLE);
3169 3226          ixgbe->tx_head_wb_enable = ixgbe_get_prop(ixgbe, PROP_TX_HEAD_WB_ENABLE,
3170 3227              0, 1, DEFAULT_TX_HEAD_WB_ENABLE);
3171 3228          ixgbe->relax_order_enable = ixgbe_get_prop(ixgbe,
3172 3229              PROP_RELAX_ORDER_ENABLE, 0, 1, DEFAULT_RELAX_ORDER_ENABLE);
3173 3230  
3174      -        /* Head Write Back not recommended for 82599 and X540 */
     3231 +        /* Head Write Back not recommended for 82599, X540 and X550 */
3175 3232          if (hw->mac.type == ixgbe_mac_82599EB ||
3176      -            hw->mac.type == ixgbe_mac_X540) {
     3233 +            hw->mac.type == ixgbe_mac_X540 ||
     3234 +            hw->mac.type == ixgbe_mac_X550 ||
     3235 +            hw->mac.type == ixgbe_mac_X550EM_x) {
3177 3236                  ixgbe->tx_head_wb_enable = B_FALSE;
3178 3237          }
3179 3238  
3180 3239          /*
3181 3240           * ixgbe LSO needs the tx h/w checksum support.
3182 3241           * LSO will be disabled if tx h/w checksum is not
3183 3242           * enabled.
3184 3243           */
3185 3244          if (ixgbe->tx_hcksum_enable == B_FALSE) {
3186 3245                  ixgbe->lso_enable = B_FALSE;
↓ open down ↓ 2 lines elided ↑ open up ↑
3189 3248          /*
3190 3249           * ixgbe LRO needs the rx h/w checksum support.
3191 3250           * LRO will be disabled if rx h/w checksum is not
3192 3251           * enabled.
3193 3252           */
3194 3253          if (ixgbe->rx_hcksum_enable == B_FALSE) {
3195 3254                  ixgbe->lro_enable = B_FALSE;
3196 3255          }
3197 3256  
3198 3257          /*
3199      -         * ixgbe LRO only been supported by 82599 and X540 now
     3258 +         * ixgbe LRO only supported by 82599, X540 and X550
3200 3259           */
3201 3260          if (hw->mac.type == ixgbe_mac_82598EB) {
3202 3261                  ixgbe->lro_enable = B_FALSE;
3203 3262          }
3204 3263          ixgbe->tx_copy_thresh = ixgbe_get_prop(ixgbe, PROP_TX_COPY_THRESHOLD,
3205 3264              MIN_TX_COPY_THRESHOLD, MAX_TX_COPY_THRESHOLD,
3206 3265              DEFAULT_TX_COPY_THRESHOLD);
3207 3266          ixgbe->tx_recycle_thresh = ixgbe_get_prop(ixgbe,
3208 3267              PROP_TX_RECYCLE_THRESHOLD, MIN_TX_RECYCLE_THRESHOLD,
3209 3268              MAX_TX_RECYCLE_THRESHOLD, DEFAULT_TX_RECYCLE_THRESHOLD);
↓ open down ↓ 9 lines elided ↑ open up ↑
3219 3278              DEFAULT_RX_COPY_THRESHOLD);
3220 3279          ixgbe->rx_limit_per_intr = ixgbe_get_prop(ixgbe, PROP_RX_LIMIT_PER_INTR,
3221 3280              MIN_RX_LIMIT_PER_INTR, MAX_RX_LIMIT_PER_INTR,
3222 3281              DEFAULT_RX_LIMIT_PER_INTR);
3223 3282  
3224 3283          ixgbe->intr_throttling[0] = ixgbe_get_prop(ixgbe, PROP_INTR_THROTTLING,
3225 3284              ixgbe->capab->min_intr_throttle,
3226 3285              ixgbe->capab->max_intr_throttle,
3227 3286              ixgbe->capab->def_intr_throttle);
3228 3287          /*
3229      -         * 82599 and X540 require the interrupt throttling rate is
3230      -         * a multiple of 8. This is enforced by the register
3231      -         * definiton.
     3288 +         * 82599, X540 and X550 require the interrupt throttling rate is
     3289 +         * a multiple of 8. This is enforced by the register definiton.
3232 3290           */
3233      -        if (hw->mac.type == ixgbe_mac_82599EB || hw->mac.type == ixgbe_mac_X540)
     3291 +        if (hw->mac.type == ixgbe_mac_82599EB ||
     3292 +            hw->mac.type == ixgbe_mac_X540 ||
     3293 +            hw->mac.type == ixgbe_mac_X550 ||
     3294 +            hw->mac.type == ixgbe_mac_X550EM_x)
3234 3295                  ixgbe->intr_throttling[0] = ixgbe->intr_throttling[0] & 0xFF8;
3235 3296  
3236 3297          hw->allow_unsupported_sfp = ixgbe_get_prop(ixgbe,
3237 3298              PROP_ALLOW_UNSUPPORTED_SFP, 0, 1, DEFAULT_ALLOW_UNSUPPORTED_SFP);
3238 3299  }
3239 3300  
3240 3301  static void
3241 3302  ixgbe_init_params(ixgbe_t *ixgbe)
3242 3303  {
3243 3304          ixgbe->param_en_10000fdx_cap = 1;
↓ open down ↓ 78 lines elided ↑ open up ↑
3322 3383                  ixgbe_notice(ixgbe, "Invalid link settings. Setup link "
3323 3384                      "to autonegotiation with full link capabilities.");
3324 3385  
3325 3386                  autoneg_advertised = IXGBE_LINK_SPEED_10GB_FULL |
3326 3387                      IXGBE_LINK_SPEED_1GB_FULL |
3327 3388                      IXGBE_LINK_SPEED_100_FULL;
3328 3389          }
3329 3390  
3330 3391          if (setup_hw) {
3331 3392                  if (ixgbe_setup_link(&ixgbe->hw, autoneg_advertised,
3332      -                    ixgbe->param_adv_autoneg_cap, B_TRUE) != IXGBE_SUCCESS) {
     3393 +                    ixgbe->param_adv_autoneg_cap) != IXGBE_SUCCESS) {
3333 3394                          ixgbe_notice(ixgbe, "Setup link failed on this "
3334 3395                              "device.");
3335 3396                          return (IXGBE_FAILURE);
3336 3397                  }
3337 3398          }
3338 3399  
3339 3400          return (IXGBE_SUCCESS);
3340 3401  }
3341 3402  
3342 3403  /*
↓ open down ↓ 72 lines elided ↑ open up ↑
3415 3476   * ixgbe_sfp_check - sfp module processing done in taskq only for 82599.
3416 3477   */
3417 3478  static void
3418 3479  ixgbe_sfp_check(void *arg)
3419 3480  {
3420 3481          ixgbe_t *ixgbe = (ixgbe_t *)arg;
3421 3482          uint32_t eicr = ixgbe->eicr;
3422 3483          struct ixgbe_hw *hw = &ixgbe->hw;
3423 3484  
3424 3485          mutex_enter(&ixgbe->gen_lock);
3425      -        if (eicr & IXGBE_EICR_GPI_SDP1) {
     3486 +        if (eicr & IXGBE_EICR_GPI_SDP1_BY_MAC(hw)) {
3426 3487                  /* clear the interrupt */
3427      -                IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1);
     3488 +                IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1_BY_MAC(hw));
3428 3489  
3429 3490                  /* if link up, do multispeed fiber setup */
3430 3491                  (void) ixgbe_setup_link(hw, IXGBE_LINK_SPEED_82599_AUTONEG,
3431      -                    B_TRUE, B_TRUE);
     3492 +                    B_TRUE);
3432 3493                  ixgbe_driver_link_check(ixgbe);
3433 3494                  ixgbe_get_hw_state(ixgbe);
3434      -        } else if (eicr & IXGBE_EICR_GPI_SDP2) {
     3495 +        } else if (eicr & IXGBE_EICR_GPI_SDP2_BY_MAC(hw)) {
3435 3496                  /* clear the interrupt */
3436      -                IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP2);
     3497 +                IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP2_BY_MAC(hw));
3437 3498  
3438 3499                  /* if link up, do sfp module setup */
3439 3500                  (void) hw->mac.ops.setup_sfp(hw);
3440 3501  
3441 3502                  /* do multispeed fiber setup */
3442 3503                  (void) ixgbe_setup_link(hw, IXGBE_LINK_SPEED_82599_AUTONEG,
3443      -                    B_TRUE, B_TRUE);
     3504 +                    B_TRUE);
3444 3505                  ixgbe_driver_link_check(ixgbe);
3445 3506                  ixgbe_get_hw_state(ixgbe);
3446 3507          }
3447 3508          mutex_exit(&ixgbe->gen_lock);
3448 3509  
3449 3510          /*
3450 3511           * We need to fully re-check the link later.
3451 3512           */
3452 3513          ixgbe->link_check_complete = B_FALSE;
3453 3514          ixgbe->link_check_hrtime = gethrtime() +
↓ open down ↓ 15 lines elided ↑ open up ↑
3469 3530          uint32_t eicr = ixgbe->eicr;
3470 3531          ixgbe_link_speed speed;
3471 3532          boolean_t link_up;
3472 3533  
3473 3534          mutex_enter(&ixgbe->gen_lock);
3474 3535  
3475 3536          /* make sure we know current state of link */
3476 3537          (void) ixgbe_check_link(hw, &speed, &link_up, false);
3477 3538  
3478 3539          /* check over-temp condition */
3479      -        if (((eicr & IXGBE_EICR_GPI_SDP0) && (!link_up)) ||
     3540 +        if (((eicr & IXGBE_EICR_GPI_SDP0_BY_MAC(hw)) && (!link_up)) ||
3480 3541              (eicr & IXGBE_EICR_LSC)) {
3481 3542                  if (hw->phy.ops.check_overtemp(hw) == IXGBE_ERR_OVERTEMP) {
3482 3543                          atomic_or_32(&ixgbe->ixgbe_state, IXGBE_OVERTEMP);
3483 3544  
3484 3545                          /*
3485 3546                           * Disable the adapter interrupts
3486 3547                           */
3487 3548                          ixgbe_disable_adapter_interrupts(ixgbe);
3488 3549  
3489 3550                          /*
↓ open down ↓ 175 lines elided ↑ open up ↑
3665 3726                                  found = B_TRUE;
3666 3727                          }
3667 3728                  }
3668 3729                  ddi_prop_free(bytes);
3669 3730          }
3670 3731  
3671 3732          /*
3672 3733           * Finally(!), if there's a valid "mac-address" property (created
3673 3734           * if we netbooted from this interface), we must use this instead
3674 3735           * of any of the above to ensure that the NFS/install server doesn't
3675      -         * get confused by the address changing as Solaris takes over!
     3736 +         * get confused by the address changing as illumos takes over!
3676 3737           */
3677 3738          err = ddi_prop_lookup_byte_array(DDI_DEV_T_ANY, ixgbe->dip,
3678 3739              DDI_PROP_DONTPASS, "mac-address", &bytes, &nelts);
3679 3740          if (err == DDI_PROP_SUCCESS) {
3680 3741                  if (nelts == ETHERADDRL) {
3681 3742                          while (nelts--)
3682 3743                                  hw->mac.addr[nelts] = bytes[nelts];
3683 3744                          found = B_TRUE;
3684 3745                  }
3685 3746                  ddi_prop_free(bytes);
↓ open down ↓ 169 lines elided ↑ open up ↑
3855 3916          /*
3856 3917           * non-msi-x mode
3857 3918           */
3858 3919          } else {
3859 3920  
3860 3921                  /* disable autoclear, leave gpie at default */
3861 3922                  eiac = 0;
3862 3923  
3863 3924                  /*
3864 3925                   * General purpose interrupt enable.
3865      -                 * For 82599 or X540, extended interrupt automask enable
3866      -                 * only in MSI or MSI-X mode
     3926 +                 * For 82599, X540 and X550, extended interrupt
     3927 +                 * automask enable only in MSI or MSI-X mode
3867 3928                   */
3868 3929                  if ((hw->mac.type == ixgbe_mac_82598EB) ||
3869 3930                      (ixgbe->intr_type == DDI_INTR_TYPE_MSI)) {
3870 3931                          gpie |= IXGBE_GPIE_EIAME;
3871 3932                  }
3872 3933          }
3873 3934  
3874 3935          /* Enable specific "other" interrupt types */
3875 3936          switch (hw->mac.type) {
3876 3937          case ixgbe_mac_82598EB:
3877 3938                  gpie |= ixgbe->capab->other_gpie;
3878 3939                  break;
3879 3940  
3880 3941          case ixgbe_mac_82599EB:
3881 3942          case ixgbe_mac_X540:
     3943 +        case ixgbe_mac_X550:
     3944 +        case ixgbe_mac_X550EM_x:
3882 3945                  gpie |= ixgbe->capab->other_gpie;
3883 3946  
3884 3947                  /* Enable RSC Delay 8us when LRO enabled  */
3885 3948                  if (ixgbe->lro_enable) {
3886 3949                          gpie |= (1 << IXGBE_GPIE_RSC_DELAY_SHIFT);
3887 3950                  }
3888 3951                  break;
3889 3952  
3890 3953          default:
3891 3954                  break;
↓ open down ↓ 174 lines elided ↑ open up ↑
4066 4129  
4067 4130                  (void) ixgbe_read_analog_reg8(&ixgbe->hw, IXGBE_ATLAS_PDN_AN,
4068 4131                      &atlas);
4069 4132                  atlas |= IXGBE_ATLAS_PDN_TX_AN_QL_ALL;
4070 4133                  (void) ixgbe_write_analog_reg8(&ixgbe->hw, IXGBE_ATLAS_PDN_AN,
4071 4134                      atlas);
4072 4135                  break;
4073 4136  
4074 4137          case ixgbe_mac_82599EB:
4075 4138          case ixgbe_mac_X540:
     4139 +        case ixgbe_mac_X550:
     4140 +        case ixgbe_mac_X550EM_x:
4076 4141                  reg = IXGBE_READ_REG(&ixgbe->hw, IXGBE_AUTOC);
4077 4142                  reg |= (IXGBE_AUTOC_FLU |
4078 4143                      IXGBE_AUTOC_10G_KX4);
4079 4144                  IXGBE_WRITE_REG(&ixgbe->hw, IXGBE_AUTOC, reg);
4080 4145  
4081 4146                  (void) ixgbe_setup_link(&ixgbe->hw, IXGBE_LINK_SPEED_10GB_FULL,
4082      -                    B_FALSE, B_TRUE);
     4147 +                    B_FALSE);
4083 4148                  break;
4084 4149  
4085 4150          default:
4086 4151                  break;
4087 4152          }
4088 4153  }
4089 4154  
4090 4155  #pragma inline(ixgbe_intr_rx_work)
4091 4156  /*
4092 4157   * ixgbe_intr_rx_work - RX processing of ISR.
↓ open down ↓ 39 lines elided ↑ open up ↑
4132 4197          }
4133 4198  }
4134 4199  
4135 4200  #pragma inline(ixgbe_intr_other_work)
4136 4201  /*
4137 4202   * ixgbe_intr_other_work - Process interrupt types other than tx/rx
4138 4203   */
4139 4204  static void
4140 4205  ixgbe_intr_other_work(ixgbe_t *ixgbe, uint32_t eicr)
4141 4206  {
     4207 +        struct ixgbe_hw *hw = &ixgbe->hw;
     4208 +
4142 4209          ASSERT(mutex_owned(&ixgbe->gen_lock));
4143 4210  
4144 4211          /*
4145 4212           * handle link status change
4146 4213           */
4147 4214          if (eicr & IXGBE_EICR_LSC) {
4148 4215                  ixgbe_driver_link_check(ixgbe);
4149 4216                  ixgbe_get_hw_state(ixgbe);
4150 4217          }
4151 4218  
4152 4219          /*
4153 4220           * check for fan failure on adapters with fans
4154 4221           */
4155 4222          if ((ixgbe->capab->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE) &&
4156      -            (eicr & IXGBE_EICR_GPI_SDP1)) {
     4223 +            (eicr & IXGBE_EICR_GPI_SDP1_BY_MAC(hw))) {
4157 4224                  atomic_or_32(&ixgbe->ixgbe_state, IXGBE_OVERTEMP);
4158 4225  
4159 4226                  /*
4160 4227                   * Disable the adapter interrupts
4161 4228                   */
4162 4229                  ixgbe_disable_adapter_interrupts(ixgbe);
4163 4230  
4164 4231                  /*
4165 4232                   * Disable Rx/Tx units
4166 4233                   */
4167 4234                  (void) ixgbe_stop_adapter(&ixgbe->hw);
4168 4235  
4169 4236                  ddi_fm_service_impact(ixgbe->dip, DDI_SERVICE_LOST);
4170 4237                  ixgbe_error(ixgbe,
4171 4238                      "Problem: Network adapter has been stopped "
4172 4239                      "because the fan has stopped.\n");
4173 4240                  ixgbe_error(ixgbe,
4174 4241                      "Action: Replace the adapter.\n");
4175 4242  
4176 4243                  /* re-enable the interrupt, which was automasked */
4177      -                ixgbe->eims |= IXGBE_EICR_GPI_SDP1;
     4244 +                ixgbe->eims |= IXGBE_EICR_GPI_SDP1_BY_MAC(hw);
4178 4245          }
4179 4246  
4180 4247          /*
4181 4248           * Do SFP check for adapters with hot-plug capability
4182 4249           */
4183 4250          if ((ixgbe->capab->flags & IXGBE_FLAG_SFP_PLUG_CAPABLE) &&
4184      -            ((eicr & IXGBE_EICR_GPI_SDP1) || (eicr & IXGBE_EICR_GPI_SDP2))) {
     4251 +            ((eicr & IXGBE_EICR_GPI_SDP1_BY_MAC(hw)) ||
     4252 +             (eicr & IXGBE_EICR_GPI_SDP2_BY_MAC(hw)))) {
4185 4253                  ixgbe->eicr = eicr;
4186 4254                  if ((ddi_taskq_dispatch(ixgbe->sfp_taskq,
4187 4255                      ixgbe_sfp_check, (void *)ixgbe,
4188 4256                      DDI_NOSLEEP)) != DDI_SUCCESS) {
4189 4257                          ixgbe_log(ixgbe, "No memory available to dispatch "
4190 4258                              "taskq for SFP check");
4191 4259                  }
4192 4260          }
4193 4261  
4194 4262          /*
4195 4263           * Do over-temperature check for adapters with temp sensor
4196 4264           */
4197 4265          if ((ixgbe->capab->flags & IXGBE_FLAG_TEMP_SENSOR_CAPABLE) &&
4198      -            ((eicr & IXGBE_EICR_GPI_SDP0) || (eicr & IXGBE_EICR_LSC))) {
     4266 +            ((eicr & IXGBE_EICR_GPI_SDP0_BY_MAC(hw)) || (eicr & IXGBE_EICR_LSC))) {
4199 4267                  ixgbe->eicr = eicr;
4200 4268                  if ((ddi_taskq_dispatch(ixgbe->overtemp_taskq,
4201 4269                      ixgbe_overtemp_check, (void *)ixgbe,
4202 4270                      DDI_NOSLEEP)) != DDI_SUCCESS) {
4203 4271                          ixgbe_log(ixgbe, "No memory available to dispatch "
4204 4272                              "taskq for overtemp check");
4205 4273                  }
4206 4274          }
4207 4275  }
4208 4276  
↓ open down ↓ 76 lines elided ↑ open up ↑
4285 4353  
4286 4354                  /* any interrupt type other than tx/rx */
4287 4355                  if (eicr & ixgbe->capab->other_intr) {
4288 4356                          switch (hw->mac.type) {
4289 4357                          case ixgbe_mac_82598EB:
4290 4358                                  ixgbe->eims &= ~(eicr & IXGBE_OTHER_INTR);
4291 4359                                  break;
4292 4360  
4293 4361                          case ixgbe_mac_82599EB:
4294 4362                          case ixgbe_mac_X540:
     4363 +                        case ixgbe_mac_X550:
     4364 +                        case ixgbe_mac_X550EM_x:
4295 4365                                  ixgbe->eimc = IXGBE_82599_OTHER_INTR;
4296 4366                                  IXGBE_WRITE_REG(hw, IXGBE_EIMC, ixgbe->eimc);
4297 4367                                  break;
4298 4368  
4299 4369                          default:
4300 4370                                  break;
4301 4371                          }
4302 4372                          ixgbe_intr_other_work(ixgbe, eicr);
4303 4373                          ixgbe->eims &= ~(eicr & IXGBE_OTHER_INTR);
4304 4374                  }
↓ open down ↓ 74 lines elided ↑ open up ↑
4379 4449          /* any interrupt type other than tx/rx */
4380 4450          if (eicr & ixgbe->capab->other_intr) {
4381 4451                  mutex_enter(&ixgbe->gen_lock);
4382 4452                  switch (hw->mac.type) {
4383 4453                  case ixgbe_mac_82598EB:
4384 4454                          ixgbe->eims &= ~(eicr & IXGBE_OTHER_INTR);
4385 4455                          break;
4386 4456  
4387 4457                  case ixgbe_mac_82599EB:
4388 4458                  case ixgbe_mac_X540:
     4459 +                case ixgbe_mac_X550:
     4460 +                case ixgbe_mac_X550EM_x:
4389 4461                          ixgbe->eimc = IXGBE_82599_OTHER_INTR;
4390 4462                          IXGBE_WRITE_REG(hw, IXGBE_EIMC, ixgbe->eimc);
4391 4463                          break;
4392 4464  
4393 4465                  default:
4394 4466                          break;
4395 4467                  }
4396 4468                  ixgbe_intr_other_work(ixgbe, eicr);
4397 4469                  ixgbe->eims &= ~(eicr & IXGBE_OTHER_INTR);
4398 4470                  mutex_exit(&ixgbe->gen_lock);
↓ open down ↓ 60 lines elided ↑ open up ↑
4459 4531                  if (eicr & ixgbe->capab->other_intr) {
4460 4532                          mutex_enter(&ixgbe->gen_lock);
4461 4533                          switch (hw->mac.type) {
4462 4534                          case ixgbe_mac_82598EB:
4463 4535                                  ixgbe->eims &= ~(eicr & IXGBE_OTHER_INTR);
4464 4536                                  ixgbe_intr_other_work(ixgbe, eicr);
4465 4537                                  break;
4466 4538  
4467 4539                          case ixgbe_mac_82599EB:
4468 4540                          case ixgbe_mac_X540:
     4541 +                        case ixgbe_mac_X550:
     4542 +                        case ixgbe_mac_X550EM_x:
4469 4543                                  ixgbe->eims |= IXGBE_EICR_RTX_QUEUE;
4470 4544                                  ixgbe_intr_other_work(ixgbe, eicr);
4471 4545                                  break;
4472 4546  
4473 4547                          default:
4474 4548                                  break;
4475 4549                          }
4476 4550                          mutex_exit(&ixgbe->gen_lock);
4477 4551                  }
4478 4552  
↓ open down ↓ 381 lines elided ↑ open up ↑
4860 4934                  }
4861 4935                  index = (((cause * 64) + intr_alloc_entry) >> 2) & 0x1F;
4862 4936                  ivar = IXGBE_READ_REG(hw, IXGBE_IVAR(index));
4863 4937                  ivar &= ~(0xFF << (8 * (intr_alloc_entry & 0x3)));
4864 4938                  ivar |= (msix_vector << (8 * (intr_alloc_entry & 0x3)));
4865 4939                  IXGBE_WRITE_REG(hw, IXGBE_IVAR(index), ivar);
4866 4940                  break;
4867 4941  
4868 4942          case ixgbe_mac_82599EB:
4869 4943          case ixgbe_mac_X540:
     4944 +        case ixgbe_mac_X550:
     4945 +        case ixgbe_mac_X550EM_x:
4870 4946                  if (cause == -1) {
4871 4947                          /* other causes */
4872 4948                          msix_vector |= IXGBE_IVAR_ALLOC_VAL;
4873 4949                          index = (intr_alloc_entry & 1) * 8;
4874 4950                          ivar = IXGBE_READ_REG(hw, IXGBE_IVAR_MISC);
4875 4951                          ivar &= ~(0xFF << index);
4876 4952                          ivar |= (msix_vector << index);
4877 4953                          IXGBE_WRITE_REG(hw, IXGBE_IVAR_MISC, ivar);
4878 4954                  } else {
4879 4955                          /* tx or rx causes */
↓ open down ↓ 34 lines elided ↑ open up ↑
4914 4990                  }
4915 4991                  index = (((cause * 64) + intr_alloc_entry) >> 2) & 0x1F;
4916 4992                  ivar = IXGBE_READ_REG(hw, IXGBE_IVAR(index));
4917 4993                  ivar |= (IXGBE_IVAR_ALLOC_VAL << (8 *
4918 4994                      (intr_alloc_entry & 0x3)));
4919 4995                  IXGBE_WRITE_REG(hw, IXGBE_IVAR(index), ivar);
4920 4996                  break;
4921 4997  
4922 4998          case ixgbe_mac_82599EB:
4923 4999          case ixgbe_mac_X540:
     5000 +        case ixgbe_mac_X550:
     5001 +        case ixgbe_mac_X550EM_x:
4924 5002                  if (cause == -1) {
4925 5003                          /* other causes */
4926 5004                          index = (intr_alloc_entry & 1) * 8;
4927 5005                          ivar = IXGBE_READ_REG(hw, IXGBE_IVAR_MISC);
4928 5006                          ivar |= (IXGBE_IVAR_ALLOC_VAL << index);
4929 5007                          IXGBE_WRITE_REG(hw, IXGBE_IVAR_MISC, ivar);
4930 5008                  } else {
4931 5009                          /* tx or rx causes */
4932 5010                          index = ((16 * (intr_alloc_entry & 1)) + (8 * cause));
4933 5011                          ivar = IXGBE_READ_REG(hw,
↓ open down ↓ 30 lines elided ↑ open up ↑
4964 5042                  }
4965 5043                  index = (((cause * 64) + intr_alloc_entry) >> 2) & 0x1F;
4966 5044                  ivar = IXGBE_READ_REG(hw, IXGBE_IVAR(index));
4967 5045                  ivar &= ~(IXGBE_IVAR_ALLOC_VAL<< (8 *
4968 5046                      (intr_alloc_entry & 0x3)));
4969 5047                  IXGBE_WRITE_REG(hw, IXGBE_IVAR(index), ivar);
4970 5048                  break;
4971 5049  
4972 5050          case ixgbe_mac_82599EB:
4973 5051          case ixgbe_mac_X540:
     5052 +        case ixgbe_mac_X550:
     5053 +        case ixgbe_mac_X550EM_x:
4974 5054                  if (cause == -1) {
4975 5055                          /* other causes */
4976 5056                          index = (intr_alloc_entry & 1) * 8;
4977 5057                          ivar = IXGBE_READ_REG(hw, IXGBE_IVAR_MISC);
4978 5058                          ivar &= ~(IXGBE_IVAR_ALLOC_VAL << index);
4979 5059                          IXGBE_WRITE_REG(hw, IXGBE_IVAR_MISC, ivar);
4980 5060                  } else {
4981 5061                          /* tx or rx causes */
4982 5062                          index = ((16 * (intr_alloc_entry & 1)) + (8 * cause));
4983 5063                          ivar = IXGBE_READ_REG(hw,
↓ open down ↓ 23 lines elided ↑ open up ↑
5007 5087          if (ixgbe->classify_mode == IXGBE_CLASSIFY_RSS ||
5008 5088              ixgbe->classify_mode == IXGBE_CLASSIFY_NONE) {
5009 5089                  return (sw_rx_index);
5010 5090          } else if (ixgbe->classify_mode == IXGBE_CLASSIFY_VMDQ) {
5011 5091                  switch (hw->mac.type) {
5012 5092                  case ixgbe_mac_82598EB:
5013 5093                          return (sw_rx_index);
5014 5094  
5015 5095                  case ixgbe_mac_82599EB:
5016 5096                  case ixgbe_mac_X540:
     5097 +                case ixgbe_mac_X550:
     5098 +                case ixgbe_mac_X550EM_x:
5017 5099                          return (sw_rx_index * 2);
5018 5100  
5019 5101                  default:
5020 5102                          break;
5021 5103                  }
5022 5104          } else if (ixgbe->classify_mode == IXGBE_CLASSIFY_VMDQ_RSS) {
5023 5105                  rx_ring_per_group = ixgbe->num_rx_rings / ixgbe->num_rx_groups;
5024 5106  
5025 5107                  switch (hw->mac.type) {
5026 5108                  case ixgbe_mac_82598EB:
5027 5109                          hw_rx_index = (sw_rx_index / rx_ring_per_group) *
5028 5110                              16 + (sw_rx_index % rx_ring_per_group);
5029 5111                          return (hw_rx_index);
5030 5112  
5031 5113                  case ixgbe_mac_82599EB:
5032 5114                  case ixgbe_mac_X540:
     5115 +                case ixgbe_mac_X550:
     5116 +                case ixgbe_mac_X550EM_x:
5033 5117                          if (ixgbe->num_rx_groups > 32) {
5034 5118                                  hw_rx_index = (sw_rx_index /
5035 5119                                      rx_ring_per_group) * 2 +
5036 5120                                      (sw_rx_index % rx_ring_per_group);
5037 5121                          } else {
5038 5122                                  hw_rx_index = (sw_rx_index /
5039 5123                                      rx_ring_per_group) * 4 +
5040 5124                                      (sw_rx_index % rx_ring_per_group);
5041 5125                          }
5042 5126                          return (hw_rx_index);
↓ open down ↓ 85 lines elided ↑ open up ↑
5128 5212           * Clear any previous entries
5129 5213           */
5130 5214          switch (hw->mac.type) {
5131 5215          case ixgbe_mac_82598EB:
5132 5216                  for (v_idx = 0; v_idx < 25; v_idx++)
5133 5217                          IXGBE_WRITE_REG(hw, IXGBE_IVAR(v_idx), 0);
5134 5218                  break;
5135 5219  
5136 5220          case ixgbe_mac_82599EB:
5137 5221          case ixgbe_mac_X540:
     5222 +        case ixgbe_mac_X550:
     5223 +        case ixgbe_mac_X550EM_x:
5138 5224                  for (v_idx = 0; v_idx < 64; v_idx++)
5139 5225                          IXGBE_WRITE_REG(hw, IXGBE_IVAR(v_idx), 0);
5140 5226                  IXGBE_WRITE_REG(hw, IXGBE_IVAR_MISC, 0);
5141 5227                  break;
5142 5228  
5143 5229          default:
5144 5230                  break;
5145 5231          }
5146 5232  
5147 5233          /*
↓ open down ↓ 708 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX