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

Commit 1d47091a authored by Linus Torvalds's avatar Linus Torvalds
Browse files


Pull USB fixes from Greg Kroah-Hartman:
 "Here are a bunch of USB fixes for the 3.7-rc tree.

  There's a lot of small USB serial driver fixes, and one larger one
  (the mos7840 driver changes are mostly just moving code around to fix
  problems.) Thanks to Johan Hovold for finding the problems and fixing
  them all up.

  Other than those, there is the usual new device ids, xhci bugfixes,
  and gadget driver fixes, nothing out of the ordinary.

  Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org&gt;">

* tag 'usb-3.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (49 commits)
  xhci: trivial: Remove assigned but unused ep_ctx.
  xhci: trivial: Remove assigned but unused slot_ctx.
  xhci: Fix missing break in xhci_evaluate_context_result.
  xhci: Fix potential NULL ptr deref in command cancellation.
  ehci: Add yet-another Lucid nohandoff pci quirk
  ehci: fix Lucid nohandoff pci quirk to be more generic with BIOS versions
  USB: mos7840: fix port_probe flow
  USB: mos7840: fix port-data memory leak
  USB: mos7840: remove invalid disconnect handling
  USB: mos7840: remove NULL-urb submission
  USB: qcserial: fix interface-data memory leak in error path
  USB: option: fix interface-data memory leak in error path
  USB: ipw: fix interface-data memory leak in error path
  USB: mos7840: fix port-device leak in error path
  USB: mos7840: fix urb leak at release
  USB: sierra: fix port-data memory leak
  USB: sierra: fix memory leak in probe error path
  USB: sierra: fix memory leak in attach error path
  USB: usb-wwan: fix multiple memory leaks in error paths
  USB: keyspan: fix NULL-pointer dereferences and memory leaks
  ...
parents 6ad2c73d 1d63f246
Loading
Loading
Loading
Loading
+5 −2
Original line number Original line Diff line number Diff line
@@ -739,13 +739,16 @@ static void hub_tt_work(struct work_struct *work)
	int			limit = 100;
	int			limit = 100;


	spin_lock_irqsave (&hub->tt.lock, flags);
	spin_lock_irqsave (&hub->tt.lock, flags);
	while (--limit && !list_empty (&hub->tt.clear_list)) {
	while (!list_empty(&hub->tt.clear_list)) {
		struct list_head	*next;
		struct list_head	*next;
		struct usb_tt_clear	*clear;
		struct usb_tt_clear	*clear;
		struct usb_device	*hdev = hub->hdev;
		struct usb_device	*hdev = hub->hdev;
		const struct hc_driver	*drv;
		const struct hc_driver	*drv;
		int			status;
		int			status;


		if (!hub->quiescing && --limit < 0)
			break;

		next = hub->tt.clear_list.next;
		next = hub->tt.clear_list.next;
		clear = list_entry (next, struct usb_tt_clear, clear_list);
		clear = list_entry (next, struct usb_tt_clear, clear_list);
		list_del (&clear->clear_list);
		list_del (&clear->clear_list);
@@ -1210,7 +1213,7 @@ static void hub_quiesce(struct usb_hub *hub, enum hub_quiescing_type type)
	if (hub->has_indicators)
	if (hub->has_indicators)
		cancel_delayed_work_sync(&hub->leds);
		cancel_delayed_work_sync(&hub->leds);
	if (hub->tt.hub)
	if (hub->tt.hub)
		cancel_work_sync(&hub->tt.clear_work);
		flush_work(&hub->tt.clear_work);
}
}


/* caller has locked the hub device */
/* caller has locked the hub device */
+3 −1
Original line number Original line Diff line number Diff line
@@ -2069,8 +2069,10 @@ static irqreturn_t net2272_irq(int irq, void *_dev)
#if defined(PLX_PCI_RDK2)
#if defined(PLX_PCI_RDK2)
	/* see if PCI int for us by checking irqstat */
	/* see if PCI int for us by checking irqstat */
	intcsr = readl(dev->rdk2.fpga_base_addr + RDK2_IRQSTAT);
	intcsr = readl(dev->rdk2.fpga_base_addr + RDK2_IRQSTAT);
	if (!intcsr & (1 << NET2272_PCI_IRQ))
	if (!intcsr & (1 << NET2272_PCI_IRQ)) {
		spin_unlock(&dev->lock);
		return IRQ_NONE;
		return IRQ_NONE;
	}
	/* check dma interrupts */
	/* check dma interrupts */
#endif
#endif
	/* Platform/devcice interrupt handler */
	/* Platform/devcice interrupt handler */
+8 −1
Original line number Original line Diff line number Diff line
@@ -545,7 +545,14 @@ static const struct dmi_system_id __devinitconst ehci_dmi_nohandoff_table[] = {
		/*  Pegatron Lucid (Ordissimo AIRIS) */
		/*  Pegatron Lucid (Ordissimo AIRIS) */
		.matches = {
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "M11JB"),
			DMI_MATCH(DMI_BOARD_NAME, "M11JB"),
			DMI_MATCH(DMI_BIOS_VERSION, "Lucid-GE-133"),
			DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
		},
	},
	{
		/*  Pegatron Lucid (Ordissimo) */
		.matches = {
			DMI_MATCH(DMI_BOARD_NAME, "Ordissimo"),
			DMI_MATCH(DMI_BIOS_VERSION, "Lucid-"),
		},
		},
	},
	},
	{ }
	{ }
+0 −2
Original line number Original line Diff line number Diff line
@@ -544,7 +544,6 @@ void xhci_dbg_ctx(struct xhci_hcd *xhci,
	int i;
	int i;
	/* Fields are 32 bits wide, DMA addresses are in bytes */
	/* Fields are 32 bits wide, DMA addresses are in bytes */
	int field_size = 32 / 8;
	int field_size = 32 / 8;
	struct xhci_slot_ctx *slot_ctx;
	dma_addr_t dma = ctx->dma;
	dma_addr_t dma = ctx->dma;
	int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params);
	int csz = HCC_64BYTE_CONTEXT(xhci->hcc_params);


@@ -570,7 +569,6 @@ void xhci_dbg_ctx(struct xhci_hcd *xhci,
			dbg_rsvd64(xhci, (u64 *)ctrl_ctx, dma);
			dbg_rsvd64(xhci, (u64 *)ctrl_ctx, dma);
	}
	}


	slot_ctx = xhci_get_slot_ctx(xhci, ctx);
	xhci_dbg_slot_ctx(xhci, ctx);
	xhci_dbg_slot_ctx(xhci, ctx);
	xhci_dbg_ep_ctx(xhci, ctx, last_ep);
	xhci_dbg_ep_ctx(xhci, ctx, last_ep);
}
}
+6 −3
Original line number Original line Diff line number Diff line
@@ -151,9 +151,8 @@ static void xhci_usb3_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
		if (portsc & PORT_DEV_REMOVE)
		if (portsc & PORT_DEV_REMOVE)
			port_removable |= 1 << (i + 1);
			port_removable |= 1 << (i + 1);
	}
	}
	memset(&desc->u.ss.DeviceRemovable,

			(__force __u16) cpu_to_le16(port_removable),
	desc->u.ss.DeviceRemovable = cpu_to_le16(port_removable);
			sizeof(__u16));
}
}


static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci,
@@ -809,11 +808,13 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
			temp = xhci_readl(xhci, port_array[wIndex]);
			temp = xhci_readl(xhci, port_array[wIndex]);
			xhci_dbg(xhci, "set port power, actual port %d status  = 0x%x\n", wIndex, temp);
			xhci_dbg(xhci, "set port power, actual port %d status  = 0x%x\n", wIndex, temp);


			spin_unlock_irqrestore(&xhci->lock, flags);
			temp = usb_acpi_power_manageable(hcd->self.root_hub,
			temp = usb_acpi_power_manageable(hcd->self.root_hub,
					wIndex);
					wIndex);
			if (temp)
			if (temp)
				usb_acpi_set_power_state(hcd->self.root_hub,
				usb_acpi_set_power_state(hcd->self.root_hub,
						wIndex, true);
						wIndex, true);
			spin_lock_irqsave(&xhci->lock, flags);
			break;
			break;
		case USB_PORT_FEAT_RESET:
		case USB_PORT_FEAT_RESET:
			temp = (temp | PORT_RESET);
			temp = (temp | PORT_RESET);
@@ -917,11 +918,13 @@ int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
			xhci_writel(xhci, temp & ~PORT_POWER,
			xhci_writel(xhci, temp & ~PORT_POWER,
				port_array[wIndex]);
				port_array[wIndex]);


			spin_unlock_irqrestore(&xhci->lock, flags);
			temp = usb_acpi_power_manageable(hcd->self.root_hub,
			temp = usb_acpi_power_manageable(hcd->self.root_hub,
					wIndex);
					wIndex);
			if (temp)
			if (temp)
				usb_acpi_set_power_state(hcd->self.root_hub,
				usb_acpi_set_power_state(hcd->self.root_hub,
						wIndex, false);
						wIndex, false);
			spin_lock_irqsave(&xhci->lock, flags);
			break;
			break;
		default:
		default:
			goto error;
			goto error;
Loading