aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/ch11.h41
-rw-r--r--include/linux/usb/ch9.h22
-rw-r--r--include/linux/usb/gadget.h26
-rw-r--r--include/linux/usb/hcd.h2
-rw-r--r--include/linux/usb/langwell_otg.h139
-rw-r--r--include/linux/usb/renesas_usbhs.h10
-rw-r--r--include/linux/usb/serial.h11
7 files changed, 82 insertions, 169 deletions
diff --git a/include/linux/usb/ch11.h b/include/linux/usb/ch11.h
index 4ebaf0824179..0b83acd3360a 100644
--- a/include/linux/usb/ch11.h
+++ b/include/linux/usb/ch11.h
@@ -26,7 +26,6 @@
26#define HUB_RESET_TT 9 26#define HUB_RESET_TT 9
27#define HUB_GET_TT_STATE 10 27#define HUB_GET_TT_STATE 10
28#define HUB_STOP_TT 11 28#define HUB_STOP_TT 11
29#define HUB_SET_DEPTH 12
30 29
31/* 30/*
32 * Hub class additional requests defined by USB 3.0 spec 31 * Hub class additional requests defined by USB 3.0 spec
@@ -62,12 +61,6 @@
62#define USB_PORT_FEAT_TEST 21 61#define USB_PORT_FEAT_TEST 21
63#define USB_PORT_FEAT_INDICATOR 22 62#define USB_PORT_FEAT_INDICATOR 22
64#define USB_PORT_FEAT_C_PORT_L1 23 63#define USB_PORT_FEAT_C_PORT_L1 23
65#define USB_PORT_FEAT_C_PORT_LINK_STATE 25
66#define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26
67#define USB_PORT_FEAT_PORT_REMOTE_WAKE_MASK 27
68#define USB_PORT_FEAT_BH_PORT_RESET 28
69#define USB_PORT_FEAT_C_BH_PORT_RESET 29
70#define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30
71 64
72/* 65/*
73 * Port feature selectors added by USB 3.0 spec. 66 * Port feature selectors added by USB 3.0 spec.
@@ -76,8 +69,8 @@
76#define USB_PORT_FEAT_LINK_STATE 5 69#define USB_PORT_FEAT_LINK_STATE 5
77#define USB_PORT_FEAT_U1_TIMEOUT 23 70#define USB_PORT_FEAT_U1_TIMEOUT 23
78#define USB_PORT_FEAT_U2_TIMEOUT 24 71#define USB_PORT_FEAT_U2_TIMEOUT 24
79#define USB_PORT_FEAT_C_LINK_STATE 25 72#define USB_PORT_FEAT_C_PORT_LINK_STATE 25
80#define USB_PORT_FEAT_C_CONFIG_ERR 26 73#define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26
81#define USB_PORT_FEAT_REMOTE_WAKE_MASK 27 74#define USB_PORT_FEAT_REMOTE_WAKE_MASK 27
82#define USB_PORT_FEAT_BH_PORT_RESET 28 75#define USB_PORT_FEAT_BH_PORT_RESET 28
83#define USB_PORT_FEAT_C_BH_PORT_RESET 29 76#define USB_PORT_FEAT_C_BH_PORT_RESET 29
@@ -165,11 +158,20 @@ struct usb_port_status {
165 * wHubCharacteristics (masks) 158 * wHubCharacteristics (masks)
166 * See USB 2.0 spec Table 11-13, offset 3 159 * See USB 2.0 spec Table 11-13, offset 3
167 */ 160 */
168#define HUB_CHAR_LPSM 0x0003 /* D1 .. D0 */ 161#define HUB_CHAR_LPSM 0x0003 /* Logical Power Switching Mode mask */
169#define HUB_CHAR_COMPOUND 0x0004 /* D2 */ 162#define HUB_CHAR_COMMON_LPSM 0x0000 /* All ports power control at once */
170#define HUB_CHAR_OCPM 0x0018 /* D4 .. D3 */ 163#define HUB_CHAR_INDV_PORT_LPSM 0x0001 /* per-port power control */
171#define HUB_CHAR_TTTT 0x0060 /* D6 .. D5 */ 164#define HUB_CHAR_NO_LPSM 0x0002 /* no power switching */
172#define HUB_CHAR_PORTIND 0x0080 /* D7 */ 165
166#define HUB_CHAR_COMPOUND 0x0004 /* hub is part of a compound device */
167
168#define HUB_CHAR_OCPM 0x0018 /* Over-Current Protection Mode mask */
169#define HUB_CHAR_COMMON_OCPM 0x0000 /* All ports Over-Current reporting */
170#define HUB_CHAR_INDV_PORT_OCPM 0x0008 /* per-port Over-current reporting */
171#define HUB_CHAR_NO_OCPM 0x0010 /* No Over-current Protection support */
172
173#define HUB_CHAR_TTTT 0x0060 /* TT Think Time mask */
174#define HUB_CHAR_PORTIND 0x0080 /* per-port indicators (LEDs) */
173 175
174struct usb_hub_status { 176struct usb_hub_status {
175 __le16 wHubStatus; 177 __le16 wHubStatus;
@@ -198,6 +200,17 @@ struct usb_hub_status {
198#define USB_DT_HUB_NONVAR_SIZE 7 200#define USB_DT_HUB_NONVAR_SIZE 7
199#define USB_DT_SS_HUB_SIZE 12 201#define USB_DT_SS_HUB_SIZE 12
200 202
203/*
204 * Hub Device descriptor
205 * USB Hub class device protocols
206 */
207
208#define USB_HUB_PR_FS 0 /* Full speed hub */
209#define USB_HUB_PR_HS_NO_TT 0 /* Hi-speed hub without TT */
210#define USB_HUB_PR_HS_SINGLE_TT 1 /* Hi-speed hub with single TT */
211#define USB_HUB_PR_HS_MULTI_TT 2 /* Hi-speed hub with multiple TT */
212#define USB_HUB_PR_SS 3 /* Super speed hub */
213
201struct usb_hub_descriptor { 214struct usb_hub_descriptor {
202 __u8 bDescLength; 215 __u8 bDescLength;
203 __u8 bDescriptorType; 216 __u8 bDescriptorType;
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index d5da6c68c250..3b6f628880f8 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -589,7 +589,7 @@ static inline int usb_endpoint_is_isoc_out(
589 */ 589 */
590static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd) 590static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd)
591{ 591{
592 return le16_to_cpu(epd->wMaxPacketSize); 592 return __le16_to_cpu(epd->wMaxPacketSize);
593} 593}
594 594
595/*-------------------------------------------------------------------------*/ 595/*-------------------------------------------------------------------------*/
@@ -605,8 +605,26 @@ struct usb_ss_ep_comp_descriptor {
605} __attribute__ ((packed)); 605} __attribute__ ((packed));
606 606
607#define USB_DT_SS_EP_COMP_SIZE 6 607#define USB_DT_SS_EP_COMP_SIZE 6
608
608/* Bits 4:0 of bmAttributes if this is a bulk endpoint */ 609/* Bits 4:0 of bmAttributes if this is a bulk endpoint */
609#define USB_SS_MAX_STREAMS(p) (1 << ((p) & 0x1f)) 610static inline int
611usb_ss_max_streams(const struct usb_ss_ep_comp_descriptor *comp)
612{
613 int max_streams;
614
615 if (!comp)
616 return 0;
617
618 max_streams = comp->bmAttributes & 0x1f;
619
620 if (!max_streams)
621 return 0;
622
623 max_streams = 1 << max_streams;
624
625 return max_streams;
626}
627
610/* Bits 1:0 of bmAttributes if this is an isoc endpoint */ 628/* Bits 1:0 of bmAttributes if this is an isoc endpoint */
611#define USB_SS_MULT(p) (1 + ((p) & 0x3)) 629#define USB_SS_MULT(p) (1 + ((p) & 0x3))
612 630
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 1d3a67523ffc..da653b5c7134 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -20,6 +20,7 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/scatterlist.h>
23#include <linux/types.h> 24#include <linux/types.h>
24#include <linux/usb/ch9.h> 25#include <linux/usb/ch9.h>
25 26
@@ -32,6 +33,9 @@ struct usb_ep;
32 * @dma: DMA address corresponding to 'buf'. If you don't set this 33 * @dma: DMA address corresponding to 'buf'. If you don't set this
33 * field, and the usb controller needs one, it is responsible 34 * field, and the usb controller needs one, it is responsible
34 * for mapping and unmapping the buffer. 35 * for mapping and unmapping the buffer.
36 * @sg: a scatterlist for SG-capable controllers.
37 * @num_sgs: number of SG entries
38 * @num_mapped_sgs: number of SG entries mapped to DMA (internal)
35 * @length: Length of that data 39 * @length: Length of that data
36 * @stream_id: The stream id, when USB3.0 bulk streams are being used 40 * @stream_id: The stream id, when USB3.0 bulk streams are being used
37 * @no_interrupt: If true, hints that no completion irq is needed. 41 * @no_interrupt: If true, hints that no completion irq is needed.
@@ -88,6 +92,10 @@ struct usb_request {
88 unsigned length; 92 unsigned length;
89 dma_addr_t dma; 93 dma_addr_t dma;
90 94
95 struct scatterlist *sg;
96 unsigned num_sgs;
97 unsigned num_mapped_sgs;
98
91 unsigned stream_id:16; 99 unsigned stream_id:16;
92 unsigned no_interrupt:1; 100 unsigned no_interrupt:1;
93 unsigned zero:1; 101 unsigned zero:1;
@@ -164,7 +172,7 @@ struct usb_ep {
164 unsigned maxpacket:16; 172 unsigned maxpacket:16;
165 unsigned max_streams:16; 173 unsigned max_streams:16;
166 unsigned mult:2; 174 unsigned mult:2;
167 unsigned maxburst:4; 175 unsigned maxburst:5;
168 u8 address; 176 u8 address;
169 const struct usb_endpoint_descriptor *desc; 177 const struct usb_endpoint_descriptor *desc;
170 const struct usb_ss_ep_comp_descriptor *comp_desc; 178 const struct usb_ss_ep_comp_descriptor *comp_desc;
@@ -477,8 +485,9 @@ struct usb_gadget_ops {
477 * driver setup() requests 485 * driver setup() requests
478 * @ep_list: List of other endpoints supported by the device. 486 * @ep_list: List of other endpoints supported by the device.
479 * @speed: Speed of current connection to USB host. 487 * @speed: Speed of current connection to USB host.
480 * @is_dualspeed: True if the controller supports both high and full speed 488 * @max_speed: Maximal speed the UDC can handle. UDC must support this
481 * operation. If it does, the gadget driver must also support both. 489 * and all slower speeds.
490 * @sg_supported: true if we can handle scatter-gather
482 * @is_otg: True if the USB device port uses a Mini-AB jack, so that the 491 * @is_otg: True if the USB device port uses a Mini-AB jack, so that the
483 * gadget driver must provide a USB OTG descriptor. 492 * gadget driver must provide a USB OTG descriptor.
484 * @is_a_peripheral: False unless is_otg, the "A" end of a USB cable 493 * @is_a_peripheral: False unless is_otg, the "A" end of a USB cable
@@ -518,7 +527,8 @@ struct usb_gadget {
518 struct usb_ep *ep0; 527 struct usb_ep *ep0;
519 struct list_head ep_list; /* of usb_ep */ 528 struct list_head ep_list; /* of usb_ep */
520 enum usb_device_speed speed; 529 enum usb_device_speed speed;
521 unsigned is_dualspeed:1; 530 enum usb_device_speed max_speed;
531 unsigned sg_supported:1;
522 unsigned is_otg:1; 532 unsigned is_otg:1;
523 unsigned is_a_peripheral:1; 533 unsigned is_a_peripheral:1;
524 unsigned b_hnp_enable:1; 534 unsigned b_hnp_enable:1;
@@ -549,7 +559,7 @@ static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev)
549static inline int gadget_is_dualspeed(struct usb_gadget *g) 559static inline int gadget_is_dualspeed(struct usb_gadget *g)
550{ 560{
551#ifdef CONFIG_USB_GADGET_DUALSPEED 561#ifdef CONFIG_USB_GADGET_DUALSPEED
552 /* runtime test would check "g->is_dualspeed" ... that might be 562 /* runtime test would check "g->max_speed" ... that might be
553 * useful to work around hardware bugs, but is mostly pointless 563 * useful to work around hardware bugs, but is mostly pointless
554 */ 564 */
555 return 1; 565 return 1;
@@ -567,7 +577,7 @@ static inline int gadget_is_superspeed(struct usb_gadget *g)
567{ 577{
568#ifdef CONFIG_USB_GADGET_SUPERSPEED 578#ifdef CONFIG_USB_GADGET_SUPERSPEED
569 /* 579 /*
570 * runtime test would check "g->is_superspeed" ... that might be 580 * runtime test would check "g->max_speed" ... that might be
571 * useful to work around hardware bugs, but is mostly pointless 581 * useful to work around hardware bugs, but is mostly pointless
572 */ 582 */
573 return 1; 583 return 1;
@@ -760,7 +770,7 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget)
760/** 770/**
761 * struct usb_gadget_driver - driver for usb 'slave' devices 771 * struct usb_gadget_driver - driver for usb 'slave' devices
762 * @function: String describing the gadget's function 772 * @function: String describing the gadget's function
763 * @speed: Highest speed the driver handles. 773 * @max_speed: Highest speed the driver handles.
764 * @setup: Invoked for ep0 control requests that aren't handled by 774 * @setup: Invoked for ep0 control requests that aren't handled by
765 * the hardware level driver. Most calls must be handled by 775 * the hardware level driver. Most calls must be handled by
766 * the gadget driver, including descriptor and configuration 776 * the gadget driver, including descriptor and configuration
@@ -824,7 +834,7 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget)
824 */ 834 */
825struct usb_gadget_driver { 835struct usb_gadget_driver {
826 char *function; 836 char *function;
827 enum usb_device_speed speed; 837 enum usb_device_speed max_speed;
828 void (*unbind)(struct usb_gadget *); 838 void (*unbind)(struct usb_gadget *);
829 int (*setup)(struct usb_gadget *, 839 int (*setup)(struct usb_gadget *,
830 const struct usb_ctrlrequest *); 840 const struct usb_ctrlrequest *);
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 03354d557b79..b2f62f3a32af 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -99,7 +99,6 @@ struct usb_hcd {
99 */ 99 */
100 unsigned long flags; 100 unsigned long flags;
101#define HCD_FLAG_HW_ACCESSIBLE 0 /* at full power */ 101#define HCD_FLAG_HW_ACCESSIBLE 0 /* at full power */
102#define HCD_FLAG_SAW_IRQ 1
103#define HCD_FLAG_POLL_RH 2 /* poll for rh status? */ 102#define HCD_FLAG_POLL_RH 2 /* poll for rh status? */
104#define HCD_FLAG_POLL_PENDING 3 /* status has changed? */ 103#define HCD_FLAG_POLL_PENDING 3 /* status has changed? */
105#define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */ 104#define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */
@@ -110,7 +109,6 @@ struct usb_hcd {
110 * be slightly faster than test_bit(). 109 * be slightly faster than test_bit().
111 */ 110 */
112#define HCD_HW_ACCESSIBLE(hcd) ((hcd)->flags & (1U << HCD_FLAG_HW_ACCESSIBLE)) 111#define HCD_HW_ACCESSIBLE(hcd) ((hcd)->flags & (1U << HCD_FLAG_HW_ACCESSIBLE))
113#define HCD_SAW_IRQ(hcd) ((hcd)->flags & (1U << HCD_FLAG_SAW_IRQ))
114#define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH)) 112#define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH))
115#define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING)) 113#define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING))
116#define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING)) 114#define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING))
diff --git a/include/linux/usb/langwell_otg.h b/include/linux/usb/langwell_otg.h
deleted file mode 100644
index 51f17b16d312..000000000000
--- a/include/linux/usb/langwell_otg.h
+++ /dev/null
@@ -1,139 +0,0 @@
1/*
2 * Intel Langwell USB OTG transceiver driver
3 * Copyright (C) 2008 - 2010, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 */
19
20#ifndef __LANGWELL_OTG_H
21#define __LANGWELL_OTG_H
22
23#include <linux/usb/intel_mid_otg.h>
24
25#define CI_USBCMD 0x30
26# define USBCMD_RST BIT(1)
27# define USBCMD_RS BIT(0)
28#define CI_USBSTS 0x34
29# define USBSTS_SLI BIT(8)
30# define USBSTS_URI BIT(6)
31# define USBSTS_PCI BIT(2)
32#define CI_PORTSC1 0x74
33# define PORTSC_PP BIT(12)
34# define PORTSC_LS (BIT(11) | BIT(10))
35# define PORTSC_SUSP BIT(7)
36# define PORTSC_CCS BIT(0)
37#define CI_HOSTPC1 0xb4
38# define HOSTPC1_PHCD BIT(22)
39#define CI_OTGSC 0xf4
40# define OTGSC_DPIE BIT(30)
41# define OTGSC_1MSE BIT(29)
42# define OTGSC_BSEIE BIT(28)
43# define OTGSC_BSVIE BIT(27)
44# define OTGSC_ASVIE BIT(26)
45# define OTGSC_AVVIE BIT(25)
46# define OTGSC_IDIE BIT(24)
47# define OTGSC_DPIS BIT(22)
48# define OTGSC_1MSS BIT(21)
49# define OTGSC_BSEIS BIT(20)
50# define OTGSC_BSVIS BIT(19)
51# define OTGSC_ASVIS BIT(18)
52# define OTGSC_AVVIS BIT(17)
53# define OTGSC_IDIS BIT(16)
54# define OTGSC_DPS BIT(14)
55# define OTGSC_1MST BIT(13)
56# define OTGSC_BSE BIT(12)
57# define OTGSC_BSV BIT(11)
58# define OTGSC_ASV BIT(10)
59# define OTGSC_AVV BIT(9)
60# define OTGSC_ID BIT(8)
61# define OTGSC_HABA BIT(7)
62# define OTGSC_HADP BIT(6)
63# define OTGSC_IDPU BIT(5)
64# define OTGSC_DP BIT(4)
65# define OTGSC_OT BIT(3)
66# define OTGSC_HAAR BIT(2)
67# define OTGSC_VC BIT(1)
68# define OTGSC_VD BIT(0)
69# define OTGSC_INTEN_MASK (0x7f << 24)
70# define OTGSC_INT_MASK (0x5f << 24)
71# define OTGSC_INTSTS_MASK (0x7f << 16)
72#define CI_USBMODE 0xf8
73# define USBMODE_CM (BIT(1) | BIT(0))
74# define USBMODE_IDLE 0
75# define USBMODE_DEVICE 0x2
76# define USBMODE_HOST 0x3
77#define USBCFG_ADDR 0xff10801c
78#define USBCFG_LEN 4
79# define USBCFG_VBUSVAL BIT(14)
80# define USBCFG_AVALID BIT(13)
81# define USBCFG_BVALID BIT(12)
82# define USBCFG_SESEND BIT(11)
83
84#define INTR_DUMMY_MASK (USBSTS_SLI | USBSTS_URI | USBSTS_PCI)
85
86enum langwell_otg_timer_type {
87 TA_WAIT_VRISE_TMR,
88 TA_WAIT_BCON_TMR,
89 TA_AIDL_BDIS_TMR,
90 TB_ASE0_BRST_TMR,
91 TB_SE0_SRP_TMR,
92 TB_SRP_INIT_TMR,
93 TB_SRP_FAIL_TMR,
94 TB_BUS_SUSPEND_TMR
95};
96
97#define TA_WAIT_VRISE 100
98#define TA_WAIT_BCON 30000
99#define TA_AIDL_BDIS 15000
100#define TB_ASE0_BRST 5000
101#define TB_SE0_SRP 2
102#define TB_SRP_INIT 100
103#define TB_SRP_FAIL 5500
104#define TB_BUS_SUSPEND 500
105
106struct langwell_otg_timer {
107 unsigned long expires; /* Number of count increase to timeout */
108 unsigned long count; /* Tick counter */
109 void (*function)(unsigned long); /* Timeout function */
110 unsigned long data; /* Data passed to function */
111 struct list_head list;
112};
113
114struct langwell_otg {
115 struct intel_mid_otg_xceiv iotg;
116 struct device *dev;
117
118 void __iomem *usbcfg; /* SCCBUSB config Reg */
119
120 unsigned region;
121 unsigned cfg_region;
122
123 struct work_struct work;
124 struct workqueue_struct *qwork;
125 struct timer_list hsm_timer;
126
127 spinlock_t lock;
128 spinlock_t wq_lock;
129
130 struct notifier_block iotg_notifier;
131};
132
133static inline
134struct langwell_otg *mid_xceiv_to_lnw(struct intel_mid_otg_xceiv *iotg)
135{
136 return container_of(iotg, struct langwell_otg, iotg);
137}
138
139#endif /* __LANGWELL_OTG_H__ */
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
index e5a40c318548..0d3f98879256 100644
--- a/include/linux/usb/renesas_usbhs.h
+++ b/include/linux/usb/renesas_usbhs.h
@@ -67,6 +67,14 @@ struct renesas_usbhs_platform_callback {
67 /* 67 /*
68 * option: 68 * option:
69 * 69 *
70 * for board specific clock control
71 */
72 void (*power_ctrl)(struct platform_device *pdev,
73 void __iomem *base, int enable);
74
75 /*
76 * option:
77 *
70 * Phy reset for platform 78 * Phy reset for platform
71 */ 79 */
72 void (*phy_reset)(struct platform_device *pdev); 80 void (*phy_reset)(struct platform_device *pdev);
@@ -118,7 +126,7 @@ struct renesas_usbhs_driver_param {
118 * 126 *
119 * delay time from notify_hotplug callback 127 * delay time from notify_hotplug callback
120 */ 128 */
121 int detection_delay; 129 int detection_delay; /* msec */
122 130
123 /* 131 /*
124 * option: 132 * option:
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index b29f70b2ecae..4267a9c717ba 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -58,11 +58,13 @@ enum port_dev_state {
58 * @read_urb: pointer to the bulk in struct urb for this port. 58 * @read_urb: pointer to the bulk in struct urb for this port.
59 * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this 59 * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
60 * port. 60 * port.
61 * @bulk_in_buffers: pointers to the bulk in buffers for this port
62 * @read_urbs: pointers to the bulk in urbs for this port
63 * @read_urbs_free: status bitmap the for bulk in urbs
61 * @bulk_out_buffer: pointer to the bulk out buffer for this port. 64 * @bulk_out_buffer: pointer to the bulk out buffer for this port.
62 * @bulk_out_size: the size of the bulk_out_buffer, in bytes. 65 * @bulk_out_size: the size of the bulk_out_buffer, in bytes.
63 * @write_urb: pointer to the bulk out struct urb for this port. 66 * @write_urb: pointer to the bulk out struct urb for this port.
64 * @write_fifo: kfifo used to buffer outgoing data 67 * @write_fifo: kfifo used to buffer outgoing data
65 * @write_urb_busy: port`s writing status
66 * @bulk_out_buffers: pointers to the bulk out buffers for this port 68 * @bulk_out_buffers: pointers to the bulk out buffers for this port
67 * @write_urbs: pointers to the bulk out urbs for this port 69 * @write_urbs: pointers to the bulk out urbs for this port
68 * @write_urbs_free: status bitmap the for bulk out urbs 70 * @write_urbs_free: status bitmap the for bulk out urbs
@@ -99,11 +101,14 @@ struct usb_serial_port {
99 struct urb *read_urb; 101 struct urb *read_urb;
100 __u8 bulk_in_endpointAddress; 102 __u8 bulk_in_endpointAddress;
101 103
104 unsigned char *bulk_in_buffers[2];
105 struct urb *read_urbs[2];
106 unsigned long read_urbs_free;
107
102 unsigned char *bulk_out_buffer; 108 unsigned char *bulk_out_buffer;
103 int bulk_out_size; 109 int bulk_out_size;
104 struct urb *write_urb; 110 struct urb *write_urb;
105 struct kfifo write_fifo; 111 struct kfifo write_fifo;
106 int write_urb_busy;
107 112
108 unsigned char *bulk_out_buffers[2]; 113 unsigned char *bulk_out_buffers[2];
109 struct urb *write_urbs[2]; 114 struct urb *write_urbs[2];
@@ -340,7 +345,7 @@ extern void usb_serial_generic_disconnect(struct usb_serial *serial);
340extern void usb_serial_generic_release(struct usb_serial *serial); 345extern void usb_serial_generic_release(struct usb_serial *serial);
341extern int usb_serial_generic_register(int debug); 346extern int usb_serial_generic_register(int debug);
342extern void usb_serial_generic_deregister(void); 347extern void usb_serial_generic_deregister(void);
343extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, 348extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port,
344 gfp_t mem_flags); 349 gfp_t mem_flags);
345extern void usb_serial_generic_process_read_urb(struct urb *urb); 350extern void usb_serial_generic_process_read_urb(struct urb *urb);
346extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, 351extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port,