s390: vfio-ap: fix warning reset not completed
Subsystems (3)
Halil Pasic
maintainerPATCH 1/1 s390: vfio-ap: fix warning reset not completed
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.
--- drivers/s390/crypto/vfio_ap_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/s390/crypto/vfio_ap_ops.c +1 -1
@@ -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 :
Signature · 1 line
2.17.1
On Tue, 3 Sep 2019 15:36:18 +0200
Halil Pasic <[email protected]> wrote:
"fix warning for not completed reset"?
Quoted 14 lines
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 <[email protected]>--- drivers/s390/crypto/vfio_ap_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/s390/crypto/vfio_ap_ops.c +0
-0
drivers/s390/crypto/vfio_ap_ops.c int vfio_ap_mdev_reset_queue(unsigned int apid, unsigned int apqi, · line 1149
Quoted 8 lines
drivers/s390/crypto/vfio_ap_ops.c +1
-1@@ -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.
Quoted 30 lines · Cornelia Huck
On Tue, 3 Sep 2019 15:36:18 +0200
Halil Pasic <[email protected]> wrote:"fix warning for not completed reset"?
Quoted 14 lines
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 <[email protected]>--- drivers/s390/crypto/vfio_ap_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/s390/crypto/vfio_ap_ops.c +0
-0drivers/s390/crypto/vfio_ap_ops.c int vfio_ap_mdev_reset_queue(unsigned int apid, unsigned int apqi, · line 1149
Quoted 8 lines
drivers/s390/crypto/vfio_ap_ops.c +1
-1@@ -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.
Quoted 1 line
Reviewed-by Cornelia Huck <[email protected]>
Agreed:
Quoted 1 line
Christian Borntraeger
AppliedQuoted 5 lines · Halil Pasic
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 <[email protected]>
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.
Quoted 18 lines
--- drivers/s390/crypto/vfio_ap_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/s390/crypto/vfio_ap_ops.c +1
-1@@ -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 :