lkml.org 
[lkml]   [2005]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH] PCI: remove access to pci_[enable|disable]_msi() for drivers
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Hi Greg.

    >>>>* What if the driver writer does not want MSI enabled for their
    >>>> hardware (even though there is an MSI capabilities entry)? Reasons
    >>>> include: overhead involved in initiating the MSI; no support in some
    >>>> versions of firmware (QLogic hardware).
    >>>
    >>>Yes, a very good point. I guess I should keep the pci_enable_msi() and
    >>>pci_disable_msi() functions exported for this reason.
    >>>
    >>
    >>well... only pci_disable_msi() is needed for this ;)
    >
    > I thought so too, until I looked at the IB driver :(
    >
    > The issue is, if pci_enable_msix() fails, we want to fall back to MSI,
    > so you need to call pci_enable_msi() for that (after calling
    > pci_disable_msi() before calling pci_enable_msix(), what a mess...)
    >
    > So we still need both functions, and for MSI-X, the logic involved in
    > enabling it is horrible. Let me see if this can be made saner...

    Why not make pci_switch_to_msix() (yeah, horrible name) instead?

    pci_switch_to_msix(dev)
    {
    pci_disable_msi(dev);
    if (!psi_enable_msix(dev))
    pci_enable_msi(dev);
    }

    And it can naturally inform the caller if it failed or not.

    // Stefan
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.1 (MingW32)

    iD8DBQFCp8uHBrn2kJu9P78RAid6AKCqYFJM0+kg0JYIgOYQiHSHv5Cw0gCfQw8w
    A+z+BYzzvfi4oaBl6isuaEM=
    =qL+F
    -----END PGP SIGNATURE-----
    -
    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/

    \
     
     \ /
      Last update: 2005-06-09 06:54    [W:3.791 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site