]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Aug 2011 04:56:53 +0000 (21:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Aug 2011 04:56:53 +0000 (21:56 -0700)
* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (30 commits)
  USB: Serial: Add PID(0xF7C0) to FTDI SIO driver for a zeitcontrol-device
  USB: Serial: Add device ID for Sierra Wireless MC8305
  USB: Serial: Added device ID for Qualcomm Modem in Sagemcom's HiLo3G
  usb/host/pci-quirks.c: correct annotation of `ehci_dmi_nohandoff_table'
  USB: option driver: add PID for Vodafone-Huawei K4511
  USB: option driver: add PID for Vodafone-Huawei K4510
  USB: option driver: add PID for Vodafone-Huawei K3771
  USB: option driver: add PID for Vodafone-Huawei K3770
  usb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index needs to be shifted too
  usb/isp1760: Added missing call to usb_hcd_check_unlink_urb() during unlink
  USB: EHCI: Fix test mode sequence
  USB: ftdi_sio: fix minor typo in get_ftdi_divisor
  USB: at91_udc: include linux/prefetch.h explicitly
  USB: usb-storage: unusual_devs entry for ARM V2M motherboard.
  usb/ehci-mxc: add missing inclusion of mach/hardware.h
  USB: assign instead of equal in usbtmc.c
  usb: renesas_usbhs: fixup usbhsg_for_each_uep 1st pos
  usb: renesas_usbhs: fix DMA build by including dma-mapping.h
  usb: gadget: net2272 - Correct includes
  usb: musb: fix oops on musb_gadget_pullup
  ...

24 files changed:
drivers/usb/class/usbtmc.c
drivers/usb/core/config.c
drivers/usb/gadget/Kconfig
drivers/usb/gadget/at91_udc.c
drivers/usb/gadget/composite.c
drivers/usb/gadget/f_hid.c
drivers/usb/gadget/fusb300_udc.c
drivers/usb/gadget/net2272.c
drivers/usb/gadget/s3c2410_udc.c
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-mxc.c
drivers/usb/host/ehci-omap.c
drivers/usb/host/isp1760-hcd.c
drivers/usb/host/pci-quirks.c
drivers/usb/host/xhci.c
drivers/usb/musb/Kconfig
drivers/usb/musb/musb_gadget.c
drivers/usb/musb/tusb6010_omap.c
drivers/usb/renesas_usbhs/mod_gadget.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/ftdi_sio_ids.h
drivers/usb/serial/option.c
drivers/usb/serial/qcserial.c
drivers/usb/storage/unusual_devs.h

index 385acb895ab3518bcbd712ccf91e669220e0a5ea..3f94ac34dce31b80440689ae7f0d319a7d2f908c 100644 (file)
@@ -268,7 +268,7 @@ usbtmc_abort_bulk_in_status:
                                dev_err(dev, "usb_bulk_msg returned %d\n", rv);
                                goto exit;
                        }
-               } while ((actual = max_size) &&
+               } while ((actual == max_size) &&
                         (n < USBTMC_MAX_READS_TO_CLEAR_BULK_IN));
 
        if (actual == max_size) {
index c962608b4b9abc8b7d403eefb567f2018f9ba98d..26678cadfb215340e35a9b56f5fe23954a13cdd9 100644 (file)
@@ -123,10 +123,11 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
        }
 
        if (usb_endpoint_xfer_isoc(&ep->desc))
-               max_tx = ep->desc.wMaxPacketSize * (desc->bMaxBurst + 1) *
-                       (desc->bmAttributes + 1);
+               max_tx = (desc->bMaxBurst + 1) * (desc->bmAttributes + 1) *
+                       le16_to_cpu(ep->desc.wMaxPacketSize);
        else if (usb_endpoint_xfer_int(&ep->desc))
-               max_tx = ep->desc.wMaxPacketSize * (desc->bMaxBurst + 1);
+               max_tx = le16_to_cpu(ep->desc.wMaxPacketSize) *
+                       (desc->bMaxBurst + 1);
        else
                max_tx = 999999;
        if (le16_to_cpu(desc->wBytesPerInterval) > max_tx) {
@@ -134,10 +135,10 @@ static void usb_parse_ss_endpoint_companion(struct device *ddev, int cfgno,
                                "config %d interface %d altsetting %d ep %d: "
                                "setting to %d\n",
                                usb_endpoint_xfer_isoc(&ep->desc) ? "Isoc" : "Int",
-                               desc->wBytesPerInterval,
+                               le16_to_cpu(desc->wBytesPerInterval),
                                cfgno, inum, asnum, ep->desc.bEndpointAddress,
                                max_tx);
-               ep->ss_ep_comp.wBytesPerInterval = max_tx;
+               ep->ss_ep_comp.wBytesPerInterval = cpu_to_le16(max_tx);
        }
 }
 
index 44b6b40aafb425d157d85622593d0ef959f5ff2b..5a084b9cfa3c67971bfe86628cbf38de8c49ec3b 100644 (file)
@@ -310,7 +310,7 @@ config USB_PXA_U2O
 # musb builds in ../musb along with host support
 config USB_GADGET_MUSB_HDRC
        tristate "Inventra HDRC USB Peripheral (TI, ADI, ...)"
-       depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
+       depends on USB_MUSB_HDRC
        select USB_GADGET_DUALSPEED
        help
          This OTG-capable silicon IP is used in dual designs including
index 98cbc06c30fda338e74530636383f574c42df2bd..ddb118a76807a9f101e6ce34e3b59116eca04f76 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/proc_fs.h>
+#include <linux/prefetch.h>
 #include <linux/clk.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
index 5ef87794fd328743f635d07fd9b56d3429451d7c..aef47414f5d5cb621408d5c95a8cfe63d5d924c8 100644 (file)
@@ -1079,10 +1079,12 @@ composite_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
                        cdev->desc.bMaxPacketSize0 =
                                cdev->gadget->ep0->maxpacket;
                        if (gadget_is_superspeed(gadget)) {
-                               if (gadget->speed >= USB_SPEED_SUPER)
+                               if (gadget->speed >= USB_SPEED_SUPER) {
                                        cdev->desc.bcdUSB = cpu_to_le16(0x0300);
-                               else
+                                       cdev->desc.bMaxPacketSize0 = 9;
+                               } else {
                                        cdev->desc.bcdUSB = cpu_to_le16(0x0210);
+                               }
                        }
 
                        value = min(w_length, (u16) sizeof cdev->desc);
index 403a48bcf5609befe4db39dc9fe35a5c3685a8fc..83a266bdb40ef1a5888650654c30bdcb70aa32c4 100644 (file)
@@ -367,6 +367,13 @@ static int hidg_setup(struct usb_function *f,
        case ((USB_DIR_IN | USB_TYPE_STANDARD | USB_RECIP_INTERFACE) << 8
                  | USB_REQ_GET_DESCRIPTOR):
                switch (value >> 8) {
+               case HID_DT_HID:
+                       VDBG(cdev, "USB_REQ_GET_DESCRIPTOR: HID\n");
+                       length = min_t(unsigned short, length,
+                                                  hidg_desc.bLength);
+                       memcpy(req->buf, &hidg_desc, length);
+                       goto respond;
+                       break;
                case HID_DT_REPORT:
                        VDBG(cdev, "USB_REQ_GET_DESCRIPTOR: REPORT\n");
                        length = min_t(unsigned short, length,
index 24a924330c81f0d23bd70e5270c31ca97f0488c3..4ec888f900029ac823f2a136ef47ab18f03b5826 100644 (file)
@@ -609,107 +609,6 @@ void fusb300_rdcxf(struct fusb300 *fusb300,
        }
 }
 
-#if 0
-static void fusb300_dbg_fifo(struct fusb300_ep *ep,
-                               u8 entry, u16 length)
-{
-       u32 reg;
-       u32 i = 0;
-       u32 j = 0;
-
-       reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_GTM);
-       reg &= ~(FUSB300_GTM_TST_EP_ENTRY(0xF) |
-               FUSB300_GTM_TST_EP_NUM(0xF) | FUSB300_GTM_TST_FIFO_DEG);
-       reg |= (FUSB300_GTM_TST_EP_ENTRY(entry) |
-               FUSB300_GTM_TST_EP_NUM(ep->epnum) | FUSB300_GTM_TST_FIFO_DEG);
-       iowrite32(reg, ep->fusb300->reg + FUSB300_OFFSET_GTM);
-
-       for (i = 0; i < (length >> 2); i++) {
-               if (i * 4 == 1024)
-                       break;
-               reg = ioread32(ep->fusb300->reg +
-                       FUSB300_OFFSET_BUFDBG_START + i * 4);
-               printk(KERN_DEBUG"  0x%-8x", reg);
-               j++;
-               if ((j % 4)  == 0)
-                       printk(KERN_DEBUG "\n");
-       }
-
-       if (length % 4) {
-               reg = ioread32(ep->fusb300->reg +
-                       FUSB300_OFFSET_BUFDBG_START + i * 4);
-               printk(KERN_DEBUG "  0x%x\n", reg);
-       }
-
-       if ((j % 4)  != 0)
-               printk(KERN_DEBUG "\n");
-
-       fusb300_disable_bit(ep->fusb300, FUSB300_OFFSET_GTM,
-               FUSB300_GTM_TST_FIFO_DEG);
-}
-
-static void fusb300_cmp_dbg_fifo(struct fusb300_ep *ep,
-                               u8 entry, u16 length, u8 *golden)
-{
-       u32 reg;
-       u32 i = 0;
-       u32 golden_value;
-       u8 *tmp;
-
-       tmp = golden;
-
-       printk(KERN_DEBUG "fusb300_cmp_dbg_fifo (entry %d) : start\n", entry);
-
-       reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_GTM);
-       reg &= ~(FUSB300_GTM_TST_EP_ENTRY(0xF) |
-               FUSB300_GTM_TST_EP_NUM(0xF) | FUSB300_GTM_TST_FIFO_DEG);
-       reg |= (FUSB300_GTM_TST_EP_ENTRY(entry) |
-               FUSB300_GTM_TST_EP_NUM(ep->epnum) | FUSB300_GTM_TST_FIFO_DEG);
-       iowrite32(reg, ep->fusb300->reg + FUSB300_OFFSET_GTM);
-
-       for (i = 0; i < (length >> 2); i++) {
-               if (i * 4 == 1024)
-                       break;
-               golden_value = *tmp | *(tmp + 1) << 8 |
-                               *(tmp + 2) << 16 | *(tmp + 3) << 24;
-
-               reg = ioread32(ep->fusb300->reg +
-                       FUSB300_OFFSET_BUFDBG_START + i*4);
-
-               if (reg != golden_value) {
-                       printk(KERN_DEBUG "0x%x  :  ", (u32)(ep->fusb300->reg +
-                               FUSB300_OFFSET_BUFDBG_START + i*4));
-                       printk(KERN_DEBUG "    golden = 0x%x, reg = 0x%x\n",
-                               golden_value, reg);
-               }
-               tmp += 4;
-       }
-
-       switch (length % 4) {
-       case 1:
-               golden_value = *tmp;
-       case 2:
-               golden_value = *tmp | *(tmp + 1) << 8;
-       case 3:
-               golden_value = *tmp | *(tmp + 1) << 8 | *(tmp + 2) << 16;
-       default:
-               break;
-
-       reg = ioread32(ep->fusb300->reg + FUSB300_OFFSET_BUFDBG_START + i*4);
-       if (reg != golden_value) {
-               printk(KERN_DEBUG "0x%x:", (u32)(ep->fusb300->reg +
-                       FUSB300_OFFSET_BUFDBG_START + i*4));
-               printk(KERN_DEBUG "  golden = 0x%x, reg = 0x%x\n",
-                       golden_value, reg);
-       }
-       }
-
-       printk(KERN_DEBUG "fusb300_cmp_dbg_fifo : end\n");
-       fusb300_disable_bit(ep->fusb300, FUSB300_OFFSET_GTM,
-               FUSB300_GTM_TST_FIFO_DEG);
-}
-#endif
-
 static void fusb300_rdfifo(struct fusb300_ep *ep,
                          struct fusb300_request *req,
                          u32 length)
index 7c7b0e120d8892e118bc078ddf1baa655902bc00..ab98ea926a11b6e227cfe4b800e4b94dd50c27f2 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/ioport.h>
-#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/prefetch.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/timer.h>
index 85c1b0d66293c72fe1577ea506faeb1b7cfb1d41..8d31848aab091534ae998e588f7803c88ea121c9 100644 (file)
@@ -2060,6 +2060,7 @@ static int s3c2410_udc_resume(struct platform_device *pdev)
 static const struct platform_device_id s3c_udc_ids[] = {
        { "s3c2410-usbgadget", },
        { "s3c2440-usbgadget", },
+       { }
 };
 MODULE_DEVICE_TABLE(platform, s3c_udc_ids);
 
index bf2c8f65e1aefc6c4d89e9dfe15a9f4a804f090e..e051b30c1847804f6b94e188521a865e036108ea 100644 (file)
@@ -1046,7 +1046,19 @@ static int ehci_hub_control (
                        if (!selector || selector > 5)
                                goto error;
                        ehci_quiesce(ehci);
+
+                       /* Put all enabled ports into suspend */
+                       while (ports--) {
+                               u32 __iomem *sreg =
+                                               &ehci->regs->port_status[ports];
+
+                               temp = ehci_readl(ehci, sreg) & ~PORT_RWC_BITS;
+                               if (temp & PORT_PE)
+                                       ehci_writel(ehci, temp | PORT_SUSPEND,
+                                                       sreg);
+                       }
                        ehci_halt(ehci);
+                       temp = ehci_readl(ehci, status_reg);
                        temp |= selector << 16;
                        ehci_writel(ehci, temp, status_reg);
                        break;
index 0c058be35a3887d5a36b9ffa005873f6824e9457..555a73c864b57567229629e8e3432f7a710a7816 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/usb/ulpi.h>
 #include <linux/slab.h>
 
+#include <mach/hardware.h>
 #include <mach/mxc_ehci.h>
 
 #include <asm/mach-types.h>
index 55a57c23dd0feac7a07ce10ff5208900564d696d..45240321ca09e774ccf41f58e8f13a58b989d5e1 100644 (file)
@@ -98,6 +98,18 @@ static void omap_ehci_soft_phy_reset(struct platform_device *pdev, u8 port)
        }
 }
 
+static void disable_put_regulator(
+               struct ehci_hcd_omap_platform_data *pdata)
+{
+       int i;
+
+       for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
+               if (pdata->regulator[i]) {
+                       regulator_disable(pdata->regulator[i]);
+                       regulator_put(pdata->regulator[i]);
+               }
+       }
+}
 
 /* configure so an HC device and id are always provided */
 /* always called with process context; sleeping is OK */
@@ -231,9 +243,11 @@ err_add_hcd:
        omap_usbhs_disable(dev);
 
 err_enable:
+       disable_put_regulator(pdata);
        usb_put_hcd(hcd);
 
 err_io:
+       iounmap(regs);
        return ret;
 }
 
@@ -253,6 +267,8 @@ static int ehci_hcd_omap_remove(struct platform_device *pdev)
 
        usb_remove_hcd(hcd);
        omap_usbhs_disable(dev);
+       disable_put_regulator(dev->platform_data);
+       iounmap(hcd->regs);
        usb_put_hcd(hcd);
        return 0;
 }
index 55d3d5859ac5667da2332a3a782588e4541bbdc9..840beda66dd94aa378c506918ffad093e1ba4052 100644 (file)
@@ -1583,6 +1583,9 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
        int retval = 0;
 
        spin_lock_irqsave(&priv->lock, spinflags);
+       retval = usb_hcd_check_unlink_urb(hcd, urb, status);
+       if (retval)
+               goto out;
 
        qh = urb->ep->hcpriv;
        if (!qh) {
index a9d315906e3dede9caa39571742a3c34c76b55ee..629a96813fd66a9ebde456a2232a572c13f13dba 100644 (file)
@@ -535,7 +535,7 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
        iounmap(base);
 }
 
-static const struct dmi_system_id __initconst ehci_dmi_nohandoff_table[] = {
+static const struct dmi_system_id __devinitconst ehci_dmi_nohandoff_table[] = {
        {
                /*  Pegatron Lucid (ExoPC) */
                .matches = {
@@ -817,7 +817,7 @@ static void __devinit quirk_usb_handoff_xhci(struct pci_dev *pdev)
 
        /* If the BIOS owns the HC, signal that the OS wants it, and wait */
        if (val & XHCI_HC_BIOS_OWNED) {
-               writel(val & XHCI_HC_OS_OWNED, base + ext_cap_offset);
+               writel(val | XHCI_HC_OS_OWNED, base + ext_cap_offset);
 
                /* Wait for 5 seconds with 10 microsecond polling interval */
                timeout = handshake(base + ext_cap_offset, XHCI_HC_BIOS_OWNED,
index 763f484bc092d1a60660411580738a519410f01a..1c4432d8fc1048f2e3bb838b63a0be84201f2a82 100644 (file)
@@ -345,7 +345,8 @@ static void xhci_event_ring_work(unsigned long arg)
        spin_lock_irqsave(&xhci->lock, flags);
        temp = xhci_readl(xhci, &xhci->op_regs->status);
        xhci_dbg(xhci, "op reg status = 0x%x\n", temp);
-       if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING)) {
+       if (temp == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING) ||
+                       (xhci->xhc_state & XHCI_STATE_HALTED)) {
                xhci_dbg(xhci, "HW died, polling stopped.\n");
                spin_unlock_irqrestore(&xhci->lock, flags);
                return;
@@ -939,8 +940,11 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
                return 0;
        }
 
+       xhci = hcd_to_xhci(hcd);
+       if (xhci->xhc_state & XHCI_STATE_HALTED)
+               return -ENODEV;
+
        if (check_virt_dev) {
-               xhci = hcd_to_xhci(hcd);
                if (!udev->slot_id || !xhci->devs
                        || !xhci->devs[udev->slot_id]) {
                        printk(KERN_DEBUG "xHCI %s called with unaddressed "
@@ -1242,7 +1246,8 @@ int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
                xhci_urb_free_priv(xhci, urb_priv);
                return ret;
        }
-       if (xhci->xhc_state & XHCI_STATE_DYING) {
+       if ((xhci->xhc_state & XHCI_STATE_DYING) ||
+                       (xhci->xhc_state & XHCI_STATE_HALTED)) {
                xhci_dbg(xhci, "Ep 0x%x: URB %p to be canceled on "
                                "non-responsive xHCI host.\n",
                                urb->ep->desc.bEndpointAddress, urb);
@@ -2665,7 +2670,10 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
        int i, ret;
 
        ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__);
-       if (ret <= 0)
+       /* If the host is halted due to driver unload, we still need to free the
+        * device.
+        */
+       if (ret <= 0 && ret != -ENODEV)
                return;
 
        virt_dev = xhci->devs[udev->slot_id];
@@ -2679,7 +2687,8 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
        spin_lock_irqsave(&xhci->lock, flags);
        /* Don't disable the slot if the host controller is dead. */
        state = xhci_readl(xhci, &xhci->op_regs->status);
-       if (state == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING)) {
+       if (state == 0xffffffff || (xhci->xhc_state & XHCI_STATE_DYING) ||
+                       (xhci->xhc_state & XHCI_STATE_HALTED)) {
                xhci_free_virt_device(xhci, udev->slot_id);
                spin_unlock_irqrestore(&xhci->lock, flags);
                return;
index 6192b45959f434d2e32b10a9e404f0f7c02fbd47..fc34b8b1191055bcb568a171a518d389b4266f25 100644 (file)
@@ -3,9 +3,6 @@
 # for silicon based on Mentor Graphics INVENTRA designs
 #
 
-comment "Enable Host or Gadget support to see Inventra options"
-       depends on !USB && USB_GADGET=n
-
 # (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
 config USB_MUSB_HDRC
        depends on USB && USB_GADGET
index b67a062f556bb65d56fead8404546dfcfb75f541..8c41a2e6ea7702e8906771d3bf5e7810ad412937 100644 (file)
@@ -1698,6 +1698,8 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
 
        is_on = !!is_on;
 
+       pm_runtime_get_sync(musb->controller);
+
        /* NOTE: this assumes we are sensing vbus; we'd rather
         * not pullup unless the B-session is active.
         */
@@ -1707,6 +1709,9 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
                musb_pullup(musb, is_on);
        }
        spin_unlock_irqrestore(&musb->lock, flags);
+
+       pm_runtime_put(musb->controller);
+
        return 0;
 }
 
index c784e6c03aac7fbc4cfec0927ee689496ab61749..07c8a73dfe41c4d565f8f36b2134bdc373e7b5bb 100644 (file)
@@ -89,7 +89,7 @@ static inline int tusb_omap_use_shared_dmareq(struct tusb_omap_dma_ch *chdat)
        u32             reg = musb_readl(chdat->tbase, TUSB_DMA_EP_MAP);
 
        if (reg != 0) {
-               dev_dbg(musb->controller, "ep%i dmareq0 is busy for ep%i\n",
+               dev_dbg(chdat->musb->controller, "ep%i dmareq0 is busy for ep%i\n",
                        chdat->epnum, reg & 0xf);
                return -EAGAIN;
        }
index ba79dbf5adbcc6cc5ab9080700d9b2c32b2ba775..cb2d451d511ec07bbd099c05b43c3ffa3ad0a27e 100644 (file)
@@ -14,6 +14,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
+#include <linux/dma-mapping.h>
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
@@ -76,7 +77,7 @@ struct usbhsg_recip_handle {
                struct usbhsg_gpriv, mod)
 
 #define __usbhsg_for_each_uep(start, pos, g, i)        \
-       for (i = start, pos = (g)->uep;         \
+       for (i = start, pos = (g)->uep + i;     \
             i < (g)->uep_size;                 \
             i++, pos = (g)->uep + i)
 
index 2e06b90aa1f8f50139c8873011f1c34956077b63..78a2cf9551cc725d220c76b13420dcd21fc78716 100644 (file)
@@ -151,6 +151,7 @@ static struct ftdi_sio_quirk ftdi_stmclite_quirk = {
  * /sys/bus/usb/ftdi_sio/new_id, then send patch/report!
  */
 static struct usb_device_id id_table_combined [] = {
+       { USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
@@ -1171,7 +1172,7 @@ static __u32 get_ftdi_divisor(struct tty_struct *tty,
        case FT2232H: /* FT2232H chip */
        case FT4232H: /* FT4232H chip */
        case FT232H:  /* FT232H chip */
-               if ((baud <= 12000000) & (baud >= 1200)) {
+               if ((baud <= 12000000) && (baud >= 1200)) {
                        div_value = ftdi_2232h_baud_to_divisor(baud);
                } else if (baud < 1200) {
                        div_value = ftdi_232bm_baud_to_divisor(baud);
@@ -1205,7 +1206,10 @@ static int change_speed(struct tty_struct *tty, struct usb_serial_port *port)
        urb_index_value = get_ftdi_divisor(tty, port);
        urb_value = (__u16)urb_index_value;
        urb_index = (__u16)(urb_index_value >> 16);
-       if (priv->interface) {  /* FT2232C */
+       if ((priv->chip_type == FT2232C) || (priv->chip_type == FT2232H) ||
+               (priv->chip_type == FT4232H) || (priv->chip_type == FT232H)) {
+               /* Probably the BM type needs the MSB of the encoded fractional
+                * divider also moved like for the chips above. Any infos? */
                urb_index = (__u16)((urb_index << 8) | priv->interface);
        }
 
index 19156d1049fe22134e745158a6dc64da1a9d0a1b..bf5227ad3ef7b7c55dfe00cb2ea5d5e5911f44ff 100644 (file)
 /* USB-Nano-485*/
 #define FTDI_CTI_NANO_PID      0xF60B
 
-
+/*
+ * ZeitControl cardsystems GmbH rfid-readers http://zeitconrol.de
+ */
+/* TagTracer MIFARE*/
+#define FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID   0xF7C0
index 60b25d8ea0e2c14376ee4fad71d21a680f0502f7..815656198914ddee0a4e5ca51fc5b2786ba5a94a 100644 (file)
@@ -148,6 +148,10 @@ static void option_instat_callback(struct urb *urb);
 #define HUAWEI_PRODUCT_K4505                   0x1464
 #define HUAWEI_PRODUCT_K3765                   0x1465
 #define HUAWEI_PRODUCT_E14AC                   0x14AC
+#define HUAWEI_PRODUCT_K3770                   0x14C9
+#define HUAWEI_PRODUCT_K3771                   0x14CA
+#define HUAWEI_PRODUCT_K4510                   0x14CB
+#define HUAWEI_PRODUCT_K4511                   0x14CC
 #define HUAWEI_PRODUCT_ETS1220                 0x1803
 #define HUAWEI_PRODUCT_E353                    0x1506
 
@@ -547,6 +551,14 @@ static const struct usb_device_id option_ids[] = {
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3765, 0xff, 0xff, 0xff) },
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_ETS1220, 0xff, 0xff, 0xff) },
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E14AC, 0xff, 0xff, 0xff) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x32) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x31) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4510, 0xff, 0x01, 0x32) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x31) },
+       { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4511, 0xff, 0x01, 0x32) },
        { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E353, 0xff, 0x01, 0x01) },
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) },
        { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) },
index 54a9dab1f33b4e4d335201d04572499ab701c424..aeccc7f0a93c5db645fa0442b433ba2291265af2 100644 (file)
@@ -45,6 +45,7 @@ static const struct usb_device_id id_table[] = {
        {USB_DEVICE(0x05c6, 0x9203)},   /* Generic Gobi Modem device */
        {USB_DEVICE(0x05c6, 0x9222)},   /* Generic Gobi Modem device */
        {USB_DEVICE(0x05c6, 0x9008)},   /* Generic Gobi QDL device */
+       {USB_DEVICE(0x05c6, 0x9009)},   /* Generic Gobi Modem device */
        {USB_DEVICE(0x05c6, 0x9201)},   /* Generic Gobi QDL device */
        {USB_DEVICE(0x05c6, 0x9221)},   /* Generic Gobi QDL device */
        {USB_DEVICE(0x05c6, 0x9231)},   /* Generic Gobi QDL device */
@@ -78,6 +79,7 @@ static const struct usb_device_id id_table[] = {
        {USB_DEVICE(0x1199, 0x9008)},   /* Sierra Wireless Gobi 2000 Modem device (VT773) */
        {USB_DEVICE(0x1199, 0x9009)},   /* Sierra Wireless Gobi 2000 Modem device (VT773) */
        {USB_DEVICE(0x1199, 0x900a)},   /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+       {USB_DEVICE(0x1199, 0x9011)},   /* Sierra Wireless Gobi 2000 Modem device (MC8305) */
        {USB_DEVICE(0x16d8, 0x8001)},   /* CMDTech Gobi 2000 QDL device (VU922) */
        {USB_DEVICE(0x16d8, 0x8002)},   /* CMDTech Gobi 2000 Modem device (VU922) */
        {USB_DEVICE(0x05c6, 0x9204)},   /* Gobi 2000 QDL device */
index ccff3483eebc87d0c82a562cbffa3f5ab36ab878..3041a974faf39278ef8fad4033e089f8e64b7b9c 100644 (file)
@@ -1988,6 +1988,16 @@ UNUSUAL_DEV(  0x4146, 0xba01, 0x0100, 0x0100,
                "Micro Mini 1GB",
                USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ),
 
+/*
+ * Nick Bowler <nbowler@elliptictech.com>
+ * SCSI stack spams (otherwise harmless) error messages.
+ */
+UNUSUAL_DEV(  0xc251, 0x4003, 0x0100, 0x0100,
+               "Keil Software, Inc.",
+               "V2M MotherBoard",
+               USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+               US_FL_NOT_LOCKABLE),
+
 /* Reported by Andrew Simmons <andrew.simmons@gmail.com> */
 UNUSUAL_DEV(  0xed06, 0x4500, 0x0001, 0x0001,
                "DataStor",