cciss: clean up unnecessary MSI/MSI-X capability find
PATCH 3/16 cciss: clean up unnecessary MSI/MSI-X capability find
PCI core will initialize device MSI/MSI-X capability in pci_msi_init_pci_dev(). So device driver should use pci_dev->msi_cap/msix_cap to determine whether the device support MSI/MSI-X instead of using pci_find_capability(pci_dev, PCI_CAP_ID_MSI/MSIX). Access to PCIe device config space again will consume more time.
Signed-off-by Yijing Wang <[email protected]>
Cc Mike Miller <[email protected]>
--- drivers/block/cciss.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/block/cciss.c +2 -2
@@ -4078,7 +4078,7 @@ static void cciss_interrupt_mode(ctlr_info_t *h) (h->board_id == 0x40820E11) || (h->board_id == 0x40830E11)) goto default_int_mode; -if (pci_find_capability (h->pdev,PCI_CAP_ID_MSIX )) { +if (h->pdev->msix_cap) { err =pci_enable_msix (h->pdev, cciss_msix_entries,4 );if (!err) { h->intr[0 ] = cciss_msix_entries[0 ].vector;
@@ -4098,7 +4098,7 @@ static void cciss_interrupt_mode(ctlr_info_t *h) goto default_int_mode; } } -if (pci_find_capability (h->pdev,PCI_CAP_ID_MSI )) { +if (h->pdev->msi_cap) {if (!pci_enable_msi (h->pdev)) h->msi_vector =1 ;else
Signature · 1 line
1.7.1