linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery
@ 2014-05-23 15:52 Brian King
  2014-05-23 16:03 ` Bart Van Assche
  2014-05-27 13:55 ` Nathan Fontenot
  0 siblings, 2 replies; 7+ messages in thread
From: Brian King @ 2014-05-23 15:52 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, nfont, brking


If a CRQ reset is triggered for some reason while in the middle
of performing VSCSI adapter initialization, we don't want to
call the done function for the initialization MAD commands as
this will only result in two threads attempting initialization
at the same time, resulting in failures.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---

 drivers/scsi/ibmvscsi/ibmvscsi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix drivers/scsi/ibmvscsi/ibmvscsi.c
--- linux/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix	2014-05-23 10:36:04.000000000 -0500
+++ linux-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c	2014-05-23 10:50:03.000000000 -0500
@@ -797,7 +797,8 @@ static void purge_requests(struct ibmvsc
 				       evt->hostdata->dev);
 			if (evt->cmnd_done)
 				evt->cmnd_done(evt->cmnd);
-		} else if (evt->done)
+		} else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT &&
+			   evt->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
 			evt->done(evt);
 		free_event_struct(&evt->hostdata->pool, evt);
 		spin_lock_irqsave(hostdata->host->host_lock, flags);
_


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery
  2014-05-23 15:52 [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery Brian King
@ 2014-05-23 16:03 ` Bart Van Assche
  2014-05-23 16:33   ` Brian King
  2014-05-27 13:55 ` Nathan Fontenot
  1 sibling, 1 reply; 7+ messages in thread
From: Bart Van Assche @ 2014-05-23 16:03 UTC (permalink / raw)
  To: Brian King; +Cc: James.Bottomley, linux-scsi, nfont

On 05/23/14 17:52, Brian King wrote:
> If a CRQ reset is triggered for some reason while in the middle
> of performing VSCSI adapter initialization, we don't want to
> call the done function for the initialization MAD commands as
> this will only result in two threads attempting initialization
> at the same time, resulting in failures.
> 
> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
> ---
> 
>  drivers/scsi/ibmvscsi/ibmvscsi.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix drivers/scsi/ibmvscsi/ibmvscsi.c
> --- linux/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix	2014-05-23 10:36:04.000000000 -0500
> +++ linux-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c	2014-05-23 10:50:03.000000000 -0500
> @@ -797,7 +797,8 @@ static void purge_requests(struct ibmvsc
>  				       evt->hostdata->dev);
>  			if (evt->cmnd_done)
>  				evt->cmnd_done(evt->cmnd);
> -		} else if (evt->done)
> +		} else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT &&
> +			   evt->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
>  			evt->done(evt);
>  		free_event_struct(&evt->hostdata->pool, evt);
>  		spin_lock_irqsave(hostdata->host->host_lock, flags);

Hello Brian,

Does this mean that the SRP-over-CRQ protocol is still in use for
communication between partitions ? Had you already noticed the "tgt
infrastructure removal" patch series
(http://thread.gmane.org/gmane.linux.scsi/90119) ? Feedback would be
appreciated.

Thanks,

Bart.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery
  2014-05-23 16:03 ` Bart Van Assche
@ 2014-05-23 16:33   ` Brian King
  0 siblings, 0 replies; 7+ messages in thread
From: Brian King @ 2014-05-23 16:33 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: James.Bottomley, linux-scsi, nfont

On 05/23/2014 11:03 AM, Bart Van Assche wrote:
> On 05/23/14 17:52, Brian King wrote:
>> If a CRQ reset is triggered for some reason while in the middle
>> of performing VSCSI adapter initialization, we don't want to
>> call the done function for the initialization MAD commands as
>> this will only result in two threads attempting initialization
>> at the same time, resulting in failures.
>>
>> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
>> ---
>>
>>  drivers/scsi/ibmvscsi/ibmvscsi.c |    3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix drivers/scsi/ibmvscsi/ibmvscsi.c
>> --- linux/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix	2014-05-23 10:36:04.000000000 -0500
>> +++ linux-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c	2014-05-23 10:50:03.000000000 -0500
>> @@ -797,7 +797,8 @@ static void purge_requests(struct ibmvsc
>>  				       evt->hostdata->dev);
>>  			if (evt->cmnd_done)
>>  				evt->cmnd_done(evt->cmnd);
>> -		} else if (evt->done)
>> +		} else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT &&
>> +			   evt->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
>>  			evt->done(evt);
>>  		free_event_struct(&evt->hostdata->pool, evt);
>>  		spin_lock_irqsave(hostdata->host->host_lock, flags);
> 
> Hello Brian,
> 
> Does this mean that the SRP-over-CRQ protocol is still in use for
> communication between partitions ? Had you already noticed the "tgt
> infrastructure removal" patch series
> (http://thread.gmane.org/gmane.linux.scsi/90119) ? Feedback would be
> appreciated.

It is indeed still supported. I've sent a response on that other thread with
clarification.

-Brian


-- 
Brian King
Power Linux I/O
IBM Linux Technology Center



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery
  2014-05-23 15:52 [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery Brian King
  2014-05-23 16:03 ` Bart Van Assche
@ 2014-05-27 13:55 ` Nathan Fontenot
  2014-06-13 15:30   ` Brian King
  1 sibling, 1 reply; 7+ messages in thread
From: Nathan Fontenot @ 2014-05-27 13:55 UTC (permalink / raw)
  To: Brian King, James.Bottomley; +Cc: linux-scsi

On 05/23/2014 10:52 AM, Brian King wrote:
> If a CRQ reset is triggered for some reason while in the middle
> of performing VSCSI adapter initialization, we don't want to
> call the done function for the initialization MAD commands as
> this will only result in two threads attempting initialization
> at the same time, resulting in failures.
> 
> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>

Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>

> ---
> 
>  drivers/scsi/ibmvscsi/ibmvscsi.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix drivers/scsi/ibmvscsi/ibmvscsi.c
> --- linux/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix	2014-05-23 10:36:04.000000000 -0500
> +++ linux-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c	2014-05-23 10:50:03.000000000 -0500
> @@ -797,7 +797,8 @@ static void purge_requests(struct ibmvsc
>  				       evt->hostdata->dev);
>  			if (evt->cmnd_done)
>  				evt->cmnd_done(evt->cmnd);
> -		} else if (evt->done)
> +		} else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT &&
> +			   evt->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
>  			evt->done(evt);
>  		free_event_struct(&evt->hostdata->pool, evt);
>  		spin_lock_irqsave(hostdata->host->host_lock, flags);
> _
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery
  2014-05-27 13:55 ` Nathan Fontenot
@ 2014-06-13 15:30   ` Brian King
  2014-06-13 15:49     ` James Bottomley
  0 siblings, 1 reply; 7+ messages in thread
From: Brian King @ 2014-06-13 15:30 UTC (permalink / raw)
  To: James.Bottomley; +Cc: Nathan Fontenot, linux-scsi

On 05/27/2014 08:55 AM, Nathan Fontenot wrote:
> On 05/23/2014 10:52 AM, Brian King wrote:
>> If a CRQ reset is triggered for some reason while in the middle
>> of performing VSCSI adapter initialization, we don't want to
>> call the done function for the initialization MAD commands as
>> this will only result in two threads attempting initialization
>> at the same time, resulting in failures.
>>
>> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
> 
> Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> 
>> ---
>>
>>  drivers/scsi/ibmvscsi/ibmvscsi.c |    3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix drivers/scsi/ibmvscsi/ibmvscsi.c
>> --- linux/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix	2014-05-23 10:36:04.000000000 -0500
>> +++ linux-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c	2014-05-23 10:50:03.000000000 -0500
>> @@ -797,7 +797,8 @@ static void purge_requests(struct ibmvsc
>>  				       evt->hostdata->dev);
>>  			if (evt->cmnd_done)
>>  				evt->cmnd_done(evt->cmnd);
>> -		} else if (evt->done)
>> +		} else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT &&
>> +			   evt->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
>>  			evt->done(evt);
>>  		free_event_struct(&evt->hostdata->pool, evt);
>>  		spin_lock_irqsave(hostdata->host->host_lock, flags);
>> _

Hi James,

Are these two patches in your queue? They both fix rather nasty issues
that have caused kernel crashes in our testing.

Thanks,

Brian



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery
  2014-06-13 15:30   ` Brian King
@ 2014-06-13 15:49     ` James Bottomley
  2014-06-13 16:17       ` Brian King
  0 siblings, 1 reply; 7+ messages in thread
From: James Bottomley @ 2014-06-13 15:49 UTC (permalink / raw)
  To: Brian King; +Cc: Nathan Fontenot, linux-scsi

On Fri, 2014-06-13 at 10:30 -0500, Brian King wrote:
> On 05/27/2014 08:55 AM, Nathan Fontenot wrote:
> > On 05/23/2014 10:52 AM, Brian King wrote:
> >> If a CRQ reset is triggered for some reason while in the middle
> >> of performing VSCSI adapter initialization, we don't want to
> >> call the done function for the initialization MAD commands as
> >> this will only result in two threads attempting initialization
> >> at the same time, resulting in failures.
> >>
> >> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
> > 
> > Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> > 
> >> ---
> >>
> >>  drivers/scsi/ibmvscsi/ibmvscsi.c |    3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix drivers/scsi/ibmvscsi/ibmvscsi.c
> >> --- linux/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix	2014-05-23 10:36:04.000000000 -0500
> >> +++ linux-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c	2014-05-23 10:50:03.000000000 -0500
> >> @@ -797,7 +797,8 @@ static void purge_requests(struct ibmvsc
> >>  				       evt->hostdata->dev);
> >>  			if (evt->cmnd_done)
> >>  				evt->cmnd_done(evt->cmnd);
> >> -		} else if (evt->done)
> >> +		} else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT &&
> >> +			   evt->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
> >>  			evt->done(evt);
> >>  		free_event_struct(&evt->hostdata->pool, evt);
> >>  		spin_lock_irqsave(hostdata->host->host_lock, flags);
> >> _
> 
> Hi James,
> 
> Are these two patches in your queue? They both fix rather nasty issues
> that have caused kernel crashes in our testing.

Should they be cc'd to stable, or are they recently introduced bugs?

James



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery
  2014-06-13 15:49     ` James Bottomley
@ 2014-06-13 16:17       ` Brian King
  0 siblings, 0 replies; 7+ messages in thread
From: Brian King @ 2014-06-13 16:17 UTC (permalink / raw)
  To: James Bottomley; +Cc: Nathan Fontenot, linux-scsi

On 06/13/2014 10:49 AM, James Bottomley wrote:
> On Fri, 2014-06-13 at 10:30 -0500, Brian King wrote:
>> On 05/27/2014 08:55 AM, Nathan Fontenot wrote:
>>> On 05/23/2014 10:52 AM, Brian King wrote:
>>>> If a CRQ reset is triggered for some reason while in the middle
>>>> of performing VSCSI adapter initialization, we don't want to
>>>> call the done function for the initialization MAD commands as
>>>> this will only result in two threads attempting initialization
>>>> at the same time, resulting in failures.
>>>>
>>>> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
>>>
>>> Acked-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
>>>
>>>> ---
>>>>
>>>>  drivers/scsi/ibmvscsi/ibmvscsi.c |    3 ++-
>>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>>
>>>> diff -puN drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix drivers/scsi/ibmvscsi/ibmvscsi.c
>>>> --- linux/drivers/scsi/ibmvscsi/ibmvscsi.c~ibmvscsi_purge_fix	2014-05-23 10:36:04.000000000 -0500
>>>> +++ linux-bjking1/drivers/scsi/ibmvscsi/ibmvscsi.c	2014-05-23 10:50:03.000000000 -0500
>>>> @@ -797,7 +797,8 @@ static void purge_requests(struct ibmvsc
>>>>  				       evt->hostdata->dev);
>>>>  			if (evt->cmnd_done)
>>>>  				evt->cmnd_done(evt->cmnd);
>>>> -		} else if (evt->done)
>>>> +		} else if (evt->done && evt->crq.format != VIOSRP_MAD_FORMAT &&
>>>> +			   evt->iu.srp.login_req.opcode != SRP_LOGIN_REQ)
>>>>  			evt->done(evt);
>>>>  		free_event_struct(&evt->hostdata->pool, evt);
>>>>  		spin_lock_irqsave(hostdata->host->host_lock, flags);
>>>> _
>>
>> Hi James,
>>
>> Are these two patches in your queue? They both fix rather nasty issues
>> that have caused kernel crashes in our testing.
> 
> Should they be cc'd to stable, or are they recently introduced bugs?

They should probably go to stable as well as they've been around a while.

Thanks,

Brian

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-06-13 16:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 15:52 [PATCHv2 1/2] ibmvscsi: Abort init sequence during error recovery Brian King
2014-05-23 16:03 ` Bart Van Assche
2014-05-23 16:33   ` Brian King
2014-05-27 13:55 ` Nathan Fontenot
2014-06-13 15:30   ` Brian King
2014-06-13 15:49     ` James Bottomley
2014-06-13 16:17       ` Brian King

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).