Commit a4083c92 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 cut-and-paste error in rtl8150.c
  USB: ehci: stop vt6212 bus hogging
  USB: sierra: add another device id
  USB: sierra: dma fixes
  USB: add support for Motorola ROKR Z6 cellphone in mass storage mode
  USB: isd200: fix memory leak in isd200_get_inquiry_data
  USB: pl2303: another product ID
  USB: new quirk flag to avoid Set-Interface
  USB: fix gadgetfs class request delegation
parents 4742dc1d 7fdba2f2
...@@ -376,7 +376,7 @@ static int alloc_all_urbs(rtl8150_t * dev) ...@@ -376,7 +376,7 @@ static int alloc_all_urbs(rtl8150_t * dev)
return 0; return 0;
} }
dev->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL); dev->ctrl_urb = usb_alloc_urb(0, GFP_KERNEL);
if (!dev->intr_urb) { if (!dev->ctrl_urb) {
usb_free_urb(dev->rx_urb); usb_free_urb(dev->rx_urb);
usb_free_urb(dev->tx_urb); usb_free_urb(dev->tx_urb);
usb_free_urb(dev->intr_urb); usb_free_urb(dev->intr_urb);
......
...@@ -1206,6 +1206,9 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) ...@@ -1206,6 +1206,9 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate)
return -EINVAL; return -EINVAL;
} }
if (dev->quirks & USB_QUIRK_NO_SET_INTF)
ret = -EPIPE;
else
ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE, USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE,
alternate, interface, NULL, 0, 5000); alternate, interface, NULL, 0, 5000);
......
...@@ -50,6 +50,9 @@ static const struct usb_device_id usb_quirk_list[] = { ...@@ -50,6 +50,9 @@ static const struct usb_device_id usb_quirk_list[] = {
/* M-Systems Flash Disk Pioneers */ /* M-Systems Flash Disk Pioneers */
{ USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME }, { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
/* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */
{ USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF },
/* Action Semiconductor flash disk */ /* Action Semiconductor flash disk */
{ USB_DEVICE(0x10d6, 0x2200), .driver_info = { USB_DEVICE(0x10d6, 0x2200), .driver_info =
USB_QUIRK_STRING_FETCH_255 }, USB_QUIRK_STRING_FETCH_255 },
......
...@@ -1458,7 +1458,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) ...@@ -1458,7 +1458,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
/* currently one config, two speeds */ /* currently one config, two speeds */
case USB_REQ_SET_CONFIGURATION: case USB_REQ_SET_CONFIGURATION:
if (ctrl->bRequestType != 0) if (ctrl->bRequestType != 0)
break; goto unrecognized;
if (0 == (u8) w_value) { if (0 == (u8) w_value) {
value = 0; value = 0;
dev->current_config = 0; dev->current_config = 0;
...@@ -1505,7 +1505,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) ...@@ -1505,7 +1505,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
/* PXA automagically handles this request too */ /* PXA automagically handles this request too */
case USB_REQ_GET_CONFIGURATION: case USB_REQ_GET_CONFIGURATION:
if (ctrl->bRequestType != 0x80) if (ctrl->bRequestType != 0x80)
break; goto unrecognized;
*(u8 *)req->buf = dev->current_config; *(u8 *)req->buf = dev->current_config;
value = min (w_length, (u16) 1); value = min (w_length, (u16) 1);
break; break;
......
...@@ -152,6 +152,20 @@ static int ehci_pci_setup(struct usb_hcd *hcd) ...@@ -152,6 +152,20 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
break; break;
} }
break; break;
case PCI_VENDOR_ID_VIA:
if (pdev->device == 0x3104 && (pdev->revision & 0xf0) == 0x60) {
u8 tmp;
/* The VT6212 defaults to a 1 usec EHCI sleep time which
* hogs the PCI bus *badly*. Setting bit 5 of 0x4B makes
* that sleep time use the conventional 10 usec.
*/
pci_read_config_byte(pdev, 0x4b, &tmp);
if (tmp & 0x20)
break;
pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
}
break;
} }
ehci_reset(ehci); ehci_reset(ehci);
......
...@@ -55,6 +55,7 @@ static struct usb_device_id id_table [] = { ...@@ -55,6 +55,7 @@ static struct usb_device_id id_table [] = {
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_DCU11) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_RSAQ3) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) }, { USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_PHAROS) },
{ USB_DEVICE(PL2303_VENDOR_ID, PL2303_PRODUCT_ID_ALDIGA) },
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID) },
{ USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
{ USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) }, { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID) },
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#define PL2303_PRODUCT_ID_DCU11 0x1234 #define PL2303_PRODUCT_ID_DCU11 0x1234
#define PL2303_PRODUCT_ID_PHAROS 0xaaa0 #define PL2303_PRODUCT_ID_PHAROS 0xaaa0
#define PL2303_PRODUCT_ID_RSAQ3 0xaaa2 #define PL2303_PRODUCT_ID_RSAQ3 0xaaa2
#define PL2303_PRODUCT_ID_ALDIGA 0x0611
#define ATEN_VENDOR_ID 0x0557 #define ATEN_VENDOR_ID 0x0557
#define ATEN_VENDOR_ID2 0x0547 #define ATEN_VENDOR_ID2 0x0547
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org> Whom based his on the Keyspan driver by Hugh Blemings <hugh@blemings.org>
*/ */
#define DRIVER_VERSION "v.1.2.7" #define DRIVER_VERSION "v.1.2.8"
#define DRIVER_AUTHOR "Kevin Lloyd <linux@sierrawireless.com>" #define DRIVER_AUTHOR "Kevin Lloyd <linux@sierrawireless.com>"
#define DRIVER_DESC "USB Driver for Sierra Wireless USB modems" #define DRIVER_DESC "USB Driver for Sierra Wireless USB modems"
...@@ -163,6 +163,7 @@ static struct usb_device_id id_table [] = { ...@@ -163,6 +163,7 @@ static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */ { USB_DEVICE(0x1199, 0x6803) }, /* Sierra Wireless MC8765 */
{ USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */ { USB_DEVICE(0x1199, 0x6812) }, /* Sierra Wireless MC8775 & AC 875U */
{ USB_DEVICE(0x1199, 0x6813) }, /* Sierra Wireless MC8775 (Thinkpad internal) */ { USB_DEVICE(0x1199, 0x6813) }, /* Sierra Wireless MC8775 (Thinkpad internal) */
{ USB_DEVICE(0x1199, 0x6815) }, /* Sierra Wireless MC8775 */
{ USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */ { USB_DEVICE(0x1199, 0x6820) }, /* Sierra Wireless AirCard 875 */
{ USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/ { USB_DEVICE(0x1199, 0x6832) }, /* Sierra Wireless MC8780*/
{ USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/ { USB_DEVICE(0x1199, 0x6833) }, /* Sierra Wireless MC8781*/
...@@ -196,9 +197,9 @@ struct sierra_port_private { ...@@ -196,9 +197,9 @@ struct sierra_port_private {
spinlock_t lock; /* lock the structure */ spinlock_t lock; /* lock the structure */
int outstanding_urbs; /* number of out urbs in flight */ int outstanding_urbs; /* number of out urbs in flight */
/* Input endpoints and buffer for this port */ /* Input endpoints and buffers for this port */
struct urb *in_urbs[N_IN_URB]; struct urb *in_urbs[N_IN_URB];
char in_buffer[N_IN_URB][IN_BUFLEN]; char *in_buffer[N_IN_URB];
/* Settings for the port */ /* Settings for the port */
int rts_state; /* Handshaking pins (outputs) */ int rts_state; /* Handshaking pins (outputs) */
...@@ -638,6 +639,15 @@ static int sierra_startup(struct usb_serial *serial) ...@@ -638,6 +639,15 @@ static int sierra_startup(struct usb_serial *serial)
return -ENOMEM; return -ENOMEM;
} }
spin_lock_init(&portdata->lock); spin_lock_init(&portdata->lock);
for (j = 0; j < N_IN_URB; j++) {
portdata->in_buffer[j] = kmalloc(IN_BUFLEN, GFP_KERNEL);
if (!portdata->in_buffer[j]) {
for (--j; j >= 0; j--)
kfree(portdata->in_buffer[j]);
kfree(portdata);
return -ENOMEM;
}
}
usb_set_serial_port_data(port, portdata); usb_set_serial_port_data(port, portdata);
...@@ -681,7 +691,7 @@ static void sierra_shutdown(struct usb_serial *serial) ...@@ -681,7 +691,7 @@ static void sierra_shutdown(struct usb_serial *serial)
for (j = 0; j < N_IN_URB; j++) { for (j = 0; j < N_IN_URB; j++) {
usb_kill_urb(portdata->in_urbs[j]); usb_kill_urb(portdata->in_urbs[j]);
usb_free_urb(portdata->in_urbs[j]); usb_free_urb(portdata->in_urbs[j]);
portdata->in_urbs[j] = NULL; kfree(portdata->in_buffer[j]);
} }
kfree(portdata); kfree(portdata);
usb_set_serial_port_data(port, NULL); usb_set_serial_port_data(port, NULL);
......
...@@ -1230,6 +1230,7 @@ static int isd200_get_inquiry_data( struct us_data *us ) ...@@ -1230,6 +1230,7 @@ static int isd200_get_inquiry_data( struct us_data *us )
/* Free driver structure */ /* Free driver structure */
us->extra_destructor(info); us->extra_destructor(info);
kfree(info);
us->extra = NULL; us->extra = NULL;
us->extra_destructor = NULL; us->extra_destructor = NULL;
} }
......
...@@ -1009,7 +1009,8 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) ...@@ -1009,7 +1009,8 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us)
US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n", US_DEBUGP("Bulk Status S 0x%x T 0x%x R %u Stat 0x%x\n",
le32_to_cpu(bcs->Signature), bcs->Tag, le32_to_cpu(bcs->Signature), bcs->Tag,
residue, bcs->Status); residue, bcs->Status);
if (bcs->Tag != us->tag || bcs->Status > US_BULK_STAT_PHASE) { if (!(bcs->Tag == us->tag || (us->flags & US_FL_BULK_IGNORE_TAG)) ||
bcs->Status > US_BULK_STAT_PHASE) {
US_DEBUGP("Bulk logical error\n"); US_DEBUGP("Bulk logical error\n");
return USB_STOR_TRANSPORT_ERROR; return USB_STOR_TRANSPORT_ERROR;
} }
......
...@@ -1589,6 +1589,17 @@ UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0001, ...@@ -1589,6 +1589,17 @@ UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0001,
US_SC_DEVICE, US_PR_DEVICE, NULL, US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY), US_FL_FIX_CAPACITY),
/*
* Patch by Constantin Baranov <const@tltsu.ru>
* Report by Andreas Koenecke.
* Motorola ROKR Z6.
*/
UNUSUAL_DEV( 0x22b8, 0x6426, 0x0101, 0x0101,
"Motorola",
"MSnc.",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY | US_FL_BULK_IGNORE_TAG),
/* Reported by Radovan Garabik <garabik@kassiopeia.juls.savba.sk> */ /* Reported by Radovan Garabik <garabik@kassiopeia.juls.savba.sk> */
UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999,
"MPIO", "MPIO",
......
...@@ -9,3 +9,6 @@ ...@@ -9,3 +9,6 @@
/* device can't resume correctly so reset it instead */ /* device can't resume correctly so reset it instead */
#define USB_QUIRK_RESET_RESUME 0x00000002 #define USB_QUIRK_RESET_RESUME 0x00000002
/* device can't handle Set-Interface requests */
#define USB_QUIRK_NO_SET_INTF 0x00000004
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \
/* sometimes sizes is too big */ \ /* sometimes sizes is too big */ \
US_FLAG(MAX_SECTORS_MIN,0x00002000) \ US_FLAG(MAX_SECTORS_MIN,0x00002000) \
/* Sets max_sectors to arch min */ /* Sets max_sectors to arch min */ \
US_FLAG(BULK_IGNORE_TAG,0x00004000) \
/* Ignore tag mismatch in bulk operations */
#define US_FLAG(name, value) US_FL_##name = value , #define US_FLAG(name, value) US_FL_##name = value ,
......
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