Commit a299ee62 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

scsi: ipr: Use pci_irq_allocate_vectors

Switch the ipr driver to use pci_alloc_irq_vectors.  We need to two
calls to pci_alloc_irq_vectors as ipr only supports multiple MSI-X
vectors, but not multiple MSI vectors.

Otherwise this cleans up a lot of cruft and allows to use a common
request_irq loop for irq types, which happens to only iterate over a
single line in the non MSI-X case.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarBrian King <brking@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 68130c99
This diff is collapsed.
...@@ -1413,10 +1413,7 @@ struct ipr_chip_cfg_t { ...@@ -1413,10 +1413,7 @@ struct ipr_chip_cfg_t {
struct ipr_chip_t { struct ipr_chip_t {
u16 vendor; u16 vendor;
u16 device; u16 device;
u16 intr_type; bool has_msi;
#define IPR_USE_LSI 0x00
#define IPR_USE_MSI 0x01
#define IPR_USE_MSIX 0x02
u16 sis_type; u16 sis_type;
#define IPR_SIS32 0x00 #define IPR_SIS32 0x00
#define IPR_SIS64 0x01 #define IPR_SIS64 0x01
...@@ -1593,11 +1590,9 @@ struct ipr_ioa_cfg { ...@@ -1593,11 +1590,9 @@ struct ipr_ioa_cfg {
struct ipr_cmnd **ipr_cmnd_list; struct ipr_cmnd **ipr_cmnd_list;
dma_addr_t *ipr_cmnd_list_dma; dma_addr_t *ipr_cmnd_list_dma;
u16 intr_flag;
unsigned int nvectors; unsigned int nvectors;
struct { struct {
unsigned short vec;
char desc[22]; char desc[22];
} vectors_info[IPR_MAX_MSIX_VECTORS]; } vectors_info[IPR_MAX_MSIX_VECTORS];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment