smsc911x_xscale_v1.12

所属分类:Windows编程
开发工具:C/C++
文件大小:133KB
下载次数:38
上传日期:2007-09-19 09:58:37
上 传 者cdamo
说明:  smsc911x 网卡驱动 This the users/programmers guide for the LAN911x Linux Driver The following sections can be found below * Revision History * Files * Features * Driver Parameters * Rx Performance Tuning * Tested Platforms * Rx Code Path * Tx Code Path * Platform Interface Descriptions
(smsc911x NIC drivers This the users/programmers guide for the LAN911x Linux DriverThe following sections can be found below* Revision History* Files* Features* Driver Parameters* Rx Performance Tuning* Tested Platforms* Rx Code Path* Tx Code Path* Platform Interface Descriptions)

文件列表:
smsc911x_xscale_v1.12\smsc911x_xscale\buildx (517, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\cmd911x (44177, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\cmd911x-Lnt.txt (626, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\cmd911x.c (60319, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\cmd911x.Lnt (2699, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\COPYING (17992, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\ioctl_11x.h (4919, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\lint.h (12721, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\smsc911x-X-Lnt.txt (4386, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\smsc911x-X.Lnt (3087, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\smsc911x.c (152718, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\smsc911x.o (45244, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\smsc911xd.o (76288, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\xscale.c (14249, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\xscale.h (2609, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale\xscale_release_note.txt (1446, 2005-02-28)
smsc911x_xscale_v1.12\smsc911x_xscale (0, 2006-07-03)
smsc911x_xscale_v1.12 (0, 2006-07-03)

/*************************************************************************** * * Copyright (c) 2004-2005, SMSC * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * *************************************************************************** * File: Readme.txt */ This is the users/programmers guide for the LAN911x Linux Driver The following sections can be found below * Revision History * Files * Features * Driver Parameters * Rx Performance Tuning * Tested Platforms * Rx Code Path * Tx Code Path * Platform Interface Descriptions ####################################################### ############### REVISION HISTORY ###################### ####################################################### 06/04/2004 Bryan Whitehead. Version 0.50: This is the first beta version 06/21/2004 Bryan Whitehead, Version 0.51: added multicast added private ioctls to set mac address and write eeprom (not tested) removed timeout function, which served no purpose anyway. 07/09/2004 Bryan Whitehead, Version 0.52 Improved Flow Control More Control on Link Management the driver parameter link_mode is now a bit wise field that specifies any combination of 4 or fewer link speeds 1=10HD,2=10FD,4=100HD,8=100FD Still Autonegotiation is always used. 07/13/2004 Bryan Whitehead, Version 0.53 EEPROM has been fixed and tested. If there is an EEPROM connected and loaded correctly, its mac address will be loaded into the 11x Improved Flow Control again. Measured >10X improvement in UDP_STREAM test with small packets. 07/30/2004 Bryan Whitehead, Version 0.54 Added many IOCTL codes for use with the command app, cmd911x. Added functions to the Platform interface Platform_RequestDmaChannel Platform_ReleaseDmaChannel Added Macros to Platform interface PLATFORM_DEFAULT_RX_DMA PLATFORM_DEFAULT_TX_DMA 08/12/2004 Bryan Whitehead, Version 0.55 Updated driver documentation Consolidated most driver source files into smsc911x.c Minor changes to the platform interface 08/13/2004 Bryan Whitehead, Version 0.56 Added Ioctl COMMAND_GET_CONFIGURATION this command used with "cmd911x -cGET_CONFIG" will display driver information, which is especially useful if trace points have been disabled. 08/24/2004 Bryan Whitehead, Version 0.57 Implemented software patch to resynchronize Rx fifos after an overrun is detected. 08/24/2004 Bryan Whitehead, Version 0.58 Turned on LEDs which were accidentally turned off in version 0.57 08/25/2004 Bryan Whitehead, Version 0.59 Added extra driver context variables useful for debugging They can be accessed with the following command # cmd911x -cGET_CONFIG 08/30/2004 Bryan Whitehead, Version 0.60 Fixed bug in software patch (0.57) that caused the receiver to be turned off and not turned back on. Added symple packet filter to detect bad packets. If a bad packet is detected the driver will handle it like an overrun. That is, turn off receiver, empty fifos, clear fifo pointers(RX_DUMP), and turn on receiver. This method allows the driver to recover after a fifo synchronization fault. 09/01/2004 Bryan Whitehead, Version 0.61 This version was used for testing the patch. It was for internal purposes only 09/03/2004 Bryan Whitehead, Version 0.62 This version fixes some bugs in 0.60 and includes extra work around code to improve patch reliability. 09/07/2004 Bryan Whitehead, Version 0.63 Added IOCTLs for reading and writing to general memory 09/13/2004 Bryan Whitehead, Version 0.*** As the hardware issue is now fully understood, this patch includes a few changes to make the work around reliable in all situations. This version also has a the beginnings of new flow control feature, however this feature is disable for this version because it is still in progress. The build process has also changed. Now instead of building one debug driver, you can build a release and debug driver by choosing to include or not include the define USE_DEBUG. The release version enables activity LEDs, and removes all trace, warning, and assertion messages. The debug version enables GPIO signals, and enables trace, warning, and assertion messages. 09/15/2004 Bryan Whitehead, Version 0.65 Removed packet filter from 0.*** Added non-Auto-Negotiate link modes. See description of the link_mode driver parameter below 09/28/2004 Bryan Whitehead, Version 0.66/0.67 Added Rx flow control which is only turned on when the driver detects a lack of flow control in the higher layers. 10/07/2004 Bryan Whitehead, Version 0.68 Added support for Peakslite, and Polaris. Implemented support for Phy management tools such as mii-diag and mii-tool. 10/13/2004 Bryan Whitehead, Version 0.69 Fixed some issues with Linux 2.6. 10/18/2004 Bryan Whitehead, Version 0.70 Added support for new chips 115, 116, 117. NOTE: 115, and 116 may still require bus timing adjustment. Disabled workaround when rev b is detected. 10/20/2004 Bryan Whitehead, Version 0.71/0.72 Added support for tasklets, which allow the bulk of the Rx processing to be done with out blocking interrupts for the rest of the system. 10/27/2004 Bryan Whitehead, Version 1.00 Tuned the PLATFORM_INT_DEAS for sh3 platforms to get better TCP performance. Bumped up version number to 1.00 because this will be the first official release. 10/27/2004 Bryan Whitehead, Version 1.01 Changed sh3 POLARIS platform to use cycle steal DMA 11/11/2004 Bryan Whitehead, Version 1.02/1.03 Changed tasklets to default to off, (tasklets=0) Testing has shown that tasklets are not stable yet. So changing the default allows us to release this version. The user may still turn tasklets on but does so at there own risk. 11/11/2004 Bryan Whitehead, Version 1.04 Fixed Tasklet Issue. Changed tasklets to be ON by default, (tasklets=1) 11/18/2004 Bryan Whitehead, Version 1.05 Improved software flow control. Updated platform code to handle all chips 118/117/116/115 11/19/2004 Bryan Whitehead, Version 1.06 Added support to provide separate flow control parameters for 118/117 and 116/115. And the driver will use which ever is appropriate. 11/23/2004 Bryan Whitehead, Version 1.07 Changed the driver so that PAUSE frames will be enable or disabled based on state of the local and remote pause bits, as specified in IEEE Standard 802.3, 2000 Edition, page 1360, Table 28B-3-Pause Resolution 12/01/2004 Bryan Whitehead, Version 1.08 Added support for external phy. To enable use of external phy use the follow driver parameter setting ext_phy=1 other wise the driver will use the internal phy as it always has before. 12/01/2004 Bryan Whitehead, Version 1.09 replace the ext_phy parameter with phy_addr which works as follows if(phy_addr==0xFFFFFFFF) { //use internal phy } else if (phy_addr<32) { //use external phy at address specified by phy_addr // if external phy can not be found use internal phy } else { //attempt to auto detect external phy // if external phy can not be found use internal phy } 02/14/2005 Bryan Whitehead, Version 1.11 Automated the tuning procedure. See RX PERFORMANCE TUNING. Changed all register access to use a Macro instead of a memory mapped structure. This should simplify porting, if register access is ever done through IO space. Tuned all current platforms. Increased time out of Rx_FastForward to 500. Fixed faulty define TX_CMD_A_BUF_SIZE_ Fixed faulty define TX_CMD_B_PKT_BYTE_LENGTH_ Changed Phy reset to use PHY_BCR_RESET Cleaned driver with Lint tool Updated Rx_CountErrors Only count length error if length/type field is set If there is a CRC error don't count length error or multicast Changed access to Mac and Phy registers. Now requires only one lock, MacPhyLock. This replaces the MacAccessLock, PhyAccessLock, and RxSwitchLock. 02/28/2005 Bryan Whitehead, Version 1.12 Added date_code static constant ####################################################### #################### FILES ############################ ####################################################### readme.txt: this file smsc911x.c: Main driver source code file. This file contains all platform independent code It also includes platform dependent code based on the following defines USE_SH3 USE_PEAKS USE_XSCALE One of these should be defined in the build batch file or makefile peaks.h xscale.h sh3.h These files are platform dependent files. They define the platform dependent structure, PLATFORM_DATA. They also define some platform dependent constants for use by smsc911x.c. see PLATFORM INTERFACE DESCRIPTIONS below for more information peaks.c xscale.c sh3.c These files implement the platform dependent functions used by smsc911x.c. see PLATFORM INTERFACE DESCRIPTIONS below for more information ioctl_11x.h defines ioctl codes common between the driver(smsc911x.c) and the helper application (cmd911x.c) cmd911x.c This is the source code for the helper application. It provides the means by which one can send any ioctl code to the driver (smsc911x.c). buildp: This batch file is used for building the driver for the peaks platform, and the helper application usage: bash buildp builds: This batch file is used for building the driver for the sh3 platform, and the helper application usage: bash builds buildx: This batch file is used for building the driver for the xscale platform, and the helper application usage: bash buildx smsc911x.o: this is the driver binary obtained after building smsc911x.c cmd911x: this is the helper application binary obtained after building cmd911x.c lint.h: This is a header file for use only with the lint tool. It provides structure definitions and function declarations used by the driver so the lint tool does not need to scan the real header files. This is done because the real header files generate too many error messages. cmd911x.Lnt: smsc911x-*.Lnt: These are lint configuration files used with the lint tool cmd911x-Lnt.txt smsc911x-*-Lnt.txt: These are lint output files created by the lint tool. COPYING: This is a copy of the GNU GENERAL PUBLIC LICENSE ############################################################ ################### FEATURES ############################### ############################################################ transmit and receive for pio and dma Automatic Flow control for Tx, and Rx Multicast capable Mac Address Management External Phy support ############################################################ ################## DRIVER PARAMETERS ####################### ############################################################ The following are load time modifiable driver parameters. They can be set when using insmod Example: # insmod smsc911x.o rx_dma=0 tx_dma=1 irq=5 lan_base specifies the physical base location in memory where the LAN911x can be accessed. By default the location will be choosen by Platform_Initialize. bus_width specifies the bus_width to be configured by Platform_Initialize. Must be set to either 16, or 32. Any other value or by default Platform_Initialize will attempt to autodetect the bus width link_mode specifies the link mode used. Each bit has different meanings bit 0, 0x01, 10Mbps Half Duplex, bit 1, 0x02, 10Mbps Full Duplex, bit 2, 0x04, 100Mbps Half Duplex, bit 3, 0x08, 100Mbps Full Duplex, bit 4, 0x10, Symmetrical Pause, bit 5, 0x20, Asymmetrical Pause, bit 6, 0x40, Auto Negotiate, if bit 6 is set, then Auto Negotiation is used, and bits 0 through 5 define what modes are advertised. if bit 6 is clear, then Auto Negotiation is not used, and bits 0 through 3 select which speed and duplex setting to use. In this case, only the most significant set bit is used to set the speed and duplex. Example, the following are bits 6 to 0, and the resulting setting bits 6 5 4 3 2 1 0 0 x x 0 0 0 x, 10Mbps Half Duplex 0 x x 0 0 1 x, 10Mbps Full Duplex 0 x x 0 1 x x, 100Mbps Half Duplex 0 x x 1 x x x, 100Mbps Full Duplex by default link_mode=0x7F which uses Auto Negotiation and advertises all modes. irq specifies the irq number to use. The default value is decided by the platform layer with the macro PLATFORM_IRQ int_deas specifies the interrupt deassertion period to be written to INT_DEAS of INT_CFG register. The default value is decided by the platform layer with the macro PLATFORM_INT_DEAS irq_pol specifies the value to be written to IRQ_POL of INT_CFG register. The default value is decided by the platform layer with the macro PLATFORM_INT_POL. irq_type specifies the value to be written to IRQ_TYPE of INT_CFG register. The default value is decided by the platform layer with the macro PLATFORM_IRQ_TYPE rx_dma specifies the dma channel to use for receiving packets. It may also be set to the following values 256 = TRANSFER_PIO the driver will not use dma, it will use PIO. 255 = TRANSFER_REQUEST_DMA the driver will call the Platform_RequestDmaChannel to get an available dma channel the default value is decided by the platform layer with the macro PLATFORM_RX_DMA tx_dma specifies the dma channel to use for transmitting packets. It may also be set to the following values 256 = TRANSFER_PIO the driver will not use dma, it will use PIO. 255 = TRANSFER_REQUEST_DMA the driver will call the Platform_RequestDmaChannel to get an available dma channel the default value is decided by the platform layer with the macro PLATFORM_TX_DMA dma_threshold specifies the minimum size a packet must be for using DMA. Otherwise the driver will use PIO. For small packets PIO may be faster than DMA because DMA requires a certain amount of set up time where as PIO can start almost immediately. Setting this value to 0 means dma will always be used where dma has been enabled. The default value is decided by the platform layer with the macro PLATFORM_DMA_THRESHOLD mac_addr_hi16 Specifies the high word of the mac address. If it was not specified then the driver will try to read the mac address from the eeprom. If that failes then the driver will set it to a valid value. Both mac_addr_hi16 and mac_addr_lo32 must be used together or not at all. mac_addr_lo32 Specifies the low dword of the mac address. If it was not specified then the driver will try to read the mac address from the eeprom. If that failes then the driver will set it to a valid value. Both mac_addr_hi16 and mac_addr_lo32 must be used together or not at all. debug_mode specifies the debug mode 0x01, bit 0 display trace messages 0x02, bit 1 display warning messages 0x04, bit 2 enable GPO signals Trace messages will only display if the driver was compiled with USE_TRACE defined. Warning message will only display if the driver was compiled with USE_WARNING defined. tx_fifo_sz specifies the value to write to TX_FIFO_SZ of the HW_CFG register. It should be set to a value from 0 to 15 that has been left shifted 16 bits. The default value is 0x00050000UL afc_cfg specifies the value to write to write to the AFC_CFG register during initialization. By default the driver will choose a value that seems resonable for the tx_fifo_sz setting. However it should be noted that the driver has only be tested using the default setting for tx_fifo_sz tasklets A non zero value specifies that most of the receive work should be done in a tasklet, thereby enabling other system interrupts. A zero value specifies that all receive work is done in the ISR, where interrupts are not enabled. A single burst of receive work has been seen to take as long as 3 mS. It would not be friendly for this driver to hold the CPU for that long, there for tasklets are enabled by default. However there are some tests that measure a mild performance drop when using tasklets, therefor this parameter is included so the end user can choose to disable tasklets. NOTE:10/29/2004: as of version 1.02 tasklets are disabled by default because testing has not confirmed their stability. The user may still turn on tasklets but does so at there own risk. NOTE:11/05/2004: as of version 1.04 tasklets are enabled by default because the issue observed before has been solved. phy_addr The default value of 0xFFFFFFFF tells the driver to use the internal phy. A value less than or equal to 31 tells the driver to use the external phy at that address. If the external phy is not found the internal phy will be used. Any other value tells the driver to search for the external phy on all addresses from 0 to 31. If the external phy is not found the internal phy will be used. max_throughput This is one of the software flow control parameters. It specifies the maximum throughput in a 100mS period that was measured during an rx TCP_STREAM test. It is used to help the driver decide when to activate software flow control and what work load to maintain when flow control is active. By default the driver will decide what value to use. See RX PERFORMANCE TUNING. max_packet_count This is one of the software flow control parameters. It specifies the maximum packets counted in a 100mS period during an rx TCP_STREAM test. It is used to help the driver decide when to activate software flow control, and what work load to maintain when flow control is active. By default the driver will decide what value to use. See RX PERFORMANCE TUNING. packet_cost This is one of the software flow control parameters. It specifies the ideal packet cost. This allows the driver achieve the best performance with both large and small packets, when flow control is active. By default the dri ... ...

近期下载者

相关文件


收藏者