Re: [PATCH]2.6.7 MSI-X Update

From: Christoph Hellwig
Date: Sat Jun 26 2004 - 03:31:23 EST


On Fri, Jun 25, 2004 at 06:38:37PM -0700, Roland Dreier wrote:
> I like this new MSI patch much better since it has pci_disable_msi()
> and pci_disable_msix() (as well as using pci_read_config_xxx instead
> of bus ops), but I still feel the API is not quite right. I don't
> think the pci_disable_msi() and pci_disable_msix() functions should
> only be for error paths; I think that they should always be used to
> undo the effect of pci_enable_msi() or pci_enable_msix() when a driver
> is unloading, and that request()/free_irq() should not have any effect
> on a device's MSI state.

Agreed. Non-symmetric APIs are very bad.

> As a concrete example, the e1000 net driver does request_irq() in its
> e1000_up() function and free_irq() in its e1000_down() function.
> Basically, the driver will do request_irq() when the user does
> "ifconfig up" and free_irq() when the user does "ifconfig down".

Lots of networking drivers do that..

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/