Received: from eggs.gnu.org ([2001:4830:134:3::10]:38784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTvWU-0004OQ-Mz for qemu-devel@nongnu.org; Mon, 24 Aug 2015 13:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZTvWR-00084D-I1 for qemu-devel@nongnu.org; Mon, 24 Aug 2015 13:27:06 -0400 Received: from mail-qk0-x22d.google.com ([2607:f8b0:400d:c09::22d]:36593) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZTvWR-00083y-Cq for qemu-devel@nongnu.org; Mon, 24 Aug 2015 13:27:03 -0400 Received: by qkda128 with SMTP id a128so28158298qkd.3 for ; Mon, 24 Aug 2015 10:27:03 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <871tesskty.fsf@blackfin.pond.sub.org> Date: Mon, 24 Aug 2015 13:26:58 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <7D5F8066-19E8-418A-9E65-645648D54826@gmail.com> References: <87a8u29uyf.fsf@blackfin.pond.sub.org> <5C0ED803-5F1C-4165-8BC4-CB6598BE233B@gmail.com> <877folrpe6.fsf@blackfin.pond.sub.org> <96C4B36C-B727-4E18-9B83-1EFB7213EB30@gmail.com> <871tesskty.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] qemu-doc.texi: Improve USB documentation... and maybe even QEMU also List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Peter Maydell , qemu-devel qemu-devel , Gerd Hoffmann On Aug 24, 2015, at 12:38 PM, Markus Armbruster wrote: > Programmingkid writes: >=20 >> On Aug 24, 2015, at 5:45 AM, Markus Armbruster wrote: >>=20 >>> Copying the USB maintainer. >>>=20 >>> Programmingkid writes: >>>=20 >>>> On Aug 8, 2015, at 8:48 AM, Programmingkid wrote: >>>>=20 >>>>>=20 >>>>> On Aug 8, 2015, at 2:04 AM, Markus Armbruster wrote: >>>>>>>=20 >>>>>>> USB devices can be connected with the @option{-usbdevice} >>>>>>> commandline option >>>>>>> -or the @code{usb_add} monitor command. Available devices are: >>>>>>> +or the @code{usb_add} monitor command. Note: some devices may >>>>>>> only work if >>>>>>> +added like this: -usb -device . Available devices = are: >>>>>>=20 >>>>>> I'm afraid "may only work" is a bit misleading. All of them work = with >>>>>> -device. Old ones are also supported by -usbdevice for backward >>>>>> compatibility. The whole section should be rewritten to point to >>>>>> -device instead of legacy -usbdevice, but that's no reason to = hold up >>>>>> your patch. >>>>>=20 >>>>> I did not know -usbdevice was considered legacy. If that is the >>>>> case, then it should probably >>>>> be removed from the documentation in favor for -usb -device = .=20 >>>>=20 >>>> Right now using "-usb -device mouse" doesn't work. >>>=20 >>> You need to say -device usb-mouse. See docs/qdev-device-use.txt. = Does >>> it work for you when you do that? >>=20 >> It does. Thank you for this information.=20 >=20 > My pleasure. >=20 >>>> Neither does >>>> "-usbdevice usb-audio". >>>=20 >>> Yes. Legacy -usbdevice only supports the devices that predate = -device. >>>=20 >>>> I think we can all agree that consistency among all the USB devices = is >>>> a good thing. >>>> Should all USB devices be added like this: -usb -device ?=20 >>>=20 >>> "Should" is perhaps a bit strong. While -device is the recommended = way >>> to add a USB device, -usbdevice is still a supported (if legacy) way = to >>> do it. >>>=20 >>> Of course, "supported, but legacy" interfaces such as -usbdevice may >>> become deprecated, and then you should really move to newer = interfaces, >>> because deprecated ones may go away. Doesn't look terribly probable = to >>> me for -usbdevice, though. >>>=20 >>>> This is an experimental patch of not how QEMU currently works, but = how >>>> I think it should work. >>>>=20 >>>> This documentation adds an "usb_remove" monitor command. This isn't >>>> available right now, >>>> but a patch could be made to change this. Any suggestions or = additions >>>> are welcomed. >>>=20 >>> Why do you think we need usb_remove in addition to device_del? >>=20 >> Ok. usb_remove isn't needed. Why is it that "device_add usb-kbd" = works, but >> "device_del usb-kbd" doesn't work? I am given this error message: >> "Device 'usb-kbd' not found". >=20 > device_del's argument isn't a driver, it's a device ID. Try this: >=20 > (qemu) device_add usb-mouse,id=3Dmouse0 > (qemu) info usb > Device 0.0, Port 1, Speed 12 Mb/s, Product QEMU USB Mouse > (qemu) device_del mouse0 > (qemu) info usb > (qemu)=20 The problem is with "info usb". It doesn't print the id you gave it. I = will make a patch that will print the id's.=20