Re: MSI and driver APIs

From: Roland Dreier
Date: Thu Dec 15 2005 - 16:36:00 EST


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

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

Well, a driver for a chip that does MSI may be "dumb" in that sense.
For example, tg3 only got MSI support in April '05 or so.

Although looking at tg3.c, it seems that nothing special is required
to disable MSI -- there is a special chip register bit to set to
enable MSI mode, but it doesn't seem necessary to clear the bit to
disable MSI.

The case I'm worried about is a chip where something special has to be
done to get out of MSI mode, but the driver is totally dumb and just
does request_irq() on its legacy interrupt. The core PCI code doesn't
have the chip-specific knowledge to fully turn off MSI.

But I don't know of a real device that falls into that category, so
your scheme is probably OK.

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