diff options
author | Lalit Chandivade <lalit.chandivade@qlogic.com> | 2009-01-22 12:45:33 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-01-25 08:57:26 -0500 |
commit | ad038fa8242a1f4547045f9213c3881a34bbcc21 (patch) | |
tree | ee514b3358f4fc4f5f8760ca477e0b0b979c28b6 /drivers/scsi/qla2xxx/qla_isr.c | |
parent | eaac30be268b90e9288b3945fb5cc9ee8c5397c0 (diff) |
[SCSI] qla2xxx: Correct MSI-X vector allocation for single queue mode.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 789fc576f222..e28ad81baf1e 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -1868,6 +1868,7 @@ qla24xx_disable_msix(struct qla_hw_data *ha) | |||
1868 | static int | 1868 | static int |
1869 | qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) | 1869 | qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) |
1870 | { | 1870 | { |
1871 | #define MIN_MSIX_COUNT 2 | ||
1871 | int i, ret; | 1872 | int i, ret; |
1872 | struct msix_entry *entries; | 1873 | struct msix_entry *entries; |
1873 | struct qla_msix_entry *qentry; | 1874 | struct qla_msix_entry *qentry; |
@@ -1883,12 +1884,16 @@ qla24xx_enable_msix(struct qla_hw_data *ha, struct rsp_que *rsp) | |||
1883 | 1884 | ||
1884 | ret = pci_enable_msix(ha->pdev, entries, ha->msix_count); | 1885 | ret = pci_enable_msix(ha->pdev, entries, ha->msix_count); |
1885 | if (ret) { | 1886 | if (ret) { |
1887 | if (ret < MIN_MSIX_COUNT) | ||
1888 | goto msix_failed; | ||
1889 | |||
1886 | qla_printk(KERN_WARNING, ha, | 1890 | qla_printk(KERN_WARNING, ha, |
1887 | "MSI-X: Failed to enable support -- %d/%d\n" | 1891 | "MSI-X: Failed to enable support -- %d/%d\n" |
1888 | " Retry with %d vectors\n", ha->msix_count, ret, ret); | 1892 | " Retry with %d vectors\n", ha->msix_count, ret, ret); |
1889 | ha->msix_count = ret; | 1893 | ha->msix_count = ret; |
1890 | ret = pci_enable_msix(ha->pdev, entries, ha->msix_count); | 1894 | ret = pci_enable_msix(ha->pdev, entries, ha->msix_count); |
1891 | if (ret) { | 1895 | if (ret) { |
1896 | msix_failed: | ||
1892 | qla_printk(KERN_WARNING, ha, "MSI-X: Failed to enable" | 1897 | qla_printk(KERN_WARNING, ha, "MSI-X: Failed to enable" |
1893 | " support, giving up -- %d/%d\n", | 1898 | " support, giving up -- %d/%d\n", |
1894 | ha->msix_count, ret); | 1899 | ha->msix_count, ret); |