From: Sumit Saxena <sumit.saxena@broadcom.com>
To: Tomas Henzl <thenzl@redhat.com>, linux-scsi@vger.kernel.org
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Subject: RE: [PATCH] megaraid-sas: request irqs later
Date: Wed, 2 Nov 2016 19:17:36 +0530 [thread overview]
Message-ID: <d95b81c153e9435144328b5430b2fa75@mail.gmail.com> (raw)
In-Reply-To: <1478017922-22655-1-git-send-email-thenzl@redhat.com>
>-----Original Message-----
>From: Tomas Henzl [mailto:thenzl@redhat.com]
>Sent: Tuesday, November 01, 2016 10:02 PM
>To: linux-scsi@vger.kernel.org
>Cc: sumit.saxena@broadcom.com; kashyap.desai@broadcom.com
>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@redhat.com>
>---
> 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@broadcom.com>
>--
>2.7.4
next prev parent reply other threads:[~2016-11-02 13:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 16:32 [PATCH] megaraid-sas: request irqs later Tomas Henzl
2016-11-02 13:47 ` Sumit Saxena [this message]
2016-11-14 23:48 ` Martin K. Petersen
2016-11-15 10:29 ` Sumit Saxena
2016-11-17 1:20 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d95b81c153e9435144328b5430b2fa75@mail.gmail.com \
--to=sumit.saxena@broadcom.com \
--cc=kashyap.desai@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
--cc=thenzl@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).