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

Commit 7a54f5e1 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: (30 commits)
  USB: ftdi_sio: add Calao reference board support
  USB option driver K3765/K4505 avoid CDC_DATA interface
  USB: option: add YUGA device id to driver
  usb: s5p-ehci: fix a NULL pointer deference
  USB: EHCI: Do not rely on PORT_SUSPEND to stop USB resuming in ehci_bus_resume().
  USB option driver add PID of Huawei Vodafone K4605
  USB option driver add PID of Huawei Vodafone K3806
  xhci: Handle zero-length isochronous packets.
  USB: Avoid NULL pointer deref in usb_hcd_alloc_bandwidth.
  usb: musb: gadget: fix error path
  usb: gadget: f_phonet: unlock in error case
  usb: musb: blackfin: include prefetch head file
  usb: musb: tusb6010: fix compilation
  usb: gadget: renesas_usbhs: fix DMA build by including dma-mapping.h
  usb: musb: cppi: fix build errors due to DBG and missing musb variable
  usb: musb: ux500: replace missing DBG with dev_dbg
  usb: musb: ux500: set dma config for both src and dst
  usb: musb: fix oops on musb_gadget_pullup
  usb: host: ehci-omap: fix .remove and failure handling path of .probe(v1)
  usb: gadget: hid: don't STALL when processing a HID Descriptor request
  ...
parents efe45ab1 c96fbdd0
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1775,6 +1775,8 @@ int usb_hcd_alloc_bandwidth(struct usb_device *udev,
		struct usb_interface *iface = usb_ifnum_to_if(udev,
		struct usb_interface *iface = usb_ifnum_to_if(udev,
				cur_alt->desc.bInterfaceNumber);
				cur_alt->desc.bInterfaceNumber);


		if (!iface)
			return -EINVAL;
		if (iface->resetting_device) {
		if (iface->resetting_device) {
			/*
			/*
			 * The USB core just reset the device, so the xHCI host
			 * The USB core just reset the device, so the xHCI host
+1 −0
Original line number Original line Diff line number Diff line
@@ -434,6 +434,7 @@ static int pn_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
			    config_ep_by_speed(gadget, f, fp->out_ep)) {
			    config_ep_by_speed(gadget, f, fp->out_ep)) {
				fp->in_ep->desc = NULL;
				fp->in_ep->desc = NULL;
				fp->out_ep->desc = NULL;
				fp->out_ep->desc = NULL;
				spin_unlock(&port->lock);
				return -EINVAL;
				return -EINVAL;
			}
			}
			usb_ep_enable(fp->out_ep);
			usb_ep_enable(fp->out_ep);
+3 −4
Original line number Original line Diff line number Diff line
@@ -343,7 +343,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
	u32			temp;
	u32			temp;
	u32			power_okay;
	u32			power_okay;
	int			i;
	int			i;
	u8			resume_needed = 0;
	unsigned long		resume_needed = 0;


	if (time_before (jiffies, ehci->next_statechange))
	if (time_before (jiffies, ehci->next_statechange))
		msleep(5);
		msleep(5);
@@ -416,7 +416,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
		if (test_bit(i, &ehci->bus_suspended) &&
		if (test_bit(i, &ehci->bus_suspended) &&
				(temp & PORT_SUSPEND)) {
				(temp & PORT_SUSPEND)) {
			temp |= PORT_RESUME;
			temp |= PORT_RESUME;
			resume_needed = 1;
			set_bit(i, &resume_needed);
		}
		}
		ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
		ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
	}
	}
@@ -431,8 +431,7 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
	i = HCS_N_PORTS (ehci->hcs_params);
	i = HCS_N_PORTS (ehci->hcs_params);
	while (i--) {
	while (i--) {
		temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
		temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
		if (test_bit(i, &ehci->bus_suspended) &&
		if (test_bit(i, &resume_needed)) {
				(temp & PORT_SUSPEND)) {
			temp &= ~(PORT_RWC_BITS | PORT_RESUME);
			temp &= ~(PORT_RWC_BITS | PORT_RESUME);
			ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
			ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
			ehci_vdbg (ehci, "resumed port %d\n", i + 1);
			ehci_vdbg (ehci, "resumed port %d\n", i + 1);
+1 −0
Original line number Original line Diff line number Diff line
@@ -86,6 +86,7 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev)
		goto fail_hcd;
		goto fail_hcd;
	}
	}


	s5p_ehci->hcd = hcd;
	s5p_ehci->clk = clk_get(&pdev->dev, "usbhost");
	s5p_ehci->clk = clk_get(&pdev->dev, "usbhost");


	if (IS_ERR(s5p_ehci->clk)) {
	if (IS_ERR(s5p_ehci->clk)) {
+13 −4
Original line number Original line Diff line number Diff line
@@ -463,10 +463,11 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
					&& (temp & PORT_POWER))
					&& (temp & PORT_POWER))
				status |= USB_PORT_STAT_SUSPEND;
				status |= USB_PORT_STAT_SUSPEND;
		}
		}
		if ((temp & PORT_PLS_MASK) == XDEV_RESUME) {
		if ((temp & PORT_PLS_MASK) == XDEV_RESUME &&
				!DEV_SUPERSPEED(temp)) {
			if ((temp & PORT_RESET) || !(temp & PORT_PE))
			if ((temp & PORT_RESET) || !(temp & PORT_PE))
				goto error;
				goto error;
			if (!DEV_SUPERSPEED(temp) && time_after_eq(jiffies,
			if (time_after_eq(jiffies,
					bus_state->resume_done[wIndex])) {
					bus_state->resume_done[wIndex])) {
				xhci_dbg(xhci, "Resume USB2 port %d\n",
				xhci_dbg(xhci, "Resume USB2 port %d\n",
					wIndex + 1);
					wIndex + 1);
@@ -487,6 +488,14 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
				xhci_ring_device(xhci, slot_id);
				xhci_ring_device(xhci, slot_id);
				bus_state->port_c_suspend |= 1 << wIndex;
				bus_state->port_c_suspend |= 1 << wIndex;
				bus_state->suspended_ports &= ~(1 << wIndex);
				bus_state->suspended_ports &= ~(1 << wIndex);
			} else {
				/*
				 * The resume has been signaling for less than
				 * 20ms. Report the port status as SUSPEND,
				 * let the usbcore check port status again
				 * and clear resume signaling later.
				 */
				status |= USB_PORT_STAT_SUSPEND;
			}
			}
		}
		}
		if ((temp & PORT_PLS_MASK) == XDEV_U0
		if ((temp & PORT_PLS_MASK) == XDEV_U0
@@ -664,7 +673,7 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
			xhci_dbg(xhci, "PORTSC %04x\n", temp);
			xhci_dbg(xhci, "PORTSC %04x\n", temp);
			if (temp & PORT_RESET)
			if (temp & PORT_RESET)
				goto error;
				goto error;
			if (temp & XDEV_U3) {
			if ((temp & PORT_PLS_MASK) == XDEV_U3) {
				if ((temp & PORT_PE) == 0)
				if ((temp & PORT_PE) == 0)
					goto error;
					goto error;


Loading