Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bddaaca authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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.
parents 9d5004fc dbb442b8
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -107,11 +107,19 @@ config USB_SUSPEND
	  If you are unsure about this, say N here.

config USB_OTG
	bool
	bool "OTG support"
	depends on USB && EXPERIMENTAL
	depends on USB_SUSPEND
	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
	bool "Rely on OTG Targeted Peripherals List"
+9 −9
Original line number Diff line number Diff line
@@ -1047,9 +1047,9 @@ composite_unbind(struct usb_gadget *gadget)
		kfree(cdev->req->buf);
		usb_ep_free_request(gadget->ep0, cdev->req);
	}
	device_remove_file(&gadget->dev, &dev_attr_suspended);
	kfree(cdev);
	set_gadget_data(gadget, NULL);
	device_remove_file(&gadget->dev, &dev_attr_suspended);
	composite = NULL;
}

@@ -1107,14 +1107,6 @@ static int composite_bind(struct usb_gadget *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
	 * serial number), register function drivers, potentially update
	 * power state and consumption, etc
@@ -1126,6 +1118,14 @@ static int composite_bind(struct usb_gadget *gadget)
	cdev->desc = *composite->dev;
	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 */
	if (iManufacturer || !cdev->desc.iManufacturer) {
		if (!iManufacturer && !composite->iManufacturer &&
+15 −10
Original line number Diff line number Diff line
@@ -1680,6 +1680,7 @@ static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports,
				xhci->port_array[i] = (u8) -1;
			}
			/* FIXME: Should we disable the port? */
			continue;
		}
		xhci->port_array[i] = major_revision;
		if (major_revision == 0x03)
@@ -1758,8 +1759,12 @@ static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags)
			return -ENOMEM;

		port_index = 0;
		for (i = 0; i < num_ports; i++)
			if (xhci->port_array[i] != 0x03) {
		for (i = 0; i < num_ports; i++) {
			if (xhci->port_array[i] == 0x03 ||
					xhci->port_array[i] == 0 ||
					xhci->port_array[i] == -1)
				continue;

			xhci->usb2_ports[port_index] =
				&xhci->op_regs->port_status_base +
				NUM_PORT_REGS*i;
+3 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
/*
 *	uss720.c  --  USS720 USB Parport Cable.
 *
 *	Copyright (C) 1999, 2005
 *	Copyright (C) 1999, 2005, 2010
 *	    Thomas Sailer (t.sailer@alumni.ethz.ch)
 *
 *	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(0x0729, 0x1284) },
	{ USB_DEVICE(0x1293, 0x0002) },
	{ USB_DEVICE(0x1293, 0x0002) },
	{ USB_DEVICE(0x050d, 0x0002) },
	{ }						/* Terminating entry */
};

+1 −0
Original line number Diff line number Diff line
@@ -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_LS_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),
		.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
	{ },					/* Optional parameter entry */
Loading