Re: MSI and driver APIs

From: Benjamin Herrenschmidt
Date: Thu Dec 15 2005 - 16:21:21 EST


On Thu, 2005-12-15 at 13:18 -0800, Roland Dreier wrote:
> Benjamin> You can have multiple MSIs too (they just have to be
> Benjamin> contiguous in numbers and aligned on the nearest power
> Benjamin> of 2).
>
> Good point. I just got too used to the x86-ism of the current MSI
> code, which can't handle allocating contiguous vectors.
>
> Benjamin> I'm tempted to leave them enabled and only disable them
> Benjamin> when request_irq() is done on the legacy INTx... Does
> Benjamin> anybody see a problem with this approach ?
>
> You might run into trouble on hardware (think tg3 or its ilk again)
> where you might have to do something beyond disabling MSI in the PCI
> header to switch the chip out of MSI mode.

But won't the driver call pci_enable/disable_msi() in those cases ? If
not, it's easy enough to add (explicit disable rather than not-enabled).

I'm mostly concerned about "dumb" drivers that don't know about MSI at
all...

Ben.


-
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/