linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] s390: vfio-ap: fix warning reset not completed
@ 2019-09-03 13:36 Halil Pasic
  2019-09-03 16:45 ` Cornelia Huck
  2019-09-04  7:25 ` Christian Borntraeger
  0 siblings, 2 replies; 4+ messages in thread
From: Halil Pasic @ 2019-09-03 13:36 UTC (permalink / raw)
  To: Tony Krowiak, Halil Pasic, Harald Freudenberger, linux-s390,
	linux-kernel
  Cc: Heiko Carstens, Christian Borntraeger, Cornelia Huck

The intention seems to be to warn once when we don't wait enough for the
reset to complete. Let's use the right retry counter to accomplish that
semantic.

Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
---
 drivers/s390/crypto/vfio_ap_ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
index 0604b49a4d32..5c0f53c6dde7 100644
--- a/drivers/s390/crypto/vfio_ap_ops.c
+++ b/drivers/s390/crypto/vfio_ap_ops.c
@@ -1143,7 +1143,7 @@ int vfio_ap_mdev_reset_queue(unsigned int apid, unsigned int apqi,
 				msleep(20);
 				status = ap_tapq(apqn, NULL);
 			}
-			WARN_ON_ONCE(retry <= 0);
+			WARN_ON_ONCE(retry2 <= 0);
 			return 0;
 		case AP_RESPONSE_RESET_IN_PROGRESS:
 		case AP_RESPONSE_BUSY:
-- 
2.17.1


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

* Re: [PATCH 1/1] s390: vfio-ap: fix warning reset not completed
  2019-09-03 13:36 [PATCH 1/1] s390: vfio-ap: fix warning reset not completed Halil Pasic
@ 2019-09-03 16:45 ` Cornelia Huck
  2019-09-04 15:08   ` Tony Krowiak
  2019-09-04  7:25 ` Christian Borntraeger
  1 sibling, 1 reply; 4+ messages in thread
From: Cornelia Huck @ 2019-09-03 16:45 UTC (permalink / raw)
  To: Halil Pasic
  Cc: Tony Krowiak, Harald Freudenberger, linux-s390, linux-kernel,
	Heiko Carstens, Christian Borntraeger

On Tue,  3 Sep 2019 15:36:18 +0200
Halil Pasic <pasic@linux.ibm.com> wrote:

"fix warning for not completed reset"?

> The intention seems to be to warn once when we don't wait enough for the
> reset to complete. Let's use the right retry counter to accomplish that
> semantic.
> 
> Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
> ---
>  drivers/s390/crypto/vfio_ap_ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
> index 0604b49a4d32..5c0f53c6dde7 100644
> --- a/drivers/s390/crypto/vfio_ap_ops.c
> +++ b/drivers/s390/crypto/vfio_ap_ops.c
> @@ -1143,7 +1143,7 @@ int vfio_ap_mdev_reset_queue(unsigned int apid, unsigned int apqi,
>  				msleep(20);
>  				status = ap_tapq(apqn, NULL);
>  			}
> -			WARN_ON_ONCE(retry <= 0);
> +			WARN_ON_ONCE(retry2 <= 0);
>  			return 0;
>  		case AP_RESPONSE_RESET_IN_PROGRESS:
>  		case AP_RESPONSE_BUSY:

Makes sense.

Reviewed-by: Cornelia Huck <cohuck@redhat.com>

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

* Re: [PATCH 1/1] s390: vfio-ap: fix warning reset not completed
  2019-09-03 13:36 [PATCH 1/1] s390: vfio-ap: fix warning reset not completed Halil Pasic
  2019-09-03 16:45 ` Cornelia Huck
@ 2019-09-04  7:25 ` Christian Borntraeger
  1 sibling, 0 replies; 4+ messages in thread
From: Christian Borntraeger @ 2019-09-04  7:25 UTC (permalink / raw)
  To: Halil Pasic, Tony Krowiak, Harald Freudenberger, linux-s390,
	linux-kernel
  Cc: Heiko Carstens, Cornelia Huck

On 03.09.19 15:36, Halil Pasic wrote:
> The intention seems to be to warn once when we don't wait enough for the
> reset to complete. Let's use the right retry counter to accomplish that
> semantic.
> 
> Signed-off-by: Halil Pasic <pasic@linux.ibm.com>

Thanks applied.

I will let it sit in our tree for some days as I want to see if we actually
hit the WARN_ON now. So if there is an rc8 this will be part of the next 
merge window, otherwise this will somewhat come later.
> ---
>  drivers/s390/crypto/vfio_ap_ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
> index 0604b49a4d32..5c0f53c6dde7 100644
> --- a/drivers/s390/crypto/vfio_ap_ops.c
> +++ b/drivers/s390/crypto/vfio_ap_ops.c
> @@ -1143,7 +1143,7 @@ int vfio_ap_mdev_reset_queue(unsigned int apid, unsigned int apqi,
>  				msleep(20);
>  				status = ap_tapq(apqn, NULL);
>  			}
> -			WARN_ON_ONCE(retry <= 0);
> +			WARN_ON_ONCE(retry2 <= 0);
>  			return 0;
>  		case AP_RESPONSE_RESET_IN_PROGRESS:
>  		case AP_RESPONSE_BUSY:
> 


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

* Re: [PATCH 1/1] s390: vfio-ap: fix warning reset not completed
  2019-09-03 16:45 ` Cornelia Huck
@ 2019-09-04 15:08   ` Tony Krowiak
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Krowiak @ 2019-09-04 15:08 UTC (permalink / raw)
  To: Cornelia Huck, Halil Pasic
  Cc: Harald Freudenberger, linux-s390, linux-kernel, Heiko Carstens,
	Christian Borntraeger

On 9/3/19 12:45 PM, Cornelia Huck wrote:
> On Tue,  3 Sep 2019 15:36:18 +0200
> Halil Pasic <pasic@linux.ibm.com> wrote:
> 
> "fix warning for not completed reset"?
> 
>> The intention seems to be to warn once when we don't wait enough for the
>> reset to complete. Let's use the right retry counter to accomplish that
>> semantic.
>>
>> Signed-off-by: Halil Pasic <pasic@linux.ibm.com>
>> ---
>>   drivers/s390/crypto/vfio_ap_ops.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
>> index 0604b49a4d32..5c0f53c6dde7 100644
>> --- a/drivers/s390/crypto/vfio_ap_ops.c
>> +++ b/drivers/s390/crypto/vfio_ap_ops.c
>> @@ -1143,7 +1143,7 @@ int vfio_ap_mdev_reset_queue(unsigned int apid, unsigned int apqi,
>>   				msleep(20);
>>   				status = ap_tapq(apqn, NULL);
>>   			}
>> -			WARN_ON_ONCE(retry <= 0);
>> +			WARN_ON_ONCE(retry2 <= 0);
>>   			return 0;
>>   		case AP_RESPONSE_RESET_IN_PROGRESS:
>>   		case AP_RESPONSE_BUSY:
> 
> Makes sense.
> 
> Reviewed-by: Cornelia Huck <cohuck@redhat.com>

Agreed:
Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com>
> 


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

end of thread, other threads:[~2019-09-04 15:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-03 13:36 [PATCH 1/1] s390: vfio-ap: fix warning reset not completed Halil Pasic
2019-09-03 16:45 ` Cornelia Huck
2019-09-04 15:08   ` Tony Krowiak
2019-09-04  7:25 ` Christian Borntraeger

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