• G
    usb: add serial number generator · 9d55d1ad
    Gerd Hoffmann 提交于
    This patch adds a function which creates unique serial numbers for usb
    devices and puts it into use.  Windows guests tend to become unhappy if
    they find two identical usb devices in the system.  Effects range from
    non-functional devices (with yellow exclamation mark in device manager)
    to BSODs.  Handing out unique serial numbers to devices fixes this.
    
    With this patch applied almost all emulated devices get a generated,
    unique serial number.  There are two exceptions:
    
     * usb-storage devices will prefer a user-specified serial number
       and will only get a generated number in case the serial property
       is unset.
     * usb-hid devices keep the fixed serial number "42" as it is used
       to signal "remote wakeup actually works".
       See commit 7b074a22Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
    9d55d1ad
desc.c 18.3 KB