/*
* This file is provided under a CDDLv1 license. When using or
* redistributing this file, you may do so under this license.
* In redistributing this file this license must be included
* and no other modification of this header file is permitted.
*
* CDDL LICENSE SUMMARY
*
* Copyright(c) 1999 - 2009 Intel Corporation. All rights reserved.
*
* The contents of this file are subject to the terms of Version
* 1.0 of the Common Development and Distribution License (the "License").
*
* You should have received a copy of the License with this software.
* You can obtain a copy of the License at
* See the License for the specific language governing permissions
* and limitations under the License.
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms of the CDDLv1.
*/
#include "e1000_api.h"
/*
* e1000_ttl_workaround_enabled_82541 - Returns current TTL workaround status
* @hw: pointer to the HW structure
*
* Returns the current status of the TTL workaround, as to whether the
* workaround is enabled or disabled.
*/
bool
{
bool state = false;
DEBUGFUNC("e1000_ttl_workaround_enabled_82541");
goto out;
out:
return (state);
}
/*
* e1000_fifo_workaround_82547 - Workaround for Tx fifo failure
* @hw: pointer to the HW structure
* @length: length of next outgoing frame
*
* Returns: E1000_ERR_FIFO_WRAP if the next packet cannot be transmitted yet
* E1000_SUCCESS if the next packet can be transmitted
*
* Workaround for the 82547 Tx fifo failure.
*/
{
DEBUGFUNC("e1000_fifo_workaround_82547");
goto out;
/*
* Get the length as seen by the FIFO of the next real
* packet to be transmitted.
*/
goto out;
goto out;
goto out;
}
goto out;
}
goto out;
}
/* Disable the tx unit to avoid further pointer movement */
/* Reset the fifo pointers. */
/* Re-enabling tx unit */
dev_spec->tx_fifo_head = 0;
out:
return (ret_val);
}
/*
* e1000_update_tx_fifo_head - Update Tx fifo head pointer
* @hw: pointer to the HW structure
* @length: length of next outgoing frame
*
* Updates the SW calculated Tx FIFO head pointer.
*/
void
{
DEBUGFUNC("e1000_update_tx_fifo_head_82547");
return;
}
/*
* @hw: pointer to the HW structure
*
* TTL workaround.
*/
void
{
DEBUGFUNC("e1000_set_ttl_workaround_state_82541");
return;
}
/*
* e1000_igp_ttl_workaround_82547 - Workaround for long TTL on 100HD hubs
* @hw: pointer to the HW structure
*
* E1000_SUCCESS in any other case
*
* This function, specific to 82547 hardware only, needs to be called every
* second. It checks if a parallel detect fault has occurred. If a fault
* second). If link is established, stop the workaround and ensure the DSP
* reset is enabled.
*/
{
bool link;
DEBUGFUNC("e1000_igp_ttl_workaround_82547");
/* The workaround needed only for B-0 silicon HW */
goto out;
if (!(e1000_ttl_workaround_enabled_82541(hw)))
goto out;
/* Check for link first */
if (ret_val)
goto out;
if (link) {
/*
* If link is established during the workaround,
* the DSP mechanism must be enabled.
*/
if (dev_spec->dsp_reset_counter) {
dev_spec->dsp_reset_counter = 0;
} else {
goto out;
}
} else {
if (dev_spec->dsp_reset_counter == 0) {
/*
* Workaround not activated,
* check if it needs activation
*/
&phy_data);
if (ret_val)
goto out;
/*
* Activate the workaround if there was a
* parallel detect fault
*/
if (phy_data & NWAY_ER_PAR_DETECT_FAULT) {
} else {
goto out;
}
}
/* After 5 times, stop the workaround */
dev_spec->dsp_reset_counter = 0;
} else {
if (dev_spec->dsp_reset_counter) {
}
}
}
ret_val =
out:
return (ret_val);
}