[PATCH 06/10] scsi:ncr710:Mark command complete in status phase and fix disconnect

Soumyajyotii Ssarkar posted 10 patches 1 month, 3 weeks ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>, Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>
[PATCH 06/10] scsi:ncr710:Mark command complete in status phase and fix disconnect
Posted by Soumyajyotii Ssarkar 1 month, 3 weeks ago
Set command_complete flag after status_phase and use_phase_clearing,
instead of full disconnect during message processing

Signed-off-by: Soumyajyotii Ssarkar<soumyajyotisarkar23@gmail.com>
---
 hw/scsi/ncr53c710.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/scsi/ncr53c710.c b/hw/scsi/ncr53c710.c
index 4b42fab754..3d7318c12e 100644
--- a/hw/scsi/ncr53c710.c
+++ b/hw/scsi/ncr53c710.c
@@ -997,6 +997,7 @@ static void ncr710_do_status(NCR710State *s)
     ncr710_set_phase(s, PHASE_MI);
     s->msg_action = NCR710_MSG_ACTION_DISCONNECT;
     ncr710_add_msg_byte(s, 0); /* COMMAND COMPLETE */
+    s->command_complete = NCR710_CMD_COMPLETE;
 }
 
 static void ncr710_do_msgin(NCR710State *s)
@@ -1041,7 +1042,7 @@ static void ncr710_do_msgin(NCR710State *s)
         ncr710_set_phase(s, PHASE_CO);
         break;
     case NCR710_MSG_ACTION_DISCONNECT:
-        ncr710_disconnect(s);
+        s->sstat2 &= ~PHASE_MASK;
         break;
     case NCR710_MSG_ACTION_DATA_OUT:
         ncr710_set_phase(s, PHASE_DO);
-- 
2.49.0
Re: [PATCH 06/10] scsi:ncr710:Mark command complete in status phase and fix disconnect
Posted by Helge Deller 1 month, 2 weeks ago
On 12/21/25 15:23, Soumyajyotii Ssarkar wrote:
> Set command_complete flag after status_phase and use_phase_clearing,
> instead of full disconnect during message processing
> 
> Signed-off-by: Soumyajyotii Ssarkar<soumyajyotisarkar23@gmail.com>

Tested-by: Helge Deller <deller@gmx.de>
Re: [PATCH 06/10] scsi:ncr710:Mark command complete in status phase and fix disconnect
Posted by Helge Deller 1 month, 2 weeks ago
On 12/21/25 15:23, Soumyajyotii Ssarkar wrote:
> Set command_complete flag after status_phase and use_phase_clearing,
> instead of full disconnect during message processing
> 
> Signed-off-by: Soumyajyotii Ssarkar<soumyajyotisarkar23@gmail.com>


Reviewed-by: Helge Deller <deller@gmx.de>

> ---
>   hw/scsi/ncr53c710.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/scsi/ncr53c710.c b/hw/scsi/ncr53c710.c
> index 4b42fab754..3d7318c12e 100644
> --- a/hw/scsi/ncr53c710.c
> +++ b/hw/scsi/ncr53c710.c
> @@ -997,6 +997,7 @@ static void ncr710_do_status(NCR710State *s)
>       ncr710_set_phase(s, PHASE_MI);
>       s->msg_action = NCR710_MSG_ACTION_DISCONNECT;
>       ncr710_add_msg_byte(s, 0); /* COMMAND COMPLETE */
> +    s->command_complete = NCR710_CMD_COMPLETE;
>   }
>   
>   static void ncr710_do_msgin(NCR710State *s)
> @@ -1041,7 +1042,7 @@ static void ncr710_do_msgin(NCR710State *s)
>           ncr710_set_phase(s, PHASE_CO);
>           break;
>       case NCR710_MSG_ACTION_DISCONNECT:
> -        ncr710_disconnect(s);
> +        s->sstat2 &= ~PHASE_MASK;
>           break;
>       case NCR710_MSG_ACTION_DATA_OUT:
>           ncr710_set_phase(s, PHASE_DO);