/*dm9ks.c:Version2.082007/02/12ADavicomDM9000/DM9010ISANICfastEthernetdriverforLinux.Thisprogramisfreesoftware;youcanredistributeitand/ormodifyitunderthetermsoftheGNUGeneralPublicLicenseaspublishedbytheFreeSoftwareFoundation;eitherversion2oftheLicense,or(atyouroption)anylaterversion.Thisprogramisdistributedinthehopethatitwillbeuseful,butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyofMERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.SeetheGNUGeneralPublicLicenseformoredetails.(C)Copyright1997-2007DAVICOMSemiconductor,Inc.AllRightsReserved.V2.00Spenser-01/10/2005-ModificationforPXA270MAINSTONE.-Modifieddmfe_tx_done().-Adddmfe_timeout().V2.0110/07/2005-Modifieddmfe_timer()-Dectednetworkspeed10/100MV2.0210/12/2005-Uselinkchangetochagedb->Speed-dmfe_open()waitforLinkOKV2.0311/22/2005-Power-offandPower-onPHYindmfe_init_dm9000()-supportIOLV2.0412/13/2005-delay1.6sbetweenpower-onandpower-offindmfe_init_dm9000()-setLEDmode1indmfe_init_dm9000()-adddatabusdrivingcapabilityindmfe_init_dm9000()(optional)10/3/2006-AddDM8606read/writefunctionbyMDCandMDIOV2.0601/03/2007-CONT_RX_PKT_CNT=0xFFFF-modifydmfe_tx_donefunction-checkRXFIFOpointer-ifusingphysicaladdress,re-defineI/Ofunction-adddb->cont_rx_pkt_cnt=0atthefrontofdmfe_packet_receive()V2.0802/12/2007-moduleparametermacro2.4MODULE_PARM2.6module_param-remove#include
-fixdmfe_interruptforkernel2.6.20V2.0905/24/2007-supportethtoolandmii-tool05/30/2007-fixthedriverbugwhenifconfigeth0(-)promiscand(-)allmulti.06/05/2007-fixdm9000bissue(ex.10MTXidle=65mA,10Mharmonic)-addflowcontrolfunction(option)10/01/2007-Add#include-Modyfydmfe_do_ioctlforkernel2.6.711/23/2007-AddTDBUGtocheckTXFIFOpointershift-Removecheck_rx_ready()-Add#defineCHECKSUMtomodifyCHECKSUMfunction12/20/2007-ModifyTXtimeoutroutine(+)checkTCR&0x01*///#defineCHECKSUM//#defineTDBUG/*checkTXFIFOpointer*///#defineRDBUG/*checkRXFIFOpointer*///#defineDM8606#defineDRV_NAME"dm9KS"#defineDRV_VERSION"2.09"#defineDRV_RELDATE"2007-11-22"#ifdefMODVERSIONS#include#endif//#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#ifdefCONFIG_ARCH_MAINSTONE#include#include#include#endif/*Board/System/Debuginformation/definition----------------*/#defineDM9KS_ID0x90000A46#defineDM9010_ID0x90100A46/*-------registername-----------------------*/#defineDM9KS_NCR0x00/*NetworkcontrolReg.*/#defineDM9KS_NSR0x01/*NetworkStatusReg.*/#defineDM9KS_TCR0x02/*TXcontrolReg.*/#defineDM9KS_RXCR0x05/*RXcontrolReg.*/#defineDM9KS_BPTR0x08#defineDM9KS_FCTR0x09#defineDM9KS_FCR0x0a#defineDM9KS_EPCR0x0b#defineDM9KS_EPAR0x0c#defineDM9KS_EPDRL0x0d#defineDM9KS_EPDRH0x0e#defineDM9KS_GPR0x1f/*Generalpurposeregister*/#defineDM9KS_CHIPR0x2c#defineDM9KS_TCR20x2d#defineDM9KS_SMCR0x2f/*SpecialModeControlReg.*/#defineDM9KS_ETXCSR0x30/*EarlyTransmitcontrol/statusReg.*/#defineDM9KS_TCCR0x31/*ChecksumcntrolReg.*/#defineDM9KS_RCSR0x32/*ReceiveChecksumstatusReg.*/#defineDM9KS_BUSCR0x38#defineDM9KS_MRCMDX0xf0#defineDM9KS_MRCMD0xf2#defineDM9KS_MDRAL0xf4#defineDM...