diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-14 04:41:06 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-14 04:41:06 -0400 |
| commit | 313e1a0a5f86cb129aa4542f61702a4bbb2079b9 (patch) | |
| tree | e2101b9bf805deca57b7b4ea21e3d789f5f050a0 | |
| parent | d0167ad2954ee2d1c70704c454c646086b6653d6 (diff) | |
| parent | 2c247804796bbcaa90087f2196f68fdc20a5fe04 (diff) | |
Merge tag 'fixes-for-v4.0-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
Felipe writes:
usb: fixes for v4.0-rc3
Revert interrupt endpoint support from g_zero as it regresses
musb.
A possible deadlock in isp1760 udc irq has been fixed.
A fix to dwc2 for disconnect IRQ handling.
We also have a new device ID for isp1760.
Signed-off-by: Felipe Balbi <balbi@ti.com>
| -rw-r--r-- | drivers/usb/dwc2/core_intr.c | 3 | ||||
| -rw-r--r-- | drivers/usb/gadget/function/f_loopback.c | 3 | ||||
| -rw-r--r-- | drivers/usb/gadget/function/f_sourcesink.c | 511 | ||||
| -rw-r--r-- | drivers/usb/gadget/function/g_zero.h | 13 | ||||
| -rw-r--r-- | drivers/usb/gadget/legacy/zero.c | 21 | ||||
| -rw-r--r-- | drivers/usb/isp1760/isp1760-core.c | 3 | ||||
| -rw-r--r-- | drivers/usb/isp1760/isp1760-udc.c | 16 | ||||
| -rw-r--r-- | drivers/usb/musb/Kconfig | 3 | ||||
| -rw-r--r-- | drivers/usb/phy/phy-am335x-control.c | 3 |
9 files changed, 40 insertions, 536 deletions
diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c index 02e3e2d4ea56..6cf047878dba 100644 --- a/drivers/usb/dwc2/core_intr.c +++ b/drivers/usb/dwc2/core_intr.c | |||
| @@ -377,6 +377,9 @@ static void dwc2_handle_disconnect_intr(struct dwc2_hsotg *hsotg) | |||
| 377 | dwc2_is_host_mode(hsotg) ? "Host" : "Device", | 377 | dwc2_is_host_mode(hsotg) ? "Host" : "Device", |
| 378 | dwc2_op_state_str(hsotg)); | 378 | dwc2_op_state_str(hsotg)); |
| 379 | 379 | ||
| 380 | if (hsotg->op_state == OTG_STATE_A_HOST) | ||
| 381 | dwc2_hcd_disconnect(hsotg); | ||
| 382 | |||
| 380 | /* Change to L3 (OFF) state */ | 383 | /* Change to L3 (OFF) state */ |
| 381 | hsotg->lx_state = DWC2_L3; | 384 | hsotg->lx_state = DWC2_L3; |
| 382 | 385 | ||
diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c index 298b46112b1a..39f49f1ad22f 100644 --- a/drivers/usb/gadget/function/f_loopback.c +++ b/drivers/usb/gadget/function/f_loopback.c | |||
| @@ -289,8 +289,7 @@ static void disable_loopback(struct f_loopback *loop) | |||
| 289 | struct usb_composite_dev *cdev; | 289 | struct usb_composite_dev *cdev; |
| 290 | 290 | ||
| 291 | cdev = loop->function.config->cdev; | 291 | cdev = loop->function.config->cdev; |
| 292 | disable_endpoints(cdev, loop->in_ep, loop->out_ep, NULL, NULL, NULL, | 292 | disable_endpoints(cdev, loop->in_ep, loop->out_ep, NULL, NULL); |
| 293 | NULL); | ||
| 294 | VDBG(cdev, "%s disabled\n", loop->function.name); | 293 | VDBG(cdev, "%s disabled\n", loop->function.name); |
| 295 | } | 294 | } |
| 296 | 295 | ||
diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c index e3dae47baef3..3a5ae9900b1e 100644 --- a/drivers/usb/gadget/function/f_sourcesink.c +++ b/drivers/usb/gadget/function/f_sourcesink.c | |||
| @@ -23,15 +23,6 @@ | |||
| 23 | #include "gadget_chips.h" | 23 | #include "gadget_chips.h" |
| 24 | #include "u_f.h" | 24 | #include "u_f.h" |
| 25 | 25 | ||
| 26 | #define USB_MS_TO_SS_INTERVAL(x) USB_MS_TO_HS_INTERVAL(x) | ||
| 27 | |||
| 28 | enum eptype { | ||
| 29 | EP_CONTROL = 0, | ||
| 30 | EP_BULK, | ||
| 31 | EP_ISOC, | ||
| 32 | EP_INTERRUPT, | ||
| 33 | }; | ||
| 34 | |||
| 35 | /* | 26 | /* |
| 36 | * SOURCE/SINK FUNCTION ... a primary testing vehicle for USB peripheral | 27 | * SOURCE/SINK FUNCTION ... a primary testing vehicle for USB peripheral |
| 37 | * controller drivers. | 28 | * controller drivers. |
| @@ -64,8 +55,6 @@ struct f_sourcesink { | |||
| 64 | struct usb_ep *out_ep; | 55 | struct usb_ep *out_ep; |
| 65 | struct usb_ep *iso_in_ep; | 56 | struct usb_ep *iso_in_ep; |
| 66 | struct usb_ep *iso_out_ep; | 57 | struct usb_ep *iso_out_ep; |
| 67 | struct usb_ep *int_in_ep; | ||
| 68 | struct usb_ep *int_out_ep; | ||
| 69 | int cur_alt; | 58 | int cur_alt; |
| 70 | }; | 59 | }; |
| 71 | 60 | ||
| @@ -79,10 +68,6 @@ static unsigned isoc_interval; | |||
| 79 | static unsigned isoc_maxpacket; | 68 | static unsigned isoc_maxpacket; |
| 80 | static unsigned isoc_mult; | 69 | static unsigned isoc_mult; |
| 81 | static unsigned isoc_maxburst; | 70 | static unsigned isoc_maxburst; |
| 82 | static unsigned int_interval; /* In ms */ | ||
| 83 | static unsigned int_maxpacket; | ||
| 84 | static unsigned int_mult; | ||
| 85 | static unsigned int_maxburst; | ||
| 86 | static unsigned buflen; | 71 | static unsigned buflen; |
| 87 | 72 | ||
| 88 | /*-------------------------------------------------------------------------*/ | 73 | /*-------------------------------------------------------------------------*/ |
| @@ -107,16 +92,6 @@ static struct usb_interface_descriptor source_sink_intf_alt1 = { | |||
| 107 | /* .iInterface = DYNAMIC */ | 92 | /* .iInterface = DYNAMIC */ |
| 108 | }; | 93 | }; |
| 109 | 94 | ||
| 110 | static struct usb_interface_descriptor source_sink_intf_alt2 = { | ||
| 111 | .bLength = USB_DT_INTERFACE_SIZE, | ||
| 112 | .bDescriptorType = USB_DT_INTERFACE, | ||
| 113 | |||
| 114 | .bAlternateSetting = 2, | ||
| 115 | .bNumEndpoints = 2, | ||
| 116 | .bInterfaceClass = USB_CLASS_VENDOR_SPEC, | ||
| 117 | /* .iInterface = DYNAMIC */ | ||
| 118 | }; | ||
| 119 | |||
| 120 | /* full speed support: */ | 95 | /* full speed support: */ |
| 121 | 96 | ||
| 122 | static struct usb_endpoint_descriptor fs_source_desc = { | 97 | static struct usb_endpoint_descriptor fs_source_desc = { |
| @@ -155,26 +130,6 @@ static struct usb_endpoint_descriptor fs_iso_sink_desc = { | |||
| 155 | .bInterval = 4, | 130 | .bInterval = 4, |
| 156 | }; | 131 | }; |
| 157 | 132 | ||
| 158 | static struct usb_endpoint_descriptor fs_int_source_desc = { | ||
| 159 | .bLength = USB_DT_ENDPOINT_SIZE, | ||
| 160 | .bDescriptorType = USB_DT_ENDPOINT, | ||
| 161 | |||
| 162 | .bEndpointAddress = USB_DIR_IN, | ||
| 163 | .bmAttributes = USB_ENDPOINT_XFER_INT, | ||
| 164 | .wMaxPacketSize = cpu_to_le16(64), | ||
| 165 | .bInterval = GZERO_INT_INTERVAL, | ||
| 166 | }; | ||
| 167 | |||
| 168 | static struct usb_endpoint_descriptor fs_int_sink_desc = { | ||
| 169 | .bLength = USB_DT_ENDPOINT_SIZE, | ||
| 170 | .bDescriptorType = USB_DT_ENDPOINT, | ||
| 171 | |||
| 172 | .bEndpointAddress = USB_DIR_OUT, | ||
| 173 | .bmAttributes = USB_ENDPOINT_XFER_INT, | ||
| 174 | .wMaxPacketSize = cpu_to_le16(64), | ||
| 175 | .bInterval = GZERO_INT_INTERVAL, | ||
| 176 | }; | ||
| 177 | |||
| 178 | static struct usb_descriptor_header *fs_source_sink_descs[] = { | 133 | static struct usb_descriptor_header *fs_source_sink_descs[] = { |
| 179 | (struct usb_descriptor_header *) &source_sink_intf_alt0, | 134 | (struct usb_descriptor_header *) &source_sink_intf_alt0, |
| 180 | (struct usb_descriptor_header *) &fs_sink_desc, | 135 | (struct usb_descriptor_header *) &fs_sink_desc, |
| @@ -185,10 +140,6 @@ static struct usb_descriptor_header *fs_source_sink_descs[] = { | |||
| 185 | (struct usb_descriptor_header *) &fs_source_desc, | 140 | (struct usb_descriptor_header *) &fs_source_desc, |
| 186 | (struct usb_descriptor_header *) &fs_iso_sink_desc, | 141 | (struct usb_descriptor_header *) &fs_iso_sink_desc, |
| 187 | (struct usb_descriptor_header *) &fs_iso_source_desc, | 142 | (struct usb_descriptor_header *) &fs_iso_source_desc, |
| 188 | (struct usb_descriptor_header *) &source_sink_intf_alt2, | ||
| 189 | #define FS_ALT_IFC_2_OFFSET 8 | ||
| 190 | (struct usb_descriptor_header *) &fs_int_sink_desc, | ||
| 191 | (struct usb_descriptor_header *) &fs_int_source_desc, | ||
| 192 | NULL, | 143 | NULL, |
| 193 | }; | 144 | }; |
| 194 | 145 | ||
| @@ -228,24 +179,6 @@ static struct usb_endpoint_descriptor hs_iso_sink_desc = { | |||
| 228 | .bInterval = 4, | 179 | .bInterval = 4, |
| 229 | }; | 180 | }; |
| 230 | 181 | ||
| 231 | static struct usb_endpoint_descriptor hs_int_source_desc = { | ||
| 232 | .bLength = USB_DT_ENDPOINT_SIZE, | ||
| 233 | .bDescriptorType = USB_DT_ENDPOINT, | ||
| 234 | |||
| 235 | .bmAttributes = USB_ENDPOINT_XFER_INT, | ||
| 236 | .wMaxPacketSize = cpu_to_le16(1024), | ||
| 237 | .bInterval = USB_MS_TO_HS_INTERVAL(GZERO_INT_INTERVAL), | ||
| 238 | }; | ||
| 239 | |||
| 240 | static struct usb_endpoint_descriptor hs_int_sink_desc = { | ||
| 241 | .bLength = USB_DT_ENDPOINT_SIZE, | ||
| 242 | .bDescriptorType = USB_DT_ENDPOINT, | ||
| 243 | |||
| 244 | .bmAttributes = USB_ENDPOINT_XFER_INT, | ||
| 245 | .wMaxPacketSize = cpu_to_le16(1024), | ||
| 246 | .bInterval = USB_MS_TO_HS_INTERVAL(GZERO_INT_INTERVAL), | ||
| 247 | }; | ||
| 248 | |||
| 249 | static struct usb_descriptor_header *hs_source_sink_descs[] = { | 182 | static struct usb_descriptor_header *hs_source_sink_descs[] = { |
| 250 | (struct usb_descriptor_header *) &source_sink_intf_alt0, | 183 | (struct usb_descriptor_header *) &source_sink_intf_alt0, |
| 251 | (struct usb_descriptor_header *) &hs_source_desc, | 184 | (struct usb_descriptor_header *) &hs_source_desc, |
| @@ -256,10 +189,6 @@ static struct usb_descriptor_header *hs_source_sink_descs[] = { | |||
| 256 | (struct usb_descriptor_header *) &hs_sink_desc, | 189 | (struct usb_descriptor_header *) &hs_sink_desc, |
| 257 | (struct usb_descriptor_header *) &hs_iso_source_desc, | 190 | (struct usb_descriptor_header *) &hs_iso_source_desc, |
| 258 | (struct usb_descriptor_header *) &hs_iso_sink_desc, | 191 | (struct usb_descriptor_header *) &hs_iso_sink_desc, |
