From 968b822c0023861ef6e4e15bb68582b36e89ad29 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Thu, 3 Nov 2011 12:03:38 -0400 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/hcd-pci.c | 4 ---- drivers/usb/core/hcd.c | 24 +++--------------------- 2 files changed, 3 insertions(+), 25 deletions(-) (limited to 'drivers/usb/core') 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) pci_set_master(pci_dev); - clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); - if (hcd->shared_hcd) - clear_bit(HCD_FLAG_SAW_IRQ, &hcd->shared_hcd->flags); - if (hcd->driver->pci_resume && !HCD_DEAD(hcd)) { if (event != PM_EVENT_AUTO_RESUME) 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, if (urb->unlinked) return -EBUSY; urb->unlinked = status; - - /* IRQ setup can easily be broken so that USB controllers - * never get completion IRQs ... maybe even the ones we need to - * finish unlinking the initial failed usb_set_address() - * or device descriptor fetch. - */ - if (!HCD_SAW_IRQ(hcd) && !is_root_hub(urb->dev)) { - dev_warn(hcd->self.controller, "Unlink after no-IRQ? " - "Controller is probably using the wrong IRQ.\n"); - set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); - if (hcd->shared_hcd) - set_bit(HCD_FLAG_SAW_IRQ, &hcd->shared_hcd->flags); - } - return 0; } EXPORT_SYMBOL_GPL(usb_hcd_check_unlink_urb); @@ -2148,16 +2134,12 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd) */ local_irq_save(flags); - if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) { + if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) rc = IRQ_NONE; - } else if (hcd->driver->irq(hcd) == IRQ_NONE) { + else if (hcd->driver->irq(hcd) == IRQ_NONE) rc = IRQ_NONE; - } else { - set_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); - if (hcd->shared_hcd) - set_bit(HCD_FLAG_SAW_IRQ, &hcd->shared_hcd->flags); + else rc = IRQ_HANDLED; - } local_irq_restore(flags); return rc; -- cgit v1.2.2