LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Petr Vandrovec <petr@vandrovec.name>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH] Unbreak MSI on ATI devices
Date: Thu, 21 Dec 2006 03:21:37 -0500	[thread overview]
Message-ID: <458A4411.1080500@garzik.org> (raw)
In-Reply-To: <20061221075540.GA21152@vana.vc.cvut.cz>

Petr Vandrovec wrote:
> After poking around I've found that problem is that at least ATI USB-HCDs
> apply INTX enable even for MSI, despite warning in the PCI specification that
> it should apply only to MSI (actually I have feeling that on these USB devices 
> disabling INTX in MSI mode drives their INTA# line active as when ohci1394 
> module got loaded kernel complained about interrupt being continuously 
> activated for no good reason (TI's 7421 is one of few MSI-incapable devices
> in my box).
> 
> So my question is - what is real reason for disabling INTX when in MSI mode?
> According to PCI spec it should not be needed, and it hurts at least chips
> listed below:

> Do not disable INTX in MSI mode.  It breaks ATI USB HCDs (both OHCI and EHCI).
> 
> Signed-off-by: Petr Vandrovec <petr@vandrovec.name>
> 
> diff -uprdN linux/drivers/pci/msi.c linux/drivers/pci/msi.c
> --- linux/drivers/pci/msi.c	2006-12-16 13:34:52.000000000 -0800
> +++ linux/drivers/pci/msi.c	2006-12-20 23:18:10.000000000 -0800
> @@ -256,7 +256,7 @@ static void enable_msi_mode(struct pci_d
>  		dev->msix_enabled = 1;
>  	}
>  
> -	pci_intx(dev, 0);  /* disable intx */
> +	pci_intx(dev, 1);  /* enable intx, on some devices it affects MSI as well */
>  }

I'm just going to CC Linus, and run ;-)

More seriously.  Some other chips choke if you forget to disable INTx, 
before going into MSI mode.

Thus, turning off one irq source before turning on another is the most 
logical course of action.

I suppose we'll have to quirk ATI for being dumb...?

	Jeff



  reply	other threads:[~2006-12-21  8:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-21  7:55 Petr Vandrovec
2006-12-21  8:21 ` Jeff Garzik [this message]
2006-12-25  4:01 ` Daniel Barkalow
2007-01-04 21:59 ` Roland Dreier
2007-01-05  9:07   ` Petr Vandrovec
2007-01-06  0:54     ` Daniel Barkalow
2007-01-05 23:57   ` Daniel Barkalow
     [not found] <fa.yZrxrHh1AWLcv/+D2xYZ1VhVYb8@ifi.uio.no>
2006-12-21 14:36 ` Robert Hancock

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=458A4411.1080500@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petr@vandrovec.name \
    --cc=torvalds@osdl.org \
    --subject='Re: [PATCH] Unbreak MSI on ATI devices' \
    /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

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).