diff options
author | Christoph Hellwig <hch@lst.de> | 2016-09-11 09:31:24 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-08 17:29:46 -0500 |
commit | a299ee62cf40d6d80a9f11d57220f0a28077fe2d (patch) | |
tree | f5a357809478024aa5af521a8754e62446d93abe /drivers/scsi/ipr.h | |
parent | 68130c99480919c2088df530fc25b5e314ad806a (diff) |
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: Christoph Hellwig <hch@lst.de>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ipr.h')
-rw-r--r-- | drivers/scsi/ipr.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index 8995053d01b3..b7d2e98eb45b 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h | |||
@@ -1413,10 +1413,7 @@ struct ipr_chip_cfg_t { | |||
1413 | struct ipr_chip_t { | 1413 | struct ipr_chip_t { |
1414 | u16 vendor; | 1414 | u16 vendor; |
1415 | u16 device; | 1415 | u16 device; |
1416 | u16 intr_type; | 1416 | bool has_msi; |
1417 | #define IPR_USE_LSI 0x00 | ||
1418 | #define IPR_USE_MSI 0x01 | ||
1419 | #define IPR_USE_MSIX 0x02 | ||
1420 | u16 sis_type; | 1417 | u16 sis_type; |
1421 | #define IPR_SIS32 0x00 | 1418 | #define IPR_SIS32 0x00 |
1422 | #define IPR_SIS64 0x01 | 1419 | #define IPR_SIS64 0x01 |
@@ -1593,11 +1590,9 @@ struct ipr_ioa_cfg { | |||
1593 | struct ipr_cmnd **ipr_cmnd_list; | 1590 | struct ipr_cmnd **ipr_cmnd_list; |
1594 | dma_addr_t *ipr_cmnd_list_dma; | 1591 | dma_addr_t *ipr_cmnd_list_dma; |
1595 | 1592 | ||
1596 | u16 intr_flag; | ||
1597 | unsigned int nvectors; | 1593 | unsigned int nvectors; |
1598 | 1594 | ||
1599 | struct { | 1595 | struct { |
1600 | unsigned short vec; | ||
1601 | char desc[22]; | 1596 | char desc[22]; |
1602 | } vectors_info[IPR_MAX_MSIX_VECTORS]; | 1597 | } vectors_info[IPR_MAX_MSIX_VECTORS]; |
1603 | 1598 | ||