[lkml]   [2000]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: New topic (PowerPC Linux PCI HELL)
    On  18 Sep, this message from Gérard Roudier echoed through cyberspace:
    >> > All I wanted was a function that allows the driver to decide that which
    >> > needs to be enabled.
    >> >
    >> > pci_enable_device(struct pci_dev *dev, byte enable_mask)
    >> >
    >> > This would allow drivers to enable that which it needs and not weird out
    >> > the hardware that does not like all of this extra fluff.
    >> Sounds not too daft
    >> static inline int pci_enable_device(struct pci_device *dev)
    >> {
    >> return pci_enable_device_features(USE_IO|USE_MM);
    >> }
    > And what about other features ?
    > I mean:
    > - Bus Master
    > - Memory Write and Invalidate
    > - Parity Error response

    This should probably be handled in arch-dependant code. So make a
    pci_enable_device() per arch. The point beeing that only this code has a
    chance to know some of the details of the PCI implementation on this
    platform/arch. Bus master and MemWI don't hurt, but I guess enabling
    parity can halt the bus. So you want to be careful... So:

    static inline int pci_enable_device(struct pci_device *dev)
    return pci_enable_device_features(~ENABLE_NONE);

    and let pci_enable_device_features() chose which features make sense/are


    Michel Lanners | " Read Philosophy. Study Art.
    23, Rue Paul Henkes | Ask Questions. Make Mistakes.
    L-1710 Luxembourg |
    email | | Learn Always. "

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 12:38    [W:0.022 / U:0.476 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site