Эх сурвалжийг харах

USB: ehci: remove obsolete workaround for bogus IRQs

It was pointed out that we found and fixed the cause of the "bogus"
fatal IRQ reports some time ago ... this patch removes the code
which was working around that bug ("status" got clobbered), and a
comment which needlessly confused folk reading this code.

This also includes a minor cleanup to the code which fixed that bug.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell 18 жил өмнө
parent
commit
d1b1842c39

+ 3 - 3
drivers/usb/host/ehci-hcd.c

@@ -686,6 +686,8 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
 	/* remote wakeup [4.3.1] */
 	/* remote wakeup [4.3.1] */
 	if (status & STS_PCD) {
 	if (status & STS_PCD) {
 		unsigned	i = HCS_N_PORTS (ehci->hcs_params);
 		unsigned	i = HCS_N_PORTS (ehci->hcs_params);
+
+		/* kick root hub later */
 		pcd_status = status;
 		pcd_status = status;
 
 
 		/* resume root hub? */
 		/* resume root hub? */
@@ -714,8 +716,6 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
 
 
 	/* PCI errors [4.15.2.4] */
 	/* PCI errors [4.15.2.4] */
 	if (unlikely ((status & STS_FATAL) != 0)) {
 	if (unlikely ((status & STS_FATAL) != 0)) {
-		/* bogus "fatal" IRQs appear on some chips... why?  */
-		status = ehci_readl(ehci, &ehci->regs->status);
 		dbg_cmd (ehci, "fatal", ehci_readl(ehci,
 		dbg_cmd (ehci, "fatal", ehci_readl(ehci,
 						   &ehci->regs->command));
 						   &ehci->regs->command));
 		dbg_status (ehci, "fatal", status);
 		dbg_status (ehci, "fatal", status);
@@ -734,7 +734,7 @@ dead:
 	if (bh)
 	if (bh)
 		ehci_work (ehci);
 		ehci_work (ehci);
 	spin_unlock (&ehci->lock);
 	spin_unlock (&ehci->lock);
-	if (pcd_status & STS_PCD)
+	if (pcd_status)
 		usb_hcd_poll_rh_status(hcd);
 		usb_hcd_poll_rh_status(hcd);
 	return IRQ_HANDLED;
 	return IRQ_HANDLED;
 }
 }