All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tommaso Califano" <tcalifano@redhat.com>
To: "Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>,
	qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Jean-Christophe Dubois" <jcd@tribudubois.net>,
	<qemu-arm@nongnu.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Helge Deller" <deller@gmx.de>,
	<qemu-devel-bounces+tcalifano=redhat.com@nongnu.org>
Subject: Re: [PATCH 03/11] hw/usb/hcd-ehci-sysbus: Convert to Resettable interface
Date: Tue, 01 Dec 2026 15:47:58 +0100	[thread overview]
Message-ID: <DN9H8RB7MGAF.2RE58MZVJKVSM@redhat.com> (raw)
In-Reply-To: <20261130-b4-usb-resettable-v1-3-2ee503f50c8a@gmail.com>

On Mon Nov 30, 2026 at 9:02 PM CET, Oscar Alejandro Sánchez Lucero wrote:
> Replace the transitional device_class_set_legacy_reset() wrapper with
> the ResettableClass interface by implementing the hold phase in
> usb_ehci_sysbus_reset_hold().
>
> Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>

Reviewed-by: Tommaso Califano <tcalifano@redhat.com>

> ---
>  hw/usb/hcd-ehci-sysbus.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c
> index 7f7c7f8..1288bbd 100644
> --- a/hw/usb/hcd-ehci-sysbus.c
> +++ b/hw/usb/hcd-ehci-sysbus.c
> @@ -46,10 +46,9 @@ static void usb_ehci_sysbus_realize(DeviceState *dev, Error **errp)
>      sysbus_init_irq(d, &s->irq);
>  }
>  
> -static void usb_ehci_sysbus_reset(DeviceState *dev)
> +static void usb_ehci_sysbus_reset_hold(Object *obj, ResetType type)
>  {
> -    SysBusDevice *d = SYS_BUS_DEVICE(dev);
> -    EHCISysBusState *i = SYS_BUS_EHCI(d);
> +    EHCISysBusState *i = SYS_BUS_EHCI(obj);
>      EHCIState *s = &i->ehci;
>  
>      ehci_reset(s);
> @@ -84,6 +83,7 @@ static void ehci_sysbus_class_init(ObjectClass *klass, const void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
>      SysBusEHCIClass *sec = SYS_BUS_EHCI_CLASS(klass);
> +    ResettableClass *rc = RESETTABLE_CLASS(klass);
>  
>      sec->portscbase = 0x44;
>      sec->portnr = EHCI_PORTS;
> @@ -91,7 +91,7 @@ static void ehci_sysbus_class_init(ObjectClass *klass, const void *data)
>      dc->realize = usb_ehci_sysbus_realize;
>      dc->vmsd = &vmstate_ehci_sysbus;
>      device_class_set_props(dc, ehci_sysbus_properties);
> -    device_class_set_legacy_reset(dc, usb_ehci_sysbus_reset);
> +    rc->phases.hold = usb_ehci_sysbus_reset_hold;
>      set_bit(DEVICE_CATEGORY_USB, dc->categories);
>  }
>  




  parent reply	other threads:[~2026-12-01 14:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 20:02 [PATCH 00/11] hw/usb: Convert USB host controllers and PHY to Resettable interface Oscar Alejandro Sánchez Lucero
2026-11-30 20:02 ` [PATCH 01/11] hw/usb/hcd-dwc3: Convert " Oscar Alejandro Sánchez Lucero
2026-12-01 13:47   ` Bin Meng
2026-12-01 14:46   ` Tommaso Califano
2026-12-01 21:38   ` Philippe Mathieu-Daudé
2026-11-30 20:02 ` [PATCH 02/11] hw/usb/hcd-ehci-pci: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:47   ` Bin Meng
2026-12-01 14:47   ` Tommaso Califano
2026-11-30 20:02 ` [PATCH 03/11] hw/usb/hcd-ehci-sysbus: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:47   ` Bin Meng
2026-12-01 14:47   ` Tommaso Califano [this message]
2026-11-30 20:02 ` [PATCH 04/11] hw/usb/hcd-ohci-pci: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:48   ` Bin Meng
2026-12-01 14:48   ` Tommaso Califano
2026-11-30 20:02 ` [PATCH 05/11] hw/usb/hcd-ohci-sysbus: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:48   ` Bin Meng
2026-12-01 14:49   ` Tommaso Califano
2026-11-30 20:02 ` [PATCH 06/11] hw/usb/hcd-uhci: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:49   ` Bin Meng
2026-12-01 14:51   ` Tommaso Califano
2026-12-01 14:52   ` Tommaso Califano
2026-11-30 20:02 ` [PATCH 07/11] hw/usb/hcd-xhci-pci: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:49   ` Bin Meng
2026-12-01 14:53   ` Tommaso Califano
2026-11-30 20:02 ` [PATCH 08/11] hw/usb/hcd-xhci-sysbus: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:49   ` Bin Meng
2026-12-01 14:54   ` Tommaso Califano
2026-11-30 20:02 ` [PATCH 09/11] hw/usb/hcd-xhci: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:50   ` Bin Meng
2026-12-01 14:55   ` Tommaso Califano
2026-11-30 20:02 ` [PATCH 10/11] hw/usb/imx-usb-phy: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:50   ` Bin Meng
2026-12-01 14:58   ` Tommaso Califano
2026-11-30 20:02 ` [PATCH 11/11] hw/usb/pc87560-ohci: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:50   ` Bin Meng
2026-12-01 14:59   ` Tommaso Califano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DN9H8RB7MGAF.2RE58MZVJKVSM@redhat.com \
    --to=tcalifano@redhat.com \
    --cc=aleszlucero@gmail.com \
    --cc=deller@gmx.de \
    --cc=jcd@tribudubois.net \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel-bounces+tcalifano=redhat.com@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.