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

Commit 2c1cfa49 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull USB fixes from Greg KH:
 "Here are some small USB fixes and device ids for 4.15-rc8

  Nothing major, small fixes for various devices, some resolutions for
  bugs found by fuzzers, and the usual handful of new device ids.

  All of these have been in linux-next with no reported issues"

* tag 'usb-4.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  Documentation: usb: fix typo in UVC gadgetfs config command
  usb: misc: usb3503: make sure reset is low for at least 100us
  uas: ignore UAS for Norelsys NS1068(X) chips
  USB: UDC core: fix double-free in usb_add_gadget_udc_release
  USB: fix usbmon BUG trigger
  usbip: vudc_tx: fix v_send_ret_submit() vulnerability to null xfer buffer
  usbip: remove kernel addresses from usb device and urb debug msgs
  usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input
  USB: serial: cp210x: add new device ID ELV ALC 8xxx
  USB: serial: cp210x: add IDs for LifeScan OneTouch Verio IQ
parents d5a047fd 1a2e91e7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -693,7 +693,7 @@ such specification consists of a number of lines with an inverval value
in each line. The rules stated above are best illustrated with an example:

# mkdir functions/uvc.usb0/control/header/h
# cd functions/uvc.usb0/control/header/h
# cd functions/uvc.usb0/control/
# ln -s header/h class/fs
# ln -s header/h class/ss
# mkdir -p functions/uvc.usb0/streaming/uncompressed/u/360p
+13 −15
Original line number Diff line number Diff line
@@ -1147,11 +1147,7 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,

	udc = kzalloc(sizeof(*udc), GFP_KERNEL);
	if (!udc)
		goto err1;

	ret = device_add(&gadget->dev);
	if (ret)
		goto err2;
		goto err_put_gadget;

	device_initialize(&udc->dev);
	udc->dev.release = usb_udc_release;
@@ -1160,7 +1156,11 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,
	udc->dev.parent = parent;
	ret = dev_set_name(&udc->dev, "%s", kobject_name(&parent->kobj));
	if (ret)
		goto err3;
		goto err_put_udc;

	ret = device_add(&gadget->dev);
	if (ret)
		goto err_put_udc;

	udc->gadget = gadget;
	gadget->udc = udc;
@@ -1170,7 +1170,7 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,

	ret = device_add(&udc->dev);
	if (ret)
		goto err4;
		goto err_unlist_udc;

	usb_gadget_set_state(gadget, USB_STATE_NOTATTACHED);
	udc->vbus = true;
@@ -1178,27 +1178,25 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,
	/* pick up one of pending gadget drivers */
	ret = check_pending_gadget_drivers(udc);
	if (ret)
		goto err5;
		goto err_del_udc;

	mutex_unlock(&udc_lock);

	return 0;

err5:
 err_del_udc:
	device_del(&udc->dev);

err4:
 err_unlist_udc:
	list_del(&udc->list);
	mutex_unlock(&udc_lock);

err3:
	put_device(&udc->dev);
	device_del(&gadget->dev);

err2:
	kfree(udc);
 err_put_udc:
	put_device(&udc->dev);

err1:
 err_put_gadget:
	put_device(&gadget->dev);
	return ret;
}
+2 −0
Original line number Diff line number Diff line
@@ -279,6 +279,8 @@ static int usb3503_probe(struct usb3503 *hub)
	if (gpio_is_valid(hub->gpio_reset)) {
		err = devm_gpio_request_one(dev, hub->gpio_reset,
				GPIOF_OUT_INIT_LOW, "usb3503 reset");
		/* Datasheet defines a hardware reset to be at least 100us */
		usleep_range(100, 10000);
		if (err) {
			dev_err(dev,
				"unable to request GPIO %d as reset pin (%d)\n",
+7 −1
Original line number Diff line number Diff line
@@ -1004,7 +1004,9 @@ static long mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg
		break;

	case MON_IOCQ_RING_SIZE:
		mutex_lock(&rp->fetch_lock);
		ret = rp->b_size;
		mutex_unlock(&rp->fetch_lock);
		break;

	case MON_IOCT_RING_SIZE:
@@ -1231,12 +1233,16 @@ static int mon_bin_vma_fault(struct vm_fault *vmf)
	unsigned long offset, chunk_idx;
	struct page *pageptr;

	mutex_lock(&rp->fetch_lock);
	offset = vmf->pgoff << PAGE_SHIFT;
	if (offset >= rp->b_size)
	if (offset >= rp->b_size) {
		mutex_unlock(&rp->fetch_lock);
		return VM_FAULT_SIGBUS;
	}
	chunk_idx = offset / CHUNK_SIZE;
	pageptr = rp->b_vec[chunk_idx].pg;
	get_page(pageptr);
	mutex_unlock(&rp->fetch_lock);
	vmf->page = pageptr;
	return 0;
}
+2 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ static const struct usb_device_id id_table[] = {
	{ USB_DEVICE(0x10C4, 0x8470) }, /* Juniper Networks BX Series System Console */
	{ USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */
	{ USB_DEVICE(0x10C4, 0x84B6) }, /* Starizona Hyperion */
	{ USB_DEVICE(0x10C4, 0x85A7) }, /* LifeScan OneTouch Verio IQ */
	{ USB_DEVICE(0x10C4, 0x85EA) }, /* AC-Services IBUS-IF */
	{ USB_DEVICE(0x10C4, 0x85EB) }, /* AC-Services CIS-IBUS */
	{ USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */
@@ -174,6 +175,7 @@ static const struct usb_device_id id_table[] = {
	{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
	{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
	{ USB_DEVICE(0x18EF, 0xE025) }, /* ELV Marble Sound Board 1 */
	{ USB_DEVICE(0x18EF, 0xE030) }, /* ELV ALC 8xxx Battery Charger */
	{ USB_DEVICE(0x18EF, 0xE032) }, /* ELV TFD500 Data Logger */
	{ USB_DEVICE(0x1901, 0x0190) }, /* GE B850 CP2105 Recorder interface */
	{ USB_DEVICE(0x1901, 0x0193) }, /* GE B650 CP2104 PMC interface */
Loading