Re: pci_enable_msi() for everyone?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 03, 2005 at 11:48:21PM -0700, Greg KH wrote:
> > One complication is some drivers will want to register a different
> > IRQ handler depending on if MSI is enabled or not.
> 
> That's fine, they can always check the device capabilities and do that.

Can you be more specific?
Maybe a short chunk of psuedo code?

> > If MSI is enabled (and usable), then some MMIO reads can be omitted.
> > I've posted a patch for tg3 driver:
> > 	ftp://ftp.parisc-linux.org/patches/diff-2.6.10-tg3_MSI-03
> > 
> > (Just an example! It was not accepted because of buggy HW
> >  though it worked great on the HW I have access to.)
> > 
> > drivers/infiniband/hw/mthca driver is another example.
> 
> But it doesn't do that yet either ;)

Sorry - only uses different IRQ handlers for MSI-X support.
But it could do something different for MSI IRQ handlers as well.

> > How can the driver know which IRQ handlers to register?
> 
> Same as always, use the dev->irq field like they do today.

I think you misunderstood my question.
The driver uses dev->irq as a "token" to register *some* IRQ handler.
If the driver wants to register "tg3_irq_nommioread()" for the
MSI case and "tg3_irq()" for Line Based IRQ case, how would the
driver know which IRQ handler it should register?

The arch IRQ support knows the difference and currently returns
that status in the pci_msi_enable() call.

thanks,
grant
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux