linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Michel Bouissou <michel@bouissou.net>
Cc: "Protasevich, Natalie" <Natalie.Protasevich@UNISYS.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble
Date: Tue, 12 Jul 2005 10:12:05 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.0507121004080.4996-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <200507120954.59522@totor.bouissou.net>

On Tue, 12 Jul 2005, Michel Bouissou wrote:

> > To try and help pin things down, tomorrow (i.e., Tuesday) I'll send you a
> > test patch to completely disable the UHCI controllers, leaving them awake
> > and idle, not generating interrupts.  If you still get those spurious
> > IRQs, they will have to come from somewhere else.  (Assuming you can
> > devote server time to this sort of testing...)
> 
> I'll try my best, although I will have little time for playing with this until 
> the end of this week, and will be on travel next week. But if you send me a 
> test patch, I'll try my best to test it.

Okay, the patch (for 2.6.12) is below.  It does several things:

	Prevents the system from reading the port status registers,
	so the computer won't know when any devices are plugged in.

	Makes the system think there always is a device plugged in,
	so it will never automatically suspend the controllers.

	Leaves all the interrupt-enable bits turned off, so the
	controllers won't ever generate an interrupt request.

	Prints a message to the system log every time the interrupt
	handler is called.

In case it's not already clear, when you install this patch the UHCI 
controllers will not be useable.

Alan Stern


Index: linux-2.6.12/drivers/usb/host/uhci-hub.c
===================================================================
--- linux-2.6.12.orig/drivers/usb/host/uhci-hub.c
+++ linux-2.6.12/drivers/usb/host/uhci-hub.c
@@ -38,6 +38,7 @@ static int uhci_hub_status_data(struct u
 	struct uhci_hcd *uhci = hcd_to_uhci(hcd);
 	int port;
 
+	return 0;
 	*buf = 0;
 	for (port = 0; port < uhci->rh_numports; ++port) {
 		if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & RWC_BITS) ||
@@ -154,6 +155,7 @@ static int uhci_hub_control(struct usb_h
 		if (to_pci_dev(hcd->self.controller)->vendor ==
 				PCI_VENDOR_ID_VIA)
 			status ^= USBPORTSC_OC;
+		status = 0;
 
 		/* UHCI doesn't support C_RESET (always false) */
 		wPortChange = lstatus = 0;
Index: linux-2.6.12/drivers/usb/host/uhci-hcd.c
===================================================================
--- linux-2.6.12.orig/drivers/usb/host/uhci-hcd.c
+++ linux-2.6.12/drivers/usb/host/uhci-hcd.c
@@ -169,6 +169,7 @@ static irqreturn_t uhci_irq(struct usb_h
 	 * "HC Halted" status bit is persistent: it is RO, not R/WC.
 	 */
 	status = inw(io_addr + USBSTS);
+	dev_info(uhci_dev(uhci), "IRQ, status = %x\n", status);
 	if (!(status & ~USBSTS_HCH))	/* shared interrupt, not mine */
 		return IRQ_NONE;
 	outw(status, io_addr + USBSTS);		/* Clear it */
@@ -282,6 +283,7 @@ static int ports_active(struct uhci_hcd 
 	int connection = 0;
 	int i;
 
+	return 1;
 	for (i = 0; i < uhci->rh_numports; i++)
 		connection |= (inw(io_addr + USBPORTSC1 + i * 2) & USBPORTSC_CCS);
 
@@ -389,8 +391,10 @@ static int start_hc(struct uhci_hcd *uhc
 	/* Turn on PIRQ and all interrupts */
 	pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
 			USBLEGSUP_DEFAULT);
+#if 0
 	outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC | USBINTR_SP,
 		io_addr + USBINTR);
+#endif
 
 	/* Start at frame 0 */
 	outw(0, io_addr + USBFRNUM);
@@ -757,8 +761,10 @@ static int uhci_resume(struct usb_hcd *h
 				0);
 		outw(uhci->frame_number, uhci->io_addr + USBFRNUM);
 		outl(uhci->fl->dma_handle, uhci->io_addr + USBFLBASEADD);
+#if 0
 		outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC |
 				USBINTR_SP, uhci->io_addr + USBINTR);
+#endif
 		uhci->resume_detect = 1;
 		pci_write_config_word(to_pci_dev(uhci_dev(uhci)), USBLEGSUP,
 				USBLEGSUP_DEFAULT);


  reply	other threads:[~2005-07-12 14:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-10 18:50 Kernel 2.6.12 + IO-APIC + uhci_hcd = Trouble Protasevich, Natalie
2005-07-11  9:06 ` Michel Bouissou
2005-07-11 18:36   ` Alan Stern
2005-07-11 19:33     ` [SOLVED ??] " Michel Bouissou
2005-07-11 19:43       ` Alan Stern
2005-07-11 20:02         ` Michel Bouissou
2005-07-11 20:16           ` Alan Stern
2005-07-11 20:46             ` Michel Bouissou
2005-07-11 20:58               ` Michel Bouissou
2005-07-11 21:21                 ` [NOT solved] " Michel Bouissou
2005-07-11 21:21               ` [SOLVED ??] " Alan Stern
2005-07-11 21:34                 ` Michel Bouissou
2005-07-12  1:54                   ` Alan Stern
2005-07-12  7:54                     ` Michel Bouissou
2005-07-12 14:12                       ` Alan Stern [this message]
2005-07-12 17:03                         ` Michel Bouissou
2005-07-12 18:15                           ` Alan Stern
2005-07-12 18:16                           ` Michel Bouissou
2005-07-12 18:57                             ` Alan Stern
2005-07-12 20:40                               ` Michel Bouissou
2005-07-12 21:37                                 ` Alan Stern
2005-07-12 22:01                                   ` Michel Bouissou
  -- strict thread matches above, loose matches on Subject: below --
2005-07-12 23:16 Protasevich, Natalie
2005-07-13  6:46 ` Michel Bouissou
2005-07-12 21:02 Protasevich, Natalie
2005-07-10  8:11 Michel Bouissou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44L0.0507121004080.4996-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=Natalie.Protasevich@UNISYS.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michel@bouissou.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).