Messages in this thread | | | Date | Fri, 3 Jun 2005 23:51:26 -0700 | From | Greg KH <> | Subject | Re: pci_enable_msi() for everyone? |
| |
On Fri, Jun 03, 2005 at 07:16:04PM -0400, Jeff Garzik wrote: > Greg KH wrote: > >In talking with a few people about the MSI kernel code, they asked why > >we can't just do the pci_enable_msi() call for every pci device in the > >system (at somewhere like pci_enable_device() time or so). That would > >let all drivers and devices get the MSI functionality without changing > >their code, and probably make the api a whole lot simpler. > > Agreed. > > And now is a good time to make changes, before bunches of drivers start > using pci_enable_msi(). I am preparing such a change for the AHCI > driver (see attached), which will be the standard SATA interface on most > new motherboards.
Yes, roll that pci_intx() into the core and have it do the pci_disable_msi() also if needed would be what I am thinking of.
> >Now I know the e1000 driver would have to specifically disable MSI for > >some of their broken versions, and possibly some other drivers might > >need this, but the downside seems quite small. > > tg3 needs to deal with some broken system chipsets as well. See > tg3_test_msi(), which I would eventually prefer to eliminate in favor of > PCI quirks and such.
Ok, that's fine.
> An API note of warning though... IMO eventually different drivers are > going to want different behavior from pci_enable_device(). IDE already > hacks around this, as Alan was required to do a while ago (IDE has a > weird PCI BAR setup sometimes, requiring care during enabling). > > Longer term, I think we will need a > > pci_enable(info on what to enable) > > so that drivers can specify ahead of time "don't enable PIO, only MMIO", > "don't enable MMIO, only PIO", "don't use MSI", etc. and add a > pci_disable() to undo all of that.
Yes, I agree, but let's start with baby steps :)
> The more we add singleton functions like pci_enable_msi(), > pci_set_master(), etc. the more I wish for a single function that > handled all those details at one atomic point. There is a lot of > standard patterns that are hand-coded into every PCI driver's probe > functions.
Also agreed.
thanks,
greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |