[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/4] usb: add attached property
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 2/4] usb: add attached property |
Date: |
Tue, 02 Feb 2016 14:33:01 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Suggest to say
usb: Add QOM property "attached"
The quotes make more obvious that "attached" is a property name, not an
adjective tacked to property.
Gerd Hoffmann <address@hidden> writes:
> USB devices in attached state are visible to the guest.
If I read the code correctly:
* ->attached is true between usb_device_attach() and usb_device_detach()
* Attach and detach is automatic on realize and unrealize, but a device
can choose to suppress attach on realize, by unsetting ->auto_attach,
and manage attach/detach itself.
* A detached device is wired up normally in QOM, but the USB core treats
it as not plugged into its USB port.
Correct?
> This patch adds
> a QOM property for this. Write access is opt-in per device. Some
> devices manage attached state automatically (usb-host, usb-serial), so
Full list of devices unsetting ->auto_attach: dev-serial.c dev-storage.c
host-libusb.c redirect.c.
dev-storage.c does it only for encrypted media without a key, but that
should go away with Dan's "Support LUKS encryption in block devices", so
I guess neglecting to mention it here is okay.
Suggest to add usb-redir to your list.
> we can't enable write access universally but have to do it on a case by
> case base.
Suggest to add: So far, no device opts in.
>
> Signed-off-by: Gerd Hoffmann <address@hidden>
Patch looks good.
- Re: [Qemu-devel] [PATCH 2/4] usb: add attached property,
Markus Armbruster <=