From: Thomas Huth <thuth@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, philmd@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] ssi-sd: Make devices picking up backends unavailable with -device
Date: Tue, 9 Oct 2018 08:10:42 +0200 [thread overview]
Message-ID: <02e87415-413e-656e-b1d0-568f7dcabc50@redhat.com> (raw)
In-Reply-To: <20181009060835.4608-1-armbru@redhat.com>
On 2018-10-09 08:08, Markus Armbruster wrote:
> Device models aren't supposed to go on fishing expeditions for
> backends. They should expose suitable properties for the user to set.
> For onboard devices, board code sets them.
>
> Device ssi-sd picks up its block backend in its init() method with
> drive_get_next() instead. This mistake is already marked FIXME since
> commit af9e40a.
>
> Unset user_creatable to remove the mistake from our external
> interface. Since the SSI bus doesn't support hotplug, only -device
> can be affected. Only certain ARM machines have ssi-sd and provide an
> SSI bus for it; this patch breaks -device ssi-sd for these machines.
> No actual use of -device ssi-sd is known.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> Acked-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> v2:
> * Rebase to master
> * Improve commit message
>
> hw/sd/ssi-sd.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
> index 95a143bfba..623d0333e8 100644
> --- a/hw/sd/ssi-sd.c
> +++ b/hw/sd/ssi-sd.c
> @@ -284,6 +284,8 @@ static void ssi_sd_class_init(ObjectClass *klass, void *data)
> k->cs_polarity = SSI_CS_LOW;
> dc->vmsd = &vmstate_ssi_sd;
> dc->reset = ssi_sd_reset;
> + /* Reason: init() method uses drive_get_next() */
> + dc->user_creatable = false;
> }
>
> static const TypeInfo ssi_sd_info = {
>
Acked-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2018-10-09 6:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 6:08 [Qemu-devel] [PATCH v2] ssi-sd: Make devices picking up backends unavailable with -device Markus Armbruster
2018-10-09 6:10 ` Thomas Huth [this message]
2018-10-18 7:50 ` Markus Armbruster
2018-10-18 16:26 ` Peter Maydell
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=02e87415-413e-656e-b1d0-568f7dcabc50@redhat.com \
--to=thuth@redhat.com \
--cc=armbru@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.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 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).