mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
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
This commit is contained in:
commit
7b2aa037e8
15 changed files with 59 additions and 40 deletions
|
@ -1107,7 +1107,7 @@ CONFIG_USB_ZERO=m
|
|||
CONFIG_USB_OTG_UTILS=y
|
||||
# CONFIG_USB_GPIO_VBUS 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_MMC=y
|
||||
# CONFIG_MMC_DEBUG is not set
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/ads7846.h>
|
||||
#include <linux/i2c/twl4030.h>
|
||||
#include <linux/usb/otg.h>
|
||||
|
||||
#include <mach/hardware.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -307,6 +308,10 @@ static void __init omap3_evm_init(void)
|
|||
ARRAY_SIZE(omap3evm_spi_board_info));
|
||||
|
||||
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();
|
||||
ads7846_dev_init();
|
||||
}
|
||||
|
|
|
@ -155,20 +155,6 @@ static struct platform_device musb_device = {
|
|||
.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)
|
||||
{
|
||||
if (cpu_is_omap243x())
|
||||
|
@ -183,13 +169,6 @@ void __init usb_musb_init(void)
|
|||
*/
|
||||
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) {
|
||||
printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
|
||||
return;
|
||||
|
|
|
@ -387,7 +387,6 @@ static void acm_rx_tasklet(unsigned long _acm)
|
|||
struct acm_ru *rcv;
|
||||
unsigned long flags;
|
||||
unsigned char throttled;
|
||||
struct usb_host_endpoint *ep;
|
||||
|
||||
dbg("Entering acm_rx_tasklet");
|
||||
|
||||
|
@ -463,14 +462,12 @@ urbs:
|
|||
|
||||
rcv->buffer = buf;
|
||||
|
||||
ep = (usb_pipein(acm->rx_endpoint) ? acm->dev->ep_in : acm->dev->ep_out)
|
||||
[usb_pipeendpoint(acm->rx_endpoint)];
|
||||
if (usb_endpoint_xfer_int(&ep->desc))
|
||||
if (acm->is_int_ep)
|
||||
usb_fill_int_urb(rcv->urb, acm->dev,
|
||||
acm->rx_endpoint,
|
||||
buf->base,
|
||||
acm->readsize,
|
||||
acm_read_bulk, rcv, ep->desc.bInterval);
|
||||
acm_read_bulk, rcv, acm->bInterval);
|
||||
else
|
||||
usb_fill_bulk_urb(rcv->urb, acm->dev,
|
||||
acm->rx_endpoint,
|
||||
|
@ -1183,6 +1180,9 @@ made_compressed_probe:
|
|||
spin_lock_init(&acm->read_lock);
|
||||
mutex_init(&acm->mutex);
|
||||
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);
|
||||
acm->port.ops = &acm_port_ops;
|
||||
|
||||
|
|
|
@ -126,6 +126,8 @@ struct acm {
|
|||
unsigned int ctrl_caps; /* control capabilities from the class specific header */
|
||||
unsigned int susp_count; /* number of suspended interfaces */
|
||||
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 */
|
||||
};
|
||||
|
||||
|
|
|
@ -595,7 +595,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
|
|||
if (!ps)
|
||||
goto out;
|
||||
|
||||
ret = -ENOENT;
|
||||
ret = -ENODEV;
|
||||
|
||||
/* usbdev device-node */
|
||||
if (imajor(inode) == USB_DEVICE_MAJOR)
|
||||
|
@ -1321,7 +1321,8 @@ static int get_urb32(struct usbdevfs_urb *kurb,
|
|||
struct usbdevfs_urb32 __user *uurb)
|
||||
{
|
||||
__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->status, &uurb->status) ||
|
||||
__get_user(kurb->flags, &uurb->flags) ||
|
||||
|
@ -1536,8 +1537,9 @@ static int proc_ioctl_compat(struct dev_state *ps, compat_uptr_t arg)
|
|||
u32 udata;
|
||||
|
||||
uioc = compat_ptr((long)arg);
|
||||
if (get_user(ctrl.ifno, &uioc->ifno) ||
|
||||
get_user(ctrl.ioctl_code, &uioc->ioctl_code) ||
|
||||
if (!access_ok(VERIFY_READ, uioc, sizeof(*uioc)) ||
|
||||
__get_user(ctrl.ifno, &uioc->ifno) ||
|
||||
__get_user(ctrl.ioctl_code, &uioc->ioctl_code) ||
|
||||
__get_user(udata, &uioc->data))
|
||||
return -EFAULT;
|
||||
ctrl.data = compat_ptr(udata);
|
||||
|
|
|
@ -903,7 +903,8 @@ static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
|
|||
/* already started */
|
||||
break;
|
||||
case QH_STATE_IDLE:
|
||||
WARN_ON(1);
|
||||
/* QH might be waiting for a Clear-TT-Buffer */
|
||||
qh_completions(ehci, qh);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -375,12 +375,11 @@ qh_completions (struct ehci_hcd *ehci, struct ehci_qh *qh)
|
|||
*/
|
||||
if ((token & QTD_STS_XACT) &&
|
||||
QTD_CERR(token) == 0 &&
|
||||
--qh->xacterrs > 0 &&
|
||||
++qh->xacterrs < QH_XACTERR_MAX &&
|
||||
!urb->unlinked) {
|
||||
ehci_dbg(ehci,
|
||||
"detected XactErr len %zu/%zu retry %d\n",
|
||||
qtd->length - QTD_LENGTH(token), qtd->length,
|
||||
QH_XACTERR_MAX - qh->xacterrs);
|
||||
qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs);
|
||||
|
||||
/* reset the token in the qtd and the
|
||||
* qh overlay (which still contains
|
||||
|
@ -494,7 +493,7 @@ halt:
|
|||
last = 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 */
|
||||
|
@ -940,7 +939,8 @@ static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh)
|
|||
head->qh_next.qh = qh;
|
||||
head->hw_next = dma;
|
||||
|
||||
qh->xacterrs = QH_XACTERR_MAX;
|
||||
qh_get(qh);
|
||||
qh->xacterrs = 0;
|
||||
qh->qh_state = QH_STATE_LINKED;
|
||||
/* qtd completions reported later by interrupt */
|
||||
}
|
||||
|
@ -1080,7 +1080,7 @@ submit_async (
|
|||
* the HC and TT handle it when the TT has a buffer ready.
|
||||
*/
|
||||
if (likely (qh->qh_state == QH_STATE_IDLE))
|
||||
qh_link_async (ehci, qh_get (qh));
|
||||
qh_link_async(ehci, qh);
|
||||
done:
|
||||
spin_unlock_irqrestore (&ehci->lock, flags);
|
||||
if (unlikely (qh == NULL))
|
||||
|
@ -1115,8 +1115,6 @@ static void end_unlink_async (struct ehci_hcd *ehci)
|
|||
&& HC_IS_RUNNING (ehci_to_hcd(ehci)->state))
|
||||
qh_link_async (ehci, qh);
|
||||
else {
|
||||
qh_put (qh); // refcount from async list
|
||||
|
||||
/* it's not free to turn the async schedule on/off; leave it
|
||||
* active but idle for a while once it empties.
|
||||
*/
|
||||
|
@ -1124,6 +1122,7 @@ static void end_unlink_async (struct ehci_hcd *ehci)
|
|||
&& ehci->async->qh_next.qh == NULL)
|
||||
timer_action (ehci, TIMER_ASYNC_OFF);
|
||||
}
|
||||
qh_put(qh); /* refcount from async list */
|
||||
|
||||
if (next) {
|
||||
ehci->reclaim = NULL;
|
||||
|
|
|
@ -542,6 +542,7 @@ static int qh_link_periodic (struct ehci_hcd *ehci, struct ehci_qh *qh)
|
|||
}
|
||||
}
|
||||
qh->qh_state = QH_STATE_LINKED;
|
||||
qh->xacterrs = 0;
|
||||
qh_get (qh);
|
||||
|
||||
/* update per-qh bandwidth for usbfs */
|
||||
|
|
|
@ -12,6 +12,7 @@ config USB_MUSB_HDRC
|
|||
depends on !SUPERH
|
||||
select NOP_USB_XCEIV if ARCH_DAVINCI
|
||||
select TWL4030_USB if MACH_OMAP_3430SDP
|
||||
select NOP_USB_XCEIV if MACH_OMAP3EVM
|
||||
select USB_OTG_UTILS
|
||||
tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
|
||||
help
|
||||
|
|
|
@ -699,6 +699,9 @@ static struct usb_device_id id_table_combined [] = {
|
|||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(LARSENBRUSGAARD_VID, LB_ALTITRACK_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 */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
|
|
@ -953,6 +953,20 @@
|
|||
#define GN_OTOMETRICS_VID 0x0c33 /* Vendor ID */
|
||||
#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
|
||||
* bRequest: FTDI_E2_READ
|
||||
|
|
|
@ -95,6 +95,7 @@ static struct usb_device_id id_table [] = {
|
|||
{ USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) },
|
||||
{ USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
|
||||
{ USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) },
|
||||
{ USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
|
|
|
@ -126,3 +126,7 @@
|
|||
/* Cressi Edy (diving computer) PC interface */
|
||||
#define CRESSI_VENDOR_ID 0x04b8
|
||||
#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,
|
|||
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
||||
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> */
|
||||
/* Change to bcdDeviceMin (0x0100 to 0x0001) reported by
|
||||
* Thomas Bartosik <tbartdev@gmx-topmail.de> */
|
||||
|
|
Loading…
Reference in a new issue