Re: [PATCH v2 16/41] hpsa: break hpsa_free_irqs_and_disable_msix into two functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 06, 2015 at 05:47:12PM -0600, Don Brace wrote:
> From: Robert Elliott <elliott@xxxxxx>
> 
> replace calls to hpsa_free_irqs_and_disable_msix with
> hpsa_free_irqs and hpsa_disable_interrupt_mode
> 
> Reviewed-by: Scott Teel <scott.teel@xxxxxxxx>
> Reviewed-by: Kevin Barnett <kevin.barnett@xxxxxxxx>
> Signed-off-by: Robert Elliott <elliott@xxxxxx>
> Signed-off-by: Don Brace <don.brace@xxxxxxxx>
> ---
>  drivers/scsi/hpsa.c |   37 ++++++++++++++++++++-----------------
>  1 file changed, 20 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index 229366b..177a38f 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -6405,10 +6405,22 @@ static int find_PCI_BAR_index(struct pci_dev *pdev, unsigned long pci_bar_addr)
>  	return -1;
>  }
>  
> +static void hpsa_disable_interrupt_mode(struct ctlr_info *h)
> +{
> +#ifdef CONFIG_PCI_MSI
> +	if (h->msix_vector) {
> +		if (h->pdev->msix_enabled)
> +			pci_disable_msix(h->pdev);
> +	} else if (h->msi_vector) {
> +		if (h->pdev->msi_enabled)
> +			pci_disable_msi(h->pdev);
> +	}
> +#endif /* CONFIG_PCI_MSI */
> +}

No need for the ifdef, both pci_disable_msix and pci_disable_msi
are provided as empty stubs for the !CONFIG_PCI_MSI case.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux