History

Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (30 commits) USB: ftdi_sio: add Calao reference board support USB option driver K3765/K4505 avoid CDC_DATA interface USB: option: add YUGA device id to driver usb: s5p-ehci: fix a NULL pointer deference USB: EHCI: Do not rely on PORT_SUSPEND to stop USB resuming in ehci_bus_resume(). USB option driver add PID of Huawei Vodafone K4605 USB option driver add PID of Huawei Vodafone K3806 xhci: Handle zero-length isochronous packets. USB: Avoid NULL pointer deref in usb_hcd_alloc_bandwidth. usb: musb: gadget: fix error path usb: gadget: f_phonet: unlock in error case usb: musb: blackfin: include prefetch head file usb: musb: tusb6010: fix compilation usb: gadget: renesas_usbhs: fix DMA build by including dma-mapping.h usb: musb: cppi: fix build errors due to DBG and missing musb variable usb: musb: ux500: replace missing DBG with dev_dbg usb: musb: ux500: set dma config for both src and dst usb: musb: fix oops on musb_gadget_pullup usb: host: ehci-omap: fix .remove and failure handling path of .probe(v1) usb: gadget: hid: don't STALL when processing a HID Descriptor request ...

Linus Torvalds committed 15 years ago

Commit 7a54f5e2 parents efe45ab c96fbdd17 files · +283 −76Browse files

Unified · Split

17 files
  1. drivers/usb/core/hcd.c +2 −0
  2. drivers/usb/gadget/f_phonet.c +1 −0
  3. drivers/usb/host/ehci-hub.c +3 −4
  4. drivers/usb/host/ehci-s5p.c +1 −0
  5. drivers/usb/host/xhci-hub.c +13 −4
  6. drivers/usb/host/xhci-ring.c +63 −27
  7. drivers/usb/host/xhci.c +24 −4
  8. drivers/usb/musb/blackfin.c +1 −0
  9. drivers/usb/musb/cppi_dma.c +17 −9
  10. drivers/usb/musb/musb_core.h +8 −4
  11. drivers/usb/musb/musb_gadget.c +3 −1
  12. drivers/usb/musb/musb_regs.h +4 −2
  13. drivers/usb/musb/tusb6010.c +1 −0
  14. drivers/usb/musb/tusb6010_omap.c +1 −0
  15. drivers/usb/musb/ux500_dma.c +21 −17
  16. drivers/usb/serial/ftdi_sio.c +19 −1
  17. drivers/usb/serial/option.c +101 −3
drivers/usb/core/hcd.c+2−0
@@ -1775,6 +1775,8 @@ int usb_hcd_alloc_bandwidth(struct usb_device *udev, · 1774 unmodified lines
17751775 struct usb_interface *iface = usb_ifnum_to_if(udev,
17761776 cur_alt->desc.bInterfaceNumber);
17771777
1778+ if (!iface)
1779+ return -EINVAL;
17781780 if (iface->resetting_device) {
17791781 /*
17801782 * The USB core just reset the device, so the xHCI host
drivers/usb/gadget/f_phonet.c+1−0
@@ -434,6 +434,7 @@ static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt) · 433 unmodified lines
434434 config_ep_by_speed(gadget, f, fp->out_ep)) {
435435 fp->in_ep->desc = NULL;
436436 fp->out_ep->desc = NULL;
437+ spin_unlock(&port->lock);
437438 return -EINVAL;
438439 }
439440 usb_ep_enable(fp->out_ep);
drivers/usb/host/ehci-hub.c+3−4
@@ -343,7 +343,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) · 342 unmodified lines
343343 u32 temp;
344344 u32 power_okay;
345345 int i;
346− u8 resume_needed = 0;
346+ unsigned long resume_needed = 0;
347347
348348 if (time_before (jiffies, ehci->next_statechange))
349349 msleep(5);
@@ -416,7 +416,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) · 66 unmodified lines
416416 if (test_bit(i, &ehci->bus_suspended) &&
417417 (temp & PORT_SUSPEND)) {
418418 temp |= PORT_RESUME;
419− resume_needed = 1;
419+ set_bit(i, &resume_needed);
420420 }
421421 ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
422422 }
@@ -431,8 +431,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd) · 8 unmodified lines
431431 i = HCS_N_PORTS (ehci->hcs_params);
432432 while (i--) {
433433 temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
434− if (test_bit(i, &ehci->bus_suspended) &&
435− (temp & PORT_SUSPEND)) {
434+ if (test_bit(i, &resume_needed)) {
436435 temp &= ~(PORT_RWC_BITS | PORT_RESUME);
437436 ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
438437 ehci_vdbg (ehci, "resumed port %d\n", i + 1);
drivers/usb/host/ehci-s5p.c+1−0
@@ -86,6 +86,7 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev) · 85 unmodified lines
8686 goto fail_hcd;
8787 }
8888
89+ s5p_ehci->hcd = hcd;
8990 s5p_ehci->clk = clk_get(&pdev->dev, "usbhost");
9091
9192 if (IS_ERR(s5p_ehci->clk)) {
drivers/usb/host/xhci-hub.c+13−4
@@ -463,11 +463,12 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, · 462 unmodified lines
463463 && (temp & PORT_POWER))
464464 status |= USB_PORT_STAT_SUSPEND;
465465 }
466− if ((temp & PORT_PLS_MASK) == XDEV_RESUME) {
466+ if ((temp & PORT_PLS_MASK) == XDEV_RESUME &&
467+ !DEV_SUPERSPEED(temp)) {
467468 if ((temp & PORT_RESET) || !(temp & PORT_PE))
468469 goto error;
469− if (!DEV_SUPERSPEED(temp) && time_after_eq(jiffies,
470− bus_state->resume_done[wIndex])) {
470+ if (time_after_eq(jiffies,
471+ bus_state->resume_done[wIndex])) {
471472 xhci_dbg(xhci, "Resume USB2 port %d\n",
472473 wIndex + 1);
473474 bus_state->resume_done[wIndex] = 0;
@@ -487,6 +488,14 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, · 13 unmodified lines
487488 xhci_ring_device(xhci, slot_id);
488489 bus_state->port_c_suspend |= 1 << wIndex;
489490 bus_state->suspended_ports &= ~(1 << wIndex);
491+ } else {
492+ /*
493+ * The resume has been signaling for less than
494+ * 20ms. Report the port status as SUSPEND,
495+ * let the usbcore check port status again
496+ * and clear resume signaling later.
497+ */
498+ status |= USB_PORT_STAT_SUSPEND;
490499 }
491500 }
492501 if ((temp & PORT_PLS_MASK) == XDEV_U0
@@ -664,7 +673,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, · 171 unmodified lines
664673 xhci_dbg(xhci, "PORTSC %04x\n", temp);
665674 if (temp & PORT_RESET)
666675 goto error;
667− if (temp & XDEV_U3) {
676+ if ((temp & PORT_PLS_MASK) == XDEV_U3) {
668677 if ((temp & PORT_PE) == 0)
669678 goto error;
670679
drivers/usb/host/xhci-ring.c+63−27
@@ -514,8 +514,12 @@ void xhci_find_new_dequeue_state(struct xhci_hcd *xhci, · 513 unmodified lines
514514 (unsigned long long) addr);
515515 }
516516
517+/* flip_cycle means flip the cycle bit of all but the first and last TRB.
518+ * (The last TRB actually points to the ring enqueue pointer, which is not part
519+ * of this TD.) This is used to remove partially enqueued isoc TDs from a ring.
520+ */
517521 static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring,
518− struct xhci_td *cur_td)
522+ struct xhci_td *cur_td, bool flip_cycle)
519523 {
520524 struct xhci_segment *cur_seg;
521525 union xhci_trb *cur_trb;
@@ -528,6 +532,12 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, · 6 unmodified lines
528532 * leave the pointers intact.
529533 */
530534 cur_trb->generic.field[3] &= cpu_to_le32(~TRB_CHAIN);
535+ /* Flip the cycle bit (link TRBs can't be the first
536+ * or last TRB).
537+ */
538+ if (flip_cycle)
539+ cur_trb->generic.field[3] ^=
540+ cpu_to_le32(TRB_CYCLE);
531541 xhci_dbg(xhci, "Cancel (unchain) link TRB\n");
532542 xhci_dbg(xhci, "Address = %p (0x%llx dma); "
533543 "in seg %p (0x%llx dma)\n",
@@ -541,6 +551,11 @@ static void td_to_noop(struct xhci_hcd *xhci, struct xhci_ring *ep_ring, · 7 unmodified lines
541551 cur_trb->generic.field[2] = 0;
542552 /* Preserve only the cycle bit of this TRB */
543553 cur_trb->generic.field[3] &= cpu_to_le32(TRB_CYCLE);
554+ /* Flip the cycle bit except on the first or last TRB */
555+ if (flip_cycle && cur_trb != cur_td->first_trb &&
556+ cur_trb != cur_td->last_trb)
557+ cur_trb->generic.field[3] ^=
558+ cpu_to_le32(TRB_CYCLE);
544559 cur_trb->generic.field[3] |= cpu_to_le32(
545560 TRB_TYPE(TRB_TR_NOOP));
546561 xhci_dbg(xhci, "Cancel TRB %p (0x%llx dma) "
@@ -719,14 +734,14 @@ static void handle_stopped_endpoint(struct xhci_hcd *xhci, · 172 unmodified lines
719734 cur_td->urb->stream_id,
720735 cur_td, &deq_state);
721736 else
722− td_to_noop(xhci, ep_ring, cur_td);
737+ td_to_noop(xhci, ep_ring, cur_td, false);
723738 remove_finished_td:
724739 /*
725740 * The event handler won't see a completion for this TD anymore,
726741 * so remove it from the endpoint ring's TD list. Keep it in
727742 * the cancelled TD list for URB completion later.
728743 */
729− list_del(&cur_td->td_list);
744+ list_del_init(&cur_td->td_list);
730745 }
731746 last_unlinked_td = cur_td;
732747 xhci_stop_watchdog_timer_in_irq(xhci, ep);
@@ -754,7 +769,7 @@ remove_finished_td: · 21 unmodified lines
754769 do {
755770 cur_td = list_entry(ep->cancelled_td_list.next,
756771 struct xhci_td, cancelled_td_list);
757− list_del(&cur_td->cancelled_td_list);
772+ list_del_init(&cur_td->cancelled_td_list);
758773
759774 /* Clean up the cancelled URB */
760775 /* Doesn't matter what we pass for status, since the core will
@@ -862,9 +877,9 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) · 101 unmodified lines
862877 cur_td = list_first_entry(&ring->td_list,
863878 struct xhci_td,
864879 td_list);
865− list_del(&cur_td->td_list);
880+ list_del_init(&cur_td->td_list);
866881 if (!list_empty(&cur_td->cancelled_td_list))
867− list_del(&cur_td->cancelled_td_list);
882+ list_del_init(&cur_td->cancelled_td_list);
868883 xhci_giveback_urb_in_irq(xhci, cur_td,
869884 -ESHUTDOWN, "killed");
870885 }
@@ -873,7 +888,7 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg) · 2 unmodified lines
873888 &temp_ep->cancelled_td_list,
874889 struct xhci_td,
875890 cancelled_td_list);
876− list_del(&cur_td->cancelled_td_list);
891+ list_del_init(&cur_td->cancelled_td_list);
877892 xhci_giveback_urb_in_irq(xhci, cur_td,
878893 -ESHUTDOWN, "killed");
879894 }
@@ -1565,10 +1580,10 @@ td_cleanup: · 685 unmodified lines
15651580 else
15661581 *status = 0;
15671582 }
1568− list_del(&td->td_list);
1583+ list_del_init(&td->td_list);
15691584 /* Was this TD slated to be cancelled but completed anyway? */
15701585 if (!list_empty(&td->cancelled_td_list))
1571− list_del(&td->cancelled_td_list);
1586+ list_del_init(&td->cancelled_td_list);
15721587
15731588 urb_priv->td_cnt++;
15741589 /* Giveback the urb when all the tds are completed */
@@ -2500,11 +2515,8 @@ static int prepare_transfer(struct xhci_hcd *xhci, · 925 unmodified lines
25002515
25012516 if (td_index == 0) {
25022517 ret = usb_hcd_link_urb_to_ep(bus_to_hcd(urb->dev->bus), urb);
2503− if (unlikely(ret)) {
2504− xhci_urb_free_priv(xhci, urb_priv);
2505− urb->hcpriv = NULL;
2518+ if (unlikely(ret))
25062519 return ret;
2507− }
25082520 }
25092521
25102522 td->urb = urb;
@@ -2672,6 +2684,10 @@ static u32 xhci_v1_0_td_remainder(int running_total, int trb_buff_len, · 161 unmodified lines
26722684 {
26732685 int packets_transferred;
26742686
2687+ /* One TRB with a zero-length data packet. */
2688+ if (running_total == 0 && trb_buff_len == 0)
2689+ return 0;
2690+
26752691 /* All the TRB queueing functions don't count the current TRB in
26762692 * running_total.
26772693 */
@@ -3113,20 +3129,15 @@ static int count_isoc_trbs_needed(struct xhci_hcd *xhci, · 435 unmodified lines
31133129 struct urb *urb, int i)
31143130 {
31153131 int num_trbs = 0;
3116− u64 addr, td_len, running_total;
3132+ u64 addr, td_len;
31173133
31183134 addr = (u64) (urb->transfer_dma + urb->iso_frame_desc[i].offset);
31193135 td_len = urb->iso_frame_desc[i].length;
31203136
3121− running_total = TRB_MAX_BUFF_SIZE - (addr & (TRB_MAX_BUFF_SIZE - 1));
3122− running_total &= TRB_MAX_BUFF_SIZE - 1;
3123− if (running_total != 0)
3124− num_trbs++;
3125−
3126− while (running_total < td_len) {
3137+ num_trbs = DIV_ROUND_UP(td_len + (addr & (TRB_MAX_BUFF_SIZE - 1)),
3138+ TRB_MAX_BUFF_SIZE);
3139+ if (num_trbs == 0)
31273140 num_trbs++;
3128− running_total += TRB_MAX_BUFF_SIZE;
3129− }
31303141
31313142 return num_trbs;
31323143 }
@@ -3226,6 +3237,7 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, · 93 unmodified lines
32263237 start_trb = &ep_ring->enqueue->generic;
32273238 start_cycle = ep_ring->cycle_state;
32283239
3240+ urb_priv = urb->hcpriv;
32293241 /* Queue the first TRB, even if it's zero-length */
32303242 for (i = 0; i < num_tds; i++) {
32313243 unsigned int total_packet_count;
@@ -3237,9 +3249,11 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, · 5 unmodified lines
32373249 addr = start_addr + urb->iso_frame_desc[i].offset;
32383250 td_len = urb->iso_frame_desc[i].length;
32393251 td_remain_len = td_len;
3240− /* FIXME: Ignoring zero-length packets, can those happen? */
32413252 total_packet_count = roundup(td_len,
32423253 le16_to_cpu(urb->ep->desc.wMaxPacketSize));
3254+ /* A zero-length transfer still involves at least one packet. */
3255+ if (total_packet_count == 0)
3256+ total_packet_count++;
32433257 burst_count = xhci_get_burst_count(xhci, urb->dev, urb,
32443258 total_packet_count);
32453259 residue = xhci_get_last_burst_packet_count(xhci,
@@ -3249,12 +3263,13 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, · 3 unmodified lines
32493263
32503264 ret = prepare_transfer(xhci, xhci->devs[slot_id], ep_index,
32513265 urb->stream_id, trbs_per_td, urb, i, mem_flags);
3252− if (ret < 0)
3253− return ret;
3266+ if (ret < 0) {
3267+ if (i == 0)
3268+ return ret;
3269+ goto cleanup;
3270+ }
32543271
3255− urb_priv = urb->hcpriv;
32563272 td = urb_priv->td[i];
3257−
32583273 for (j = 0; j < trbs_per_td; j++) {
32593274 u32 remainder = 0;
32603275 field = TRB_TBC(burst_count) | TRB_TLBPC(residue);
@@ -3344,6 +3359,27 @@ static int xhci_queue_isoc_tx(struct xhci_hcd *xhci, gfp_t mem_flags, · 83 unmodified lines
33443359 giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
33453360 start_cycle, start_trb);
33463361 return 0;
3362+cleanup:
3363+ /* Clean up a partially enqueued isoc transfer. */
3364+
3365+ for (i--; i >= 0; i--)
3366+ list_del_init(&urb_priv->td[i]->td_list);
3367+
3368+ /* Use the first TD as a temporary variable to turn the TDs we've queued
3369+ * into No-ops with a software-owned cycle bit. That way the hardware
3370+ * won't accidentally start executing bogus TDs when we partially
3371+ * overwrite them. td->first_trb and td->start_seg are already set.
3372+ */
3373+ urb_priv->td[0]->last_trb = ep_ring->enqueue;
3374+ /* Every TRB except the first & last will have its cycle bit flipped. */
3375+ td_to_noop(xhci, ep_ring, urb_priv->td[0], true);
3376+
3377+ /* Reset the ring enqueue back to the first TRB and its cycle bit. */
3378+ ep_ring->enqueue = urb_priv->td[0]->first_trb;
3379+ ep_ring->enq_seg = urb_priv->td[0]->start_seg;
3380+ ep_ring->cycle_state = start_cycle;
3381+ usb_hcd_unlink_urb_from_ep(bus_to_hcd(urb->dev->bus), urb);
3382+ return ret;
33473383 }
33483384
33493385 /*
drivers/usb/host/xhci.c+24−4
@@ -1085,8 +1085,11 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) · 1084 unmodified lines
10851085 if (urb->dev->speed == USB_SPEED_FULL) {
10861086 ret = xhci_check_maxpacket(xhci, slot_id,
10871087 ep_index, urb);
1088− if (ret < 0)
1088+ if (ret < 0) {
1089+ xhci_urb_free_priv(xhci, urb_priv);
1090+ urb->hcpriv = NULL;
10891091 return ret;
1092+ }
10901093 }
10911094
10921095 /* We have a spinlock and interrupts disabled, so we must pass
@@ -1097,6 +1100,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) · 4 unmodified lines
10971100 goto dying;
10981101 ret = xhci_queue_ctrl_tx(xhci, GFP_ATOMIC, urb,
10991102 slot_id, ep_index);
1103+ if (ret)
1104+ goto free_priv;
11001105 spin_unlock_irqrestore(&xhci->lock, flags);
11011106 } else if (usb_endpoint_xfer_bulk(&urb->ep->desc)) {
11021107 spin_lock_irqsave(&xhci->lock, flags);
@@ -1117,6 +1122,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) · 14 unmodified lines
11171122 ret = xhci_queue_bulk_tx(xhci, GFP_ATOMIC, urb,
11181123 slot_id, ep_index);
11191124 }
1125+ if (ret)
1126+ goto free_priv;
11201127 spin_unlock_irqrestore(&xhci->lock, flags);
11211128 } else if (usb_endpoint_xfer_int(&urb->ep->desc)) {
11221129 spin_lock_irqsave(&xhci->lock, flags);
@@ -1124,6 +1131,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) · 1 unmodified line
11241131 goto dying;
11251132 ret = xhci_queue_intr_tx(xhci, GFP_ATOMIC, urb,
11261133 slot_id, ep_index);
1134+ if (ret)
1135+ goto free_priv;
11271136 spin_unlock_irqrestore(&xhci->lock, flags);
11281137 } else {
11291138 spin_lock_irqsave(&xhci->lock, flags);
@@ -1131,18 +1140,22 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) · 1 unmodified line
11311140 goto dying;
11321141 ret = xhci_queue_isoc_tx_prepare(xhci, GFP_ATOMIC, urb,
11331142 slot_id, ep_index);
1143+ if (ret)
1144+ goto free_priv;
11341145 spin_unlock_irqrestore(&xhci->lock, flags);
11351146 }
11361147 exit:
11371148 return ret;
11381149 dying:
1139− xhci_urb_free_priv(xhci, urb_priv);
1140− urb->hcpriv = NULL;
11411150 xhci_dbg(xhci, "Ep 0x%x: URB %p submitted for "
11421151 "non-responsive xHCI host.\n",
11431152 urb->ep->desc.bEndpointAddress, urb);
1153+ ret = -ESHUTDOWN;
1154+free_priv:
1155+ xhci_urb_free_priv(xhci, urb_priv);
1156+ urb->hcpriv = NULL;
11441157 spin_unlock_irqrestore(&xhci->lock, flags);
1145− return -ESHUTDOWN;
1158+ return ret;
11461159 }
11471160
11481161 /* Get the right ring for the given URB.
@@ -1239,6 +1252,13 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) · 90 unmodified lines
12391252 if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_HALTED)) {
12401253 xhci_dbg(xhci, "HW died, freeing TD.\n");
12411254 urb_priv = urb->hcpriv;
1255+ for (i = urb_priv->td_cnt; i < urb_priv->length; i++) {
1256+ td = urb_priv->td[i];
1257+ if (!list_empty(&td->td_list))
1258+ list_del_init(&td->td_list);
1259+ if (!list_empty(&td->cancelled_td_list))
1260+ list_del_init(&td->cancelled_td_list);
1261+ }
12421262
12431263 usb_hcd_unlink_urb_from_ep(hcd, urb);
12441264 spin_unlock_irqrestore(&xhci->lock, flags);
drivers/usb/musb/blackfin.c+1−0
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 #include <linux/io.h>
1818 #include <linux/platform_device.h>
1919 #include <linux/dma-mapping.h>
20+#include <linux/prefetch.h>
2021
2122 #include <asm/cacheflush.h>
2223
drivers/usb/musb/cppi_dma.c+17−9
@@ -226,8 +226,10 @@ static int cppi_controller_stop(struct dma_controller *c) · 225 unmodified lines
226226 struct cppi *controller;
227227 void __iomem *tibase;
228228 int i;
229+ struct musb *musb;
229230
230231 controller = container_of(c, struct cppi, controller);
232+ musb = controller->musb;
231233
232234 tibase = controller->tibase;
233235 /* DISABLE INDIVIDUAL CHANNEL Interrupts */
@@ -289,9 +291,11 @@ cppi_channel_allocate(struct dma_controller *c, · 55 unmodified lines
289291 u8 index;
290292 struct cppi_channel *cppi_ch;
291293 void __iomem *tibase;
294+ struct musb *musb;
292295
293296 controller = container_of(c, struct cppi, controller);
294297 tibase = controller->tibase;
298+ musb = controller->musb;
295299
296300 /* ep0 doesn't use DMA; remember cppi indices are 0..N-1 */
297301 index = ep->epnum - 1;
@@ -339,7 +343,8 @@ static void cppi_channel_release(struct dma_channel *channel) · 41 unmodified lines
339343 c = container_of(channel, struct cppi_channel, channel);
340344 tibase = c->controller->tibase;
341345 if (!c->hw_ep)
342− dev_dbg(musb->controller, "releasing idle DMA channel %p\n", c);
346+ dev_dbg(c->controller->musb->controller,
347+ "releasing idle DMA channel %p\n", c);
343348 else if (!c->transmit)
344349 core_rxirq_enable(tibase, c->index + 1);
345350
@@ -357,10 +362,11 @@ cppi_dump_rx(int level, struct cppi_channel *c, const char *tag) · 11 unmodified lines
357362
358363 musb_ep_select(base, c->index + 1);
359364
360− DBG(level, "RX DMA%d%s: %d left, csr %04x, "
361− "%08x H%08x S%08x C%08x, "
362− "B%08x L%08x %08x .. %08x"
363− "\n",
365+ dev_dbg(c->controller->musb->controller,
366+ "RX DMA%d%s: %d left, csr %04x, "
367+ "%08x H%08x S%08x C%08x, "
368+ "B%08x L%08x %08x .. %08x"
369+ "\n",
364370 c->index, tag,
365371 musb_readl(c->controller->tibase,
366372 DAVINCI_RXCPPI_BUFCNT0_REG + 4 * c->index),
@@ -387,10 +393,11 @@ cppi_dump_tx(int level, struct cppi_channel *c, const char *tag) · 20 unmodified lines
387393
388394 musb_ep_select(base, c->index + 1);
389395
390− DBG(level, "TX DMA%d%s: csr %04x, "
391− "H%08x S%08x C%08x %08x, "
392− "F%08x L%08x .. %08x"
393− "\n",
396+ dev_dbg(c->controller->musb->controller,
397+ "TX DMA%d%s: csr %04x, "
398+ "H%08x S%08x C%08x %08x, "
399+ "F%08x L%08x .. %08x"
400+ "\n",
394401 c->index, tag,
395402 musb_readw(c->hw_ep->regs, MUSB_TXCSR),
396403
@@ -1022,6 +1029,7 @@ static bool cppi_rx_scan(struct cppi *cppi, unsigned ch) · 625 unmodified lines
10221029 int i;
10231030 dma_addr_t safe2ack;
10241031 void __iomem *regs = rx->hw_ep->regs;
1032+ struct musb *musb = cppi->musb;
10251033
10261034 cppi_dump_rx(6, rx, "/K");
10271035
drivers/usb/musb/musb_core.h+8−4
@@ -172,7 +172,8 @@ enum musb_g_ep0_state { · 171 unmodified lines
172172 #endif
173173
174174 /* TUSB mapping: "flat" plus ep0 special cases */
175−#if defined(CONFIG_USB_MUSB_TUSB6010)
175+#if defined(CONFIG_USB_MUSB_TUSB6010) || \
176+ defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
176177 #define musb_ep_select(_mbase, _epnum) \
177178 musb_writeb((_mbase), MUSB_INDEX, (_epnum))
178179 #define MUSB_EP_OFFSET MUSB_TUSB_OFFSET
@@ -241,7 +242,8 @@ struct musb_hw_ep { · 62 unmodified lines
241242 void __iomem *fifo;
242243 void __iomem *regs;
243244
244−#ifdef CONFIG_USB_MUSB_TUSB6010
245+#if defined(CONFIG_USB_MUSB_TUSB6010) || \
246+ defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
245247 void __iomem *conf;
246248 #endif
247249
@@ -258,7 +260,8 @@ struct musb_hw_ep { · 10 unmodified lines
258260 struct dma_channel *tx_channel;
259261 struct dma_channel *rx_channel;
260262
261−#ifdef CONFIG_USB_MUSB_TUSB6010
263+#if defined(CONFIG_USB_MUSB_TUSB6010) || \
264+ defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
262265 /* TUSB has "asynchronous" and "synchronous" dma modes */
263266 dma_addr_t fifo_async;
264267 dma_addr_t fifo_sync;
@@ -356,7 +359,8 @@ struct musb { · 91 unmodified lines
356359 void __iomem *ctrl_base;
357360 void __iomem *mregs;
358361
359−#ifdef CONFIG_USB_MUSB_TUSB6010
362+#if defined(CONFIG_USB_MUSB_TUSB6010) || \
363+ defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
360364 dma_addr_t async;
361365 dma_addr_t sync;
362366 void __iomem *sync_va;
drivers/usb/musb/musb_gadget.c+3−1
@@ -1856,6 +1856,7 @@ int __init musb_gadget_setup(struct musb *musb) · 1855 unmodified lines
18561856
18571857 return 0;
18581858 err:
1859+ musb->g.dev.parent = NULL;
18591860 device_unregister(&musb->g.dev);
18601861 return status;
18611862 }
@@ -1863,7 +1864,8 @@ err: · 1 unmodified line
18631864 void musb_gadget_cleanup(struct musb *musb)
18641865 {
18651866 usb_del_gadget_udc(&musb->g);
1866− device_unregister(&musb->g.dev);
1867+ if (musb->g.dev.parent)
1868+ device_unregister(&musb->g.dev);
18671869 }
18681870
18691871 /*
drivers/usb/musb/musb_regs.h+4−2
@@ -234,7 +234,8 @@ · 233 unmodified lines
234234 #define MUSB_TESTMODE 0x0F /* 8 bit */
235235
236236 /* Get offset for a given FIFO from musb->mregs */
237−#ifdef CONFIG_USB_MUSB_TUSB6010
237+#if defined(CONFIG_USB_MUSB_TUSB6010) || \
238+ defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
238239 #define MUSB_FIFO_OFFSET(epnum) (0x200 + ((epnum) * 0x20))
239240 #else
240241 #define MUSB_FIFO_OFFSET(epnum) (0x20 + ((epnum) * 4))
@@ -295,7 +296,8 @@ · 54 unmodified lines
295296 #define MUSB_FLAT_OFFSET(_epnum, _offset) \
296297 (0x100 + (0x10*(_epnum)) + (_offset))
297298
298−#ifdef CONFIG_USB_MUSB_TUSB6010
299+#if defined(CONFIG_USB_MUSB_TUSB6010) || \
300+ defined(CONFIG_USB_MUSB_TUSB6010_MODULE)
299301 /* TUSB6010 EP0 configuration register is special */
300302 #define MUSB_TUSB_OFFSET(_epnum, _offset) \
301303 (0x10 + _offset)
drivers/usb/musb/tusb6010.c+1−0
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818 #include <linux/kernel.h>
1919 #include <linux/errno.h>
2020 #include <linux/init.h>
21+#include <linux/prefetch.h>
2122 #include <linux/usb.h>
2223 #include <linux/irq.h>
2324 #include <linux/platform_device.h>
drivers/usb/musb/tusb6010_omap.c+1−0
@@ -20,6 +20,7 @@ · 19 unmodified lines
2020 #include <plat/mux.h>
2121
2222 #include "musb_core.h"
23+#include "tusb6010.h"
2324
2425 #define to_chdat(c) ((struct tusb_omap_dma_ch *)(c)->private_data)
2526
drivers/usb/musb/ux500_dma.c+21−17
@@ -65,7 +65,8 @@ static void ux500_tx_work(struct work_struct *data) · 64 unmodified lines
6565 struct musb *musb = hw_ep->musb;
6666 unsigned long flags;
6767
68− DBG(4, "DMA tx transfer done on hw_ep=%d\n", hw_ep->epnum);
68+ dev_dbg(musb->controller, "DMA tx transfer done on hw_ep=%d\n",
69+ hw_ep->epnum);
6970
7071 spin_lock_irqsave(&musb->lock, flags);
7172 ux500_channel->channel.actual_len = ux500_channel->cur_len;
@@ -84,7 +85,8 @@ static void ux500_rx_work(struct work_struct *data) · 12 unmodified lines
8485 struct musb *musb = hw_ep->musb;
8586 unsigned long flags;
8687
87− DBG(4, "DMA rx transfer done on hw_ep=%d\n", hw_ep->epnum);
88+ dev_dbg(musb->controller, "DMA rx transfer done on hw_ep=%d\n",
89+ hw_ep->epnum);
8890
8991 spin_lock_irqsave(&musb->lock, flags);
9092 ux500_channel->channel.actual_len = ux500_channel->cur_len;
@@ -116,9 +118,11 @@ static bool ux500_configure_channel(struct dma_channel *channel, · 25 unmodified lines
116118 enum dma_slave_buswidth addr_width;
117119 dma_addr_t usb_fifo_addr = (MUSB_FIFO_OFFSET(hw_ep->epnum) +
118120 ux500_channel->controller->phy_base);
121+ struct musb *musb = ux500_channel->controller->private_data;
119122
120− DBG(4, "packet_sz=%d, mode=%d, dma_addr=0x%x, len=%d is_tx=%d\n",
121− packet_sz, mode, dma_addr, len, ux500_channel->is_tx);
123+ dev_dbg(musb->controller,
124+ "packet_sz=%d, mode=%d, dma_addr=0x%x, len=%d is_tx=%d\n",
125+ packet_sz, mode, dma_addr, len, ux500_channel->is_tx);
122126
123127 ux500_channel->cur_len = len;
124128
@@ -133,15 +137,13 @@ static bool ux500_configure_channel(struct dma_channel *channel, · 8 unmodified lines
133137 DMA_SLAVE_BUSWIDTH_4_BYTES;
134138
135139 slave_conf.direction = direction;
136− if (direction == DMA_FROM_DEVICE) {
137− slave_conf.src_addr = usb_fifo_addr;
138− slave_conf.src_addr_width = addr_width;
139− slave_conf.src_maxburst = 16;
140− } else {
141− slave_conf.dst_addr = usb_fifo_addr;
142− slave_conf.dst_addr_width = addr_width;
143− slave_conf.dst_maxburst = 16;
144− }
140+ slave_conf.src_addr = usb_fifo_addr;
141+ slave_conf.src_addr_width = addr_width;
142+ slave_conf.src_maxburst = 16;
143+ slave_conf.dst_addr = usb_fifo_addr;
144+ slave_conf.dst_addr_width = addr_width;
145+ slave_conf.dst_maxburst = 16;
146+
145147 dma_chan->device->device_control(dma_chan, DMA_SLAVE_CONFIG,
146148 (unsigned long) &slave_conf);
147149
@@ -166,6 +168,7 @@ static struct dma_channel *ux500_dma_channel_allocate(struct dma_controller *c, · 18 unmodified lines
166168 struct ux500_dma_controller *controller = container_of(c,
167169 struct ux500_dma_controller, controller);
168170 struct ux500_dma_channel *ux500_channel = NULL;
171+ struct musb *musb = controller->private_data;
169172 u8 ch_num = hw_ep->epnum - 1;
170173 u32 max_ch;
171174
@@ -192,7 +195,7 @@ static struct dma_channel *ux500_dma_channel_allocate(struct dma_controller *c, · 20 unmodified lines
192195 ux500_channel->hw_ep = hw_ep;
193196 ux500_channel->is_allocated = 1;
194197
195− DBG(7, "hw_ep=%d, is_tx=0x%x, channel=%d\n",
198+ dev_dbg(musb->controller, "hw_ep=%d, is_tx=0x%x, channel=%d\n",
196199 hw_ep->epnum, is_tx, ch_num);
197200
198201 return &(ux500_channel->channel);
@@ -201,8 +204,9 @@ static struct dma_channel *ux500_dma_channel_allocate(struct dma_controller *c, · 2 unmodified lines
201204 static void ux500_dma_channel_release(struct dma_channel *channel)
202205 {
203206 struct ux500_dma_channel *ux500_channel = channel->private_data;
207+ struct musb *musb = ux500_channel->controller->private_data;
204208
205− DBG(7, "channel=%d\n", ux500_channel->ch_num);
209+ dev_dbg(musb->controller, "channel=%d\n", ux500_channel->ch_num);
206210
207211 if (ux500_channel->is_allocated) {
208212 ux500_channel->is_allocated = 0;
@@ -252,8 +256,8 @@ static int ux500_dma_channel_abort(struct dma_channel *channel) · 43 unmodified lines
252256 void __iomem *epio = musb->endpoints[ux500_channel->hw_ep->epnum].regs;
253257 u16 csr;
254258
255− DBG(4, "channel=%d, is_tx=%d\n", ux500_channel->ch_num,
256− ux500_channel->is_tx);
259+ dev_dbg(musb->controller, "channel=%d, is_tx=%d\n",
260+ ux500_channel->ch_num, ux500_channel->is_tx);
257261
258262 if (channel->status == MUSB_DMA_STATUS_BUSY) {
259263 if (ux500_channel->is_tx) {
drivers/usb/serial/ftdi_sio.c+19−1
@@ -101,6 +101,7 @@ static int ftdi_jtag_probe(struct usb_serial *serial); · 100 unmodified lines
101101 static int ftdi_mtxorb_hack_setup(struct usb_serial *serial);
102102 static int ftdi_NDI_device_setup(struct usb_serial *serial);
103103 static int ftdi_stmclite_probe(struct usb_serial *serial);
104+static int ftdi_8u2232c_probe(struct usb_serial *serial);
104105 static void ftdi_USB_UIRT_setup(struct ftdi_private *priv);
105106 static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv);
106107
@@ -128,6 +129,10 @@ static struct ftdi_sio_quirk ftdi_stmclite_quirk = { · 21 unmodified lines
128129 .probe = ftdi_stmclite_probe,
129130 };
130131
132+static struct ftdi_sio_quirk ftdi_8u2232c_quirk = {
133+ .probe = ftdi_8u2232c_probe,
134+};
135+
131136 /*
132137 * The 8U232AM has the same API as the sio except for:
133138 * - it can support MUCH higher baudrates; up to:
@@ -178,7 +183,8 @@ static struct usb_device_id id_table_combined [] = { · 44 unmodified lines
178183 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
179184 { USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
180185 { USB_DEVICE(FTDI_VID, FTDI_232RL_PID) },
181− { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
186+ { USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) ,
187+ .driver_info = (kernel_ulong_t)&ftdi_8u2232c_quirk },
182188 { USB_DEVICE(FTDI_VID, FTDI_4232H_PID) },
183189 { USB_DEVICE(FTDI_VID, FTDI_232H_PID) },
184190 { USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
@@ -1737,6 +1743,18 @@ static int ftdi_jtag_probe(struct usb_serial *serial) · 1552 unmodified lines
17371743 return 0;
17381744 }
17391745
1746+static int ftdi_8u2232c_probe(struct usb_serial *serial)
1747+{
1748+ struct usb_device *udev = serial->dev;
1749+
1750+ dbg("%s", __func__);
1751+
1752+ if (strcmp(udev->manufacturer, "CALAO Systems") == 0)
1753+ return ftdi_jtag_probe(serial);
1754+
1755+ return 0;
1756+}
1757+
17401758 /*
17411759 * First and second port on STMCLiteadaptors is reserved for JTAG interface
17421760 * and the forth port for pio
drivers/usb/serial/option.c+101−3
@@ -148,6 +148,8 @@ static void option_instat_callback(struct urb *urb); · 147 unmodified lines
148148 #define HUAWEI_PRODUCT_K4505 0x1464
149149 #define HUAWEI_PRODUCT_K3765 0x1465
150150 #define HUAWEI_PRODUCT_E14AC 0x14AC
151+#define HUAWEI_PRODUCT_K3806 0x14AE
152+#define HUAWEI_PRODUCT_K4605 0x14C6
151153 #define HUAWEI_PRODUCT_K3770 0x14C9
152154 #define HUAWEI_PRODUCT_K3771 0x14CA
153155 #define HUAWEI_PRODUCT_K4510 0x14CB
@@ -416,6 +418,56 @@ static void option_instat_callback(struct urb *urb); · 262 unmodified lines
416418 #define SAMSUNG_VENDOR_ID 0x04e8
417419 #define SAMSUNG_PRODUCT_GT_B3730 0x6889
418420
421+/* YUGA products www.yuga-info.com*/
422+#define YUGA_VENDOR_ID 0x257A
423+#define YUGA_PRODUCT_CEM600 0x1601
424+#define YUGA_PRODUCT_CEM610 0x1602
425+#define YUGA_PRODUCT_CEM500 0x1603
426+#define YUGA_PRODUCT_CEM510 0x1604
427+#define YUGA_PRODUCT_CEM800 0x1605
428+#define YUGA_PRODUCT_CEM900 0x1606
429+
430+#define YUGA_PRODUCT_CEU818 0x1607
431+#define YUGA_PRODUCT_CEU816 0x1608
432+#define YUGA_PRODUCT_CEU828 0x1609
433+#define YUGA_PRODUCT_CEU826 0x160A
434+#define YUGA_PRODUCT_CEU518 0x160B
435+#define YUGA_PRODUCT_CEU516 0x160C
436+#define YUGA_PRODUCT_CEU528 0x160D
437+#define YUGA_PRODUCT_CEU526 0x160F
438+
439+#define YUGA_PRODUCT_CWM600 0x2601
440+#define YUGA_PRODUCT_CWM610 0x2602
441+#define YUGA_PRODUCT_CWM500 0x2603
442+#define YUGA_PRODUCT_CWM510 0x2604
443+#define YUGA_PRODUCT_CWM800 0x2605
444+#define YUGA_PRODUCT_CWM900 0x2606
445+
446+#define YUGA_PRODUCT_CWU718 0x2607
447+#define YUGA_PRODUCT_CWU716 0x2608
448+#define YUGA_PRODUCT_CWU728 0x2609
449+#define YUGA_PRODUCT_CWU726 0x260A
450+#define YUGA_PRODUCT_CWU518 0x260B
451+#define YUGA_PRODUCT_CWU516 0x260C
452+#define YUGA_PRODUCT_CWU528 0x260D
453+#define YUGA_PRODUCT_CWU526 0x260F
454+
455+#define YUGA_PRODUCT_CLM600 0x2601
456+#define YUGA_PRODUCT_CLM610 0x2602
457+#define YUGA_PRODUCT_CLM500 0x2603
458+#define YUGA_PRODUCT_CLM510 0x2604
459+#define YUGA_PRODUCT_CLM800 0x2605
460+#define YUGA_PRODUCT_CLM900 0x2606
461+
462+#define YUGA_PRODUCT_CLU718 0x2607
463+#define YUGA_PRODUCT_CLU716 0x2608
464+#define YUGA_PRODUCT_CLU728 0x2609
465+#define YUGA_PRODUCT_CLU726 0x260A
466+#define YUGA_PRODUCT_CLU518 0x260B
467+#define YUGA_PRODUCT_CLU516 0x260C
468+#define YUGA_PRODUCT_CLU528 0x260D
469+#define YUGA_PRODUCT_CLU526 0x260F
470+
419471 /* some devices interfaces need special handling due to a number of reasons */
420472 enum option_blacklist_reason {
421473 OPTION_BLACKLIST_NONE = 0,
@@ -551,6 +603,8 @@ static const struct usb_device_id option_ids[] = { · 129 unmodified lines
551603 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) },
552604 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) },
553605 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) },
606+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) },
607+ { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff) },
554608 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) },
555609 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) },
556610 { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) },
@@ -1005,6 +1059,48 @@ static const struct usb_device_id option_ids[] = { · 448 unmodified lines
10051059 { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */
10061060 { USB_DEVICE(ONDA_VENDOR_ID, ONDA_MT825UP) }, /* ONDA MT825UP modem */
10071061 { USB_DEVICE_AND_INTERFACE_INFO(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_GT_B3730, USB_CLASS_CDC_DATA, 0x00, 0x00) }, /* Samsung GT-B3730 LTE USB modem.*/
1062+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM600) },
1063+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM610) },
1064+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM500) },
1065+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM510) },
1066+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM800) },
1067+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEM900) },
1068+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU818) },
1069+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU816) },
1070+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU828) },
1071+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU826) },
1072+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU518) },
1073+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU516) },
1074+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU528) },
1075+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU526) },
1076+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM600) },
1077+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM610) },
1078+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM500) },
1079+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM510) },
1080+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM800) },
1081+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWM900) },
1082+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU718) },
1083+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU716) },
1084+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU728) },
1085+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU726) },
1086+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU518) },
1087+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU516) },
1088+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU528) },
1089+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU526) },
1090+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM600) },
1091+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM610) },
1092+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM500) },
1093+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM510) },
1094+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM800) },
1095+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLM900) },
1096+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU718) },
1097+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU716) },
1098+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU728) },
1099+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU726) },
1100+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU518) },
1101+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU516) },
1102+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) },
1103+ { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) },
10081104 { } /* Terminating entry */
10091105 };
10101106 MODULE_DEVICE_TABLE(usb, option_ids);
@@ -1134,11 +1230,13 @@ static int option_probe(struct usb_serial *serial, · 123 unmodified lines
11341230 serial->interface->cur_altsetting->desc.bInterfaceClass != 0xff)
11351231 return -ENODEV;
11361232
1137− /* Don't bind network interfaces on Huawei K3765 & K4505 */
1233+ /* Don't bind network interfaces on Huawei K3765, K4505 & K4605 */
11381234 if (serial->dev->descriptor.idVendor == HUAWEI_VENDOR_ID &&
11391235 (serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K3765 ||
1140− serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4505) &&
1141− serial->interface->cur_altsetting->desc.bInterfaceNumber == 1)
1236+ serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4505 ||
1237+ serial->dev->descriptor.idProduct == HUAWEI_PRODUCT_K4605) &&
1238+ (serial->interface->cur_altsetting->desc.bInterfaceNumber == 1 ||
1239+ serial->interface->cur_altsetting->desc.bInterfaceNumber == 2))
11421240 return -ENODEV;
11431241
11441242 /* Don't bind network interface on Samsung GT-B3730, it is handled by a separate module */