src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_start_hw(struct txgbe_hw *hw)
{
	s32 err;
	u16 device_caps;

	DEBUGFUNC("txgbe_start_hw");

	/* Set the media type */
	hw->phy.media_type = hw->phy.get_media_type(hw);

	/* Clear the VLAN filter table */
	hw->mac.clear_vfta(hw);

	/* Clear statistics registers */
	hw->mac.clear_hw_cntrs(hw);

	/* Setup flow control */
	err = txgbe_setup_fc(hw);
	if (err != 0 && err != TXGBE_NOT_IMPLEMENTED) {
		DEBUGOUT("Flow control setup failed, returning %d\n", err);
		return err;
	}

	/* Cache bit indicating need for crosstalk fix */
	switch (hw->mac.type) {
	case txgbe_mac_raptor:
		hw->mac.get_device_caps(hw, &device_caps);
		if (device_caps & TXGBE_DEVICE_CAPS_NO_CROSSTALK_WR)
			hw->need_crosstalk_fix = false;
		else
			hw->need_crosstalk_fix = true;
		break;
	default:
		hw->need_crosstalk_fix = false;
		break;
	}

	/* Clear adapter stopped flag */
	hw->adapter_stopped = false;

	return 0;
}
/**
 *  txgbe_start_hw - Prepare hardware for Tx/Rx
 *  @hw: pointer to hardware structure
 *
 *  Starts the hardware by filling the bus info structure and media type, clears
 *  all on chip counters, initializes receive address registers, multicast
 *  table, VLAN filter table, calls routine to set up link and flow control
 *  settings, and leaves transmit and receive units disabled and uninitialized
 **/
Prepare hardware for Tx/Rx
@hw: pointer to hardware structure

Starts the hardware by filling the bus info structure and media type, clears
all on chip counters, initializes receive address registers, multicast
table, VLAN filter table, calls routine to set up link and flow control
settings, and leaves transmit and receive units disabled and uninitialized
Prepare hardware for Tx / Rx @hw : pointer to hardware structure Starts the hardware by filling the bus info structure and media type clears all on chip counters initializes receive address registers multicast table VLAN filter table calls routine to set up link and flow control settings and leaves transmit and receive units disabled and uninitialized
s32 txgbe_start_hw(struct txgbe_hw *hw)
{
	s32 err;
	u16 device_caps;
	DEBUGFUNC("txgbe_start_hw");
	hw->phy.media_type = hw->phy.get_media_type(hw);
	hw->mac.clear_vfta(hw);
	hw->mac.clear_hw_cntrs(hw);
	err = txgbe_setup_fc(hw);
	if (err != 0 && err != TXGBE_NOT_IMPLEMENTED) {
		DEBUGOUT("Flow control setup failed, returning %d\n", err);
		return err;
	}
	switch (hw->mac.type) {
	case txgbe_mac_raptor:
		hw->mac.get_device_caps(hw, &device_caps);
		if (device_caps & TXGBE_DEVICE_CAPS_NO_CROSSTALK_WR)
			hw->need_crosstalk_fix = false;
		else
			hw->need_crosstalk_fix = true;
		break;
	default:
		hw->need_crosstalk_fix = false;
		break;
	}
	hw->adapter_stopped = false;
	return 0;
}
s32 txgbe_start_hw ( struct txgbe_hw * hw ) { s32 err ; u16 device_caps ; DEBUGFUNC ( " " ) ; hw -> phy . media_type = hw -> phy . get_media_type ( hw ) ; hw -> mac . clear_vfta ( hw ) ; hw -> mac . clear_hw_cntrs ( hw ) ; err = txgbe_setup_fc ( hw ) ; if ( err != 0 && err != TXGBE_NOT_IMPLEMENTED ) { DEBUGOUT ( " \n " , err ) ; return err ; } switch ( hw -> mac . type ) { case txgbe_mac_raptor : hw -> mac . get_device_caps ( hw , & device_caps ) ; if ( device_caps & TXGBE_DEVICE_CAPS_NO_CROSSTALK_WR ) hw -> need_crosstalk_fix = false ; else hw -> need_crosstalk_fix = true ; break ; default : hw -> need_crosstalk_fix = false ; break ; } hw -> adapter_stopped = false ; return 0 ; }
txgbe_start_hw - Prepare hardware for Tx/Rx
  @hw: pointer to hardware structure
txgbe_start_hw - Prepare hardware for Tx / Rx @hw : pointer to hardware structure
/* Set the media type */ /* Clear the VLAN filter table */ /* Clear statistics registers */ /* Setup flow control */ /* Cache bit indicating need for crosstalk fix */ /* Clear adapter stopped flag */