Commit 7b2aa037 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: fix oops on disconnect in cdc-acm
  USB: storage: include Prolific Technology USB drive in unusual_devs list
  USB: ftdi_sio: add product_id for Marvell OpenRD Base, Client
  USB: ftdi_sio: add vendor and product id for Bayer glucose meter serial converter cable
  USB: EHCI: fix counting of transaction error retries
  USB: EHCI: fix two new bugs related to Clear-TT-Buffer
  USB: usbfs: fix -ENOENT error code to be -ENODEV
  USB: musb: fix the nop registration for OMAP3EVM
  USB: devio: Properly do access_ok() checks
  USB: pl2303: New vendor and product id
parents 710ad849 cf7fdd57
...@@ -1107,7 +1107,7 @@ CONFIG_USB_ZERO=m ...@@ -1107,7 +1107,7 @@ CONFIG_USB_ZERO=m
CONFIG_USB_OTG_UTILS=y CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set # CONFIG_USB_GPIO_VBUS is not set
# CONFIG_ISP1301_OMAP is not set # CONFIG_ISP1301_OMAP is not set
CONFIG_TWL4030_USB=y # CONFIG_TWL4030_USB is not set
# CONFIG_NOP_USB_XCEIV is not set # CONFIG_NOP_USB_XCEIV is not set
CONFIG_MMC=y CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set # CONFIG_MMC_DEBUG is not set
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/spi/ads7846.h> #include <linux/spi/ads7846.h>
#include <linux/i2c/twl4030.h> #include <linux/i2c/twl4030.h>
#include <linux/usb/otg.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -307,6 +308,10 @@ static void __init omap3_evm_init(void) ...@@ -307,6 +308,10 @@ static void __init omap3_evm_init(void)
ARRAY_SIZE(omap3evm_spi_board_info)); ARRAY_SIZE(omap3evm_spi_board_info));
omap_serial_init(); omap_serial_init();
#ifdef CONFIG_NOP_USB_XCEIV
/* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
usb_nop_xceiv_register();
#endif
usb_musb_init(); usb_musb_init();
ads7846_dev_init(); ads7846_dev_init();
} }
......
...@@ -155,20 +155,6 @@ static struct platform_device musb_device = { ...@@ -155,20 +155,6 @@ static struct platform_device musb_device = {
.resource = musb_resources, .resource = musb_resources,
}; };
#ifdef CONFIG_NOP_USB_XCEIV
static u64 nop_xceiv_dmamask = DMA_BIT_MASK(32);
static struct platform_device nop_xceiv_device = {
.name = "nop_usb_xceiv",
.id = -1,
.dev = {
.dma_mask = &nop_xceiv_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
.platform_data = NULL,
},
};
#endif
void __init usb_musb_init(void) void __init usb_musb_init(void)
{ {
if (cpu_is_omap243x()) if (cpu_is_omap243x())
...@@ -183,13 +169,6 @@ void __init usb_musb_init(void) ...@@ -183,13 +169,6 @@ void __init usb_musb_init(void)
*/ */
musb_plat.clock = "ick"; musb_plat.clock = "ick";
#ifdef CONFIG_NOP_USB_XCEIV
if (platform_device_register(&nop_xceiv_device) < 0) {
printk(KERN_ERR "Unable to register NOP-XCEIV device\n");
return;
}
#endif
if (platform_device_register(&musb_device) < 0) { if (platform_device_register(&musb_device) < 0) {
printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
return; return;
......
...@@ -387,7 +387,6 @@ static void acm_rx_tasklet(unsigned long _acm) ...@@ -387,7 +387,6 @@ static void acm_rx_tasklet(unsigned long _acm)
struct acm_ru *rcv; struct acm_ru *rcv;
unsigned long flags; unsigned long flags;
unsigned char throttled; unsigned char throttled;
struct usb_host_endpoint *ep;
dbg("Entering acm_rx_tasklet"); dbg("Entering acm_rx_tasklet");
...@@ -463,14 +462,12 @@ static void acm_rx_tasklet(unsigned long _acm) ...@@ -463,14 +462,12 @@ static void acm_rx_tasklet(unsigned long _acm)
rcv->buffer = buf; rcv->buffer = buf;
ep = (usb_pipein(acm->rx_endpoint) ? acm->dev->ep_in : acm->dev->ep_out) if (acm->is_int_ep)
[usb_pipeendpoint(acm->rx_endpoint)];
if (usb_endpoint_xfer_int(&ep->desc))
usb_fill_int_urb(rcv->urb, acm->dev, usb_fill_int_urb(rcv->urb, acm->dev,
acm->rx_endpoint, acm->rx_endpoint,
buf->base, buf->base,
acm->readsize, acm->readsize,
acm_read_bulk, rcv, ep->desc.bInterval); acm_read_bulk, rcv, acm->bInterval);
else else
usb_fill_bulk_urb(rcv->urb, acm->dev, usb_fill_bulk_urb(rcv->urb, acm->dev,
acm->rx_endpoint, acm->rx_endpoint,
...@@ -1183,6 +1180,9 @@ static int acm_probe(struct usb_interface *intf, ...@@ -1183,6 +1180,9 @@ static int acm_probe(struct usb_interface *intf,
spin_lock_init(&acm->read_lock); spin_lock_init(&acm->read_lock);
mutex_init(&acm->mutex); mutex_init(&acm->mutex);
acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress); acm->rx_endpoint = usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress);
acm->is_int_ep = usb_endpoint_xfer_int(epread);
if (acm->is_int_ep)
acm->bInterval = epread->bInterval;
tty_port_init(&acm->port); tty_port_init(&acm->port);
acm->port.ops = &acm_port_ops; acm->port.ops = &acm_port_ops;
......
...@@ -126,6 +126,8 @@ struct acm { ...@@ -126,6 +126,8 @@ struct acm {
unsigned int ctrl_caps; /* control capabilities from the class specific header */ unsigned int ctrl_caps; /* control capabilities from the class specific header */
unsigned int susp_count; /* number of suspended interfaces */ unsigned int susp_count; /* number of suspended interfaces */
int combined_interfaces:1; /* control and data collapsed */ int combined_interfaces:1; /* control and data collapsed */
int is_int_ep:1; /* interrupt endpoints contrary to spec used */
u8 bInterval;
struct acm_wb *delayed_wb; /* write queued for a device about to be woken */ struct acm_wb *delayed_wb; /* write queued for a device about to be woken */
}; };
......
...@@ -595,7 +595,7 @@ static int usbdev_open(struct inode *inode, struct file *file) ...@@ -595,7 +595,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
if (!ps) if (!ps)
goto out; goto out;
ret = -ENOENT; ret = -ENODEV;
/* usbdev device-node */ /* usbdev device-node */
if (imajor(inode) == USB_DEVICE_MAJOR) if (imajor(inode) == USB_DEVICE_MAJOR)
...@@ -1321,7 +1321,8 @@ static int get_urb32(struct usbdevfs_urb *kurb, ...@@ -1321,7 +1321,8 @@ static int get_urb32(struct usbdevfs_urb *kurb,
struct usbdevfs_urb32 __user *uurb) struct usbdevfs_urb32 __user *uurb)
{ {
__u32 uptr; __u32 uptr;
if (get_user(kurb->type, &uurb->type) || if (!access_ok(VERIFY_READ, uurb, sizeof(*uurb)) ||
__get_user(kurb->type, &uurb->type) ||
__get_user(kurb->endpoint, &uurb->endpoint) || __get_user(kurb->endpoint, &uurb->endpoint) ||
__get_user(kurb->status, &uurb->status) || __get_user(kurb->status, &uurb->status) ||
__get_user(kurb->flags, &uurb->flags) || __get_user(kurb->flags, &uurb->flags) ||
...@@ -1536,8 +1537,9 @@ static int proc_ioctl_compat(struct dev_state *ps, compat_uptr_t arg) ...@@ -1536,8 +1537,9 @@ static int proc_ioctl_compat(struct dev_state *ps, compat_uptr_t arg)
u32 udata; u32 udata;
uioc = compat_ptr((long)arg); uioc = compat_ptr((long)arg);
if (get_user(ctrl.ifno, &uioc->ifno) || if (!access_ok(VERIFY_READ, uioc, sizeof(*uioc)) ||
get_user(ctrl.ioctl_code, &uioc->ioctl_code) || __get_user(ctrl.ifno, &uioc->ifno) ||
__get_user(ctrl.ioctl_code, &uioc->ioctl_code) ||
__get_user(udata, &uioc->data)) __get_user(udata, &uioc->data))
return -EFAULT; return -EFAULT;
ctrl.data = compat_ptr(udata); ctrl.data = compat_ptr(udata);
......
...@@ -903,7 +903,8 @@ static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) ...@@ -903,7 +903,8 @@ static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
/* already started */ /* already started */
break; break;
case QH_STATE_IDLE: case QH_STATE_IDLE:
WARN_ON(1); /* QH might be waiting for a Clear-TT-Buffer */
qh_completions(ehci, qh);
break; break;
} }
break; break;
......
...@@ -375,12 +375,11 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) ...@@ -375,12 +375,11 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
*/ */
if ((token & QTD_STS_XACT) && if ((token & QTD_STS_XACT) &&
QTD_CERR(token) == 0 && QTD_CERR(token) == 0 &&
--qh->xacterrs > 0 && ++qh->xacterrs < QH_XACTERR_MAX &&
!urb->unlinked) { !urb->unlinked) {
ehci_dbg(ehci, ehci_dbg(ehci,
"detected XactErr len %zu/%zu retry %d\n", "detected XactErr len %zu/%zu retry %d\n",
qtd->length - QTD_LENGTH(token), qtd->length, qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs);
QH_XACTERR_MAX - qh->xacterrs);
/* reset the token in the qtd and the /* reset the token in the qtd and the
* qh overlay (which still contains * qh overlay (which still contains
...@@ -494,7 +493,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh) ...@@ -494,7 +493,7 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
last = qtd; last = qtd;
/* reinit the xacterr counter for the next qtd */ /* reinit the xacterr counter for the next qtd */
qh->xacterrs = QH_XACTERR_MAX; qh->xacterrs = 0;
} }
/* last urb's completion might still need calling */ /* last urb's completion might still need calling */
...@@ -940,7 +939,8 @@ static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh) ...@@ -940,7 +939,8 @@ static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
head->qh_next.qh = qh; head->qh_next.qh = qh;
head->hw_next = dma; head->hw_next = dma;
qh->xacterrs = QH_XACTERR_MAX; qh_get(qh);
qh->xacterrs = 0;
qh->qh_state = QH_STATE_LINKED; qh->qh_state = QH_STATE_LINKED;
/* qtd completions reported later by interrupt */ /* qtd completions reported later by interrupt */
} }
...@@ -1080,7 +1080,7 @@ submit_async ( ...@@ -1080,7 +1080,7 @@ submit_async (
* the HC and TT handle it when the TT has a buffer ready. * the HC and TT handle it when the TT has a buffer ready.
*/ */
if (likely (qh->qh_state == QH_STATE_IDLE)) if (likely (qh->qh_state == QH_STATE_IDLE))
qh_link_async (ehci, qh_get (qh)); qh_link_async(ehci, qh);
done: done:
spin_unlock_irqrestore (&ehci->lock, flags); spin_unlock_irqrestore (&ehci->lock, flags);
if (unlikely (qh == NULL)) if (unlikely (qh == NULL))
...@@ -1115,8 +1115,6 @@ static void end_unlink_async (struct ehci_hcd *ehci) ...@@ -1115,8 +1115,6 @@ static void end_unlink_async (struct ehci_hcd *ehci)
&& HC_IS_RUNNING (ehci_to_hcd(ehci)->state)) && HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
qh_link_async (ehci, qh); qh_link_async (ehci, qh);
else { else {
qh_put (qh); // refcount from async list
/* it's not free to turn the async schedule on/off; leave it /* it's not free to turn the async schedule on/off; leave it
* active but idle for a while once it empties. * active but idle for a while once it empties.
*/ */
...@@ -1124,6 +1122,7 @@ static void end_unlink_async (struct ehci_hcd *ehci) ...@@ -1124,6 +1122,7 @@ static void end_unlink_async (struct ehci_hcd *ehci)
&& ehci->async->qh_next.qh == NULL) && ehci->async->qh_next.qh == NULL)
timer_action (ehci, TIMER_ASYNC_OFF); timer_action (ehci, TIMER_ASYNC_OFF);
} }
qh_put(qh); /* refcount from async list */
if (next) { if (next) {
ehci->reclaim = NULL; ehci->reclaim = NULL;
......
...@@ -542,6 +542,7 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh) ...@@ -542,6 +542,7 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
} }
} }
qh->qh_state = QH_STATE_LINKED; qh->qh_state = QH_STATE_LINKED;
qh->xacterrs = 0;
qh_get (qh); qh_get (qh);
/* update per-qh bandwidth for usbfs */ /* update per-qh bandwidth for usbfs */
......
...@@ -12,6 +12,7 @@ config USB_MUSB_HDRC ...@@ -12,6 +12,7 @@ config USB_MUSB_HDRC
depends on !SUPERH depends on !SUPERH
select NOP_USB_XCEIV if ARCH_DAVINCI select NOP_USB_XCEIV if ARCH_DAVINCI
select TWL4030_USB if MACH_OMAP_3430SDP select TWL4030_USB if MACH_OMAP_3430SDP
select NOP_USB_XCEIV if MACH_OMAP3EVM
select USB_OTG_UTILS select USB_OTG_UTILS
tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)' tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
help help
......
...@@ -699,6 +699,9 @@ static struct usb_device_id id_table_combined [] = { ...@@ -699,6 +699,9 @@ static struct usb_device_id id_table_combined [] = {
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
{ USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) }, { USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_PID) },
{ USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) }, { USB_DEVICE(GN_OTOMETRICS_VID, AURICAL_USB_PID) },
{ USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) },
{ USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
{ }, /* Optional parameter entry */ { }, /* Optional parameter entry */
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
......
...@@ -953,6 +953,20 @@ ...@@ -953,6 +953,20 @@
#define GN_OTOMETRICS_VID 0x0c33 /* Vendor ID */ #define GN_OTOMETRICS_VID 0x0c33 /* Vendor ID */
#define AURICAL_USB_PID 0x0010 /* Aurical USB Audiometer */ #define AURICAL_USB_PID 0x0010 /* Aurical USB Audiometer */
/*
* Bayer Ascensia Contour blood glucose meter USB-converter cable.
* http://winglucofacts.com/cables/
*/
#define BAYER_VID 0x1A79
#define BAYER_CONTOUR_CABLE_PID 0x6001
/*
* Marvell OpenRD Base, Client
* http://www.open-rd.org
* OpenRD Base, Client use VID 0x0403
*/
#define MARVELL_OPENRD_PID 0x9e90
/* /*
* BmRequestType: 1100 0000b * BmRequestType: 1100 0000b
* bRequest: FTDI_E2_READ * bRequest: FTDI_E2_READ
......
...@@ -95,6 +95,7 @@ static struct usb_device_id id_table [] = { ...@@ -95,6 +95,7 @@ static struct usb_device_id id_table [] = {
{ USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) }, { USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) }, { USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
{ USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) },
{ USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) },
{ } /* Terminating entry */ { } /* Terminating entry */
}; };
......
...@@ -126,3 +126,7 @@ ...@@ -126,3 +126,7 @@
/* Cressi Edy (diving computer) PC interface */ /* Cressi Edy (diving computer) PC interface */
#define CRESSI_VENDOR_ID 0x04b8 #define CRESSI_VENDOR_ID 0x04b8
#define CRESSI_EDY_PRODUCT_ID 0x0521 #define CRESSI_EDY_PRODUCT_ID 0x0521
/* Sony, USB data cable for CMD-Jxx mobile phones */
#define SONY_VENDOR_ID 0x054c
#define SONY_QN3USB_PRODUCT_ID 0x0437
...@@ -838,6 +838,13 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001, ...@@ -838,6 +838,13 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001,
US_SC_DEVICE, US_PR_DEVICE, NULL, US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ), US_FL_FIX_CAPACITY ),
/* Reported by Rogerio Brito <rbrito@ime.usp.br> */
UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x001,
"Prolific Technology, Inc.",
"Mass Storage Device",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_NOT_LOCKABLE ),
/* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */ /* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */
/* Change to bcdDeviceMin (0x0100 to 0x0001) reported by /* Change to bcdDeviceMin (0x0100 to 0x0001) reported by
* Thomas Bartosik <tbartdev@gmx-topmail.de> */ * Thomas Bartosik <tbartdev@gmx-topmail.de> */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment