* [PATCH] megaraid_sas: init tasklet earlier
@ 2015-08-25 13:31 Tomas Henzl
2015-08-26 13:15 ` Sumit Saxena
0 siblings, 1 reply; 5+ messages in thread
From: Tomas Henzl @ 2015-08-25 13:31 UTC (permalink / raw)
To: linux-scsi; +Cc: kashyap.desai, kiran-kumar.kasturi, Sumit.Saxena
It may happen (kdump), that an interrupt is invoked just
after the setup_irqs function was called but before
the tasklet was initialised.
At this phase the hw ints should have been disabled, but for
unknown reason this mechanism seems to not work properly.
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 71b884dae2..c8e0c6de80 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -4627,6 +4627,9 @@ static int megasas_init_fw(struct megasas_instance *instance)
"current msix/online cpus\t: (%d/%d)\n",
instance->msix_vectors, (unsigned int)num_online_cpus());
+ 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))
@@ -4647,9 +4650,6 @@ static int megasas_init_fw(struct megasas_instance *instance)
if (instance->instancet->init_adapter(instance))
goto fail_init_adapter;
- tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
- (unsigned long)instance);
-
instance->instancet->enable_intr(instance);
printk(KERN_ERR "megasas: INIT adapter done\n");
--
2.4.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] megaraid_sas: init tasklet earlier
2015-08-25 13:31 [PATCH] megaraid_sas: init tasklet earlier Tomas Henzl
@ 2015-08-26 13:15 ` Sumit Saxena
2015-08-26 14:14 ` Tomas Henzl
0 siblings, 1 reply; 5+ messages in thread
From: Sumit Saxena @ 2015-08-26 13:15 UTC (permalink / raw)
To: Tomas Henzl, linux-scsi; +Cc: Kashyap Desai, Kiran Kumar Kasturi
> -----Original Message-----
> From: Tomas Henzl [mailto:thenzl@redhat.com]
> Sent: Tuesday, August 25, 2015 7:02 PM
> To: linux-scsi@vger.kernel.org
> Cc: kashyap.desai@avagotech.com; kiran-kumar.kasturi@avagotech.com;
> Sumit.Saxena@avagotech.com
> Subject: [PATCH] megaraid_sas: init tasklet earlier
>
> It may happen (kdump), that an interrupt is invoked just after the
setup_irqs
> function was called but before the tasklet was initialised.
> At this phase the hw ints should have been disabled, but for unknown
reason this
> mechanism seems to not work properly.
>
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> ---
> drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
> b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 71b884dae2..c8e0c6de80 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -4627,6 +4627,9 @@ static int megasas_init_fw(struct megasas_instance
> *instance)
> "current msix/online cpus\t: (%d/%d)\n",
> instance->msix_vectors, (unsigned int)num_online_cpus());
>
> + 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))
> @@ -4647,9 +4650,6 @@ static int megasas_init_fw(struct megasas_instance
> *instance)
> if (instance->instancet->init_adapter(instance))
> goto fail_init_adapter;
>
> - tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
> - (unsigned long)instance);
> -
> instance->instancet->enable_intr(instance);
>
> printk(KERN_ERR "megasas: INIT adapter done\n");
Patch looks harmless and it fixes your problem then it's fine. But we need
to know the reason why interrupts are coming even if they are not enabled
by that time. Can you provide controller's FW version ? I would like to
try this locally.
> --
> 2.4.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] megaraid_sas: init tasklet earlier
2015-08-26 13:15 ` Sumit Saxena
@ 2015-08-26 14:14 ` Tomas Henzl
2015-08-28 10:22 ` Sumit Saxena
2015-10-15 9:46 ` Sumit Saxena
0 siblings, 2 replies; 5+ messages in thread
From: Tomas Henzl @ 2015-08-26 14:14 UTC (permalink / raw)
To: Sumit Saxena, linux-scsi; +Cc: Kashyap Desai, Kiran Kumar Kasturi
On 26.8.2015 15:15, Sumit Saxena wrote:
>> -----Original Message-----
>> From: Tomas Henzl [mailto:thenzl@redhat.com]
>> Sent: Tuesday, August 25, 2015 7:02 PM
>> To: linux-scsi@vger.kernel.org
>> Cc: kashyap.desai@avagotech.com; kiran-kumar.kasturi@avagotech.com;
>> Sumit.Saxena@avagotech.com
>> Subject: [PATCH] megaraid_sas: init tasklet earlier
>>
>> It may happen (kdump), that an interrupt is invoked just after the
> setup_irqs
>> function was called but before the tasklet was initialised.
>> At this phase the hw ints should have been disabled, but for unknown
> reason this
>> mechanism seems to not work properly.
>>
>> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
>> ---
>> drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
>> b/drivers/scsi/megaraid/megaraid_sas_base.c
>> index 71b884dae2..c8e0c6de80 100644
>> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
>> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
>> @@ -4627,6 +4627,9 @@ static int megasas_init_fw(struct megasas_instance
>> *instance)
>> "current msix/online cpus\t: (%d/%d)\n",
>> instance->msix_vectors, (unsigned int)num_online_cpus());
>>
>> + 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))
>> @@ -4647,9 +4650,6 @@ static int megasas_init_fw(struct megasas_instance
>> *instance)
>> if (instance->instancet->init_adapter(instance))
>> goto fail_init_adapter;
>>
>> - tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
>> - (unsigned long)instance);
>> -
>> instance->instancet->enable_intr(instance);
>>
>> printk(KERN_ERR "megasas: INIT adapter done\n");
>
> Patch looks harmless and it fixes your problem then it's fine. But we need
> to know the reason why interrupts are coming even if they are not enabled
> by that time. Can you provide controller's FW version ? I would like to
> try this locally.
It is a "PERC 6/i Integrated" with
FW Version : 1.22.02-0612
BIOS Version : 2.04.00
------------------
Even when you'll be able to fix it by another means, we can take
my patch too, just because it calls the init functions in proper order and so it
is safe(r).
>
>> --
>> 2.4.3
> --
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] megaraid_sas: init tasklet earlier
2015-08-26 14:14 ` Tomas Henzl
@ 2015-08-28 10:22 ` Sumit Saxena
2015-10-15 9:46 ` Sumit Saxena
1 sibling, 0 replies; 5+ messages in thread
From: Sumit Saxena @ 2015-08-28 10:22 UTC (permalink / raw)
To: Tomas Henzl, linux-scsi; +Cc: Kashyap Desai, Kiran Kumar Kasturi
> -----Original Message-----
> From: Tomas Henzl [mailto:thenzl@redhat.com]
> Sent: Wednesday, August 26, 2015 7:45 PM
> To: Sumit Saxena; linux-scsi@vger.kernel.org
> Cc: Kashyap Desai; Kiran Kumar Kasturi
> Subject: Re: [PATCH] megaraid_sas: init tasklet earlier
>
> On 26.8.2015 15:15, Sumit Saxena wrote:
> >> -----Original Message-----
> >> From: Tomas Henzl [mailto:thenzl@redhat.com]
> >> Sent: Tuesday, August 25, 2015 7:02 PM
> >> To: linux-scsi@vger.kernel.org
> >> Cc: kashyap.desai@avagotech.com; kiran-kumar.kasturi@avagotech.com;
> >> Sumit.Saxena@avagotech.com
> >> Subject: [PATCH] megaraid_sas: init tasklet earlier
> >>
> >> It may happen (kdump), that an interrupt is invoked just after the
> > setup_irqs
> >> function was called but before the tasklet was initialised.
> >> At this phase the hw ints should have been disabled, but for unknown
> > reason this
> >> mechanism seems to not work properly.
> >>
> >> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> >> ---
> >> drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++---
> >> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
> >> b/drivers/scsi/megaraid/megaraid_sas_base.c
> >> index 71b884dae2..c8e0c6de80 100644
> >> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> >> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> >> @@ -4627,6 +4627,9 @@ static int megasas_init_fw(struct
> >> megasas_instance
> >> *instance)
> >> "current msix/online cpus\t: (%d/%d)\n",
> >> instance->msix_vectors, (unsigned int)num_online_cpus());
> >>
> >> + 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))
> >> @@ -4647,9 +4650,6 @@ static int megasas_init_fw(struct
> >> megasas_instance
> >> *instance)
> >> if (instance->instancet->init_adapter(instance))
> >> goto fail_init_adapter;
> >>
> >> - tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
> >> - (unsigned long)instance);
> >> -
> >> instance->instancet->enable_intr(instance);
> >>
> >> printk(KERN_ERR "megasas: INIT adapter done\n");
> >
> > Patch looks harmless and it fixes your problem then it's fine. But we
> > need to know the reason why interrupts are coming even if they are not
> > enabled by that time. Can you provide controller's FW version ? I
> > would like to try this locally.
>
> It is a "PERC 6/i Integrated" with
> FW Version : 1.22.02-0612
> BIOS Version : 2.04.00
> ------------------
>
> Even when you'll be able to fix it by another means, we can take my patch
> too,
> just because it calls the init functions in proper order and so it is
> safe(r).
Looks good.
Acked-by: Sumit Saxena <sumit.saxena@avagotech.com>
>
> >
> >> --
> >> 2.4.3
> > --
> > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] megaraid_sas: init tasklet earlier
2015-08-26 14:14 ` Tomas Henzl
2015-08-28 10:22 ` Sumit Saxena
@ 2015-10-15 9:46 ` Sumit Saxena
1 sibling, 0 replies; 5+ messages in thread
From: Sumit Saxena @ 2015-10-15 9:46 UTC (permalink / raw)
To: Tomas Henzl, linux-scsi; +Cc: Kashyap Desai, Kiran Kumar Kasturi
> -----Original Message-----
> From: Sumit Saxena [mailto:sumit.saxena@avagotech.com]
> Sent: Friday, August 28, 2015 3:52 PM
> To: 'Tomas Henzl'; 'linux-scsi@vger.kernel.org'
> Cc: Kashyap Desai; Kiran Kumar Kasturi
> Subject: RE: [PATCH] megaraid_sas: init tasklet earlier
>
>
>
> > -----Original Message-----
> > From: Tomas Henzl [mailto:thenzl@redhat.com]
> > Sent: Wednesday, August 26, 2015 7:45 PM
> > To: Sumit Saxena; linux-scsi@vger.kernel.org
> > Cc: Kashyap Desai; Kiran Kumar Kasturi
> > Subject: Re: [PATCH] megaraid_sas: init tasklet earlier
> >
> > On 26.8.2015 15:15, Sumit Saxena wrote:
> > >> -----Original Message-----
> > >> From: Tomas Henzl [mailto:thenzl@redhat.com]
> > >> Sent: Tuesday, August 25, 2015 7:02 PM
> > >> To: linux-scsi@vger.kernel.org
> > >> Cc: kashyap.desai@avagotech.com; kiran-kumar.kasturi@avagotech.com;
> > >> Sumit.Saxena@avagotech.com
> > >> Subject: [PATCH] megaraid_sas: init tasklet earlier
> > >>
> > >> It may happen (kdump), that an interrupt is invoked just after the
> > > setup_irqs
> > >> function was called but before the tasklet was initialised.
> > >> At this phase the hw ints should have been disabled, but for
> > >> unknown
> > > reason this
> > >> mechanism seems to not work properly.
> > >>
> > >> Signed-off-by: Tomas Henzl <thenzl@redhat.com>
> > >> ---
> > >> drivers/scsi/megaraid/megaraid_sas_base.c | 6 +++---
> > >> 1 file changed, 3 insertions(+), 3 deletions(-)
> > >>
> > >> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
> > >> b/drivers/scsi/megaraid/megaraid_sas_base.c
> > >> index 71b884dae2..c8e0c6de80 100644
> > >> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> > >> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> > >> @@ -4627,6 +4627,9 @@ static int megasas_init_fw(struct
> > >> megasas_instance
> > >> *instance)
> > >> "current msix/online cpus\t: (%d/%d)\n",
> > >> instance->msix_vectors, (unsigned int)num_online_cpus());
> > >>
> > >> + 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))
> > >> @@ -4647,9 +4650,6 @@ static int megasas_init_fw(struct
> > >> megasas_instance
> > >> *instance)
> > >> if (instance->instancet->init_adapter(instance))
> > >> goto fail_init_adapter;
> > >>
> > >> - tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
> > >> - (unsigned long)instance);
> > >> -
> > >> instance->instancet->enable_intr(instance);
> > >>
> > >> printk(KERN_ERR "megasas: INIT adapter done\n");
> > >
> > > Patch looks harmless and it fixes your problem then it's fine. But
> > > we need to know the reason why interrupts are coming even if they
> > > are not enabled by that time. Can you provide controller's FW
> > > version ? I would like to try this locally.
> >
> > It is a "PERC 6/i Integrated" with
> > FW Version : 1.22.02-0612
> > BIOS Version : 2.04.00
> > ------------------
> >
> > Even when you'll be able to fix it by another means, we can take my
> > patch too, just because it calls the init functions in proper order and
> > so it is
> safe(r).
> Looks good.
> Acked-by: Sumit Saxena <sumit.saxena@avagotech.com>
I have posted same patch with subject- [PATCH 08/12] megaraid_sas :
Initialize tasklet before setting up IRQs.
Please ignore this patch to avoid confusion.
Thanks,
Sumit
>
> >
> > >
> > >> --
> > >> 2.4.3
> > > --
> > > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-15 9:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-25 13:31 [PATCH] megaraid_sas: init tasklet earlier Tomas Henzl
2015-08-26 13:15 ` Sumit Saxena
2015-08-26 14:14 ` Tomas Henzl
2015-08-28 10:22 ` Sumit Saxena
2015-10-15 9:46 ` Sumit Saxena
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).