Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
rtl8150.c File Reference
#include <linux/init.h>
#include <linux/signal.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/usb.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Data Structures

struct  rtl8150
 

Macros

#define DRIVER_VERSION   "v0.6.2 (2004/08/27)"
 
#define DRIVER_AUTHOR   "Petko Manolov <[email protected]>"
 
#define DRIVER_DESC   "rtl8150 based usb-ethernet driver"
 
#define IDR   0x0120
 
#define MAR   0x0126
 
#define CR   0x012e
 
#define TCR   0x012f
 
#define RCR   0x0130
 
#define TSR   0x0132
 
#define RSR   0x0133
 
#define CON0   0x0135
 
#define CON1   0x0136
 
#define MSR   0x0137
 
#define PHYADD   0x0138
 
#define PHYDAT   0x0139
 
#define PHYCNT   0x013b
 
#define GPPC   0x013d
 
#define BMCR   0x0140
 
#define BMSR   0x0142
 
#define ANAR   0x0144
 
#define ANLP   0x0146
 
#define AER   0x0148
 
#define CSCR   0x014C /* This one has the link status */
 
#define CSCR_LINK_STATUS   (1 << 3)
 
#define IDR_EEPROM   0x1202
 
#define PHY_READ   0
 
#define PHY_WRITE   0x20
 
#define PHY_GO   0x40
 
#define MII_TIMEOUT   10
 
#define INTBUFSIZE   8
 
#define RTL8150_REQT_READ   0xc0
 
#define RTL8150_REQT_WRITE   0x40
 
#define RTL8150_REQ_GET_REGS   0x05
 
#define RTL8150_REQ_SET_REGS   0x05
 
#define TSR_ECOL   (1<<5)
 
#define TSR_LCOL   (1<<4)
 
#define TSR_LOSS_CRS   (1<<3)
 
#define TSR_JBR   (1<<2)
 
#define TSR_ERRORS   (TSR_ECOL | TSR_LCOL | TSR_LOSS_CRS | TSR_JBR)
 
#define RSR_CRC   (1<<2)
 
#define RSR_FAE   (1<<1)
 
#define RSR_ERRORS   (RSR_CRC | RSR_FAE)
 
#define MSR_DUPLEX   (1<<4)
 
#define MSR_SPEED   (1<<3)
 
#define MSR_LINK   (1<<2)
 
#define INT_TSR   0x00
 
#define INT_RSR   0x01
 
#define INT_MSR   0x02
 
#define INT_WAKSR   0x03
 
#define INT_TXOK_CNT   0x04
 
#define INT_RXLOST_CNT   0x05
 
#define INT_CRERR_CNT   0x06
 
#define INT_COL_CNT   0x07
 
#define RTL8150_MTU   1540
 
#define RTL8150_TX_TIMEOUT   (HZ)
 
#define RX_SKB_POOL_SIZE   4
 
#define RTL8150_HW_CRC   0
 
#define RX_REG_SET   1
 
#define RTL8150_UNPLUG   2
 
#define RX_URB_FAIL   3
 
#define VENDOR_ID_REALTEK   0x0bda
 
#define VENDOR_ID_MELCO   0x0411
 
#define VENDOR_ID_MICRONET   0x3980
 
#define VENDOR_ID_LONGSHINE   0x07b8
 
#define VENDOR_ID_OQO   0x1557
 
#define VENDOR_ID_ZYXEL   0x0586
 
#define PRODUCT_ID_RTL8150   0x8150
 
#define PRODUCT_ID_LUAKTX   0x0012
 
#define PRODUCT_ID_LCS8138TX   0x401a
 
#define PRODUCT_ID_SP128AR   0x0003
 
#define PRODUCT_ID_PRESTIGE   0x401a
 

Typedefs

typedef struct rtl8150 rtl8150_t
 

Functions

 MODULE_DEVICE_TABLE (usb, rtl8150_table)
 
 module_usb_driver (rtl8150_driver)
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define AER   0x0148

Definition at line 43 of file rtl8150.c.

#define ANAR   0x0144

Definition at line 41 of file rtl8150.c.

#define ANLP   0x0146

Definition at line 42 of file rtl8150.c.

#define BMCR   0x0140

Definition at line 39 of file rtl8150.c.

#define BMSR   0x0142

Definition at line 40 of file rtl8150.c.

#define CON0   0x0135

Definition at line 32 of file rtl8150.c.

#define CON1   0x0136

Definition at line 33 of file rtl8150.c.

#define CR   0x012e

Definition at line 27 of file rtl8150.c.

#define CSCR   0x014C /* This one has the link status */

Definition at line 44 of file rtl8150.c.

#define CSCR_LINK_STATUS   (1 << 3)

Definition at line 45 of file rtl8150.c.

#define DRIVER_AUTHOR   "Petko Manolov <[email protected]>"

Definition at line 22 of file rtl8150.c.

#define DRIVER_DESC   "rtl8150 based usb-ethernet driver"

Definition at line 23 of file rtl8150.c.

#define DRIVER_VERSION   "v0.6.2 (2004/08/27)"

Definition at line 21 of file rtl8150.c.

#define GPPC   0x013d

Definition at line 38 of file rtl8150.c.

#define IDR   0x0120

Definition at line 25 of file rtl8150.c.

#define IDR_EEPROM   0x1202

Definition at line 47 of file rtl8150.c.

#define INT_COL_CNT   0x07

Definition at line 86 of file rtl8150.c.

#define INT_CRERR_CNT   0x06

Definition at line 85 of file rtl8150.c.

#define INT_MSR   0x02

Definition at line 81 of file rtl8150.c.

#define INT_RSR   0x01

Definition at line 80 of file rtl8150.c.

#define INT_RXLOST_CNT   0x05

Definition at line 84 of file rtl8150.c.

#define INT_TSR   0x00

Definition at line 79 of file rtl8150.c.

#define INT_TXOK_CNT   0x04

Definition at line 83 of file rtl8150.c.

#define INT_WAKSR   0x03

Definition at line 82 of file rtl8150.c.

#define INTBUFSIZE   8

Definition at line 54 of file rtl8150.c.

#define MAR   0x0126

Definition at line 26 of file rtl8150.c.

#define MII_TIMEOUT   10

Definition at line 53 of file rtl8150.c.

#define MSR   0x0137

Definition at line 34 of file rtl8150.c.

#define MSR_DUPLEX   (1<<4)

Definition at line 74 of file rtl8150.c.

#define MSR_LINK   (1<<2)

Definition at line 76 of file rtl8150.c.

#define MSR_SPEED   (1<<3)

Definition at line 75 of file rtl8150.c.

#define PHY_GO   0x40

Definition at line 51 of file rtl8150.c.

#define PHY_READ   0

Definition at line 49 of file rtl8150.c.

#define PHY_WRITE   0x20

Definition at line 50 of file rtl8150.c.

#define PHYADD   0x0138

Definition at line 35 of file rtl8150.c.

#define PHYCNT   0x013b

Definition at line 37 of file rtl8150.c.

#define PHYDAT   0x0139

Definition at line 36 of file rtl8150.c.

#define PRODUCT_ID_LCS8138TX   0x401a

Definition at line 109 of file rtl8150.c.

#define PRODUCT_ID_LUAKTX   0x0012

Definition at line 108 of file rtl8150.c.

#define PRODUCT_ID_PRESTIGE   0x401a

Definition at line 111 of file rtl8150.c.

#define PRODUCT_ID_RTL8150   0x8150

Definition at line 107 of file rtl8150.c.

#define PRODUCT_ID_SP128AR   0x0003

Definition at line 110 of file rtl8150.c.

#define RCR   0x0130

Definition at line 29 of file rtl8150.c.

#define RSR   0x0133

Definition at line 31 of file rtl8150.c.

#define RSR_CRC   (1<<2)

Definition at line 69 of file rtl8150.c.

#define RSR_ERRORS   (RSR_CRC | RSR_FAE)

Definition at line 71 of file rtl8150.c.

#define RSR_FAE   (1<<1)

Definition at line 70 of file rtl8150.c.

#define RTL8150_HW_CRC   0

Definition at line 94 of file rtl8150.c.

#define RTL8150_MTU   1540

Definition at line 89 of file rtl8150.c.

#define RTL8150_REQ_GET_REGS   0x05

Definition at line 58 of file rtl8150.c.

#define RTL8150_REQ_SET_REGS   0x05

Definition at line 59 of file rtl8150.c.

#define RTL8150_REQT_READ   0xc0

Definition at line 56 of file rtl8150.c.

#define RTL8150_REQT_WRITE   0x40

Definition at line 57 of file rtl8150.c.

#define RTL8150_TX_TIMEOUT   (HZ)

Definition at line 90 of file rtl8150.c.

#define RTL8150_UNPLUG   2

Definition at line 96 of file rtl8150.c.

#define RX_REG_SET   1

Definition at line 95 of file rtl8150.c.

#define RX_SKB_POOL_SIZE   4

Definition at line 91 of file rtl8150.c.

#define RX_URB_FAIL   3

Definition at line 97 of file rtl8150.c.

#define TCR   0x012f

Definition at line 28 of file rtl8150.c.

#define TSR   0x0132

Definition at line 30 of file rtl8150.c.

#define TSR_ECOL   (1<<5)

Definition at line 63 of file rtl8150.c.

#define TSR_ERRORS   (TSR_ECOL | TSR_LCOL | TSR_LOSS_CRS | TSR_JBR)

Definition at line 67 of file rtl8150.c.

#define TSR_JBR   (1<<2)

Definition at line 66 of file rtl8150.c.

#define TSR_LCOL   (1<<4)

Definition at line 64 of file rtl8150.c.

#define TSR_LOSS_CRS   (1<<3)

Definition at line 65 of file rtl8150.c.

#define VENDOR_ID_LONGSHINE   0x07b8

Definition at line 103 of file rtl8150.c.

#define VENDOR_ID_MELCO   0x0411

Definition at line 101 of file rtl8150.c.

#define VENDOR_ID_MICRONET   0x3980

Definition at line 102 of file rtl8150.c.

#define VENDOR_ID_OQO   0x1557

Definition at line 104 of file rtl8150.c.

#define VENDOR_ID_REALTEK   0x0bda

Definition at line 100 of file rtl8150.c.

#define VENDOR_ID_ZYXEL   0x0586

Definition at line 105 of file rtl8150.c.

Typedef Documentation

Definition at line 144 of file rtl8150.c.

Function Documentation

MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
rtl8150_table   
)
MODULE_LICENSE ( "GPL"  )
module_usb_driver ( rtl8150_driver  )