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

Commit 69b4269e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 4.6-rc5 into usb-next



We want the USB fixes in here as well.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parents 02da2d72 7ce04cff
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -314,7 +314,7 @@ void qset_free_std(struct whc *whc, struct whc_std *std)
		kfree(std->bounce_buf);
	}
	if (std->pl_virt) {
		if (std->dma_addr)
		if (!dma_mapping_error(whc->wusbhc.dev, std->dma_addr))
			dma_unmap_single(whc->wusbhc.dev, std->dma_addr,
					 std->num_pointers * sizeof(struct whc_page_list_entry),
					 DMA_TO_DEVICE);
@@ -535,9 +535,11 @@ static int qset_add_urb_sg(struct whc *whc, struct whc_qset *qset, struct urb *u
	list_for_each_entry(std, &qset->stds, list_node) {
		if (std->ntds_remaining == -1) {
			pl_len = std->num_pointers * sizeof(struct whc_page_list_entry);
			std->ntds_remaining = ntds--;
			std->dma_addr = dma_map_single(whc->wusbhc.dev, std->pl_virt,
						       pl_len, DMA_TO_DEVICE);
			if (dma_mapping_error(whc->wusbhc.dev, std->dma_addr))
				return -EFAULT;
			std->ntds_remaining = ntds--;
		}
	}
	return 0;
@@ -618,6 +620,8 @@ static int qset_add_urb_sg_linearize(struct whc *whc, struct whc_qset *qset,

		std->dma_addr = dma_map_single(&whc->umc->dev, std->bounce_buf, std->len,
					       is_out ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
		if (dma_mapping_error(&whc->umc->dev, std->dma_addr))
			return -EFAULT;

		if (qset_fill_page_list(whc, std, mem_flags) < 0)
			return -ENOMEM;
+1 −1
Original line number Diff line number Diff line
@@ -1768,7 +1768,7 @@ static int xhci_requires_manual_halt_cleanup(struct xhci_hcd *xhci,
	if (trb_comp_code == COMP_TX_ERR ||
			trb_comp_code == COMP_BABBLE ||
			trb_comp_code == COMP_SPLIT_ERR)
		/* The 0.96 spec says a babbling control endpoint
		/* The 0.95 spec says a babbling control endpoint
		 * is not halted. The 0.96 spec says it is.  Some HW
		 * claims to be 0.95 compliant, but it halts the control
		 * endpoint anyway.  Check if a babble halted the
+1 −2
Original line number Diff line number Diff line
@@ -388,7 +388,6 @@ static int stub_probe(struct usb_device *udev)
err_port:
	dev_set_drvdata(&udev->dev, NULL);
	usb_put_dev(udev);
	kthread_stop_put(sdev->ud.eh);

	busid_priv->sdev = NULL;
	stub_device_free(sdev);
@@ -449,7 +448,7 @@ static void stub_disconnect(struct usb_device *udev)
	}

	/* If usb reset is called from event handler */
	if (busid_priv->sdev->ud.eh == current)
	if (usbip_in_eh(current))
		return;

	/* shutdown the current connection */
+7 −0
Original line number Diff line number Diff line
@@ -769,12 +769,19 @@ EXPORT_SYMBOL_GPL(usbip_recv_xbuff);

static int __init usbip_core_init(void)
{
	int ret;

	pr_info(DRIVER_DESC " v" USBIP_VERSION "\n");
	ret = usbip_init_eh();
	if (ret)
		return ret;

	return 0;
}

static void __exit usbip_core_exit(void)
{
	usbip_finish_eh();
	return;
}

+3 −1
Original line number Diff line number Diff line
@@ -267,7 +267,6 @@ struct usbip_device {
	struct task_struct *tcp_tx;

	unsigned long event;
	struct task_struct *eh;
	wait_queue_head_t eh_waitq;

	struct eh_ops {
@@ -313,10 +312,13 @@ void usbip_pad_iso(struct usbip_device *ud, struct urb *urb);
int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb);

/* usbip_event.c */
int usbip_init_eh(void);
void usbip_finish_eh(void);
int usbip_start_eh(struct usbip_device *ud);
void usbip_stop_eh(struct usbip_device *ud);
void usbip_event_add(struct usbip_device *ud, unsigned long event);
int usbip_event_happened(struct usbip_device *ud);
int usbip_in_eh(struct task_struct *task);

static inline int interface_to_busnum(struct usb_interface *interface)
{
Loading