diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2011-11-03 12:03:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-14 19:46:06 -0500 |
commit | 968b822c0023861ef6e4e15bb68582b36e89ad29 (patch) | |
tree | 0cd7f03035bd8a7a73c59df965ee8dc552f4a5d6 | |
parent | 2c1ce2b3fa6fe12c7804b62596a2fa63ac0b68a5 (diff) |
USB: Remove the SAW_IRQ hcd flag
The HCD_FLAG_SAW_IRQ flag was introduced in order to catch IRQ routing
errors: If an URB was unlinked and the host controller hadn't gotten
any IRQs, it seemed likely that the IRQs were directed to the wrong
vector.
This warning hasn't come up in many years, as far as I know; interrupt
routing now seems to be well under control. Therefore there's no
reason to keep the flag around any more. This patch (as1495) finally
removes it.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/c67x00/c67x00-hcd.c | 1 | ||||
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 4 | ||||
-rw-r--r-- | drivers/usb/core/hcd.c | 24 | ||||
-rw-r--r-- | drivers/usb/host/hwa-hc.c | 1 | ||||
-rw-r--r-- | drivers/usb/host/xhci-ring.c | 12 | ||||
-rw-r--r-- | drivers/usb/musb/musb_core.c | 1 | ||||
-rw-r--r-- | include/linux/usb/hcd.h | 2 |
7 files changed, 4 insertions, 41 deletions
diff --git a/drivers/usb/c67x00/c67x00-hcd.c b/drivers/usb/c67x00/c67x00-hcd.c index d3e1356d091..75e47b860a5 100644 --- a/drivers/usb/c67x00/c67x00-hcd.c +++ b/drivers/usb/c67x00/c67x00-hcd.c | |||
@@ -271,7 +271,6 @@ static void c67x00_hcd_irq(struct c67x00_sie *sie, u16 int_status, u16 msg) | |||
271 | if (int_status & SOFEOP_FLG(sie->sie_num)) { | 271 | if (int_status & SOFEOP_FLG(sie->sie_num)) { |
272 | c67x00_ll_usb_clear_status(sie, SOF_EOP_IRQ_FLG); | 272 | c67x00_ll_usb_clear_status(sie, SOF_EOP_IRQ_FLG); |
273 | c67x00_sched_kick(c67x00); | 273 | c67x00_sched_kick(c67x00); |
274 | set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); | ||
275 | } | 274 | } |
276 | } | 275 | } |
277 | 276 | ||
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index a004db35f6d..d136b8f4c8a 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -453,10 +453,6 @@ static int resume_common(struct device *dev, int event) | |||
453 | 453 | ||
454 | pci_set_master(pci_dev); | 454 | pci_set_master(pci_dev); |
455 | 455 | ||
456 | clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); | ||
457 | if (hcd->shared_hcd) | ||
458 | clear_bit(HCD_FLAG_SAW_IRQ, &hcd->shared_hcd->flags); | ||
459 | |||
460 | if (hcd->driver->pci_resume && !HCD_DEAD(hcd)) { | 456 | if (hcd->driver->pci_resume && !HCD_DEAD(hcd)) { |
461 | if (event != PM_EVENT_AUTO_RESUME) | 457 | if (event != PM_EVENT_AUTO_RESUME) |
462 | wait_for_companions(pci_dev, hcd); | 458 | wait_for_companions(pci_dev, hcd); |
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 13222d352a6..43a89e4ba92 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1168,20 +1168,6 @@ int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, | |||
1168 | if (urb->unlinked) | 1168 | if (urb->unlinked) |
1169 | return -EBUSY; | 1169 | return -EBUSY; |
1170 | urb->unlinked = status; | 1170 | urb->unlinked = status; |
1171 | |||
1172 | /* IRQ setup can easily be broken so that USB controllers | ||
1173 | * never get completion IRQs ... maybe even the ones we need to | ||
1174 | * finish unlinking the initial failed usb_set_address() | ||
1175 | * or device descriptor fetch. | ||
1176 | */ | ||
1177 | if (!HCD_SAW_IRQ(hcd) && !is_root_hub(urb->dev)) { | ||
1178 | dev_warn(hcd->self.controller, "Unlink after no-IRQ? " | ||
1179 | "Controller is probably using the wrong IRQ.\n"); | ||
1180 | set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); | ||
1181 | if (hcd->shared_hcd) | ||
1182 | set_bit(HCD_FLAG_SAW_IRQ, &hcd->shared_hcd->flags); | ||
1183 | } | ||
1184 | |||
1185 | return 0; | 1171 | return 0; |
1186 | } | 1172 | } |
1187 | EXPORT_SYMBOL_GPL(usb_hcd_check_unlink_urb); | 1173 | EXPORT_SYMBOL_GPL(usb_hcd_check_unlink_urb); |
@@ -2148,16 +2134,12 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd) | |||
2148 | */ | 2134 | */ |
2149 | local_irq_save(flags); | 2135 | local_irq_save(flags); |
2150 | 2136 | ||
2151 | if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) { | 2137 | if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) |
2152 | rc = IRQ_NONE; | 2138 | rc = IRQ_NONE; |
2153 | } else if (hcd->driver->irq(hcd) == IRQ_NONE) { | 2139 | else if (hcd->driver->irq(hcd) == IRQ_NONE) |
2154 | rc = IRQ_NONE; | 2140 | rc = IRQ_NONE; |
2155 | } else { | 2141 | else |
2156 | set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); | ||
2157 | if (hcd->shared_hcd) | ||
2158 | set_bit(HCD_FLAG_SAW_IRQ, &hcd->shared_hcd->flags); | ||
2159 | rc = IRQ_HANDLED; | 2142 | rc = IRQ_HANDLED; |
2160 | } | ||
2161 | 2143 | ||
2162 | local_irq_restore(flags); | 2144 | local_irq_restore(flags); |
2163 | return rc; | 2145 | return rc; |
diff --git a/drivers/usb/host/hwa-hc.c b/drivers/usb/host/hwa-hc.c index 9bfac657572..565d79f06e6 100644 --- a/drivers/usb/host/hwa-hc.c +++ b/drivers/usb/host/hwa-hc.c | |||
@@ -776,7 +776,6 @@ static int hwahc_probe(struct usb_interface *usb_iface, | |||
776 | goto error_alloc; | 776 | goto error_alloc; |
777 | } | 777 | } |
778 | usb_hcd->wireless = 1; | 778 | usb_hcd->wireless = 1; |
779 | set_bit(HCD_FLAG_SAW_IRQ, &usb_hcd->flags); | ||
780 | wusbhc = usb_hcd_to_wusbhc(usb_hcd); | 779 | wusbhc = usb_hcd_to_wusbhc(usb_hcd); |
781 | hwahc = container_of(wusbhc, struct hwahc, wusbhc); | 780 | hwahc = container_of(wusbhc, struct hwahc, wusbhc); |
782 | hwahc_init(hwahc); | 781 | hwahc_init(hwahc); |
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 940321b3ec6..2f8c17381c6 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c | |||
@@ -2389,17 +2389,7 @@ hw_died: | |||
2389 | 2389 | ||
2390 | irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd) | 2390 | irqreturn_t xhci_msi_irq(int irq, struct usb_hcd *hcd) |
2391 | { | 2391 | { |
2392 | irqreturn_t ret; | 2392 | return xhci_irq(hcd); |
2393 | struct xhci_hcd *xhci; | ||
2394 | |||
2395 | xhci = hcd_to_xhci(hcd); | ||
2396 | set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); | ||
2397 | if (xhci->shared_hcd) | ||
2398 | set_bit(HCD_FLAG_SAW_IRQ, &xhci->shared_hcd->flags); | ||
2399 | |||
2400 | ret = xhci_irq(hcd); | ||
2401 | |||
2402 | return ret; | ||
2403 | } | 2393 | } |
2404 | 2394 | ||
2405 | /**** Endpoint Ring Operations ****/ | 2395 | /**** Endpoint Ring Operations ****/ |
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 20a28731c33..12044c473c3 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -661,7 +661,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, | |||
661 | 661 | ||
662 | handled = IRQ_HANDLED; | 662 | handled = IRQ_HANDLED; |
663 | musb->is_active = 1; | 663 | musb->is_active = 1; |
664 | set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); | ||
665 | 664 | ||
666 | musb->ep0_stage = MUSB_EP0_START; | 665 | musb->ep0_stage = MUSB_EP0_START; |
667 | 666 | ||
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 03354d557b7..b2f62f3a32a 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -99,7 +99,6 @@ struct usb_hcd { | |||
99 | */ | 99 | */ |
100 | unsigned long flags; | 100 | unsigned long flags; |
101 | #define HCD_FLAG_HW_ACCESSIBLE 0 /* at full power */ | 101 | #define HCD_FLAG_HW_ACCESSIBLE 0 /* at full power */ |
102 | #define HCD_FLAG_SAW_IRQ 1 | ||
103 | #define HCD_FLAG_POLL_RH 2 /* poll for rh status? */ | 102 | #define HCD_FLAG_POLL_RH 2 /* poll for rh status? */ |
104 | #define HCD_FLAG_POLL_PENDING 3 /* status has changed? */ | 103 | #define HCD_FLAG_POLL_PENDING 3 /* status has changed? */ |
105 | #define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */ | 104 | #define HCD_FLAG_WAKEUP_PENDING 4 /* root hub is resuming? */ |
@@ -110,7 +109,6 @@ struct usb_hcd { | |||
110 | * be slightly faster than test_bit(). | 109 | * be slightly faster than test_bit(). |
111 | */ | 110 | */ |
112 | #define HCD_HW_ACCESSIBLE(hcd) ((hcd)->flags & (1U << HCD_FLAG_HW_ACCESSIBLE)) | 111 | #define HCD_HW_ACCESSIBLE(hcd) ((hcd)->flags & (1U << HCD_FLAG_HW_ACCESSIBLE)) |
113 | #define HCD_SAW_IRQ(hcd) ((hcd)->flags & (1U << HCD_FLAG_SAW_IRQ)) | ||
114 | #define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH)) | 112 | #define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH)) |
115 | #define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING)) | 113 | #define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING)) |
116 | #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING)) | 114 | #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING)) |