Received: from eggs.gnu.org ([2001:4830:134:3::10]:41334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQb4t-00075u-Ig for qemu-devel@nongnu.org; Tue, 02 Feb 2016 08:33:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQb4q-0004zS-C4 for qemu-devel@nongnu.org; Tue, 02 Feb 2016 08:33:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQb4q-0004z3-6V for qemu-devel@nongnu.org; Tue, 02 Feb 2016 08:33:04 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id D7E833C88D4 for ; Tue, 2 Feb 2016 13:33:03 +0000 (UTC) From: Markus Armbruster References: <1453804885-15544-1-git-send-email-kraxel@redhat.com> <1453804885-15544-3-git-send-email-kraxel@redhat.com> Date: Tue, 02 Feb 2016 14:33:01 +0100 In-Reply-To: <1453804885-15544-3-git-send-email-kraxel@redhat.com> (Gerd Hoffmann's message of "Tue, 26 Jan 2016 11:41:23 +0100") Message-ID: <87zivjkzjm.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/4] usb: add attached property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org 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 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 Patch looks good.