And isn't multi_msi_enable(), though unused (since msi_{en,dis}able() are
unused), broken altogether (shifting num right by 1 instead of taking the
binary log)?

Signed-off-by: Jan Beulich

---
drivers/pci/msi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.28-rc4/drivers/pci/msi.h 2007-02-04 19:44:54.000000000 +0100
+++ 2.6.28-rc4-pci-multi-msi-enable/drivers/pci/msi.h 2008-11-07 09:13:09.000000000 +0100
@@ -23,7 +23,7 @@
#define multi_msi_capable(control) \
(1 << ((control & PCI_MSI_FLAGS_QMASK) >> 1))
#define multi_msi_enable(control, num) \
- control |= (((num >> 1) << 4) & PCI_MSI_FLAGS_QSIZE);
+ control |= ((fls((num) - 1) << 4) & PCI_MSI_FLAGS_QSIZE)
#define is_64bit_address(control) (!!(control & PCI_MSI_FLAGS_64BIT))
#define is_mask_bit_support(control) (!!(control & PCI_MSI_FLAGS_MASKBIT))
#define msi_enable(control, num) multi_msi_enable(control, num); \



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