Added GPIO driver
[openwrt.git] / target / linux / aruba-2.6 / patches / 012-ehci_softirq.patch
1 diff -Nurb linux-2.6.16.1/drivers/usb/host/ehci.h linux-patched/drivers/usb/host/ehci.h
2 --- linux-2.6.16.1/drivers/usb/host/ehci.h 2006-03-27 22:49:02.000000000 -0800
3 +++ linux-patched/drivers/usb/host/ehci.h 2006-04-07 12:07:30.000000000 -0700
4 @@ -82,6 +82,7 @@
5 struct dma_pool *sitd_pool; /* sitd per split iso urb */
6
7 struct timer_list watchdog;
8 + struct timer_list softirq;
9 unsigned long actions;
10 unsigned stamp;
11 unsigned long next_statechange;
12 diff -Nurb linux-2.6.16.1/drivers/usb/host/ehci-hcd.c linux-patched/drivers/usb/host/ehci-hcd.c
13 --- linux-2.6.16.1/drivers/usb/host/ehci-hcd.c 2006-03-27 22:49:02.000000000 -0800
14 +++ linux-patched/drivers/usb/host/ehci-hcd.c 2006-04-07 13:20:13.000000000 -0700
15 @@ -116,6 +116,7 @@
16 #define EHCI_IO_JIFFIES (HZ/10) /* io watchdog > irq_thresh */
17 #define EHCI_ASYNC_JIFFIES (HZ/20) /* async idle timeout */
18 #define EHCI_SHRINK_JIFFIES (HZ/200) /* async qh unlink delay */
19 +#define EHCI_SOFTIRQ (HZ/400)
20
21 /* Initial IRQ latency: faster than hw default */
22 static int log2_irq_thresh = 0; // 0 to 6
23 @@ -263,6 +264,16 @@
24 #include "ehci-sched.c"
25
26 /*-------------------------------------------------------------------------*/
27 +static irqreturn_t ehci_irq (struct usb_hcd *hcd);
28 +
29 +static void ehci_softirq (unsigned long param)
30 +{
31 + struct ehci_hcd *ehci = (struct ehci_hcd *) param;
32 +
33 + if (ehci_irq(ehci_to_hcd(ehci)) != IRQ_NONE)
34 + set_bit(HCD_FLAG_SAW_IRQ, &(ehci_to_hcd(ehci))->flags);
35 + mod_timer (&ehci->softirq, jiffies + EHCI_SOFTIRQ);
36 +}
37
38 static void ehci_watchdog (unsigned long param)
39 {
40 @@ -280,6 +291,10 @@
41 COUNT (ehci->stats.lost_iaa);
42 writel (STS_IAA, &ehci->regs->status);
43 ehci->reclaim_ready = 1;
44 + if (!timer_pending(&ehci->softirq)) {
45 + ehci_info(ehci, "switching to softirq\n");
46 + mod_timer (&ehci->softirq, jiffies + EHCI_SOFTIRQ);
47 + }
48 }
49 }
50
51 @@ -371,6 +388,7 @@
52
53 /* no more interrupts ... */
54 del_timer_sync (&ehci->watchdog);
55 + del_timer_sync (&ehci->softirq);
56
57 spin_lock_irq(&ehci->lock);
58 if (HC_IS_RUNNING (hcd->state))
59 @@ -418,6 +436,10 @@
60 ehci->watchdog.function = ehci_watchdog;
61 ehci->watchdog.data = (unsigned long) ehci;
62
63 + init_timer(&ehci->softirq);
64 + ehci->softirq.function = ehci_softirq;
65 + ehci->softirq.data = (unsigned long) ehci;
66 +
67 /*
68 * hw default: 1K periodic list heads, one per frame.
69 * periodic_size can shrink by USBCMD update if hcc_params allows.
70
This page took 0.045854 seconds and 5 git commands to generate.