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

Commit bf9127c3 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: adding comment for ipaq forcing number of ports
  USB: fix Oops on loading ipaq module since 2.6.26
  USB: add a pl2303 device id
  USB: another option device id
  USB: don't lose disconnections during suspend
  USB: fix interrupt disabling for HCDs with shared interrupt handlers
  USB: New device ID for ftdi_sio driver
  sisusbvga: Fix oops on disconnect.
  USB: mass storage: new id for US_SC_CYP_ATACB
  USB: ohci - record data toggle after unlink
  USB: ehci - fix timer regression
  USB: fix cdc-acm resume()
  OHCI: Fix problem if SM501 and another platform driver is selected
parents b620754b b89cbb81
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1125,9 +1125,6 @@ static void stop_data_traffic(struct acm *acm)
	for (i = 0; i < acm->rx_buflimit; i++)
		usb_kill_urb(acm->ru[i].urb);

	INIT_LIST_HEAD(&acm->filled_read_bufs);
	INIT_LIST_HEAD(&acm->spare_read_bufs);

	tasklet_enable(&acm->urb_task);

	cancel_work_sync(&acm->work);
+28 −10
Original line number Diff line number Diff line
@@ -1684,19 +1684,30 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum);
irqreturn_t usb_hcd_irq (int irq, void *__hcd)
{
	struct usb_hcd		*hcd = __hcd;
	int			start = hcd->state;
	unsigned long		flags;
	irqreturn_t		rc;

	if (unlikely(start == HC_STATE_HALT ||
	    !test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)))
		return IRQ_NONE;
	if (hcd->driver->irq (hcd) == IRQ_NONE)
		return IRQ_NONE;
	/* IRQF_DISABLED doesn't work correctly with shared IRQs
	 * when the first handler doesn't use it.  So let's just
	 * assume it's never used.
	 */
	local_irq_save(flags);

	if (unlikely(hcd->state == HC_STATE_HALT ||
		     !test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) {
		rc = IRQ_NONE;
	} else if (hcd->driver->irq(hcd) == IRQ_NONE) {
		rc = IRQ_NONE;
	} else {
		set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags);

		if (unlikely(hcd->state == HC_STATE_HALT))
			usb_hc_died(hcd);
	return IRQ_HANDLED;
		rc = IRQ_HANDLED;
	}

	local_irq_restore(flags);
	return rc;
}

/*-------------------------------------------------------------------------*/
@@ -1860,6 +1871,13 @@ int usb_add_hcd(struct usb_hcd *hcd,

	/* enable irqs just before we start the controller */
	if (hcd->driver->irq) {

		/* IRQF_DISABLED doesn't work as advertised when used together
		 * with IRQF_SHARED. As usb_hcd_irq() will always disable
		 * interrupts we can remove it here.
		 */
		irqflags &= ~IRQF_DISABLED;

		snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
				hcd->driver->description, hcd->self.busnum);
		if ((retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
+4 −11
Original line number Diff line number Diff line
@@ -713,18 +713,11 @@ static void hub_restart(struct usb_hub *hub, int type)
		}

		/* Was the power session lost while we were suspended? */
		switch (type) {
		case HUB_RESET_RESUME:
			portstatus = 0;
			portchange = USB_PORT_STAT_C_CONNECTION;
			break;
		status = hub_port_status(hub, port1, &portstatus, &portchange);

		case HUB_RESET:
		case HUB_RESUME:
			status = hub_port_status(hub, port1,
					&portstatus, &portchange);
			break;
		}
		/* If the device is gone, khubd will handle it later */
		if (status == 0 && !(portstatus & USB_PORT_STAT_CONNECTION))
			continue;

		/* For "USB_PERSIST"-enabled children we must
		 * mark the child device for reset-resume and
+10 −9
Original line number Diff line number Diff line
@@ -177,6 +177,15 @@ timer_action_done (struct ehci_hcd *ehci, enum ehci_timer_action action)
static inline void
timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
{
	/* Don't override timeouts which shrink or (later) disable
	 * the async ring; just the I/O watchdog.  Note that if a
	 * SHRINK were pending, OFF would never be requested.
	 */
	if (timer_pending(&ehci->watchdog)
			&& ((BIT(TIMER_ASYNC_SHRINK) | BIT(TIMER_ASYNC_OFF))
				& ehci->actions))
		return;

	if (!test_and_set_bit (action, &ehci->actions)) {
		unsigned long t;

@@ -192,15 +201,7 @@ timer_action (struct ehci_hcd *ehci, enum ehci_timer_action action)
			t = EHCI_SHRINK_JIFFIES;
			break;
		}
		t += jiffies;
		// all timings except IAA watchdog can be overridden.
		// async queue SHRINK often precedes IAA.  while it's ready
		// to go OFF neither can matter, and afterwards the IO
		// watchdog stops unless there's still periodic traffic.
		if (time_before_eq(t, ehci->watchdog.expires)
				&& timer_pending (&ehci->watchdog))
			return;
		mod_timer (&ehci->watchdog, t);
		mod_timer(&ehci->watchdog, t + jiffies);
	}
}

+14 −1
Original line number Diff line number Diff line
@@ -1054,7 +1054,7 @@ MODULE_LICENSE ("GPL");

#ifdef CONFIG_MFD_SM501
#include "ohci-sm501.c"
#define PLATFORM_DRIVER		ohci_hcd_sm501_driver
#define SM501_OHCI_DRIVER	ohci_hcd_sm501_driver
#endif

#if	!defined(PCI_DRIVER) &&		\
@@ -1062,6 +1062,7 @@ MODULE_LICENSE ("GPL");
	!defined(OF_PLATFORM_DRIVER) &&	\
	!defined(SA1111_DRIVER) &&	\
	!defined(PS3_SYSTEM_BUS_DRIVER) && \
	!defined(SM501_OHCI_DRIVER) && \
	!defined(SSB_OHCI_DRIVER)
#error "missing bus glue for ohci-hcd"
#endif
@@ -1121,9 +1122,18 @@ static int __init ohci_hcd_mod_init(void)
		goto error_ssb;
#endif

#ifdef SM501_OHCI_DRIVER
	retval = platform_driver_register(&SM501_OHCI_DRIVER);
	if (retval < 0)
		goto error_sm501;
#endif

	return retval;

	/* Error path */
#ifdef SM501_OHCI_DRIVER
 error_sm501:
#endif
#ifdef SSB_OHCI_DRIVER
 error_ssb:
#endif
@@ -1159,6 +1169,9 @@ module_init(ohci_hcd_mod_init);

static void __exit ohci_hcd_mod_exit(void)
{
#ifdef SM501_OHCI_DRIVER
	platform_driver_unregister(&SM501_OHCI_DRIVER);
#endif
#ifdef SSB_OHCI_DRIVER
	ssb_driver_unregister(&SSB_OHCI_DRIVER);
#endif
Loading