qemu-devel
[Top][All Lists]
Advanced

[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: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 1/6] usb: add usb_bus_release function
Date: Mon, 02 Jun 2014 09:36:20 +0200

  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.

cheers,
  Gerd





reply via email to

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