patch-2.4.26 linux-2.4.26/drivers/net/sk98lin/skxmac2.c
Next file: linux-2.4.26/drivers/net/sk_mca.c
Previous file: linux-2.4.26/drivers/net/sk98lin/skvpd.c
Back to the patch index
Back to the overall index
- Lines: 471
- Date:
2004-04-14 06:05:30.000000000 -0700
- Orig file:
linux-2.4.25/drivers/net/sk98lin/skxmac2.c
- Orig date:
2004-02-18 05:36:31.000000000 -0800
diff -urN linux-2.4.25/drivers/net/sk98lin/skxmac2.c linux-2.4.26/drivers/net/sk98lin/skxmac2.c
@@ -2,8 +2,6 @@
*
* Name: skxmac2.c
* Project: Gigabit Ethernet Adapters, Common Modules
- * Version: $Revision: 1.102 $
- * Date: $Date: 2003/10/02 16:53:58 $
* Purpose: Contains functions to initialize the MACs and PHYs
*
******************************************************************************/
@@ -22,461 +20,6 @@
*
******************************************************************************/
-/******************************************************************************
- *
- * History:
- *
- * $Log: skxmac2.c,v $
- * Revision 1.102 2003/10/02 16:53:58 rschmidt
- * Changed setting of GMAC parameters with new macros.
- * Added define SLIM around SkGm...LowPowerMode().
- * Editorial changes.
- *
- * Revision 1.101 2003/09/16 14:49:07 rschmidt
- * Added routines SkGmClearRst(), SkXmClearRst, SkMacClearRst().
- * Added WA code for Yukon-Lite's COMA mode in SkGmHardRst().
- * Replaced PCI-Config R/W through internal access.
- * Fixed return from coma mode in SkGmLeaveLowPowerMode().
- * Fixed compiler warnings for different types.
- * Editorial changes.
- *
- * Revision 1.100 2003/09/16 07:09:11 mschmid
- * Added functions SkGmEnterLowPowerMode() and
- * SkGmLeaveLowPowerMode()
- *
- * Revision 1.99 2003/07/11 12:19:33 rschmidt
- * Reduced init values for Master & Slave downshift counters to
- * minimum values.
- * Editorial changes.
- *
- * Revision 1.98 2003/07/04 12:53:56 rschmidt
- * Changed setting of downshift feature in SkGmInitPhyMarv().
- * Enabled downshift feature only for para 'Speed' set to 'Auto'.
- * Changed init values for Master & Slave downshift counters.
- * Editorial changes.
- *
- * Revision 1.97 2003/05/28 15:53:47 rschmidt
- * Removed setting of Yukon PHY's 'force link good' in loopback mode.
- * Replaced call pFnMacOverflow() with SkXmOverflowStatus() resp.
- * SkGmOverflowStatus().
- * Editorial changes.
- *
- * Revision 1.96 2003/05/13 17:37:11 mkarl
- * Removed calls to PNMI for SLIM driver.
- * Added SK_FAR for PXE.
- * Separated code pathes not used for SLIM driver.
- * Some further separations for YUKON and GENESIS.
- * Editorial changes.
- *
- * Revision 1.95 2003/05/06 13:09:53 rschmidt
- * Changed init sequence for auto-negotiation disabled in SkGmInitMac().
- * Added defines around GENESIS resp. YUKON branches to reduce
- * code size for PXE.
- * Editorial changes.
- *
- * Revision 1.94 2003/04/10 14:36:40 rschmidt
- * Fixed define for debug code in SkGmInitPhyMarv().
- *
- * Revision 1.93 2003/04/08 16:58:16 rschmidt
- * Changed initialisation of GMAC and GPHY for disabling
- * Flow-Control with parameter 'none' (Bug Id #10769).
- * Changed init for blinking active LED and normal duplex LED
- * depending on value from GILedBlinkCtrl (LED Blink Control).
- * Added control for Link100 LED.
- * Changed handling for different PhyTypes for source code
- * portability to PXE, UNDI.
- * Editorial changes.
- *
- * Revision 1.92 2003/03/31 07:12:33 mkarl
- * Restore PHY_MARV_AUNE_ADV after writing to GM_GP_CTRL in order to make
- * auto-negotiation of limited flow-control possible.
- * Corrected Copyright.
- * Editorial changes.
- *
- * Revision 1.91 2003/02/05 15:09:34 rschmidt
- * Removed setting of 'Collision Test'-bit in SkGmInitPhyMarv().
- * Disabled auto-update for speed, duplex and flow-control when
- * auto-negotiation is not enabled (Bug Id #10766).
- * Editorial changes.
- *
- * Revision 1.90 2003/01/29 13:35:19 rschmidt
- * Increment Rx FIFO Overflow counter only in DEBUG-mode.
- * Corrected define for blinking active LED.
- *
- * Revision 1.89 2003/01/28 16:37:45 rschmidt
- * Changed init for blinking active LED
- *
- * Revision 1.88 2003/01/28 10:09:38 rschmidt
- * Added debug outputs in SkGmInitMac().
- * Added customized init of LED registers in SkGmInitPhyMarv(),
- * for blinking active LED (#ifdef ACT_LED_BLINK) and
- * for normal duplex LED (#ifdef DUP_LED_NORMAL).
- * Editorial changes.
- *
- * Revision 1.87 2002/12/10 14:39:05 rschmidt
- * Improved initialization of GPHY in SkGmInitPhyMarv().
- * Editorial changes.
- *
- * Revision 1.86 2002/12/09 15:01:12 rschmidt
- * Added setup of Ext. PHY Specific Ctrl Reg (downshift feature).
- *
- * Revision 1.85 2002/12/05 14:09:16 rschmidt
- * Improved avoiding endless loop in SkGmPhyRead(), SkGmPhyWrite().
- * Added additional advertising for 10Base-T when 100Base-T is selected.
- * Added case SK_PHY_MARV_FIBER for YUKON Fiber adapter.
- * Editorial changes.
- *
- * Revision 1.84 2002/11/15 12:50:09 rschmidt
- * Changed SkGmCableDiagStatus() when getting results.
- *
- * Revision 1.83 2002/11/13 10:28:29 rschmidt
- * Added some typecasts to avoid compiler warnings.
- *
- * Revision 1.82 2002/11/13 09:20:46 rschmidt
- * Replaced for(..) with do {} while (...) in SkXmUpdateStats().
- * Replaced 2 macros GM_IN16() with 1 GM_IN32() in SkGmMacStatistic().
- * Added SkGmCableDiagStatus() for Virtual Cable Test (VCT).
- * Editorial changes.
- *
- * Revision 1.81 2002/10/28 14:28:08 rschmidt
- * Changed MAC address setup for GMAC in SkGmInitMac().
- * Optimized handling of counter overflow IRQ in SkGmOverflowStatus().
- * Editorial changes.
- *
- * Revision 1.80 2002/10/14 15:29:44 rschmidt
- * Corrected disabling of all PHY IRQs.
- * Added WA for deviation #16 (address used for pause packets).
- * Set Pause Mode in SkMacRxTxEnable() only for Genesis.
- * Added IRQ and counter for Receive FIFO Overflow in DEBUG-mode.
- * SkXmTimeStamp() replaced by SkMacTimeStamp().
- * Added clearing of GMAC Tx FIFO Underrun IRQ in SkGmIrq().
- * Editorial changes.
- *
- * Revision 1.79 2002/10/10 15:55:36 mkarl
- * changes for PLinkSpeedUsed
- *
- * Revision 1.78 2002/09/12 09:39:51 rwahl
- * Removed deactivate code for SIRQ overflow event separate for TX/RX.
- *
- * Revision 1.77 2002/09/09 12:26:37 mkarl
- * added handling for Yukon to SkXmTimeStamp
- *
- * Revision 1.76 2002/08/21 16:41:16 rschmidt
- * Added bit GPC_ENA_XC (Enable MDI crossover) in HWCFG_MODE.
- * Added forced speed settings in SkGmInitPhyMarv().
- * Added settings of full/half duplex capabilities for YUKON Fiber.
- * Editorial changes.
- *
- * Revision 1.75 2002/08/16 15:12:01 rschmidt
- * Replaced all if(GIChipId == CHIP_ID_GENESIS) with new entry GIGenesis.
- * Added function SkMacHashing() for ADDR-Module.
- * Removed functions SkXmClrSrcCheck(), SkXmClrHashAddr() (calls replaced
- * with macros).
- * Removed functions SkGmGetMuxConfig().
- * Added HWCFG_MODE init for YUKON Fiber.
- * Changed initialization of GPHY in SkGmInitPhyMarv().
- * Changed check of parameter in SkXmMacStatistic().
- * Editorial changes.
- *
- * Revision 1.74 2002/08/12 14:00:17 rschmidt
- * Replaced usage of Broadcom PHY Ids with defines.
- * Corrected error messages in SkGmMacStatistic().
- * Made SkMacPromiscMode() public for ADDR-Module.
- * Editorial changes.
- *
- * Revision 1.73 2002/08/08 16:26:24 rschmidt
- * Improved reset sequence for YUKON in SkGmHardRst() and SkGmInitMac().
- * Replaced XMAC Rx High Watermark init value with SK_XM_RX_HI_WM.
- * Editorial changes.
- *
- * Revision 1.72 2002/07/24 15:11:19 rschmidt
- * Fixed wrong placement of parenthesis.
- * Editorial changes.
- *
- * Revision 1.71 2002/07/23 16:05:18 rschmidt
- * Added global functions for PHY: SkGePhyRead(), SkGePhyWrite().
- * Fixed Tx Counter Overflow IRQ (Bug ID #10730).
- * Editorial changes.
- *
- * Revision 1.70 2002/07/18 14:27:27 rwahl
- * Fixed syntax error.
- *
- * Revision 1.69 2002/07/17 17:08:47 rwahl
- * Fixed check in SkXmMacStatistic().
- *
- * Revision 1.68 2002/07/16 07:35:24 rwahl
- * Removed check for cleared mib counter in SkGmResetCounter().
- *
- * Revision 1.67 2002/07/15 18:35:56 rwahl
- * Added SkXmUpdateStats(), SkGmUpdateStats(), SkXmMacStatistic(),
- * SkGmMacStatistic(), SkXmResetCounter(), SkGmResetCounter(),
- * SkXmOverflowStatus(), SkGmOverflowStatus().
- * Changes to SkXmIrq() & SkGmIrq(): Combined SIRQ Overflow for both
- * RX & TX.
- * Changes to SkGmInitMac(): call to SkGmResetCounter().
- * Editorial changes.
- *
- * Revision 1.66 2002/07/15 15:59:30 rschmidt
- * Added PHY Address in SkXmPhyRead(), SkXmPhyWrite().
- * Added MIB Clear Counter in SkGmInitMac().
- * Added Duplex and Flow-Control settings.
- * Reset all Multicast filtering Hash reg. in SkGmInitMac().
- * Added new function: SkGmGetMuxConfig().
- * Editorial changes.
- *
- * Revision 1.65 2002/06/10 09:35:39 rschmidt
- * Replaced C++ comments (//).
- * Added #define VCPU around VCPUwaitTime.
- * Editorial changes.
- *
- * Revision 1.64 2002/06/05 08:41:10 rschmidt
- * Added function for XMAC2: SkXmTimeStamp().
- * Added function for YUKON: SkGmSetRxCmd().
- * Changed SkGmInitMac() resp. SkGmHardRst().
- * Fixed wrong variable in SkXmAutoNegLipaXmac() (debug mode).
- * SkXmRxTxEnable() replaced by SkMacRxTxEnable().
- * Editorial changes.
- *
- * Revision 1.63 2002/04/25 13:04:44 rschmidt
- * Changes for handling YUKON.
- * Use of #ifdef OTHER_PHY to eliminate code for unused Phy types.
- * Macros for XMAC PHY access PHY_READ(), PHY_WRITE() replaced
- * by functions SkXmPhyRead(), SkXmPhyWrite();
- * Removed use of PRxCmd to setup XMAC.
- * Added define PHY_B_AS_PAUSE_MSK for BCom Pause Res.
- * Added setting of XM_RX_DIS_CEXT in SkXmInitMac().
- * Removed status parameter from MAC IRQ handler SkMacIrq(),
- * SkXmIrq() and SkGmIrq().
- * SkXmAutoNegLipa...() for ext. Phy replaced by SkMacAutoNegLipaPhy().
- * Added SkMac...() functions to handle both XMAC and GMAC.
- * Added functions for YUKON: SkGmHardRst(), SkGmSoftRst(),
- * SkGmSetRxTxEn(), SkGmIrq(), SkGmInitMac(), SkGmInitPhyMarv(),
- * SkGmAutoNegDoneMarv(), SkGmPhyRead(), SkGmPhyWrite().
- * Changes for V-CPU support.
- * Editorial changes.
- *
- * Revision 1.62 2001/08/06 09:50:14 rschmidt
- * Workaround BCOM Errata #1 for the C5 type.
- * Editorial changes.
- *
- * Revision 1.61 2001/02/09 15:40:59 rassmann
- * Editorial changes.
- *
- * Revision 1.60 2001/02/07 15:02:01 cgoos
- * Added workaround for Fujitsu switch link down.
- *
- * Revision 1.59 2001/01/10 09:38:06 cgoos
- * Fixed Broadcom C0/A1 Id check for workaround.
- *
- * Revision 1.58 2000/11/29 11:30:38 cgoos
- * Changed DEBUG sections with NW output to xDEBUG
- *
- * Revision 1.57 2000/11/27 12:40:40 rassmann
- * Suppressing preamble after first access to BCom, not before (#10556).
- *
- * Revision 1.56 2000/11/09 12:32:48 rassmann
- * Renamed variables.
- *
- * Revision 1.55 2000/11/09 11:30:10 rassmann
- * WA: Waiting after releasing reset until BCom chip is accessible.
- *
- * Revision 1.54 2000/10/02 14:10:27 rassmann
- * Reading BCOM PHY after releasing reset until it returns a valid value.
- *
- * Revision 1.53 2000/07/27 12:22:11 gklug
- * fix: possible endless loop in XmHardRst.
- *
- * Revision 1.52 2000/05/22 08:48:31 malthoff
- * Fix: #10523 errata valid for all BCOM PHYs.
- *
- * Revision 1.51 2000/05/17 12:52:18 malthoff
- * Fixes BCom link errata (#10523).
- *
- * Revision 1.50 1999/11/22 13:40:14 cgoos
- * Changed license header to GPL.
- *
- * Revision 1.49 1999/11/22 08:12:13 malthoff
- * Add workaround for power consumption feature of BCom C0 chip.
- *
- * Revision 1.48 1999/11/16 08:39:01 malthoff
- * Fix: MDIO preamble suppression is port dependent.
- *
- * Revision 1.47 1999/08/27 08:55:35 malthoff
- * 1000BT: Optimizing MDIO transfer by oppressing MDIO preamble.
- *
- * Revision 1.46 1999/08/13 11:01:12 malthoff
- * Fix for 1000BT: pFlowCtrlMode was not set correctly.
- *
- * Revision 1.45 1999/08/12 19:18:28 malthoff
- * 1000BT Fixes: Do not owerwrite XM_MMU_CMD.
- * Do not execute BCOM A1 workaround for B1 chips.
- * Fix pause frame setting.
- * Always set PHY_B_AC_TX_TST in PHY_BCOM_AUX_CTRL.
- *
- * Revision 1.44 1999/08/03 15:23:48 cgoos
- * Fixed setting of PHY interrupt mask in half duplex mode.
- *
- * Revision 1.43 1999/08/03 15:22:17 cgoos
- * Added some debug output.
- * Disabled XMac GP0 interrupt for external PHYs.
- *
- * Revision 1.42 1999/08/02 08:39:23 malthoff
- * BCOM PHY: TX LED: To get the mono flop behaviour it is required
- * to set the LED Traffic Mode bit in PHY_BCOM_P_EXT_CTRL.
- *
- * Revision 1.41 1999/07/30 06:54:31 malthoff
- * Add temp. workarounds for the BCOM Phy revision A1.
- *
- * Revision 1.40 1999/06/01 07:43:26 cgoos
- * Changed Link Mode Status in SkXmAutoNegDone... from FULL/HALF to
- * AUTOFULL/AUTOHALF.
- *
- * Revision 1.39 1999/05/19 07:29:51 cgoos
- * Changes for 1000Base-T.
- *
- * Revision 1.38 1999/04/08 14:35:10 malthoff
- * Add code for enabling signal detect. Enabling signal detect is disabled.
- *
- * Revision 1.37 1999/03/12 13:42:54 malthoff
- * Add: Jumbo Frame Support.
- * Add: Receive modes SK_LENERR_OK_ON/OFF and
- * SK_BIG_PK_OK_ON/OFF in SkXmSetRxCmd().
- *
- * Revision 1.36 1999/03/08 10:10:55 gklug
- * fix: AutoSensing did switch to next mode even if LiPa indicated offline
- *
- * Revision 1.35 1999/02/22 15:16:41 malthoff
- * Remove some compiler warnings.
- *
- * Revision 1.34 1999/01/22 09:19:59 gklug
- * fix: Init DupMode and InitPauseMd are now called in RxTxEnable
- *
- * Revision 1.33 1998/12/11 15:19:11 gklug
- * chg: lipa autoneg stati
- * chg: debug messages
- * chg: do NOT use spurious XmIrq
- *
- * Revision 1.32 1998/12/10 11:08:44 malthoff
- * bug fix: pAC has been used for IOs in SkXmHardRst().
- * SkXmInitPhy() is also called for the Diag in SkXmInitMac().
- *
- * Revision 1.31 1998/12/10 10:39:11 gklug
- * fix: do 4 RESETS of the XMAC at the beginning
- * fix: dummy read interrupt source register BEFORE initializing the Phy
- * add: debug messages
- * fix: Linkpartners autoneg capability cannot be shown by TX_PAGE interrupt
- *
- * Revision 1.30 1998/12/07 12:18:32 gklug
- * add: refinement of autosense mode: take into account the autoneg cap of LiPa
- *
- * Revision 1.29 1998/12/07 07:12:29 gklug
- * fix: if page is received the link is down.
- *
- * Revision 1.28 1998/12/01 10:12:47 gklug
- * chg: if spurious IRQ from XMAC encountered, save it
- *
- * Revision 1.27 1998/11/26 07:33:38 gklug
- * add: InitPhy call is now in XmInit function
- *
- * Revision 1.26 1998/11/18 13:38:24 malthoff
- * 'Imsk' is also unused in SkXmAutoNegDone.
- *
- * Revision 1.25 1998/11/18 13:28:01 malthoff
- * Remove unused variable 'Reg' in SkXmAutoNegDone().
- *
- * Revision 1.24 1998/11/18 13:18:45 gklug
- * add: workaround for xmac errata #1
- * add: detect Link Down also when Link partner requested config
- * chg: XMIrq is only used when link is up
- *
- * Revision 1.23 1998/11/04 07:07:04 cgoos
- * Added function SkXmRxTxEnable.
- *
- * Revision 1.22 1998/10/30 07:35:54 gklug
- * fix: serve LinkDown interrupt when link is already down
- *
- * Revision 1.21 1998/10/29 15:32:03 gklug
- * fix: Link Down signaling
- *
- * Revision 1.20 1998/10/29 11:17:27 gklug
- * fix: AutoNegDone bug
- *
- * Revision 1.19 1998/10/29 10:14:43 malthoff
- * Add endainesss comment for reading/writing MAC addresses.
- *
- * Revision 1.18 1998/10/28 07:48:55 cgoos
- * Fix: ASS somtimes signaled although link is up.
- *
- * Revision 1.17 1998/10/26 07:55:39 malthoff
- * Fix in SkXmInitPauseMd(): Pause Mode
- * was disabled and not enabled.
- * Fix in SkXmAutoNegDone(): Checking Mode bits
- * always failed, becaues of some missing braces.
- *
- * Revision 1.16 1998/10/22 09:46:52 gklug
- * fix SysKonnectFileId typo
- *
- * Revision 1.15 1998/10/21 05:51:37 gklug
- * add: para DoLoop to InitPhy function for loopback set-up
- *
- * Revision 1.14 1998/10/16 10:59:23 malthoff
- * Remove Lint warning for dummy reads.
- *
- * Revision 1.13 1998/10/15 14:01:20 malthoff
- * Fix: SkXmAutoNegDone() is (int) but does not return a value.
- *
- * Revision 1.12 1998/10/14 14:45:04 malthoff
- * Remove SKERR_SIRQ_E0xx and SKERR_SIRQ_E0xxMSG by
- * SKERR_HWI_Exx and SKERR_HWI_E0xxMSG to be independent
- * from the Sirq module.
- *
- * Revision 1.11 1998/10/14 13:59:01 gklug
- * add: InitPhy function
- *
- * Revision 1.10 1998/10/14 11:20:57 malthoff
- * Make SkXmAutoNegDone() public, because it's
- * used in diagnostics, too.
- * The Link Up event to the RLMT is issued in SkXmIrq().
- * SkXmIrq() is not available in diagnostics.
- * Use PHY_READ when reading PHY registers.
- *
- * Revision 1.9 1998/10/14 05:50:10 cgoos
- * Added definition for Para.
- *
- * Revision 1.8 1998/10/14 05:41:28 gklug
- * add: Xmac IRQ
- * add: auto-negotiation done function
- *
- * Revision 1.7 1998/10/09 06:55:20 malthoff
- * The configuration of the XMACs Tx Request Threshold
- * depends from the drivers port usage now. The port
- * usage is configured in GIPortUsage.
- *
- * Revision 1.6 1998/10/05 07:48:00 malthoff
- * minor changes
- *
- * Revision 1.5 1998/10/01 07:03:54 gklug
- * add: dummy function for XMAC ISR
- *
- * Revision 1.4 1998/09/30 12:37:44 malthoff
- * Add SkXmSetRxCmd() and related code.
- *
- * Revision 1.3 1998/09/28 13:26:40 malthoff
- * Add SkXmInitMac(), SkXmInitDupMd(), and SkXmInitPauseMd()
- *
- * Revision 1.2 1998/09/16 14:34:21 malthoff
- * Add SkXmClrExactAddr(), SkXmClrSrcCheck(),
- * SkXmClrHashAddr(), SkXmFlushTxFifo(),
- * SkXmFlushRxFifo(), and SkXmHardRst().
- * Finish Coding of SkXmSoftRst().
- * The sources may be compiled now.
- *
- * Revision 1.1 1998/09/04 10:05:56 malthoff
- * Created.
- *
- *
- ******************************************************************************/
-
#include "h/skdrv1st.h"
#include "h/skdrv2nd.h"
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)