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: Revert "USB: gadget: Allow function access to device ID data during bind()" USB: misc: uss720.c: add another vendor/product ID USB: usb-storage: unusual_devs entry for the Samsung YP-CP3 USB: gadget: Remove suspended sysfs file before freeing cdev USB: core: Add input prompt and help text for USB_OTG config USB: ftdi_sio: Add D.O.Tec PID xhci: Fix issue with port array setup and buggy hosts.
This commit is contained in:
commit
7bddaaca47
|
@ -107,11 +107,19 @@ config USB_SUSPEND
|
||||||
If you are unsure about this, say N here.
|
If you are unsure about this, say N here.
|
||||||
|
|
||||||
config USB_OTG
|
config USB_OTG
|
||||||
bool
|
bool "OTG support"
|
||||||
depends on USB && EXPERIMENTAL
|
depends on USB && EXPERIMENTAL
|
||||||
depends on USB_SUSPEND
|
depends on USB_SUSPEND
|
||||||
default n
|
default n
|
||||||
|
help
|
||||||
|
The most notable feature of USB OTG is support for a
|
||||||
|
"Dual-Role" device, which can act as either a device
|
||||||
|
or a host. The initial role is decided by the type of
|
||||||
|
plug inserted and can be changed later when two dual
|
||||||
|
role devices talk to each other.
|
||||||
|
|
||||||
|
Select this only if your board has Mini-AB/Micro-AB
|
||||||
|
connector.
|
||||||
|
|
||||||
config USB_OTG_WHITELIST
|
config USB_OTG_WHITELIST
|
||||||
bool "Rely on OTG Targeted Peripherals List"
|
bool "Rely on OTG Targeted Peripherals List"
|
||||||
|
|
|
@ -1047,9 +1047,9 @@ composite_unbind(struct usb_gadget *gadget)
|
||||||
kfree(cdev->req->buf);
|
kfree(cdev->req->buf);
|
||||||
usb_ep_free_request(gadget->ep0, cdev->req);
|
usb_ep_free_request(gadget->ep0, cdev->req);
|
||||||
}
|
}
|
||||||
|
device_remove_file(&gadget->dev, &dev_attr_suspended);
|
||||||
kfree(cdev);
|
kfree(cdev);
|
||||||
set_gadget_data(gadget, NULL);
|
set_gadget_data(gadget, NULL);
|
||||||
device_remove_file(&gadget->dev, &dev_attr_suspended);
|
|
||||||
composite = NULL;
|
composite = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1107,14 +1107,6 @@ static int composite_bind(struct usb_gadget *gadget)
|
||||||
*/
|
*/
|
||||||
usb_ep_autoconfig_reset(cdev->gadget);
|
usb_ep_autoconfig_reset(cdev->gadget);
|
||||||
|
|
||||||
/* standardized runtime overrides for device ID data */
|
|
||||||
if (idVendor)
|
|
||||||
cdev->desc.idVendor = cpu_to_le16(idVendor);
|
|
||||||
if (idProduct)
|
|
||||||
cdev->desc.idProduct = cpu_to_le16(idProduct);
|
|
||||||
if (bcdDevice)
|
|
||||||
cdev->desc.bcdDevice = cpu_to_le16(bcdDevice);
|
|
||||||
|
|
||||||
/* composite gadget needs to assign strings for whole device (like
|
/* composite gadget needs to assign strings for whole device (like
|
||||||
* serial number), register function drivers, potentially update
|
* serial number), register function drivers, potentially update
|
||||||
* power state and consumption, etc
|
* power state and consumption, etc
|
||||||
|
@ -1126,6 +1118,14 @@ static int composite_bind(struct usb_gadget *gadget)
|
||||||
cdev->desc = *composite->dev;
|
cdev->desc = *composite->dev;
|
||||||
cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
|
cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
|
||||||
|
|
||||||
|
/* standardized runtime overrides for device ID data */
|
||||||
|
if (idVendor)
|
||||||
|
cdev->desc.idVendor = cpu_to_le16(idVendor);
|
||||||
|
if (idProduct)
|
||||||
|
cdev->desc.idProduct = cpu_to_le16(idProduct);
|
||||||
|
if (bcdDevice)
|
||||||
|
cdev->desc.bcdDevice = cpu_to_le16(bcdDevice);
|
||||||
|
|
||||||
/* stirng overrides */
|
/* stirng overrides */
|
||||||
if (iManufacturer || !cdev->desc.iManufacturer) {
|
if (iManufacturer || !cdev->desc.iManufacturer) {
|
||||||
if (!iManufacturer && !composite->iManufacturer &&
|
if (!iManufacturer && !composite->iManufacturer &&
|
||||||
|
|
|
@ -1680,6 +1680,7 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports,
|
||||||
xhci->port_array[i] = (u8) -1;
|
xhci->port_array[i] = (u8) -1;
|
||||||
}
|
}
|
||||||
/* FIXME: Should we disable the port? */
|
/* FIXME: Should we disable the port? */
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
xhci->port_array[i] = major_revision;
|
xhci->port_array[i] = major_revision;
|
||||||
if (major_revision == 0x03)
|
if (major_revision == 0x03)
|
||||||
|
@ -1758,16 +1759,20 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
port_index = 0;
|
port_index = 0;
|
||||||
for (i = 0; i < num_ports; i++)
|
for (i = 0; i < num_ports; i++) {
|
||||||
if (xhci->port_array[i] != 0x03) {
|
if (xhci->port_array[i] == 0x03 ||
|
||||||
xhci->usb2_ports[port_index] =
|
xhci->port_array[i] == 0 ||
|
||||||
&xhci->op_regs->port_status_base +
|
xhci->port_array[i] == -1)
|
||||||
NUM_PORT_REGS*i;
|
continue;
|
||||||
xhci_dbg(xhci, "USB 2.0 port at index %u, "
|
|
||||||
"addr = %p\n", i,
|
xhci->usb2_ports[port_index] =
|
||||||
xhci->usb2_ports[port_index]);
|
&xhci->op_regs->port_status_base +
|
||||||
port_index++;
|
NUM_PORT_REGS*i;
|
||||||
}
|
xhci_dbg(xhci, "USB 2.0 port at index %u, "
|
||||||
|
"addr = %p\n", i,
|
||||||
|
xhci->usb2_ports[port_index]);
|
||||||
|
port_index++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (xhci->num_usb3_ports) {
|
if (xhci->num_usb3_ports) {
|
||||||
xhci->usb3_ports = kmalloc(sizeof(*xhci->usb3_ports)*
|
xhci->usb3_ports = kmalloc(sizeof(*xhci->usb3_ports)*
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/*
|
/*
|
||||||
* uss720.c -- USS720 USB Parport Cable.
|
* uss720.c -- USS720 USB Parport Cable.
|
||||||
*
|
*
|
||||||
* Copyright (C) 1999, 2005
|
* Copyright (C) 1999, 2005, 2010
|
||||||
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
* Thomas Sailer (t.sailer@alumni.ethz.ch)
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -776,6 +776,8 @@ static const struct usb_device_id uss720_table[] = {
|
||||||
{ USB_DEVICE(0x0557, 0x2001) },
|
{ USB_DEVICE(0x0557, 0x2001) },
|
||||||
{ USB_DEVICE(0x0729, 0x1284) },
|
{ USB_DEVICE(0x0729, 0x1284) },
|
||||||
{ USB_DEVICE(0x1293, 0x0002) },
|
{ USB_DEVICE(0x1293, 0x0002) },
|
||||||
|
{ USB_DEVICE(0x1293, 0x0002) },
|
||||||
|
{ USB_DEVICE(0x050d, 0x0002) },
|
||||||
{ } /* Terminating entry */
|
{ } /* Terminating entry */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -796,6 +796,7 @@ static struct usb_device_id id_table_combined [] = {
|
||||||
{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) },
|
{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) },
|
||||||
{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) },
|
{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) },
|
||||||
{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) },
|
{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) },
|
||||||
|
{ USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) },
|
||||||
{ USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID),
|
{ USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID),
|
||||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||||
{ }, /* Optional parameter entry */
|
{ }, /* Optional parameter entry */
|
||||||
|
|
|
@ -1080,6 +1080,11 @@
|
||||||
#define MJSG_XM_RADIO_PID 0x937A
|
#define MJSG_XM_RADIO_PID 0x937A
|
||||||
#define MJSG_HD_RADIO_PID 0x937C
|
#define MJSG_HD_RADIO_PID 0x937C
|
||||||
|
|
||||||
|
/*
|
||||||
|
* D.O.Tec products (http://www.directout.eu)
|
||||||
|
*/
|
||||||
|
#define FTDI_DOTEC_PID 0x9868
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Xverve Signalyzer tools (http://www.signalyzer.com/)
|
* Xverve Signalyzer tools (http://www.signalyzer.com/)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -481,6 +481,13 @@ UNUSUAL_DEV( 0x04e8, 0x507c, 0x0220, 0x0220,
|
||||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||||
US_FL_MAX_SECTORS_64),
|
US_FL_MAX_SECTORS_64),
|
||||||
|
|
||||||
|
/* Reported by Vitaly Kuznetsov <vitty@altlinux.ru> */
|
||||||
|
UNUSUAL_DEV( 0x04e8, 0x5122, 0x0000, 0x9999,
|
||||||
|
"Samsung",
|
||||||
|
"YP-CP3",
|
||||||
|
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||||
|
US_FL_MAX_SECTORS_64 | US_FL_BULK_IGNORE_TAG),
|
||||||
|
|
||||||
/* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
|
/* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>.
|
||||||
* Device uses standards-violating 32-byte Bulk Command Block Wrappers and
|
* Device uses standards-violating 32-byte Bulk Command Block Wrappers and
|
||||||
* reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011.
|
* reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011.
|
||||||
|
|
Loading…
Reference in a new issue