Skip to content

Instantly share code, notes, and snippets.

@Yasushi
Created May 2, 2009 02:54
Show Gist options
  • Save Yasushi/105386 to your computer and use it in GitHub Desktop.
Save Yasushi/105386 to your computer and use it in GitHub Desktop.
#define RX_DESC_MIN 64
#define RX_DESC_MAX 255
#define RX_DESC_DEF 64
VELOCITY_PARAM(RxDescriptors, "Number of receive descriptors");
#define TX_DESC_MIN 16
#define TX_DESC_MAX 256
#define TX_DESC_DEF 64
VELOCITY_PARAM(TxDescriptors, "Number of transmit descriptors");
#define RX_THRESH_DEF 0
/* rx_thresh[] is used for controlling the receive fifo threshold.
0: indicate the rxfifo threshold is 128 bytes.
1: indicate the rxfifo threshold is 512 bytes.
2: indicate the rxfifo threshold is 1024 bytes.
3: indicate the rxfifo threshold is store & forward.
*/
VELOCITY_PARAM(rx_thresh, "Receive fifo threshold");
#define DMA_LENGTH_DEF 0
/* DMA_length[] is used for controlling the DMA length
0: 8 DWORDs
1: 16 DWORDs
2: 32 DWORDs
3: 64 DWORDs
4: 128 DWORDs
5: 256 DWORDs
6: SF(flush till emply)
7: SF(flush till emply)
*/
VELOCITY_PARAM(DMA_length, "DMA length");
#define TX_CSUM_DEF 1
/* txcsum_offload[] is used for setting the checksum offload ability of NIC.
(We only support RX checksum offload now)
0: disable csum_offload[checksum offload
1: enable checksum offload. (Default)
*/
VELOCITY_PARAM(txcsum_offload, "Enable transmit packet checksum offload");
#define FLOW_CNTL_DEF 1
#define FLOW_CNTL_MIN 1
#define FLOW_CNTL_MAX 5
/* flow_control[] is used for setting the flow control ability of NIC.
1: hardware deafult - AUTO (default). Use Hardware default value in ANAR.
2: enable TX flow control.
3: enable RX flow control.
4: enable RX/TX flow control.
5: disable
*/
VELOCITY_PARAM(flow_control, "Enable flow control ability");
#define MED_LNK_DEF 0
#define MED_LNK_MIN 0
#define MED_LNK_MAX 4
/* speed_duplex[] is used for setting the speed and duplex mode of NIC.
0: indicate autonegotiation for both speed and duplex mode
1: indicate 100Mbps half duplex mode
2: indicate 100Mbps full duplex mode
3: indicate 10Mbps half duplex mode
4: indicate 10Mbps full duplex mode
Note:
if EEPROM have been set to the force mode, this option is ignored
by driver.
*/
VELOCITY_PARAM(speed_duplex, "Setting the speed and duplex mode");
#define VAL_PKT_LEN_DEF 0
/* ValPktLen[] is used for setting the checksum offload ability of NIC.
0: Receive frame with invalid layer 2 length (Default)
1: Drop frame with invalid layer 2 length
*/
VELOCITY_PARAM(ValPktLen, "Receiving or Drop invalid 802.3 frame");
#define WOL_OPT_DEF 0
#define WOL_OPT_MIN 0
#define WOL_OPT_MAX 7
/* wol_opts[] is used for controlling wake on lan behavior.
0: Wake up if recevied a magic packet. (Default)
1: Wake up if link status is on/off.
2: Wake up if recevied an arp packet.
4: Wake up if recevied any unicast packet.
Those value can be sumed up to support more than one option.
*/
VELOCITY_PARAM(wol_opts, "Wake On Lan options");
#define INT_WORKS_DEF 20
#define INT_WORKS_MIN 10
#define INT_WORKS_MAX 64
VELOCITY_PARAM(int_works, "Number of packets per interrupt services");
static int rx_copybreak = 200;
module_param(rx_copybreak, int, 0644);
MODULE_PARM_DESC(rx_copybreak, "Copy breakpoint for copy-only-tiny-frames");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment