diff options
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 15a803b206b8..4725d15d096f 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -643,7 +643,7 @@ static int ehci_run (struct usb_hcd *hcd) | |||
643 | static irqreturn_t ehci_irq (struct usb_hcd *hcd) | 643 | static irqreturn_t ehci_irq (struct usb_hcd *hcd) |
644 | { | 644 | { |
645 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); | 645 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); |
646 | u32 status, pcd_status = 0, cmd; | 646 | u32 status, masked_status, pcd_status = 0, cmd; |
647 | int bh; | 647 | int bh; |
648 | 648 | ||
649 | spin_lock (&ehci->lock); | 649 | spin_lock (&ehci->lock); |
@@ -656,14 +656,14 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
656 | goto dead; | 656 | goto dead; |
657 | } | 657 | } |
658 | 658 | ||
659 | status &= INTR_MASK; | 659 | masked_status = status & INTR_MASK; |
660 | if (!status) { /* irq sharing? */ | 660 | if (!masked_status) { /* irq sharing? */ |
661 | spin_unlock(&ehci->lock); | 661 | spin_unlock(&ehci->lock); |
662 | return IRQ_NONE; | 662 | return IRQ_NONE; |
663 | } | 663 | } |
664 | 664 | ||
665 | /* clear (just) interrupts */ | 665 | /* clear (just) interrupts */ |
666 | ehci_writel(ehci, status, &ehci->regs->status); | 666 | ehci_writel(ehci, masked_status, &ehci->regs->status); |
667 | cmd = ehci_readl(ehci, &ehci->regs->command); | 667 | cmd = ehci_readl(ehci, &ehci->regs->command); |
668 | bh = 0; | 668 | bh = 0; |
669 | 669 | ||
@@ -734,18 +734,17 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
734 | 734 | ||
735 | /* PCI errors [4.15.2.4] */ | 735 | /* PCI errors [4.15.2.4] */ |
736 | if (unlikely ((status & STS_FATAL) != 0)) { | 736 | if (unlikely ((status & STS_FATAL) != 0)) { |
737 | ehci_err(ehci, "fatal error\n"); | ||
737 | dbg_cmd(ehci, "fatal", cmd); | 738 | dbg_cmd(ehci, "fatal", cmd); |
738 | dbg_status(ehci, "fatal", status); | 739 | dbg_status(ehci, "fatal", status); |
739 | if (status & STS_HALT) { | 740 | ehci_halt(ehci); |
740 | ehci_err (ehci, "fatal error\n"); | ||
741 | dead: | 741 | dead: |
742 | ehci_reset (ehci); | 742 | ehci_reset(ehci); |
743 | ehci_writel(ehci, 0, &ehci->regs->configured_flag); | 743 | ehci_writel(ehci, 0, &ehci->regs->configured_flag); |
744 | /* generic layer kills/unlinks all urbs, then | 744 | /* generic layer kills/unlinks all urbs, then |
745 | * uses ehci_stop to clean up the rest | 745 | * uses ehci_stop to clean up the rest |
746 | */ | 746 | */ |
747 | bh = 1; | 747 | bh = 1; |
748 | } | ||
749 | } | 748 | } |
750 | 749 | ||
751 | if (bh) | 750 | if (bh) |