Message ID | 1436310984-4519-11-git-send-email-rajinikanth.pandurangan@pmcs.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 8.7.2015 01:16, rajinikanth.pandurangan@pmcs.com wrote: > From: Rajinikanth Pandurangan <rajinikanth.pandurangan@pmcs.com> > > Description: > As pci_enable_msix() deprecated, replaced with pci_enable_msix_exact() > > Changes from V2: > Newly created for V3 based on review comment. > > Signed-off-by: Rajinikanth Pandurangan <rajinikanth.pandurangan@pmcs.com> > --- > drivers/scsi/aacraid/comminit.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c > index b4b6088..e4ff47e 100644 > --- a/drivers/scsi/aacraid/comminit.c > +++ b/drivers/scsi/aacraid/comminit.c > @@ -366,7 +366,7 @@ void aac_define_int_mode(struct aac_dev *dev) > > if (msi_count > 1 && > pci_find_capability(dev->pdev, PCI_CAP_ID_MSIX)) { > - i = pci_enable_msix(dev->pdev, > + i = pci_enable_msix_exact(dev->pdev, > dev->msixentry, > msi_count); > /* Check how many MSIX vectors are allocated */ > @@ -374,7 +374,7 @@ void aac_define_int_mode(struct aac_dev *dev) > dev->msi_enabled = 1; > if (i) { Hi Rajinikanth, the pci_enable_msix_exact is not a 1;1 replacement for pci_enable_msix, you shouldn't use it this way - it never returns a positive value. What you probably want is to use pci_enable_msix_range Cheers, Tomas > msi_count = i; > - if (pci_enable_msix(dev->pdev, > + if (pci_enable_msix_exact(dev->pdev, > dev->msixentry, > msi_count)) { > dev->msi_enabled = 0; > -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks for the comment Tomas. I'll submit another patch with range. -----Original Message----- From: Tomas Henzl [mailto:thenzl@redhat.com] Sent: Monday, July 20, 2015 8:54 AM To: Rajinikanth Pandurangan; jbottomley@parallels.com; linux-scsi@vger.kernel.org Cc: aacraid@pmc-sierra.com; Harry Yang; Mahesh Rajashekhara; Rich Bono; Achim Leubner; Murthy Bhat Subject: Re: [PATCH V3 10/10] [SCSI] aacraid: Replace pci_enable_msix() with pci_enable_msix_exact() On 8.7.2015 01:16, rajinikanth.pandurangan@pmcs.com wrote: > From: Rajinikanth Pandurangan <rajinikanth.pandurangan@pmcs.com> > > Description: > As pci_enable_msix() deprecated, replaced with > pci_enable_msix_exact() > > Changes from V2: > Newly created for V3 based on review comment. > > Signed-off-by: Rajinikanth Pandurangan > <rajinikanth.pandurangan@pmcs.com> > --- > drivers/scsi/aacraid/comminit.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/aacraid/comminit.c > b/drivers/scsi/aacraid/comminit.c index b4b6088..e4ff47e 100644 > --- a/drivers/scsi/aacraid/comminit.c > +++ b/drivers/scsi/aacraid/comminit.c > @@ -366,7 +366,7 @@ void aac_define_int_mode(struct aac_dev *dev) > > if (msi_count > 1 && > pci_find_capability(dev->pdev, PCI_CAP_ID_MSIX)) { > - i = pci_enable_msix(dev->pdev, > + i = pci_enable_msix_exact(dev->pdev, > dev->msixentry, > msi_count); > /* Check how many MSIX vectors are allocated */ @@ -374,7 +374,7 > @@ void aac_define_int_mode(struct aac_dev *dev) > dev->msi_enabled = 1; > if (i) { Hi Rajinikanth, the pci_enable_msix_exact is not a 1;1 replacement for pci_enable_msix, you shouldn't use it this way - it never returns a positive value. What you probably want is to use pci_enable_msix_range Cheers, Tomas > msi_count = i; > - if (pci_enable_msix(dev->pdev, > + if (pci_enable_msix_exact(dev->pdev, > dev->msixentry, > msi_count)) { > dev->msi_enabled = 0; > -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index b4b6088..e4ff47e 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -366,7 +366,7 @@ void aac_define_int_mode(struct aac_dev *dev) if (msi_count > 1 && pci_find_capability(dev->pdev, PCI_CAP_ID_MSIX)) { - i = pci_enable_msix(dev->pdev, + i = pci_enable_msix_exact(dev->pdev, dev->msixentry, msi_count); /* Check how many MSIX vectors are allocated */ @@ -374,7 +374,7 @@ void aac_define_int_mode(struct aac_dev *dev) dev->msi_enabled = 1; if (i) { msi_count = i; - if (pci_enable_msix(dev->pdev, + if (pci_enable_msix_exact(dev->pdev, dev->msixentry, msi_count)) { dev->msi_enabled = 0;