[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/6] usb: add usb_bus_release function
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH 1/6] usb: add usb_bus_release function |
Date: |
Tue, 3 Jun 2014 01:21:52 +0000 |
> -----Original Message-----
> From: Gerd Hoffmann [mailto:address@hidden
> Sent: Monday, June 02, 2014 3:36 PM
> To: Gonglei (Arei)
> Cc: address@hidden; Luonengjun; Huangweidong (C); Huangpeng
> (Peter)
> Subject: Re: [PATCH 1/6] usb: add usb_bus_release function
>
> Hi,
>
> > +void usb_bus_release(USBBus *bus)
> > +{
> > + assert(next_usb_bus > 0);
> > +
> > + next_usb_bus--;
> > + QTAILQ_REMOVE(&busses, bus, next);
> > +}
>
> That breaks when not hotplugging in last-in-first-out order. I'd
> suggest to simply leave next_usb_bus alone on unplug. It is only used
> for bus numbering. We'll get holes in our bus numbering then, but we
> can't avoid that with hotplug anyway.
>
Indeed. Thanks!
Best regards,
-Gonglei