Newer Test Chips boards have MSI support. It does no harm to try to
request it as the function will fallback to legacy interrupts if MSI is
not supported.
Signed-off-by: Jose Abreu <[email protected]>
---
Cc: Joao Lima <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Alim Akhtar <[email protected]>
Cc: Avri Altman <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/scsi/ufs/tc-dwc-pci.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/tc-dwc-pci.c b/drivers/scsi/ufs/tc-dwc-pci.c
index 74a2d80d32bd..e0a880cbbe68 100644
--- a/drivers/scsi/ufs/tc-dwc-pci.c
+++ b/drivers/scsi/ufs/tc-dwc-pci.c
@@ -136,9 +136,15 @@ tc_dwc_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return -ENOENT;
}
+ err = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
+ if (err < 0) {
+ dev_err(&pdev->dev, "Allocation failed\n");
+ return err;
+ }
+
hba->vops = &data->ops;
- err = ufshcd_init(hba, mmio_base, pdev->irq);
+ err = ufshcd_init(hba, mmio_base, pci_irq_vector(pdev, 0));
if (err) {
dev_err(&pdev->dev, "Initialization failed\n");
return err;
--
2.7.4
>
> Newer Test Chips boards have MSI support. It does no harm to try to request it
> as the function will fallback to legacy interrupts if MSI is not supported.
>
> Signed-off-by: Jose Abreu <[email protected]>
>
> ---
> Cc: Joao Lima <[email protected]>
> Cc: Jose Abreu <[email protected]>
> Cc: Alim Akhtar <[email protected]>
> Cc: Avri Altman <[email protected]>
> Cc: "James E.J. Bottomley" <[email protected]>
> Cc: "Martin K. Petersen" <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> drivers/scsi/ufs/tc-dwc-pci.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/tc-dwc-pci.c b/drivers/scsi/ufs/tc-dwc-pci.c index
> 74a2d80d32bd..e0a880cbbe68 100644
> --- a/drivers/scsi/ufs/tc-dwc-pci.c
> +++ b/drivers/scsi/ufs/tc-dwc-pci.c
> @@ -136,9 +136,15 @@ tc_dwc_pci_probe(struct pci_dev *pdev, const struct
> pci_device_id *id)
> return -ENOENT;
> }
>
> + err = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
PCI_IRQ_LEGACY | PCI_IRQ_MSI , is enough you don't have MSIX
> + if (err < 0) {
> + dev_err(&pdev->dev, "Allocation failed\n");
> + return err;
> + }
> +
Where do you call pci_free_irq_vectors() ?
> hba->vops = &data->ops;
>
> - err = ufshcd_init(hba, mmio_base, pdev->irq);
> + err = ufshcd_init(hba, mmio_base, pci_irq_vector(pdev, 0));
> if (err) {
> dev_err(&pdev->dev, "Initialization failed\n");
> return err;
> --
> 2.7.4
From: Winkler, Tomas <[email protected]>
Date: Apr/24/2020, 12:55:57 (UTC+00:00)
> >
> > Newer Test Chips boards have MSI support. It does no harm to try to request it
> > as the function will fallback to legacy interrupts if MSI is not supported.
> >
> > Signed-off-by: Jose Abreu <[email protected]>
> >
> > ---
> > Cc: Joao Lima <[email protected]>
> > Cc: Jose Abreu <[email protected]>
> > Cc: Alim Akhtar <[email protected]>
> > Cc: Avri Altman <[email protected]>
> > Cc: "James E.J. Bottomley" <[email protected]>
> > Cc: "Martin K. Petersen" <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > ---
> > drivers/scsi/ufs/tc-dwc-pci.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/scsi/ufs/tc-dwc-pci.c b/drivers/scsi/ufs/tc-dwc-pci.c index
> > 74a2d80d32bd..e0a880cbbe68 100644
> > --- a/drivers/scsi/ufs/tc-dwc-pci.c
> > +++ b/drivers/scsi/ufs/tc-dwc-pci.c
> > @@ -136,9 +136,15 @@ tc_dwc_pci_probe(struct pci_dev *pdev, const struct
> > pci_device_id *id)
> > return -ENOENT;
> > }
> >
> > + err = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
> PCI_IRQ_LEGACY | PCI_IRQ_MSI , is enough you don't have MSIX
Makes sense :)
> > + if (err < 0) {
> > + dev_err(&pdev->dev, "Allocation failed\n");
> > + return err;
> > + }
> > +
> Where do you call pci_free_irq_vectors() ?
Right ... Will be fixed in v2. Thanks!
---
Thanks,
Jose Miguel Abreu