Go to the documentation of this file.
21 #define INT_SUSPEND 0x00001
22 #define INT_USBRESET 0x00002
23 #define INT_ENDPOINT0 0x00004
24 #define INT_SETUP 0x00008
25 #define INT_STATUS 0x00010
26 #define INT_STATUSNAK 0x00020
27 #define INT_EPxDATASET(n) (0x00020 << (n))
28 # define INT_EP1DATASET 0x00040
29 # define INT_EP2DATASET 0x00080
30 # define INT_EP3DATASET 0x00100
31 #define INT_EPnNAK(n) (0x00100 < (n))
32 # define INT_EP1NAK 0x00200
33 # define INT_EP2NAK 0x00400
34 # define INT_EP3NAK 0x00800
35 #define INT_SOF 0x01000
36 #define INT_ERR 0x02000
37 #define INT_MSTWRSET 0x04000
38 #define INT_MSTWREND 0x08000
39 #define INT_MSTWRTMOUT 0x10000
40 #define INT_MSTRDEND 0x20000
41 #define INT_SYSERROR 0x40000
42 #define INT_PWRDETECT 0x80000
45 (INT_PWRDETECT|INT_SYSERROR|INT_USBRESET|INT_SUSPEND)
47 (INT_SETUP|INT_ENDPOINT0|INT_STATUSNAK)
50 #define MST_EOPB_DIS 0x0800
51 #define MST_EOPB_ENA 0x0400
52 #define MST_TIMEOUT_DIS 0x0200
53 #define MST_TIMEOUT_ENA 0x0100
54 #define MST_RD_EOPB 0x0080
55 #define MST_RD_RESET 0x0040
56 #define MST_WR_RESET 0x0020
57 #define MST_RD_ENA 0x0004
58 #define MST_WR_ENA 0x0002
59 #define MST_CONNECTION 0x0001
61 #define MST_R_BITS (MST_EOPB_DIS|MST_EOPB_ENA \
62 |MST_RD_ENA|MST_RD_RESET)
63 #define MST_W_BITS (MST_TIMEOUT_DIS|MST_TIMEOUT_ENA \
64 |MST_WR_ENA|MST_WR_RESET)
65 #define MST_RW_BITS (MST_R_BITS|MST_W_BITS \
69 #define UDC_MSTWR_ENDPOINT 1
70 #define UDC_MSTRD_ENDPOINT 2
83 #define PW_DETECT 0x04
84 #define PW_RESETB 0x02
85 #define PW_PULLUP 0x01
96 #define EPxSTATUS_TOGGLE 0x40
97 #define EPxSTATUS_SUSPEND 0x20
98 #define EPxSTATUS_EP_MASK (0x07<<2)
99 # define EPxSTATUS_EP_READY (0<<2)
100 # define EPxSTATUS_EP_DATAIN (1<<2)
101 # define EPxSTATUS_EP_FULL (2<<2)
102 # define EPxSTATUS_EP_TX_ERR (3<<2)
103 # define EPxSTATUS_EP_RX_ERR (4<<2)
104 # define EPxSTATUS_EP_BUSY (5<<2)
105 # define EPxSTATUS_EP_STALL (6<<2)
106 # define EPxSTATUS_EP_INVALID (7<<2)
107 #define EPxSTATUS_FIFO_DISABLE 0x02
108 #define EPxSTATUS_STAGE_ERROR 0x01
112 #define PACKET_ACTIVE (1<<7)
113 #define DATASIZE 0x7f
138 #define DATASET_A(epnum) (1<<(2*(epnum)))
139 #define DATASET_B(epnum) (2<<(2*(epnum)))
140 #define DATASET_AB(epnum) (3<<(2*(epnum)))
144 #define USBSTATE_CONFIGURED 0x04
145 #define USBSTATE_ADDRESSED 0x02
146 #define USBSTATE_DEFAULT 0x01
151 #define COMMAND_SETDATA0 2
152 #define COMMAND_RESET 3
153 #define COMMAND_STALL 4
154 #define COMMAND_INVALID 5
155 #define COMMAND_FIFO_DISABLE 7
156 #define COMMAND_FIFO_ENABLE 8
157 #define COMMAND_INIT_DESCRIPTOR 9
158 #define COMMAND_FIFO_CLEAR 10
159 #define COMMAND_STALL_CLEAR 11
160 #define COMMAND_EP(n) ((n) << 4)
167 #define ICONTROL_STATUSNAK 1
171 #define G_REQMODE_SET_INTF (1<<7)
172 #define G_REQMODE_GET_INTF (1<<6)
173 #define G_REQMODE_SET_CONF (1<<5)
174 #define G_REQMODE_GET_CONF (1<<4)
175 #define G_REQMODE_GET_DESC (1<<3)
176 #define G_REQMODE_SET_FEAT (1<<2)
177 #define G_REQMODE_CLEAR_FEAT (1<<1)
178 #define G_REQMODE_GET_STATUS (1<<0)
193 #define DESC_LEN 0x80
199 #define MAX_FIFO_SIZE 64
200 #define MAX_EP0_SIZE 8
267 #define xprintk(dev,level,fmt,args...) \
268 printk(level "%s %s: " fmt , driver_name , \
269 pci_name(dev->pdev) , ## args)
272 #define DBG(dev,fmt,args...) \
273 xprintk(dev , KERN_DEBUG , fmt , ## args)
275 #define DBG(dev,fmt,args...) \
282 #define VDBG(dev,fmt,args...) \
286 #define ERROR(dev,fmt,args...) \
287 xprintk(dev , KERN_ERR , fmt , ## args)
288 #define WARNING(dev,fmt,args...) \
289 xprintk(dev , KERN_WARNING , fmt , ## args)
290 #define INFO(dev,fmt,args...) \
291 xprintk(dev , KERN_INFO , fmt , ## args)