RE: [PATCH] megaraid-sas: request irqs later

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

 



>-----Original Message-----
>From: Tomas Henzl [mailto:thenzl@xxxxxxxxxx]
>Sent: Tuesday, November 01, 2016 10:02 PM
>To: linux-scsi@xxxxxxxxxxxxxxx
>Cc: sumit.saxena@xxxxxxxxxxxx; kashyap.desai@xxxxxxxxxxxx
>Subject: [PATCH] megaraid-sas: request irqs later
>
>It is not good when an irq arrives before driver structures are
allocated.
>
>Signed-off-by: Tomas Henzl <thenzl@xxxxxxxxxx>
>---
> drivers/scsi/megaraid/megaraid_sas_base.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
>diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
>b/drivers/scsi/megaraid/megaraid_sas_base.c
>index c3efcc7255..e207410150 100644
>--- a/drivers/scsi/megaraid/megaraid_sas_base.c
>+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
>@@ -5155,11 +5155,6 @@ static int megasas_init_fw(struct megasas_instance
>*instance)
> 	tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
> 		(unsigned long)instance);
>
>-	if (instance->msix_vectors ?
>-		megasas_setup_irqs_msix(instance, 1) :
>-		megasas_setup_irqs_ioapic(instance))
>-		goto fail_setup_irqs;
>-
> 	instance->ctrl_info = kzalloc(sizeof(struct megasas_ctrl_info),
> 				GFP_KERNEL);
> 	if (instance->ctrl_info == NULL)
>@@ -5175,6 +5170,10 @@ static int megasas_init_fw(struct megasas_instance
>*instance)
> 	if (instance->instancet->init_adapter(instance))
> 		goto fail_init_adapter;
>
>+	if (instance->msix_vectors ?
>+		megasas_setup_irqs_msix(instance, 1) :
>+		megasas_setup_irqs_ioapic(instance))
>+		goto fail_init_adapter;
>
> 	instance->instancet->enable_intr(instance);
>
>@@ -5314,9 +5313,8 @@ static int megasas_init_fw(struct megasas_instance
>*instance)
>
> fail_get_pd_list:
> 	instance->instancet->disable_intr(instance);
>-fail_init_adapter:
> 	megasas_destroy_irqs(instance);
>-fail_setup_irqs:
>+fail_init_adapter:
> 	if (instance->msix_vectors)
> 		pci_disable_msix(instance->pdev);
> 	instance->msix_vectors = 0;
Looks good to me. Acked-by: Sumit Saxena <sumit.saxena@xxxxxxxxxxxx>

>--
>2.7.4
--
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