#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/dma-mapping.h>
#include <linux/bitops.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/uaccess.h>
Go to the source code of this file.
|
enum | uli526x_offsets {
DCR0 = 0x00,
DCR1 = 0x08,
DCR2 = 0x10,
DCR3 = 0x18,
DCR4 = 0x20,
DCR5 = 0x28,
DCR6 = 0x30,
DCR7 = 0x38,
DCR8 = 0x40,
DCR9 = 0x48,
DCR10 = 0x50,
DCR11 = 0x58,
DCR12 = 0x60,
DCR13 = 0x68,
DCR14 = 0x70,
DCR15 = 0x78
} |
|
enum | uli526x_CR6_bits {
CR6_RXSC = 0x2,
CR6_PBF = 0x8,
CR6_PM = 0x40,
CR6_PAM = 0x80,
CR6_FDM = 0x200,
CR6_TXSC = 0x2000,
CR6_STI = 0x100000,
CR6_SFT = 0x200000,
CR6_RXA = 0x40000000,
CR6_NO_PURGE = 0x20000000
} |
|
|
struct tx_desc | __attribute__ ((aligned(32))) |
|
| MODULE_DEVICE_TABLE (pci, uli526x_pci_tbl) |
|
| MODULE_AUTHOR ("Peer Chen, [email protected]") |
|
| MODULE_DESCRIPTION ("ULi M5261/M5263 fast ethernet driver") |
|
| MODULE_LICENSE ("GPL") |
|
| module_param (debug, int, 0644) |
|
| module_param (mode, int, 0) |
|
| module_param (cr6set, int, 0) |
|
| MODULE_PARM_DESC (debug,"ULi M5261/M5263 enable debugging (0-1)") |
|
| MODULE_PARM_DESC (mode,"ULi M5261/M5263: Bit 0: 10/100Mbps, bit 2: duplex, bit 8: HomePNA") |
|
| module_init (uli526x_init_module) |
|
| module_exit (uli526x_cleanup_module) |
|
#define CR15_DEFAULT 0x06 /* TxJabber RxWatchdog */ |
#define CR6_DEFAULT 0x22200000 |
#define CR7_DEFAULT 0x180c1 |
#define CR9_SROM_READ 0x4800 |
#define DRV_NAME "uli526x" |
#define DRV_RELDATE "2005-7-29" |
#define DRV_VERSION "0.9.3" |
#define MAX_CHECK_PACKET 0x8000 |
#define MAX_PACKET_SIZE 1514 |
#define PCI_ULI5261_ID 0x526110B9 /* ULi M5261 ID*/ |
#define PCI_ULI5263_ID 0x526310B9 /* ULi M5263 ID*/ |
#define PHY_DATA_0 0x00000 |
#define PHY_DATA_1 0x20000 |
#define PHY_POWER_DOWN 0x800 |
#define pr_fmt |
( |
|
fmt | ) |
KBUILD_MODNAME ": " fmt |
#define RX_ALLOC_SIZE 0x620 |
#define RX_DESC_CNT 0x30 /* Allocated Rx descriptors */ |
#define SHOW_MEDIA_TYPE |
( |
|
mode | ) |
|
Value:pr_err(
"Change Speed to %sMhz %s duplex\n", \
mode & 1 ?
"100" :
"10", \
mode & 4 ?
"full" :
"half");
Definition at line 94 of file uli526x.c.
#define SROM_V41_CODE 0x14 |
#define TDES0_ERR_MASK 0x4302 /* TXJT, LC, EC, FUE */ |
#define TX_BUF_ALLOC 0x600 |
#define TX_DESC_CNT 0x20 /* Allocated Tx descriptors */ |
#define ULI5261_MAX_MULTICAST 14 |
#define ULI526X_DBUG |
( |
|
dbug_now, |
|
|
|
msg, |
|
|
|
value |
|
) |
| |
Value:do { \
if (uli526x_debug || (dbug_now)) \
pr_err(
"%s %lx\n", (
msg), (
long) (
value)); \
} while (0)
Definition at line 88 of file uli526x.c.
#define ULI526X_IO_SIZE 0x100 |
#define uli526x_resume NULL |
#define uli526x_suspend NULL |
#define ULI526X_TXTH_128 0x0000 /* TX TH 128 byte */ |
#define ULI526X_TXTH_1K 0xC000 /* TX TH 1K byte */ |
#define ULI526X_TXTH_256 0x4000 /* TX TH 256 byte */ |
#define ULI526X_TXTH_512 0x8000 /* TX TH 512 byte */ |
#define ULI526X_TXTH_72 0x400000 /* TX TH 72 byte */ |
#define ULI526X_TXTH_96 0x404000 /* TX TH 96 byte */ |
- Enumerator:
CR6_RXSC |
|
CR6_PBF |
|
CR6_PM |
|
CR6_PAM |
|
CR6_FDM |
|
CR6_TXSC |
|
CR6_STI |
|
CR6_SFT |
|
CR6_RXA |
|
CR6_NO_PURGE |
|
Definition at line 200 of file uli526x.c.
- Enumerator:
DCR0 |
|
DCR1 |
|
DCR2 |
|
DCR3 |
|
DCR4 |
|
DCR5 |
|
DCR6 |
|
DCR7 |
|
DCR8 |
|
DCR9 |
|
DCR10 |
|
DCR11 |
|
DCR12 |
|
DCR13 |
|
DCR14 |
|
DCR15 |
|
Definition at line 193 of file uli526x.c.
MODULE_AUTHOR |
( |
"Peer |
Chen, |
|
|
peer.chen @uli.com.tw" |
|
|
) |
| |
MODULE_DEVICE_TABLE |
( |
pci |
, |
|
|
uli526x_pci_tbl |
|
|
) |
| |
module_exit |
( |
uli526x_cleanup_module |
| ) |
|
module_init |
( |
uli526x_init_module |
| ) |
|
module_param |
( |
cr6set |
, |
|
|
int |
, |
|
|
0 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
debug |
, |
|
|
"ULi M5261/M5263 enable debugging (0-1)" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
mode |
, |
|
|
"ULi M5261/M5263: Bit 0: 10/ |
100Mbps, |
|
|
bit 2:duplex |
, |
|
|
bit 8:HomePNA" |
|
|
) |
| |