xref: /onnv-gate/usr/src/uts/common/io/ixgbe/ixgbe_api.c (revision 8490:b196365c7f89)
16621Sbt150084 /*
26621Sbt150084  * CDDL HEADER START
36621Sbt150084  *
46621Sbt150084  * Copyright(c) 2007-2008 Intel Corporation. All rights reserved.
56621Sbt150084  * The contents of this file are subject to the terms of the
66621Sbt150084  * Common Development and Distribution License (the "License").
76621Sbt150084  * You may not use this file except in compliance with the License.
86621Sbt150084  *
96621Sbt150084  * You can obtain a copy of the license at:
106621Sbt150084  *      http://www.opensolaris.org/os/licensing.
116621Sbt150084  * See the License for the specific language governing permissions
126621Sbt150084  * and limitations under the License.
136621Sbt150084  *
146621Sbt150084  * When using or redistributing this file, you may do so under the
156621Sbt150084  * License only. No other modification of this header is permitted.
166621Sbt150084  *
176621Sbt150084  * If applicable, add the following below this CDDL HEADER, with the
186621Sbt150084  * fields enclosed by brackets "[]" replaced with your own identifying
196621Sbt150084  * information: Portions Copyright [yyyy] [name of copyright owner]
206621Sbt150084  *
216621Sbt150084  * CDDL HEADER END
226621Sbt150084  */
236621Sbt150084 
246621Sbt150084 /*
25*8490SPaul.Guo@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
266621Sbt150084  * Use is subject to license terms of the CDDL.
276621Sbt150084  */
286621Sbt150084 
29*8490SPaul.Guo@Sun.COM /* IntelVersion: 1.99 v2008-09-12 */
306621Sbt150084 
316621Sbt150084 #include "ixgbe_api.h"
326621Sbt150084 #include "ixgbe_common.h"
33*8490SPaul.Guo@Sun.COM #ident "$Id: ixgbe_api.c,v 1.99 2008/08/22 16:30:26 mrchilak Exp $"
346621Sbt150084 
356621Sbt150084 extern s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw);
366621Sbt150084 
376621Sbt150084 /*
386621Sbt150084  * ixgbe_init_shared_code - Initialize the shared code
396621Sbt150084  * @hw: pointer to hardware structure
406621Sbt150084  *
416621Sbt150084  * This will assign function pointers and assign the MAC type and PHY code.
426621Sbt150084  * Does not touch the hardware. This function must be called prior to any
436621Sbt150084  * other function in the shared code. The ixgbe_hw structure should be
446621Sbt150084  * memset to 0 prior to calling this function.  The following fields in
456621Sbt150084  * hw structure should be filled in prior to calling this function:
466621Sbt150084  * hw_addr, back, device_id, vendor_id, subsystem_device_id,
476621Sbt150084  *  subsystem_vendor_id, and revision_id
486621Sbt150084  */
496621Sbt150084 s32
506621Sbt150084 ixgbe_init_shared_code(struct ixgbe_hw *hw)
516621Sbt150084 {
526621Sbt150084 	s32 status;
536621Sbt150084 
546621Sbt150084 	/*
556621Sbt150084 	 * Set the mac type
566621Sbt150084 	 */
576621Sbt150084 	(void) ixgbe_set_mac_type(hw);
586621Sbt150084 
596621Sbt150084 	switch (hw->mac.type) {
606621Sbt150084 	case ixgbe_mac_82598EB:
616621Sbt150084 		status = ixgbe_init_ops_82598(hw);
626621Sbt150084 		break;
636621Sbt150084 	default:
646621Sbt150084 		status = IXGBE_ERR_DEVICE_NOT_SUPPORTED;
656621Sbt150084 		break;
666621Sbt150084 	}
676621Sbt150084 
686621Sbt150084 	return (status);
696621Sbt150084 }
706621Sbt150084 
716621Sbt150084 /*
726621Sbt150084  * ixgbe_set_mac_type - Sets MAC type
736621Sbt150084  * @hw: pointer to the HW structure
746621Sbt150084  *
756621Sbt150084  * This function sets the mac type of the adapter based on the
766621Sbt150084  * vendor ID and device ID stored in the hw structure.
776621Sbt150084  */
786621Sbt150084 s32
796621Sbt150084 ixgbe_set_mac_type(struct ixgbe_hw *hw)
806621Sbt150084 {
816621Sbt150084 	s32 ret_val = IXGBE_SUCCESS;
826621Sbt150084 
83*8490SPaul.Guo@Sun.COM 	DEBUGFUNC("ixgbe_set_mac_type\n");
846621Sbt150084 
856621Sbt150084 	if (hw->vendor_id == IXGBE_INTEL_VENDOR_ID) {
866621Sbt150084 		switch (hw->device_id) {
876621Sbt150084 		case IXGBE_DEV_ID_82598AF_SINGLE_PORT:
886621Sbt150084 		case IXGBE_DEV_ID_82598AF_DUAL_PORT:
89*8490SPaul.Guo@Sun.COM 		case IXGBE_DEV_ID_82598AT:
906621Sbt150084 		case IXGBE_DEV_ID_82598EB_CX4:
916621Sbt150084 		case IXGBE_DEV_ID_82598_CX4_DUAL_PORT:
92*8490SPaul.Guo@Sun.COM 		case IXGBE_DEV_ID_82598_DA_DUAL_PORT:
93*8490SPaul.Guo@Sun.COM 		case IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM:
946621Sbt150084 		case IXGBE_DEV_ID_82598EB_XF_LR:
95*8490SPaul.Guo@Sun.COM 		case IXGBE_DEV_ID_82598EB_SFP_LOM:
966621Sbt150084 			hw->mac.type = ixgbe_mac_82598EB;
976621Sbt150084 			break;
986621Sbt150084 		default:
996621Sbt150084 			ret_val = IXGBE_ERR_DEVICE_NOT_SUPPORTED;
1006621Sbt150084 			break;
1016621Sbt150084 		}
1026621Sbt150084 	} else {
1036621Sbt150084 		ret_val = IXGBE_ERR_DEVICE_NOT_SUPPORTED;
1046621Sbt150084 	}
1056621Sbt150084 
106*8490SPaul.Guo@Sun.COM 	DEBUGOUT2("ixgbe_set_mac_type found mac: %d, returns: %d\n",
107*8490SPaul.Guo@Sun.COM 	    hw->mac.type, ret_val);
108*8490SPaul.Guo@Sun.COM 
1096621Sbt150084 	return (ret_val);
1106621Sbt150084 }
1116621Sbt150084 
1126621Sbt150084 /*
1136621Sbt150084  * ixgbe_init_hw - Initialize the hardware
1146621Sbt150084  * @hw: pointer to hardware structure
1156621Sbt150084  *
1166621Sbt150084  * Initialize the hardware by resetting and then starting the hardware
1176621Sbt150084  */
1186621Sbt150084 s32
1196621Sbt150084 ixgbe_init_hw(struct ixgbe_hw *hw)
1206621Sbt150084 {
1216621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.init_hw, (hw),
1226621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
1236621Sbt150084 }
1246621Sbt150084 
1256621Sbt150084 /*
1266621Sbt150084  * ixgbe_reset_hw - Performs a hardware reset
1276621Sbt150084  * @hw: pointer to hardware structure
1286621Sbt150084  *
1296621Sbt150084  * Resets the hardware by resetting the transmit and receive units, masks and
1306621Sbt150084  * clears all interrupts, performs a PHY reset, and performs a MAC reset
1316621Sbt150084  */
1326621Sbt150084 s32
1336621Sbt150084 ixgbe_reset_hw(struct ixgbe_hw *hw)
1346621Sbt150084 {
1356621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.reset_hw, (hw),
1366621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
1376621Sbt150084 }
1386621Sbt150084 
1396621Sbt150084 /*
1406621Sbt150084  * ixgbe_start_hw - Prepares hardware for Rx/Tx
1416621Sbt150084  * @hw: pointer to hardware structure
1426621Sbt150084  *
1436621Sbt150084  * Starts the hardware by filling the bus info structure and media type,
1446621Sbt150084  * clears all on chip counters, initializes receive address registers,
1456621Sbt150084  * multicast table, VLAN filter table, calls routine to setup link and
1466621Sbt150084  * flow control settings, and leaves transmit and receive units disabled
1476621Sbt150084  * and uninitialized.
1486621Sbt150084  */
1496621Sbt150084 s32
1506621Sbt150084 ixgbe_start_hw(struct ixgbe_hw *hw)
1516621Sbt150084 {
1526621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.start_hw, (hw),
1536621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
1546621Sbt150084 }
1556621Sbt150084 
1566621Sbt150084 /*
1576621Sbt150084  * ixgbe_clear_hw_cntrs - Clear hardware counters
1586621Sbt150084  * @hw: pointer to hardware structure
1596621Sbt150084  *
1606621Sbt150084  * Clears all hardware statistics counters by reading them from the hardware
1616621Sbt150084  * Statistics counters are clear on read.
1626621Sbt150084  */
1636621Sbt150084 s32
1646621Sbt150084 ixgbe_clear_hw_cntrs(struct ixgbe_hw *hw)
1656621Sbt150084 {
1666621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.clear_hw_cntrs, (hw),
1676621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
1686621Sbt150084 }
1696621Sbt150084 
1706621Sbt150084 /*
1716621Sbt150084  * ixgbe_get_media_type - Get media type
1726621Sbt150084  * @hw: pointer to hardware structure
1736621Sbt150084  *
1746621Sbt150084  * Returns the media type (fiber, copper, backplane)
1756621Sbt150084  */
1766621Sbt150084 enum ixgbe_media_type
1776621Sbt150084 ixgbe_get_media_type(struct ixgbe_hw *hw)
1786621Sbt150084 {
1796621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.get_media_type, (hw),
1806621Sbt150084 	    ixgbe_media_type_unknown);
1816621Sbt150084 }
1826621Sbt150084 
1836621Sbt150084 /*
1846621Sbt150084  * ixgbe_get_mac_addr - Get MAC address
1856621Sbt150084  * @hw: pointer to hardware structure
1866621Sbt150084  * @mac_addr: Adapter MAC address
1876621Sbt150084  *
1886621Sbt150084  * Reads the adapter's MAC address from the first Receive Address Register
1896621Sbt150084  * (RAR0) A reset of the adapter must have been performed prior to calling
1906621Sbt150084  * this function in order for the MAC address to have been loaded from the
1916621Sbt150084  * EEPROM into RAR0
1926621Sbt150084  */
1936621Sbt150084 s32
1946621Sbt150084 ixgbe_get_mac_addr(struct ixgbe_hw *hw, u8 *mac_addr)
1956621Sbt150084 {
1966621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.get_mac_addr,
1976621Sbt150084 	    (hw, mac_addr), IXGBE_NOT_IMPLEMENTED);
1986621Sbt150084 }
1996621Sbt150084 
2006621Sbt150084 /*
2016621Sbt150084  * ixgbe_get_bus_info - Set PCI bus info
2026621Sbt150084  * @hw: pointer to hardware structure
2036621Sbt150084  *
2046621Sbt150084  * Sets the PCI bus info (speed, width, type) within the ixgbe_hw structure
2056621Sbt150084  */
2066621Sbt150084 s32
2076621Sbt150084 ixgbe_get_bus_info(struct ixgbe_hw *hw)
2086621Sbt150084 {
2096621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.get_bus_info, (hw),
2106621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
2116621Sbt150084 }
2126621Sbt150084 
2136621Sbt150084 /*
2146621Sbt150084  * ixgbe_get_num_of_tx_queues - Get Tx queues
2156621Sbt150084  * @hw: pointer to hardware structure
2166621Sbt150084  *
2176621Sbt150084  * Returns the number of transmit queues for the given adapter.
2186621Sbt150084  */
2196621Sbt150084 u32
2206621Sbt150084 ixgbe_get_num_of_tx_queues(struct ixgbe_hw *hw)
2216621Sbt150084 {
2226621Sbt150084 	return (hw->mac.max_tx_queues);
2236621Sbt150084 }
2246621Sbt150084 
2256621Sbt150084 /*
2266621Sbt150084  * ixgbe_get_num_of_rx_queues - Get Rx queues
2276621Sbt150084  * @hw: pointer to hardware structure
2286621Sbt150084  *
2296621Sbt150084  * Returns the number of receive queues for the given adapter.
2306621Sbt150084  */
2316621Sbt150084 u32
2326621Sbt150084 ixgbe_get_num_of_rx_queues(struct ixgbe_hw *hw)
2336621Sbt150084 {
2346621Sbt150084 	return (hw->mac.max_rx_queues);
2356621Sbt150084 }
2366621Sbt150084 
2376621Sbt150084 /*
2386621Sbt150084  * ixgbe_stop_adapter - Disable Rx/Tx units
2396621Sbt150084  * @hw: pointer to hardware structure
2406621Sbt150084  *
2416621Sbt150084  * Sets the adapter_stopped flag within ixgbe_hw struct. Clears interrupts,
2426621Sbt150084  * disables transmit and receive units. The adapter_stopped flag is used by
2436621Sbt150084  * the shared code and drivers to determine if the adapter is in a stopped
2446621Sbt150084  * state and should not touch the hardware.
2456621Sbt150084  */
2466621Sbt150084 s32
2476621Sbt150084 ixgbe_stop_adapter(struct ixgbe_hw *hw)
2486621Sbt150084 {
2496621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.stop_adapter, (hw),
2506621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
2516621Sbt150084 }
2526621Sbt150084 
2536621Sbt150084 /*
2546621Sbt150084  * ixgbe_read_pba_num - Reads part number from EEPROM
2556621Sbt150084  * @hw: pointer to hardware structure
2566621Sbt150084  * @pba_num: stores the part number from the EEPROM
2576621Sbt150084  *
2586621Sbt150084  * Reads the part number from the EEPROM.
2596621Sbt150084  */
2606621Sbt150084 s32
2616621Sbt150084 ixgbe_read_pba_num(struct ixgbe_hw *hw, u32 *pba_num)
2626621Sbt150084 {
2636621Sbt150084 	return (ixgbe_read_pba_num_generic(hw, pba_num));
2646621Sbt150084 }
2656621Sbt150084 
2666621Sbt150084 /*
2676621Sbt150084  * ixgbe_identify_phy - Get PHY type
2686621Sbt150084  * @hw: pointer to hardware structure
2696621Sbt150084  *
2706621Sbt150084  * Determines the physical layer module found on the current adapter.
2716621Sbt150084  */
2726621Sbt150084 s32
2736621Sbt150084 ixgbe_identify_phy(struct ixgbe_hw *hw)
2746621Sbt150084 {
2756621Sbt150084 	s32 status = IXGBE_SUCCESS;
2766621Sbt150084 
2776621Sbt150084 	if (hw->phy.type == ixgbe_phy_unknown) {
2786621Sbt150084 		status = ixgbe_call_func(hw,
2796621Sbt150084 		    hw->phy.ops.identify,
2806621Sbt150084 		    (hw),
2816621Sbt150084 		    IXGBE_NOT_IMPLEMENTED);
2826621Sbt150084 	}
2836621Sbt150084 
2846621Sbt150084 	return (status);
2856621Sbt150084 }
2866621Sbt150084 
2876621Sbt150084 /*
2886621Sbt150084  * ixgbe_reset_phy - Perform a PHY reset
2896621Sbt150084  * @hw: pointer to hardware structure
2906621Sbt150084  */
2916621Sbt150084 s32
2926621Sbt150084 ixgbe_reset_phy(struct ixgbe_hw *hw)
2936621Sbt150084 {
2946621Sbt150084 	s32 status = IXGBE_SUCCESS;
2956621Sbt150084 
2966621Sbt150084 	if (hw->phy.type == ixgbe_phy_unknown) {
2976621Sbt150084 		if (ixgbe_identify_phy(hw) != IXGBE_SUCCESS) {
2986621Sbt150084 			status = IXGBE_ERR_PHY;
2996621Sbt150084 		}
3006621Sbt150084 	}
3016621Sbt150084 
3026621Sbt150084 	if (status == IXGBE_SUCCESS) {
3036621Sbt150084 		status = ixgbe_call_func(hw, hw->phy.ops.reset, (hw),
3046621Sbt150084 		    IXGBE_NOT_IMPLEMENTED);
3056621Sbt150084 	}
3066621Sbt150084 	return (status);
3076621Sbt150084 }
3086621Sbt150084 
3096621Sbt150084 /*
310*8490SPaul.Guo@Sun.COM  * ixgbe_get_phy_firmware_version -
311*8490SPaul.Guo@Sun.COM  * @hw: pointer to hardware structure
312*8490SPaul.Guo@Sun.COM  * @firmware_version: pointer to firmware version
313*8490SPaul.Guo@Sun.COM  */
314*8490SPaul.Guo@Sun.COM s32
315*8490SPaul.Guo@Sun.COM ixgbe_get_phy_firmware_version(struct ixgbe_hw *hw, u16 *firmware_version)
316*8490SPaul.Guo@Sun.COM {
317*8490SPaul.Guo@Sun.COM 	s32 status = IXGBE_SUCCESS;
318*8490SPaul.Guo@Sun.COM 
319*8490SPaul.Guo@Sun.COM 	status = ixgbe_call_func(hw, hw->phy.ops.get_firmware_version,
320*8490SPaul.Guo@Sun.COM 	    (hw, firmware_version), IXGBE_NOT_IMPLEMENTED);
321*8490SPaul.Guo@Sun.COM 	return (status);
322*8490SPaul.Guo@Sun.COM }
323*8490SPaul.Guo@Sun.COM 
324*8490SPaul.Guo@Sun.COM /*
3256621Sbt150084  * ixgbe_read_phy_reg - Read PHY register
3266621Sbt150084  * @hw: pointer to hardware structure
3276621Sbt150084  * @reg_addr: 32 bit address of PHY register to read
3286621Sbt150084  * @phy_data: Pointer to read data from PHY register
3296621Sbt150084  *
3306621Sbt150084  * Reads a value from a specified PHY register
3316621Sbt150084  */
3326621Sbt150084 s32
3336621Sbt150084 ixgbe_read_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
3346621Sbt150084 	u16 *phy_data)
3356621Sbt150084 {
3366621Sbt150084 	return ixgbe_call_func(hw, hw->phy.ops.read_reg, (hw, reg_addr,
3376621Sbt150084 	    device_type, phy_data), IXGBE_NOT_IMPLEMENTED);
3386621Sbt150084 }
3396621Sbt150084 
3406621Sbt150084 /*
3416621Sbt150084  * ixgbe_write_phy_reg - Write PHY register
3426621Sbt150084  * @hw: pointer to hardware structure
3436621Sbt150084  * @reg_addr: 32 bit PHY register to write
3446621Sbt150084  * @phy_data: Data to write to the PHY register
3456621Sbt150084  *
3466621Sbt150084  * Writes a value to specified PHY register
3476621Sbt150084  */
3486621Sbt150084 s32 ixgbe_write_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
3496621Sbt150084     u16 phy_data)
3506621Sbt150084 {
3516621Sbt150084 	return ixgbe_call_func(hw, hw->phy.ops.write_reg, (hw, reg_addr,
3526621Sbt150084 	    device_type, phy_data), IXGBE_NOT_IMPLEMENTED);
3536621Sbt150084 }
3546621Sbt150084 
3556621Sbt150084 /*
3566621Sbt150084  * ixgbe_setup_phy_link - Restart PHY autoneg
3576621Sbt150084  * @hw: pointer to hardware structure
3586621Sbt150084  *
3596621Sbt150084  * Restart autonegotiation and PHY and waits for completion.
3606621Sbt150084  */
3616621Sbt150084 s32
3626621Sbt150084 ixgbe_setup_phy_link(struct ixgbe_hw *hw)
3636621Sbt150084 {
3646621Sbt150084 	return ixgbe_call_func(hw, hw->phy.ops.setup_link, (hw),
3656621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
3666621Sbt150084 }
3676621Sbt150084 
3686621Sbt150084 /*
369*8490SPaul.Guo@Sun.COM  * ixgbe_check_phy_link - Determine link and speed status
370*8490SPaul.Guo@Sun.COM  * @hw: pointer to hardware structure
371*8490SPaul.Guo@Sun.COM  *
372*8490SPaul.Guo@Sun.COM  * Reads a PHY register to determine if link is up and the current speed for
373*8490SPaul.Guo@Sun.COM  * the PHY.
374*8490SPaul.Guo@Sun.COM  */
375*8490SPaul.Guo@Sun.COM s32 ixgbe_check_phy_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
376*8490SPaul.Guo@Sun.COM     bool *link_up)
377*8490SPaul.Guo@Sun.COM {
378*8490SPaul.Guo@Sun.COM 	return ixgbe_call_func(hw, hw->phy.ops.check_link, (hw, speed,
379*8490SPaul.Guo@Sun.COM 	    link_up), IXGBE_NOT_IMPLEMENTED);
380*8490SPaul.Guo@Sun.COM }
381*8490SPaul.Guo@Sun.COM 
382*8490SPaul.Guo@Sun.COM /*
3836621Sbt150084  * ixgbe_setup_phy_link_speed - Set auto advertise
3846621Sbt150084  * @hw: pointer to hardware structure
3856621Sbt150084  * @speed: new link speed
386*8490SPaul.Guo@Sun.COM  * @autoneg: true if autonegotiation enabled
3876621Sbt150084  *
3886621Sbt150084  * Sets the auto advertised capabilities
3896621Sbt150084  */
3906621Sbt150084 s32
3916621Sbt150084 ixgbe_setup_phy_link_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed,
3926621Sbt150084     bool autoneg,
3936621Sbt150084     bool autoneg_wait_to_complete)
3946621Sbt150084 {
3956621Sbt150084 	return ixgbe_call_func(hw, hw->phy.ops.setup_link_speed, (hw, speed,
3966621Sbt150084 	    autoneg, autoneg_wait_to_complete),
3976621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
3986621Sbt150084 }
3996621Sbt150084 
4006621Sbt150084 /*
4016621Sbt150084  * ixgbe_setup_link - Configure link settings
4026621Sbt150084  * @hw: pointer to hardware structure
4036621Sbt150084  *
4046621Sbt150084  * Configures link settings based on values in the ixgbe_hw struct.
4056621Sbt150084  * Restarts the link.  Performs autonegotiation if needed.
4066621Sbt150084  */
4076621Sbt150084 s32
4086621Sbt150084 ixgbe_setup_link(struct ixgbe_hw *hw)
4096621Sbt150084 {
4106621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.setup_link, (hw),
4116621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
4126621Sbt150084 }
4136621Sbt150084 
4146621Sbt150084 /*
4156621Sbt150084  * ixgbe_check_link - Get link and speed status
4166621Sbt150084  * @hw: pointer to hardware structure
4176621Sbt150084  *
4186621Sbt150084  * Reads the links register to determine if link is up and the current speed
4196621Sbt150084  */
4206621Sbt150084 s32
4216621Sbt150084 ixgbe_check_link(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
422*8490SPaul.Guo@Sun.COM     bool *link_up, bool link_up_wait_to_complete)
4236621Sbt150084 {
4246621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.check_link, (hw, speed,
425*8490SPaul.Guo@Sun.COM 	    link_up, link_up_wait_to_complete), IXGBE_NOT_IMPLEMENTED);
4266621Sbt150084 }
4276621Sbt150084 
4286621Sbt150084 /*
4296621Sbt150084  * ixgbe_setup_link_speed - Set link speed
4306621Sbt150084  * @hw: pointer to hardware structure
4316621Sbt150084  * @speed: new link speed
432*8490SPaul.Guo@Sun.COM  * @autoneg: true if autonegotiation enabled
4336621Sbt150084  *
4346621Sbt150084  * Set the link speed and restarts the link.
4356621Sbt150084  */
4366621Sbt150084 s32 ixgbe_setup_link_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed,
4376621Sbt150084     bool autoneg,
4386621Sbt150084     bool autoneg_wait_to_complete)
4396621Sbt150084 {
4406621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.setup_link_speed, (hw, speed,
4416621Sbt150084 	    autoneg, autoneg_wait_to_complete),
4426621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
4436621Sbt150084 }
4446621Sbt150084 
4456621Sbt150084 /*
4466621Sbt150084  * ixgbe_get_link_capabilities - Returns link capabilities
4476621Sbt150084  * @hw: pointer to hardware structure
4486621Sbt150084  *
4496621Sbt150084  * Determines the link capabilities of the current configuration.
4506621Sbt150084  */
4516621Sbt150084 s32
4526621Sbt150084 ixgbe_get_link_capabilities(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
4536621Sbt150084     bool *autoneg)
4546621Sbt150084 {
4556621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.get_link_capabilities, (hw,
4566621Sbt150084 	    speed, autoneg), IXGBE_NOT_IMPLEMENTED);
4576621Sbt150084 }
4586621Sbt150084 
4596621Sbt150084 /*
4606621Sbt150084  * ixgbe_led_on - Turn on LEDs
4616621Sbt150084  * @hw: pointer to hardware structure
4626621Sbt150084  * @index: led number to turn on
4636621Sbt150084  *
4646621Sbt150084  * Turns on the software controllable LEDs.
4656621Sbt150084  */
4666621Sbt150084 s32
4676621Sbt150084 ixgbe_led_on(struct ixgbe_hw *hw, u32 index)
4686621Sbt150084 {
4696621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.led_on, (hw, index),
4706621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
4716621Sbt150084 }
4726621Sbt150084 
4736621Sbt150084 /*
4746621Sbt150084  * ixgbe_led_off - Turn off LEDs
4756621Sbt150084  * @hw: pointer to hardware structure
4766621Sbt150084  * @index: led number to turn off
4776621Sbt150084  *
4786621Sbt150084  * Turns off the software controllable LEDs.
4796621Sbt150084  */
4806621Sbt150084 s32
4816621Sbt150084 ixgbe_led_off(struct ixgbe_hw *hw, u32 index)
4826621Sbt150084 {
4836621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.led_off, (hw, index),
4846621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
4856621Sbt150084 }
4866621Sbt150084 
4876621Sbt150084 /*
4886621Sbt150084  * ixgbe_blink_led_start - Blink LEDs
4896621Sbt150084  * @hw: pointer to hardware structure
4906621Sbt150084  * @index: led number to blink
4916621Sbt150084  *
4926621Sbt150084  * Blink LED based on index.
4936621Sbt150084  */
4946621Sbt150084 s32
4956621Sbt150084 ixgbe_blink_led_start(struct ixgbe_hw *hw, u32 index)
4966621Sbt150084 {
4976621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.blink_led_start, (hw, index),
4986621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
4996621Sbt150084 }
5006621Sbt150084 
5016621Sbt150084 /*
5026621Sbt150084  * ixgbe_blink_led_stop - Stop blinking LEDs
5036621Sbt150084  * @hw: pointer to hardware structure
5046621Sbt150084  *
5056621Sbt150084  * Stop blinking LED based on index.
5066621Sbt150084  */
5076621Sbt150084 s32
5086621Sbt150084 ixgbe_blink_led_stop(struct ixgbe_hw *hw, u32 index)
5096621Sbt150084 {
5106621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.blink_led_stop, (hw, index),
5116621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
5126621Sbt150084 }
5136621Sbt150084 
5146621Sbt150084 /*
5156621Sbt150084  * ixgbe_init_eeprom_params - Initialize EEPROM parameters
5166621Sbt150084  * @hw: pointer to hardware structure
5176621Sbt150084  *
5186621Sbt150084  * Initializes the EEPROM parameters ixgbe_eeprom_info within the
5196621Sbt150084  * ixgbe_hw struct in order to set up EEPROM access.
5206621Sbt150084  */
5216621Sbt150084 s32
5226621Sbt150084 ixgbe_init_eeprom_params(struct ixgbe_hw *hw)
5236621Sbt150084 {
5246621Sbt150084 	return ixgbe_call_func(hw, hw->eeprom.ops.init_params, (hw),
5256621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
5266621Sbt150084 }
5276621Sbt150084 
5286621Sbt150084 
5296621Sbt150084 /*
5306621Sbt150084  * ixgbe_write_eeprom - Write word to EEPROM
5316621Sbt150084  * @hw: pointer to hardware structure
5326621Sbt150084  * @offset: offset within the EEPROM to be written to
5336621Sbt150084  * @data: 16 bit word to be written to the EEPROM
5346621Sbt150084  *
5356621Sbt150084  * Writes 16 bit value to EEPROM. If ixgbe_eeprom_update_checksum is not
5366621Sbt150084  * called after this function, the EEPROM will most likely contain an
5376621Sbt150084  * invalid checksum.
5386621Sbt150084  */
5396621Sbt150084 s32
5406621Sbt150084 ixgbe_write_eeprom(struct ixgbe_hw *hw, u16 offset, u16 data)
5416621Sbt150084 {
5426621Sbt150084 	return ixgbe_call_func(hw, hw->eeprom.ops.write, (hw, offset, data),
5436621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
5446621Sbt150084 }
5456621Sbt150084 
5466621Sbt150084 /*
5476621Sbt150084  * ixgbe_read_eeprom - Read word from EEPROM
5486621Sbt150084  * @hw: pointer to hardware structure
5496621Sbt150084  * @offset: offset within the EEPROM to be read
5506621Sbt150084  * @data: read 16 bit value from EEPROM
5516621Sbt150084  *
5526621Sbt150084  * Reads 16 bit value from EEPROM
5536621Sbt150084  */
5546621Sbt150084 s32
5556621Sbt150084 ixgbe_read_eeprom(struct ixgbe_hw *hw, u16 offset, u16 *data)
5566621Sbt150084 {
5576621Sbt150084 	return ixgbe_call_func(hw, hw->eeprom.ops.read, (hw, offset, data),
5586621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
5596621Sbt150084 }
5606621Sbt150084 
5616621Sbt150084 /*
5626621Sbt150084  * ixgbe_validate_eeprom_checksum - Validate EEPROM checksum
5636621Sbt150084  * @hw: pointer to hardware structure
5646621Sbt150084  * @checksum_val: calculated checksum
5656621Sbt150084  *
5666621Sbt150084  * Performs checksum calculation and validates the EEPROM checksum
5676621Sbt150084  */
5686621Sbt150084 s32
5696621Sbt150084 ixgbe_validate_eeprom_checksum(struct ixgbe_hw *hw, u16 *checksum_val)
5706621Sbt150084 {
5716621Sbt150084 	return ixgbe_call_func(hw, hw->eeprom.ops.validate_checksum,
5726621Sbt150084 	    (hw, checksum_val), IXGBE_NOT_IMPLEMENTED);
5736621Sbt150084 }
5746621Sbt150084 
5756621Sbt150084 /*
5766621Sbt150084  * ixgbe_eeprom_update_checksum - Updates the EEPROM checksum
5776621Sbt150084  * @hw: pointer to hardware structure
5786621Sbt150084  */
5796621Sbt150084 s32
5806621Sbt150084 ixgbe_update_eeprom_checksum(struct ixgbe_hw *hw)
5816621Sbt150084 {
5826621Sbt150084 	return ixgbe_call_func(hw, hw->eeprom.ops.update_checksum, (hw),
5836621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
5846621Sbt150084 }
5856621Sbt150084 
5866621Sbt150084 /*
5876621Sbt150084  * ixgbe_set_rar - Set Rx address register
5886621Sbt150084  * @hw: pointer to hardware structure
5896621Sbt150084  * @index: Receive address register to write
5906621Sbt150084  * @addr: Address to put into receive address register
5916621Sbt150084  * @vmdq: VMDq "set"
5926621Sbt150084  * @enable_addr: set flag that address is active
5936621Sbt150084  *
5946621Sbt150084  * Puts an ethernet address into a receive address register.
5956621Sbt150084  */
5966621Sbt150084 s32
5976621Sbt150084 ixgbe_set_rar(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
5986621Sbt150084     u32 enable_addr)
5996621Sbt150084 {
6006621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.set_rar, (hw, index, addr, vmdq,
6016621Sbt150084 	    enable_addr), IXGBE_NOT_IMPLEMENTED);
6026621Sbt150084 }
6036621Sbt150084 
6046621Sbt150084 /*
605*8490SPaul.Guo@Sun.COM  * ixgbe_clear_rar - Clear Rx address register
606*8490SPaul.Guo@Sun.COM  * @hw: pointer to hardware structure
607*8490SPaul.Guo@Sun.COM  * @index: Receive address register to write
608*8490SPaul.Guo@Sun.COM  *
609*8490SPaul.Guo@Sun.COM  * Puts an ethernet address into a receive address register.
610*8490SPaul.Guo@Sun.COM  */
611*8490SPaul.Guo@Sun.COM s32
612*8490SPaul.Guo@Sun.COM ixgbe_clear_rar(struct ixgbe_hw *hw, u32 index)
613*8490SPaul.Guo@Sun.COM {
614*8490SPaul.Guo@Sun.COM 	return ixgbe_call_func(hw, hw->mac.ops.clear_rar, (hw, index),
615*8490SPaul.Guo@Sun.COM 	    IXGBE_NOT_IMPLEMENTED);
616*8490SPaul.Guo@Sun.COM }
617*8490SPaul.Guo@Sun.COM 
618*8490SPaul.Guo@Sun.COM /*
6196621Sbt150084  * ixgbe_set_vmdq - Associate a VMDq index with a receive address
6206621Sbt150084  * @hw: pointer to hardware structure
6216621Sbt150084  * @rar: receive address register index to associate with VMDq index
6226621Sbt150084  * @vmdq: VMDq set or pool index
6236621Sbt150084  */
6246621Sbt150084 s32
6256621Sbt150084 ixgbe_set_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
6266621Sbt150084 {
6276621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.set_vmdq, (hw, rar, vmdq),
6286621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
6296621Sbt150084 }
6306621Sbt150084 
6316621Sbt150084 /*
632*8490SPaul.Guo@Sun.COM  * ixgbe_clear_vmdq - Disassociate a VMDq index from a receive address
633*8490SPaul.Guo@Sun.COM  * @hw: pointer to hardware structure
634*8490SPaul.Guo@Sun.COM  * @rar: receive address register index to disassociate with VMDq index
635*8490SPaul.Guo@Sun.COM  * @vmdq: VMDq set or pool index
636*8490SPaul.Guo@Sun.COM  */
637*8490SPaul.Guo@Sun.COM s32
638*8490SPaul.Guo@Sun.COM ixgbe_clear_vmdq(struct ixgbe_hw *hw, u32 rar, u32 vmdq)
639*8490SPaul.Guo@Sun.COM {
640*8490SPaul.Guo@Sun.COM 	return ixgbe_call_func(hw, hw->mac.ops.clear_vmdq, (hw, rar, vmdq),
641*8490SPaul.Guo@Sun.COM 	    IXGBE_NOT_IMPLEMENTED);
642*8490SPaul.Guo@Sun.COM }
643*8490SPaul.Guo@Sun.COM 
644*8490SPaul.Guo@Sun.COM /*
6456621Sbt150084  * ixgbe_init_rx_addrs - Initializes receive address filters.
6466621Sbt150084  * @hw: pointer to hardware structure
6476621Sbt150084  *
6486621Sbt150084  * Places the MAC address in receive address register 0 and clears the rest
6496621Sbt150084  * of the receive address registers. Clears the multicast table. Assumes
6506621Sbt150084  * the receiver is in reset when the routine is called.
6516621Sbt150084  */
6526621Sbt150084 s32
6536621Sbt150084 ixgbe_init_rx_addrs(struct ixgbe_hw *hw)
6546621Sbt150084 {
6556621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.init_rx_addrs, (hw),
6566621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
6576621Sbt150084 }
6586621Sbt150084 
6596621Sbt150084 /*
6606621Sbt150084  * ixgbe_get_num_rx_addrs - Returns the number of RAR entries.
6616621Sbt150084  * @hw: pointer to hardware structure
6626621Sbt150084  */
6636621Sbt150084 u32
6646621Sbt150084 ixgbe_get_num_rx_addrs(struct ixgbe_hw *hw)
6656621Sbt150084 {
6666621Sbt150084 	return (hw->mac.num_rar_entries);
6676621Sbt150084 }
6686621Sbt150084 
6696621Sbt150084 /*
6706621Sbt150084  * ixgbe_update_uc_addr_list - Updates the MAC's list of secondary addresses
6716621Sbt150084  * @hw: pointer to hardware structure
6726621Sbt150084  * @addr_list: the list of new multicast addresses
6736621Sbt150084  * @addr_count: number of addresses
6746621Sbt150084  * @func: iterator function to walk the multicast address list
6756621Sbt150084  *
6766621Sbt150084  * The given list replaces any existing list. Clears the secondary addrs from
6776621Sbt150084  * receive address registers. Uses unused receive address registers for the
6786621Sbt150084  * first secondary addresses, and falls back to promiscuous mode as needed.
6796621Sbt150084  */
6806621Sbt150084 s32
6816621Sbt150084 ixgbe_update_uc_addr_list(struct ixgbe_hw *hw, u8 *addr_list,
6826621Sbt150084     u32 addr_count, ixgbe_mc_addr_itr func)
6836621Sbt150084 {
6846621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.update_uc_addr_list, (hw,
6856621Sbt150084 	    addr_list, addr_count, func),
6866621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
6876621Sbt150084 }
6886621Sbt150084 
6896621Sbt150084 /*
6906621Sbt150084  * ixgbe_update_mc_addr_list - Updates the MAC's list of multicast addresses
6916621Sbt150084  * @hw: pointer to hardware structure
6926621Sbt150084  * @mc_addr_list: the list of new multicast addresses
6936621Sbt150084  * @mc_addr_count: number of addresses
6946621Sbt150084  * @func: iterator function to walk the multicast address list
6956621Sbt150084  *
6966621Sbt150084  * The given list replaces any existing list. Clears the MC addrs from receive
6976621Sbt150084  * address registers and the multicast table. Uses unused receive address
6986621Sbt150084  * registers for the first multicast addresses, and hashes the rest into the
6996621Sbt150084  * multicast table.
7006621Sbt150084  */
7016621Sbt150084 s32
7026621Sbt150084 ixgbe_update_mc_addr_list(struct ixgbe_hw *hw, u8 *mc_addr_list,
7036621Sbt150084     u32 mc_addr_count, ixgbe_mc_addr_itr func)
7046621Sbt150084 {
7056621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.update_mc_addr_list, (hw,
7066621Sbt150084 	    mc_addr_list, mc_addr_count, func),
7076621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
7086621Sbt150084 }
7096621Sbt150084 
7106621Sbt150084 /*
7116621Sbt150084  * ixgbe_enable_mc - Enable multicast address in RAR
7126621Sbt150084  * @hw: pointer to hardware structure
7136621Sbt150084  *
7146621Sbt150084  * Enables multicast address in RAR and the use of the multicast hash table.
7156621Sbt150084  */
7166621Sbt150084 s32
7176621Sbt150084 ixgbe_enable_mc(struct ixgbe_hw *hw)
7186621Sbt150084 {
7196621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.enable_mc, (hw),
7206621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
7216621Sbt150084 }
7226621Sbt150084 
7236621Sbt150084 /*
7246621Sbt150084  * ixgbe_disable_mc - Disable multicast address in RAR
7256621Sbt150084  * @hw: pointer to hardware structure
7266621Sbt150084  *
7276621Sbt150084  * Disables multicast address in RAR and the use of the multicast hash table.
7286621Sbt150084  */
7296621Sbt150084 s32
7306621Sbt150084 ixgbe_disable_mc(struct ixgbe_hw *hw)
7316621Sbt150084 {
7326621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.disable_mc, (hw),
7336621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
7346621Sbt150084 }
7356621Sbt150084 
7366621Sbt150084 /*
7376621Sbt150084  * ixgbe_clear_vfta - Clear VLAN filter table
7386621Sbt150084  * @hw: pointer to hardware structure
7396621Sbt150084  *
7406621Sbt150084  * Clears the VLAN filer table, and the VMDq index associated with the filter
7416621Sbt150084  */
7426621Sbt150084 s32
7436621Sbt150084 ixgbe_clear_vfta(struct ixgbe_hw *hw)
7446621Sbt150084 {
7456621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.clear_vfta, (hw),
7466621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
7476621Sbt150084 }
7486621Sbt150084 
7496621Sbt150084 /*
7506621Sbt150084  * ixgbe_set_vfta - Set VLAN filter table
7516621Sbt150084  * @hw: pointer to hardware structure
7526621Sbt150084  * @vlan: VLAN id to write to VLAN filter
7536621Sbt150084  * @vind: VMDq output index that maps queue to VLAN id in VFTA
7546621Sbt150084  * @vlan_on: boolean flag to turn on/off VLAN in VFTA
7556621Sbt150084  *
7566621Sbt150084  * Turn on/off specified VLAN in the VLAN filter table.
7576621Sbt150084  */
7586621Sbt150084 s32
7596621Sbt150084 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on)
7606621Sbt150084 {
7616621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.set_vfta, (hw, vlan, vind,
7626621Sbt150084 	    vlan_on), IXGBE_NOT_IMPLEMENTED);
7636621Sbt150084 }
7646621Sbt150084 
7656621Sbt150084 /*
7666621Sbt150084  * ixgbe_setup_fc - Set flow control
7676621Sbt150084  * @hw: pointer to hardware structure
7686621Sbt150084  * @packetbuf_num: packet buffer number (0-7)
7696621Sbt150084  *
7706621Sbt150084  * Configures the flow control settings based on SW configuration.
7716621Sbt150084  */
7726621Sbt150084 s32
7736621Sbt150084 ixgbe_setup_fc(struct ixgbe_hw *hw, s32 packetbuf_num)
7746621Sbt150084 {
7756621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.setup_fc, (hw, packetbuf_num),
7766621Sbt150084 	    IXGBE_NOT_IMPLEMENTED);
7776621Sbt150084 }
7786621Sbt150084 
7796621Sbt150084 /*
7806621Sbt150084  * ixgbe_read_analog_reg8 - Reads 8 bit analog register
7816621Sbt150084  * @hw: pointer to hardware structure
7826621Sbt150084  * @reg: analog register to read
7836621Sbt150084  * @val: read value
7846621Sbt150084  *
7856621Sbt150084  * Performs write operation to analog register specified.
7866621Sbt150084  */
7876621Sbt150084 s32
7886621Sbt150084 ixgbe_read_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 *val)
7896621Sbt150084 {
7906621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.read_analog_reg8, (hw, reg,
7916621Sbt150084 	    val), IXGBE_NOT_IMPLEMENTED);
7926621Sbt150084 }
7936621Sbt150084 
7946621Sbt150084 /*
7956621Sbt150084  * ixgbe_write_analog_reg8 - Writes 8 bit analog register
7966621Sbt150084  * @hw: pointer to hardware structure
7976621Sbt150084  * @reg: analog register to write
7986621Sbt150084  * @val: value to write
7996621Sbt150084  *
8006621Sbt150084  * Performs write operation to Atlas analog register specified.
8016621Sbt150084  */
8026621Sbt150084 s32
8036621Sbt150084 ixgbe_write_analog_reg8(struct ixgbe_hw *hw, u32 reg, u8 val)
8046621Sbt150084 {
8056621Sbt150084 	return ixgbe_call_func(hw, hw->mac.ops.write_analog_reg8, (hw, reg,
8066621Sbt150084 	    val), IXGBE_NOT_IMPLEMENTED);
8076621Sbt150084 }
808*8490SPaul.Guo@Sun.COM 
809*8490SPaul.Guo@Sun.COM /*
810*8490SPaul.Guo@Sun.COM  * ixgbe_init_uta_tables - Initializes Unicast Table Arrays.
811*8490SPaul.Guo@Sun.COM  * @hw: pointer to hardware structure
812*8490SPaul.Guo@Sun.COM  *
813*8490SPaul.Guo@Sun.COM  * Initializes the Unicast Table Arrays to zero on device load.  This
814*8490SPaul.Guo@Sun.COM  * is part of the Rx init addr execution path.
815*8490SPaul.Guo@Sun.COM  */
816*8490SPaul.Guo@Sun.COM s32
817*8490SPaul.Guo@Sun.COM ixgbe_init_uta_tables(struct ixgbe_hw *hw)
818*8490SPaul.Guo@Sun.COM {
819*8490SPaul.Guo@Sun.COM 	return ixgbe_call_func(hw, hw->mac.ops.init_uta_tables, (hw),
820*8490SPaul.Guo@Sun.COM 	    IXGBE_NOT_IMPLEMENTED);
821*8490SPaul.Guo@Sun.COM }
822*8490SPaul.Guo@Sun.COM 
823*8490SPaul.Guo@Sun.COM /*
824*8490SPaul.Guo@Sun.COM  * ixgbe_read_i2c_eeprom - Reads 8 bit EEPROM word over I2C interface
825*8490SPaul.Guo@Sun.COM  * @hw: pointer to hardware structure
826*8490SPaul.Guo@Sun.COM  * @byte_offset: EEPROM byte offset to read
827*8490SPaul.Guo@Sun.COM  * @eeprom_data: value read
828*8490SPaul.Guo@Sun.COM  *
829*8490SPaul.Guo@Sun.COM  * Performs byte read operation to SFP module's EEPROM over I2C interface.
830*8490SPaul.Guo@Sun.COM  */
831*8490SPaul.Guo@Sun.COM s32
832*8490SPaul.Guo@Sun.COM ixgbe_read_i2c_eeprom(struct ixgbe_hw *hw, u8 byte_offset, u8 *eeprom_data)
833*8490SPaul.Guo@Sun.COM {
834*8490SPaul.Guo@Sun.COM 	return ixgbe_call_func(hw, hw->phy.ops.read_i2c_eeprom,
835*8490SPaul.Guo@Sun.COM 	    (hw, byte_offset, eeprom_data),
836*8490SPaul.Guo@Sun.COM 	    IXGBE_NOT_IMPLEMENTED);
837*8490SPaul.Guo@Sun.COM }
838*8490SPaul.Guo@Sun.COM 
839*8490SPaul.Guo@Sun.COM /*
840*8490SPaul.Guo@Sun.COM  * ixgbe_get_supported_physical_layer - Returns physical layer type
841*8490SPaul.Guo@Sun.COM  * @hw: pointer to hardware structure
842*8490SPaul.Guo@Sun.COM  *
843*8490SPaul.Guo@Sun.COM  * Determines physical layer capabilities of the current configuration.
844*8490SPaul.Guo@Sun.COM  */
845*8490SPaul.Guo@Sun.COM s32
846*8490SPaul.Guo@Sun.COM ixgbe_get_supported_physical_layer(struct ixgbe_hw *hw)
847*8490SPaul.Guo@Sun.COM {
848*8490SPaul.Guo@Sun.COM 	return ixgbe_call_func(hw, hw->mac.ops.get_supported_physical_layer,
849*8490SPaul.Guo@Sun.COM 	    (hw), IXGBE_NOT_IMPLEMENTED);
850*8490SPaul.Guo@Sun.COM }
851