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_x540.c
          +++ new/usr/src/uts/common/io/ixgbe/ixgbe_x540.c
   1    1  /******************************************************************************
   2    2  
   3      -  Copyright (c) 2001-2012, Intel Corporation 
        3 +  Copyright (c) 2001-2013, Intel Corporation 
   4    4    All rights reserved.
   5    5    
   6    6    Redistribution and use in source and binary forms, with or without 
   7    7    modification, are permitted provided that the following conditions are met:
   8    8    
   9    9     1. Redistributions of source code must retain the above copyright notice, 
  10   10        this list of conditions and the following disclaimer.
  11   11    
  12   12     2. Redistributions in binary form must reproduce the above copyright 
  13   13        notice, this list of conditions and the following disclaimer in the 
↓ open down ↓ 95 lines elided ↑ open up ↑
 109  109          mac->ops.set_mac_anti_spoofing = &ixgbe_set_mac_anti_spoofing;
 110  110          mac->ops.set_vlan_anti_spoofing = &ixgbe_set_vlan_anti_spoofing;
 111  111  
 112  112          /* Link */
 113  113          mac->ops.get_link_capabilities =
 114  114                                  &ixgbe_get_copper_link_capabilities_generic;
 115  115          mac->ops.setup_link = &ixgbe_setup_mac_link_X540;
 116  116          mac->ops.setup_rxpba = &ixgbe_set_rxpba_generic;
 117  117          mac->ops.check_link = &ixgbe_check_mac_link_generic;
 118  118  
      119 +
 119  120          mac->mcft_size          = 128;
 120  121          mac->vft_size           = 128;
 121  122          mac->num_rar_entries    = 128;
 122  123          mac->rx_pb_size         = 384;
 123  124          mac->max_tx_queues      = 128;
 124  125          mac->max_rx_queues      = 128;
 125  126          mac->max_msix_vectors   = ixgbe_get_pcie_msix_count_generic(hw);
 126  127  
 127  128          /*
 128  129           * FWSM register
↓ open down ↓ 39 lines elided ↑ open up ↑
 168  169  enum ixgbe_media_type ixgbe_get_media_type_X540(struct ixgbe_hw *hw)
 169  170  {
 170  171          UNREFERENCED_1PARAMETER(hw);
 171  172          return ixgbe_media_type_copper;
 172  173  }
 173  174  
 174  175  /**
 175  176   *  ixgbe_setup_mac_link_X540 - Sets the auto advertised capabilities
 176  177   *  @hw: pointer to hardware structure
 177  178   *  @speed: new link speed
 178      - *  @autoneg: TRUE if autonegotiation enabled
 179  179   *  @autoneg_wait_to_complete: TRUE when waiting for completion is needed
 180  180   **/
 181  181  s32 ixgbe_setup_mac_link_X540(struct ixgbe_hw *hw,
 182      -                              ixgbe_link_speed speed, bool autoneg,
      182 +                              ixgbe_link_speed speed,
 183  183                                bool autoneg_wait_to_complete)
 184  184  {
 185  185          DEBUGFUNC("ixgbe_setup_mac_link_X540");
 186      -        return hw->phy.ops.setup_link_speed(hw, speed, autoneg,
 187      -                                            autoneg_wait_to_complete);
      186 +        return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait_to_complete);
 188  187  }
 189  188  
 190  189  /**
 191  190   *  ixgbe_reset_hw_X540 - Perform hardware reset
 192  191   *  @hw: pointer to hardware structure
 193  192   *
 194  193   *  Resets the hardware by resetting the transmit and receive units, masks
 195  194   *  and clears all interrupts, and perform a reset.
 196  195   **/
 197  196  s32 ixgbe_reset_hw_X540(struct ixgbe_hw *hw)
↓ open down ↓ 767 lines elided ↑ open up ↑
 965  964          IXGBE_WRITE_REG(hw, IXGBE_LEDCTL, ledctl_reg);
 966  965  
 967  966          /* Unforce link and speed in the MAC. */
 968  967          macc_reg = IXGBE_READ_REG(hw, IXGBE_MACC);
 969  968          macc_reg &= ~(IXGBE_MACC_FLU | IXGBE_MACC_FSV_10G | IXGBE_MACC_FS);
 970  969          IXGBE_WRITE_REG(hw, IXGBE_MACC, macc_reg);
 971  970          IXGBE_WRITE_FLUSH(hw);
 972  971  
 973  972          return IXGBE_SUCCESS;
 974  973  }
      974 +
 975  975  
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX