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

Commit fbf4d7ff authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  Revert "USB: EHCI: fix performance regression"
  USB: fsl_usb2_udc: fix recursive lock
  USB: usb-serial: option: Don't match Huawei driver CD images
  USB: pl2303: another product ID
  USB: add another scanner quirk
  USB: Add support for ROKR W5 in unusual_devs.h
  USB: Fix M600i unusual_devs entry
  USB: usb-storage: unusual_devs update for Cypress ATACB
  USB: EHCI: fix performance regression
  USB: EHCI: fix bug in Iso scheduling
  USB: EHCI: fix remote-wakeup regression
  USB: EHCI: suppress unwanted error messages
  USB: EHCI: fix up root-hub TT mess
  USB: add all configs to the "descriptors" attribute
  USB: fix possible deadlock involving sysfs attributes
  USB: Firmware loader driver for USB Apple iSight camera
  USB: FTDI_SIO : Add support for Matrix Orbital PID Range
parents 4bd27972 bb7e6984
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -155,9 +155,6 @@ static int generic_probe(struct usb_device *udev)
{
	int err, c;

	/* put device-specific files into sysfs */
	usb_create_sysfs_dev_files(udev);

	/* Choose and set the configuration.  This registers the interfaces
	 * with the driver core and lets interface drivers bind to them.
	 */
@@ -189,8 +186,6 @@ static void generic_disconnect(struct usb_device *udev)
	 * unconfigure the device */
	if (udev->actconfig)
		usb_set_configuration(udev, -1);

	usb_remove_sysfs_dev_files(udev);
}

#ifdef	CONFIG_PM
+2 −0
Original line number Diff line number Diff line
@@ -213,6 +213,8 @@ struct hc_driver {

		/* force handover of high-speed port to full-speed companion */
	void	(*relinquish_port)(struct usb_hcd *, int);
		/* has a port been handed over to a companion? */
	int	(*port_handed_over)(struct usb_hcd *, int);
};

extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb);
+14 −1
Original line number Diff line number Diff line
@@ -1326,6 +1326,12 @@ void usb_disconnect(struct usb_device **pdev)

	usb_unlock_device(udev);

	/* Remove the device-specific files from sysfs.  This must be
	 * done with udev unlocked, because some of the attribute
	 * routines try to acquire the device lock.
	 */
	usb_remove_sysfs_dev_files(udev);

	/* Unregister the device.  The device driver is responsible
	 * for removing the device files from usbfs and sysfs and for
	 * de-configuring the device.
@@ -1541,6 +1547,9 @@ int usb_new_device(struct usb_device *udev)
		goto fail;
	}

	/* put device-specific files into sysfs */
	usb_create_sysfs_dev_files(udev);

	/* Tell the world! */
	announce_device(udev);
	return err;
@@ -2744,7 +2753,11 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1,
		if ((status == -ENOTCONN) || (status == -ENOTSUPP))
			break;
	}
	dev_err(hub_dev, "unable to enumerate USB device on port %d\n", port1);
	if (hub->hdev->parent ||
			!hcd->driver->port_handed_over ||
			!(hcd->driver->port_handed_over)(hcd, port1))
		dev_err(hub_dev, "unable to enumerate USB device on port %d\n",
				port1);
 
done:
	hub_port_disable(hub, port1, 1);
+4 −0
Original line number Diff line number Diff line
@@ -47,6 +47,10 @@ static const struct usb_device_id usb_quirk_list[] = {
	/* Edirol SD-20 */
	{ USB_DEVICE(0x0582, 0x0027), .driver_info = USB_QUIRK_RESET_RESUME },

	/* Avision AV600U */
	{ USB_DEVICE(0x0638, 0x0a13), .driver_info =
	  USB_QUIRK_STRING_FETCH_255 },

	/* M-Systems Flash Disk Pioneers */
	{ USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },

+21 −23
Original line number Diff line number Diff line
@@ -588,35 +588,33 @@ read_descriptors(struct kobject *kobj, struct bin_attribute *attr,
			container_of(kobj, struct device, kobj));
	size_t nleft = count;
	size_t srclen, n;
	int cfgno;
	void *src;

	usb_lock_device(udev);

	/* The binary attribute begins with the device descriptor */
	/* The binary attribute begins with the device descriptor.
	 * Following that are the raw descriptor entries for all the
	 * configurations (config plus subsidiary descriptors).
	 */
	for (cfgno = -1; cfgno < udev->descriptor.bNumConfigurations &&
			nleft > 0; ++cfgno) {
		if (cfgno < 0) {
			src = &udev->descriptor;
			srclen = sizeof(struct usb_device_descriptor);
		} else {
			src = udev->rawdescriptors[cfgno];
			srclen = __le16_to_cpu(udev->config[cfgno].desc.
					wTotalLength);
		}
		if (off < srclen) {
		n = min_t(size_t, nleft, srclen - off);
		memcpy(buf, off + (char *) &udev->descriptor, n);
			n = min(nleft, srclen - (size_t) off);
			memcpy(buf, src + off, n);
			nleft -= n;
			buf += n;
			off = 0;
		} else {
			off -= srclen;
		}

	/* Then follows the raw descriptor entry for the current
	 * configuration (config plus subsidiary descriptors).
	 */
	if (udev->actconfig) {
		int cfgno = udev->actconfig - udev->config;

		srclen = __le16_to_cpu(udev->actconfig->desc.wTotalLength);
		if (off < srclen) {
			n = min_t(size_t, nleft, srclen - off);
			memcpy(buf, off + udev->rawdescriptors[cfgno], n);
			nleft -= n;
		}
	}
	usb_unlock_device(udev);
	return count - nleft;
}

Loading