lkml.org 
[lkml]   [2005]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: avoiding pci_disable_device()...
    Roland Dreier wrote:
    > Jeff> That's an MSI bug.
    >
    > Jeff> A current PCI driver -should- be using pci_request_regions().
    >
    > Hmm... I'm not sure everyone would agree with that. It does make
    > sense that the MSI-X core wants to make sure that it owns the MSI-X
    > table without having someone else stomp on it.

    The idea is right but the implementation is definitely incorrect, for
    multiple reasons:

    * Every PCI driver should call pci_request_regions(), because there
    should only be one pci_driver associated with that set of resources.

    * Therefore, any _addition_ to the PCI API that prevents a driver from
    using pci_request_regions() causes multiple problems, by virtue of
    diverging from the other 98% of the kernel's PCI drivers, which use
    pci_request_regions().

    IOW, MSI-X's implementation incorrectly constrains PCI driver authors.

    * Programmer over-protection. Who is attempting to stomp on MSI-X
    tables? If a driver is reading an MSI-X bar and doing something without
    consulting the kernel MSI-X code, that's a bug and most likely a
    violation of the PCI spec. Fix the driver.

    In Linux we don't over-protect programmers with a zillion sanity checks
    for every internal API call; that leads to bloat, and papers over bugs
    that should be fixed.

    Jeff


    -
    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-03-22 14:10    [W:2.937 / U:1.336 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site