[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] monitor: add usb_attach and usb_detach

From: Alon Levy
Subject: Re: [Qemu-devel] [PATCH 3/3] monitor: add usb_attach and usb_detach
Date: Thu, 21 Oct 2010 21:18:35 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Oct 20, 2010 at 02:24:20PM -0200, Luiz Capitulino wrote:
> On Tue, 19 Oct 2010 15:35:01 +0200
> Gerd Hoffmann <address@hidden> wrote:
> >    Hi,
> > 
> > > +        .help       = "attach USB device 'bus.addr'",
> > 
> > > address@hidden usb_attach @var{devname}
> > 
> > /me sees a mismatch here.
> > 
> > There is still the use case question.  Also note that this might have 
> > unwanted side effects when drivers automagically attach/detach devices 
> > like usb-host.
> Alon, did you check this? I hope it doesn't blowup.

I just did, I created
 usb-hub id=hub1
  .. (6 more)
  usb-hub id=hub2
   (6 more)

(verified the guest sees this tree using lsusb -t)

I did usb_detach hub1, and as expected only the first usb-serial remained.
I then did a usb_attach hub1, and no devices appeared. A second usb_attach
gets the expected warning (you tried to attach a device twice).

So It doesn't blow up, but an info qtree showed it's because the rest of
the devices (those below hub1) were still attached. So I think the detach
should take care to detach anything below. If after that attach still won't
cause attach then hub attaches need fixing as well (it should be just causing
attach for devices under it, since the whole protocol for an attach is already
correctly implemented).

> > Having this purely for debugging/troubleshooting purposes would be fine 
> > with me, but the documentation should clearly say so.
> Is this useful in production or only in the development of new devices? If
> it's the letter, then I would even prefer enabling them only when DEBUG
> is enabled.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]