diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-01-01 08:47:10 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:15:33 -0500 |
commit | e57895d38991036f9ccf193b70fc5ebd5f6e6dc9 (patch) | |
tree | 4c0e014a007a2e31c15bfa0232f5c5cbcc08136a /drivers/infiniband/hw/mthca/mthca_main.c | |
parent | 38dc732f47948b9f91ae846806159a16aab1015f (diff) |
IB/mthca: Remove MSI support as scheduled
Remove MSI support from the mthca driver, as scheduled. There is no
reason to use MSI instead of MSI-X, since MSI-X performs better. No
one has spoken up since MSI support was deprecated in commit f6be6fbe
("IB/mthca: Schedule MSI support for removal"), so apparently the MSI
support is unused.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_main.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_main.c | 38 |
1 files changed, 5 insertions, 33 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 60de6f93869e..2fc36ca134a6 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -65,14 +65,9 @@ static int msi_x = 1; | |||
65 | module_param(msi_x, int, 0444); | 65 | module_param(msi_x, int, 0444); |
66 | MODULE_PARM_DESC(msi_x, "attempt to use MSI-X if nonzero"); | 66 | MODULE_PARM_DESC(msi_x, "attempt to use MSI-X if nonzero"); |
67 | 67 | ||
68 | static int msi = 0; | ||
69 | module_param(msi, int, 0444); | ||
70 | MODULE_PARM_DESC(msi, "attempt to use MSI if nonzero (deprecated, use MSI-X instead)"); | ||
71 | |||
72 | #else /* CONFIG_PCI_MSI */ | 68 | #else /* CONFIG_PCI_MSI */ |
73 | 69 | ||
74 | #define msi_x (0) | 70 | #define msi_x (0) |
75 | #define msi (0) | ||
76 | 71 | ||
77 | #endif /* CONFIG_PCI_MSI */ | 72 | #endif /* CONFIG_PCI_MSI */ |
78 | 73 | ||
@@ -816,13 +811,11 @@ static int mthca_setup_hca(struct mthca_dev *dev) | |||
816 | 811 | ||
817 | err = mthca_NOP(dev, &status); | 812 | err = mthca_NOP(dev, &status); |
818 | if (err || status) { | 813 | if (err || status) { |
819 | if (dev->mthca_flags & (MTHCA_FLAG_MSI | MTHCA_FLAG_MSI_X)) { | 814 | if (dev->mthca_flags & MTHCA_FLAG_MSI_X) { |
820 | mthca_warn(dev, "NOP command failed to generate interrupt " | 815 | mthca_warn(dev, "NOP command failed to generate interrupt " |
821 | "(IRQ %d).\n", | 816 | "(IRQ %d).\n", |
822 | dev->mthca_flags & MTHCA_FLAG_MSI_X ? | 817 | dev->eq_table.eq[MTHCA_EQ_CMD].msi_x_vector); |
823 | dev->eq_table.eq[MTHCA_EQ_CMD].msi_x_vector : | 818 | mthca_warn(dev, "Trying again with MSI-X disabled.\n"); |
824 | dev->pdev->irq); | ||
825 | mthca_warn(dev, "Trying again with MSI/MSI-X disabled.\n"); | ||
826 | } else { | 819 | } else { |
827 | mthca_err(dev, "NOP command failed to generate interrupt " | 820 | mthca_err(dev, "NOP command failed to generate interrupt " |
828 | "(IRQ %d), aborting.\n", | 821 | "(IRQ %d), aborting.\n", |
@@ -1128,29 +1121,12 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type) | |||
1128 | 1121 | ||
1129 | if (msi_x && !mthca_enable_msi_x(mdev)) | 1122 | if (msi_x && !mthca_enable_msi_x(mdev)) |
1130 | mdev->mthca_flags |= MTHCA_FLAG_MSI_X; | 1123 | mdev->mthca_flags |= MTHCA_FLAG_MSI_X; |
1131 | else if (msi) { | ||
1132 | static int warned; | ||
1133 | |||
1134 | if (!warned) { | ||
1135 | printk(KERN_WARNING PFX "WARNING: MSI support will be " | ||
1136 | "removed from the ib_mthca driver in January 2008.\n"); | ||
1137 | printk(KERN_WARNING " If you are using MSI and cannot " | ||
1138 | "switch to MSI-X, please tell " | ||
1139 | "<general@lists.openfabrics.org>.\n"); | ||
1140 | ++warned; | ||
1141 | } | ||
1142 | |||
1143 | if (!pci_enable_msi(pdev)) | ||
1144 | mdev->mthca_flags |= MTHCA_FLAG_MSI; | ||
1145 | } | ||
1146 | 1124 | ||
1147 | err = mthca_setup_hca(mdev); | 1125 | err = mthca_setup_hca(mdev); |
1148 | if (err == -EBUSY && (mdev->mthca_flags & (MTHCA_FLAG_MSI | MTHCA_FLAG_MSI_X))) { | 1126 | if (err == -EBUSY && (mdev->mthca_flags & MTHCA_FLAG_MSI_X)) { |
1149 | if (mdev->mthca_flags & MTHCA_FLAG_MSI_X) | 1127 | if (mdev->mthca_flags & MTHCA_FLAG_MSI_X) |
1150 | pci_disable_msix(pdev); | 1128 | pci_disable_msix(pdev); |
1151 | if (mdev->mthca_flags & MTHCA_FLAG_MSI) | 1129 | mdev->mthca_flags &= ~MTHCA_FLAG_MSI_X; |
1152 | pci_disable_msi(pdev); | ||
1153 | mdev->mthca_flags &= ~(MTHCA_FLAG_MSI_X | MTHCA_FLAG_MSI); | ||
1154 | 1130 | ||
1155 | err = mthca_setup_hca(mdev); | 1131 | err = mthca_setup_hca(mdev); |
1156 | } | 1132 | } |
@@ -1192,8 +1168,6 @@ err_cleanup: | |||
1192 | err_close: | 1168 | err_close: |
1193 | if (mdev->mthca_flags & MTHCA_FLAG_MSI_X) | 1169 | if (mdev->mthca_flags & MTHCA_FLAG_MSI_X) |
1194 | pci_disable_msix(pdev); | 1170 | pci_disable_msix(pdev); |
1195 | if (mdev->mthca_flags & MTHCA_FLAG_MSI) | ||
1196 | pci_disable_msi(pdev); | ||
1197 | 1171 | ||
1198 | mthca_close_hca(mdev); | 1172 | mthca_close_hca(mdev); |
1199 | 1173 | ||
@@ -1246,8 +1220,6 @@ static void __mthca_remove_one(struct pci_dev *pdev) | |||
1246 | 1220 | ||
1247 | if (mdev->mthca_flags & MTHCA_FLAG_MSI_X) | 1221 | if (mdev->mthca_flags & MTHCA_FLAG_MSI_X) |
1248 | pci_disable_msix(pdev); | 1222 | pci_disable_msix(pdev); |
1249 | if (mdev->mthca_flags & MTHCA_FLAG_MSI) | ||
1250 | pci_disable_msi(pdev); | ||
1251 | 1223 | ||
1252 | ib_dealloc_device(&mdev->ib_dev); | 1224 | ib_dealloc_device(&mdev->ib_dev); |
1253 | mthca_release_regions(pdev, mdev->mthca_flags & | 1225 | mthca_release_regions(pdev, mdev->mthca_flags & |