diff mbox series

[v1,03/22] hw/ide: restore replay support of IDE

Message ID 20201007160038.26953-4-alex.bennee@linaro.org
State Superseded
Headers show
Series testing and plugin fixes with gitdm updates (pre PR) | expand

Commit Message

Alex Bennée Oct. 7, 2020, 4 p.m. UTC
A recent change to weak reset handling broke replay due to the use of
aio_bh_schedule_oneshot instead of the replay aware
replay_bh_schedule_oneshot_event.

Fixes: 55adb3c456 ("ide: cancel pending callbacks on SRST")
Suggested-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 hw/ide/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

John Snow Oct. 7, 2020, 4:35 p.m. UTC | #1
On 10/7/20 12:00 PM, Alex Bennée wrote:
> A recent change to weak reset handling broke replay due to the use of
> aio_bh_schedule_oneshot instead of the replay aware
> replay_bh_schedule_oneshot_event.
> 
> Fixes: 55adb3c456 ("ide: cancel pending callbacks on SRST")
> Suggested-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   hw/ide/core.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/ide/core.c b/hw/ide/core.c
> index 0e32abd779..693b352d5e 100644
> --- a/hw/ide/core.c
> +++ b/hw/ide/core.c
> @@ -2289,8 +2289,8 @@ void ide_ctrl_write(void *opaque, uint32_t addr, uint32_t val)
>               s = &bus->ifs[i];
>               s->status |= BUSY_STAT;
>           }
> -        aio_bh_schedule_oneshot(qemu_get_aio_context(),
> -                                ide_bus_perform_srst, bus);
> +        replay_bh_schedule_oneshot_event(qemu_get_aio_context(),
> +                                         ide_bus_perform_srst, bus);
>       }
>   
>       bus->cmd = val;
> 

Reviewed-by: John Snow <jsnow@redhat.com>
Acked-by: John Snow <jsnow@redhat.com>
Philippe Mathieu-Daudé Oct. 7, 2020, 5:53 p.m. UTC | #2
On 10/7/20 6:00 PM, Alex Bennée wrote:
> A recent change to weak reset handling broke replay due to the use of

> aio_bh_schedule_oneshot instead of the replay aware

> replay_bh_schedule_oneshot_event.

> 

> Fixes: 55adb3c456 ("ide: cancel pending callbacks on SRST")

> Suggested-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> ---

>  hw/ide/core.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/hw/ide/core.c b/hw/ide/core.c

> index 0e32abd779..693b352d5e 100644

> --- a/hw/ide/core.c

> +++ b/hw/ide/core.c

> @@ -2289,8 +2289,8 @@ void ide_ctrl_write(void *opaque, uint32_t addr, uint32_t val)

>              s = &bus->ifs[i];

>              s->status |= BUSY_STAT;

>          }

> -        aio_bh_schedule_oneshot(qemu_get_aio_context(),

> -                                ide_bus_perform_srst, bus);

> +        replay_bh_schedule_oneshot_event(qemu_get_aio_context(),

> +                                         ide_bus_perform_srst, bus);


Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


>      }

>  

>      bus->cmd = val;

>
Richard Henderson Oct. 8, 2020, 12:36 p.m. UTC | #3
On 10/7/20 11:00 AM, Alex Bennée wrote:
> A recent change to weak reset handling broke replay due to the use of
> aio_bh_schedule_oneshot instead of the replay aware
> replay_bh_schedule_oneshot_event.
> 
> Fixes: 55adb3c456 ("ide: cancel pending callbacks on SRST")
> Suggested-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  hw/ide/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
diff mbox series

Patch

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 0e32abd779..693b352d5e 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -2289,8 +2289,8 @@  void ide_ctrl_write(void *opaque, uint32_t addr, uint32_t val)
             s = &bus->ifs[i];
             s->status |= BUSY_STAT;
         }
-        aio_bh_schedule_oneshot(qemu_get_aio_context(),
-                                ide_bus_perform_srst, bus);
+        replay_bh_schedule_oneshot_event(qemu_get_aio_context(),
+                                         ide_bus_perform_srst, bus);
     }
 
     bus->cmd = val;