diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-09-16 00:48:32 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-09-16 00:48:32 -0400 |
commit | ea88023b3491a384575ebcd5e8a449e841a28a24 (patch) | |
tree | f46e3d8302e44dc55ce31823501e100472d29683 /include/linux/usb | |
parent | a6f15ade97989d414e9bf33874c9d5d1f39808ec (diff) | |
parent | 0cb583fd2862f19ea88b02eb307d11c09e51e2f8 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/sh/kernel/vmlinux.lds.S
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/rndis_host.h | 13 | ||||
-rw-r--r-- | include/linux/usb/usbnet.h | 18 | ||||
-rw-r--r-- | include/linux/usb/video.h | 164 |
3 files changed, 185 insertions, 10 deletions
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h index 37836b937d97..1ef1ebc2b04f 100644 --- a/include/linux/usb/rndis_host.h +++ b/include/linux/usb/rndis_host.h | |||
@@ -70,12 +70,13 @@ struct rndis_msg_hdr { | |||
70 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) | 70 | #define RNDIS_MSG_KEEPALIVE_C (RNDIS_MSG_KEEPALIVE|RNDIS_MSG_COMPLETION) |
71 | 71 | ||
72 | /* codes for "status" field of completion messages */ | 72 | /* codes for "status" field of completion messages */ |
73 | #define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000) | 73 | #define RNDIS_STATUS_SUCCESS cpu_to_le32(0x00000000) |
74 | #define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001) | 74 | #define RNDIS_STATUS_FAILURE cpu_to_le32(0xc0000001) |
75 | #define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015) | 75 | #define RNDIS_STATUS_INVALID_DATA cpu_to_le32(0xc0010015) |
76 | #define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb) | 76 | #define RNDIS_STATUS_NOT_SUPPORTED cpu_to_le32(0xc00000bb) |
77 | #define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b) | 77 | #define RNDIS_STATUS_MEDIA_CONNECT cpu_to_le32(0x4001000b) |
78 | #define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c) | 78 | #define RNDIS_STATUS_MEDIA_DISCONNECT cpu_to_le32(0x4001000c) |
79 | #define RNDIS_STATUS_MEDIA_SPECIFIC_INDICATION cpu_to_le32(0x40010012) | ||
79 | 80 | ||
80 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ | 81 | /* codes for OID_GEN_PHYSICAL_MEDIUM */ |
81 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000) | 82 | #define RNDIS_PHYSICAL_MEDIUM_UNSPECIFIED cpu_to_le32(0x00000000) |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 310e18a880ff..bb69e256cd16 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -53,6 +53,7 @@ struct usbnet { | |||
53 | struct sk_buff_head rxq; | 53 | struct sk_buff_head rxq; |
54 | struct sk_buff_head txq; | 54 | struct sk_buff_head txq; |
55 | struct sk_buff_head done; | 55 | struct sk_buff_head done; |
56 | struct sk_buff_head rxq_pause; | ||
56 | struct urb *interrupt; | 57 | struct urb *interrupt; |
57 | struct tasklet_struct bh; | 58 | struct tasklet_struct bh; |
58 | 59 | ||
@@ -63,6 +64,7 @@ struct usbnet { | |||
63 | # define EVENT_RX_MEMORY 2 | 64 | # define EVENT_RX_MEMORY 2 |
64 | # define EVENT_STS_SPLIT 3 | 65 | # define EVENT_STS_SPLIT 3 |
65 | # define EVENT_LINK_RESET 4 | 66 | # define EVENT_LINK_RESET 4 |
67 | # define EVENT_RX_PAUSED 5 | ||
66 | }; | 68 | }; |
67 | 69 | ||
68 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 70 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
@@ -86,6 +88,7 @@ struct driver_info { | |||
86 | 88 | ||
87 | #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ | 89 | #define FLAG_FRAMING_AX 0x0040 /* AX88772/178 packets */ |
88 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ | 90 | #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ |
91 | #define FLAG_AVOID_UNLINK_URBS 0x0100 /* don't unlink urbs at usbnet_stop() */ | ||
89 | 92 | ||
90 | 93 | ||
91 | /* init device ... can sleep, or cause probe() failure */ | 94 | /* init device ... can sleep, or cause probe() failure */ |
@@ -97,6 +100,9 @@ struct driver_info { | |||
97 | /* reset device ... can sleep */ | 100 | /* reset device ... can sleep */ |
98 | int (*reset)(struct usbnet *); | 101 | int (*reset)(struct usbnet *); |
99 | 102 | ||
103 | /* stop device ... can sleep */ | ||
104 | int (*stop)(struct usbnet *); | ||
105 | |||
100 | /* see if peer is connected ... can sleep */ | 106 | /* see if peer is connected ... can sleep */ |
101 | int (*check_connect)(struct usbnet *); | 107 | int (*check_connect)(struct usbnet *); |
102 | 108 | ||
@@ -118,9 +124,8 @@ struct driver_info { | |||
118 | * right after minidriver have initialized hardware. */ | 124 | * right after minidriver have initialized hardware. */ |
119 | int (*early_init)(struct usbnet *dev); | 125 | int (*early_init)(struct usbnet *dev); |
120 | 126 | ||
121 | /* called by minidriver when link state changes, state: 0=disconnect, | 127 | /* called by minidriver when receiving indication */ |
122 | * 1=connect */ | 128 | void (*indication)(struct usbnet *dev, void *ind, int indlen); |
123 | void (*link_change)(struct usbnet *dev, int state); | ||
124 | 129 | ||
125 | /* for new devices, use the descriptor-reading code instead */ | 130 | /* for new devices, use the descriptor-reading code instead */ |
126 | int in; /* rx endpoint */ | 131 | int in; /* rx endpoint */ |
@@ -177,7 +182,8 @@ struct skb_data { /* skb->cb is one of these */ | |||
177 | 182 | ||
178 | extern int usbnet_open (struct net_device *net); | 183 | extern int usbnet_open (struct net_device *net); |
179 | extern int usbnet_stop (struct net_device *net); | 184 | extern int usbnet_stop (struct net_device *net); |
180 | extern int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net); | 185 | extern netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, |
186 | struct net_device *net); | ||
181 | extern void usbnet_tx_timeout (struct net_device *net); | 187 | extern void usbnet_tx_timeout (struct net_device *net); |
182 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); | 188 | extern int usbnet_change_mtu (struct net_device *net, int new_mtu); |
183 | 189 | ||
@@ -187,6 +193,10 @@ extern void usbnet_defer_kevent (struct usbnet *, int); | |||
187 | extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); | 193 | extern void usbnet_skb_return (struct usbnet *, struct sk_buff *); |
188 | extern void usbnet_unlink_rx_urbs(struct usbnet *); | 194 | extern void usbnet_unlink_rx_urbs(struct usbnet *); |
189 | 195 | ||
196 | extern void usbnet_pause_rx(struct usbnet *); | ||
197 | extern void usbnet_resume_rx(struct usbnet *); | ||
198 | extern void usbnet_purge_paused_rxq(struct usbnet *); | ||
199 | |||
190 | extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd); | 200 | extern int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd); |
191 | extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd); | 201 | extern int usbnet_set_settings (struct net_device *net, struct ethtool_cmd *cmd); |
192 | extern u32 usbnet_get_link (struct net_device *net); | 202 | extern u32 usbnet_get_link (struct net_device *net); |
diff --git a/include/linux/usb/video.h b/include/linux/usb/video.h new file mode 100644 index 000000000000..be436d9ee479 --- /dev/null +++ b/include/linux/usb/video.h | |||
@@ -0,0 +1,164 @@ | |||
1 | /* | ||
2 | * USB Video Class definitions. | ||
3 | * | ||
4 | * Copyright (C) 2009 Laurent Pinchart <laurent.pinchart@skynet.be> | ||
5 | * | ||
6 | * This file holds USB constants and structures defined by the USB Device | ||
7 | * Class Definition for Video Devices. Unless otherwise stated, comments | ||
8 | * below reference relevant sections of the USB Video Class 1.1 specification | ||
9 | * available at | ||
10 | * | ||
11 | * http://www.usb.org/developers/devclass_docs/USB_Video_Class_1_1.zip | ||
12 | */ | ||
13 | |||
14 | #ifndef __LINUX_USB_VIDEO_H | ||
15 | #define __LINUX_USB_VIDEO_H | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | |||
19 | /* -------------------------------------------------------------------------- | ||
20 | * UVC constants | ||
21 | */ | ||
22 | |||
23 | /* A.2. Video Interface Subclass Codes */ | ||
24 | #define UVC_SC_UNDEFINED 0x00 | ||
25 | #define UVC_SC_VIDEOCONTROL 0x01 | ||
26 | #define UVC_SC_VIDEOSTREAMING 0x02 | ||
27 | #define UVC_SC_VIDEO_INTERFACE_COLLECTION 0x03 | ||
28 | |||
29 | /* A.3. Video Interface Protocol Codes */ | ||
30 | #define UVC_PC_PROTOCOL_UNDEFINED 0x00 | ||
31 | |||
32 | /* A.5. Video Class-Specific VC Interface Descriptor Subtypes */ | ||
33 | #define UVC_VC_DESCRIPTOR_UNDEFINED 0x00 | ||
34 | #define UVC_VC_HEADER 0x01 | ||
35 | #define UVC_VC_INPUT_TERMINAL 0x02 | ||
36 | #define UVC_VC_OUTPUT_TERMINAL 0x03 | ||
37 | #define UVC_VC_SELECTOR_UNIT 0x04 | ||
38 | #define UVC_VC_PROCESSING_UNIT 0x05 | ||
39 | #define UVC_VC_EXTENSION_UNIT 0x06 | ||
40 | |||
41 | /* A.6. Video Class-Specific VS Interface Descriptor Subtypes */ | ||
42 | #define UVC_VS_UNDEFINED 0x00 | ||
43 | #define UVC_VS_INPUT_HEADER 0x01 | ||
44 | #define UVC_VS_OUTPUT_HEADER 0x02 | ||
45 | #define UVC_VS_STILL_IMAGE_FRAME 0x03 | ||
46 | #define UVC_VS_FORMAT_UNCOMPRESSED 0x04 | ||
47 | #define UVC_VS_FRAME_UNCOMPRESSED 0x05 | ||
48 | #define UVC_VS_FORMAT_MJPEG 0x06 | ||
49 | #define UVC_VS_FRAME_MJPEG 0x07 | ||
50 | #define UVC_VS_FORMAT_MPEG2TS 0x0a | ||
51 | #define UVC_VS_FORMAT_DV 0x0c | ||
52 | #define UVC_VS_COLORFORMAT 0x0d | ||
53 | #define UVC_VS_FORMAT_FRAME_BASED 0x10 | ||
54 | #define UVC_VS_FRAME_FRAME_BASED 0x11 | ||
55 | #define UVC_VS_FORMAT_STREAM_BASED 0x12 | ||
56 | |||
57 | /* A.7. Video Class-Specific Endpoint Descriptor Subtypes */ | ||
58 | #define UVC_EP_UNDEFINED 0x00 | ||
59 | #define UVC_EP_GENERAL 0x01 | ||
60 | #define UVC_EP_ENDPOINT 0x02 | ||
61 | #define UVC_EP_INTERRUPT 0x03 | ||
62 | |||
63 | /* A.8. Video Class-Specific Request Codes */ | ||
64 | #define UVC_RC_UNDEFINED 0x00 | ||
65 | #define UVC_SET_CUR 0x01 | ||
66 | #define UVC_GET_CUR 0x81 | ||
67 | #define UVC_GET_MIN 0x82 | ||
68 | #define UVC_GET_MAX 0x83 | ||
69 | #define UVC_GET_RES 0x84 | ||
70 | #define UVC_GET_LEN 0x85 | ||
71 | #define UVC_GET_INFO 0x86 | ||
72 | #define UVC_GET_DEF 0x87 | ||
73 | |||
74 | /* A.9.1. VideoControl Interface Control Selectors */ | ||
75 | #define UVC_VC_CONTROL_UNDEFINED 0x00 | ||
76 | #define UVC_VC_VIDEO_POWER_MODE_CONTROL 0x01 | ||
77 | #define UVC_VC_REQUEST_ERROR_CODE_CONTROL 0x02 | ||
78 | |||
79 | /* A.9.2. Terminal Control Selectors */ | ||
80 | #define UVC_TE_CONTROL_UNDEFINED 0x00 | ||
81 | |||
82 | /* A.9.3. Selector Unit Control Selectors */ | ||
83 | #define UVC_SU_CONTROL_UNDEFINED 0x00 | ||
84 | #define UVC_SU_INPUT_SELECT_CONTROL 0x01 | ||
85 | |||
86 | /* A.9.4. Camera Terminal Control Selectors */ | ||
87 | #define UVC_CT_CONTROL_UNDEFINED 0x00 | ||
88 | #define UVC_CT_SCANNING_MODE_CONTROL 0x01 | ||
89 | #define UVC_CT_AE_MODE_CONTROL 0x02 | ||
90 | #define UVC_CT_AE_PRIORITY_CONTROL 0x03 | ||
91 | #define UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04 | ||
92 | #define UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05 | ||
93 | #define UVC_CT_FOCUS_ABSOLUTE_CONTROL 0x06 | ||
94 | #define UVC_CT_FOCUS_RELATIVE_CONTROL 0x07 | ||
95 | #define UVC_CT_FOCUS_AUTO_CONTROL 0x08 | ||
96 | #define UVC_CT_IRIS_ABSOLUTE_CONTROL 0x09 | ||
97 | #define UVC_CT_IRIS_RELATIVE_CONTROL 0x0a | ||
98 | #define UVC_CT_ZOOM_ABSOLUTE_CONTROL 0x0b | ||
99 | #define UVC_CT_ZOOM_RELATIVE_CONTROL 0x0c | ||
100 | #define UVC_CT_PANTILT_ABSOLUTE_CONTROL 0x0d | ||
101 | #define UVC_CT_PANTILT_RELATIVE_CONTROL 0x0e | ||
102 | #define UVC_CT_ROLL_ABSOLUTE_CONTROL 0x0f | ||
103 | #define UVC_CT_ROLL_RELATIVE_CONTROL 0x10 | ||
104 | #define UVC_CT_PRIVACY_CONTROL 0x11 | ||
105 | |||
106 | /* A.9.5. Processing Unit Control Selectors */ | ||
107 | #define UVC_PU_CONTROL_UNDEFINED 0x00 | ||
108 | #define UVC_PU_BACKLIGHT_COMPENSATION_CONTROL 0x01 | ||
109 | #define UVC_PU_BRIGHTNESS_CONTROL 0x02 | ||
110 | #define UVC_PU_CONTRAST_CONTROL 0x03 | ||
111 | #define UVC_PU_GAIN_CONTROL 0x04 | ||
112 | #define UVC_PU_POWER_LINE_FREQUENCY_CONTROL 0x05 | ||
113 | #define UVC_PU_HUE_CONTROL 0x06 | ||
114 | #define UVC_PU_SATURATION_CONTROL 0x07 | ||
115 | #define UVC_PU_SHARPNESS_CONTROL 0x08 | ||
116 | #define UVC_PU_GAMMA_CONTROL 0x09 | ||
117 | #define UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a | ||
118 | #define UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b | ||
119 | #define UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c | ||
120 | #define UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d | ||
121 | #define UVC_PU_DIGITAL_MULTIPLIER_CONTROL 0x0e | ||
122 | #define UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f | ||
123 | #define UVC_PU_HUE_AUTO_CONTROL 0x10 | ||
124 | #define UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11 | ||
125 | #define UVC_PU_ANALOG_LOCK_STATUS_CONTROL 0x12 | ||
126 | |||
127 | /* A.9.7. VideoStreaming Interface Control Selectors */ | ||
128 | #define UVC_VS_CONTROL_UNDEFINED 0x00 | ||
129 | #define UVC_VS_PROBE_CONTROL 0x01 | ||
130 | #define UVC_VS_COMMIT_CONTROL 0x02 | ||
131 | #define UVC_VS_STILL_PROBE_CONTROL 0x03 | ||
132 | #define UVC_VS_STILL_COMMIT_CONTROL 0x04 | ||
133 | #define UVC_VS_STILL_IMAGE_TRIGGER_CONTROL 0x05 | ||
134 | #define UVC_VS_STREAM_ERROR_CODE_CONTROL 0x06 | ||
135 | #define UVC_VS_GENERATE_KEY_FRAME_CONTROL 0x07 | ||
136 | #define UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08 | ||
137 | #define UVC_VS_SYNC_DELAY_CONTROL 0x09 | ||
138 | |||
139 | /* B.1. USB Terminal Types */ | ||
140 | #define UVC_TT_VENDOR_SPECIFIC 0x0100 | ||
141 | #define UVC_TT_STREAMING 0x0101 | ||
142 | |||
143 | /* B.2. Input Terminal Types */ | ||
144 | #define UVC_ITT_VENDOR_SPECIFIC 0x0200 | ||
145 | #define UVC_ITT_CAMERA 0x0201 | ||
146 | #define UVC_ITT_MEDIA_TRANSPORT_INPUT 0x0202 | ||
147 | |||
148 | /* B.3. Output Terminal Types */ | ||
149 | #define UVC_OTT_VENDOR_SPECIFIC 0x0300 | ||
150 | #define UVC_OTT_DISPLAY 0x0301 | ||
151 | #define UVC_OTT_MEDIA_TRANSPORT_OUTPUT 0x0302 | ||
152 | |||
153 | /* B.4. External Terminal Types */ | ||
154 | #define UVC_EXTERNAL_VENDOR_SPECIFIC 0x0400 | ||
155 | #define UVC_COMPOSITE_CONNECTOR 0x0401 | ||
156 | #define UVC_SVIDEO_CONNECTOR 0x0402 | ||
157 | #define UVC_COMPONENT_CONNECTOR 0x0403 | ||
158 | |||
159 | /* 2.4.2.2. Status Packet Type */ | ||
160 | #define UVC_STATUS_TYPE_CONTROL 1 | ||
161 | #define UVC_STATUS_TYPE_STREAMING 2 | ||
162 | |||
163 | #endif /* __LINUX_USB_VIDEO_H */ | ||
164 | |||