qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] b63e10: usb: assign unique serial numbers to


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] b63e10: usb: assign unique serial numbers to hid devices
Date: Thu, 31 Jan 2019 15:40:17 +0000 (UTC)

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b63e10508bee7169cfc7022805638c7358feefb5
      
https://github.com/qemu/qemu/commit/b63e10508bee7169cfc7022805638c7358feefb5
  Author: Gerd Hoffmann <address@hidden>
  Date:   2019-01-30 (Wed, 30 Jan 2019)

  Changed paths:
    M hw/core/machine.c
    M hw/usb/dev-hid.c

  Log Message:
  -----------
  usb: assign unique serial numbers to hid devices

Windows guests have trouble dealing with usb devices having identical
serial numbers.  So, assign unique serial numbers to usb hid devices.
All other usb devices have this already.

In the past the fixed serial number has been used to indicate working
remote setup to linux guests.  Here is a bit of history:

 * First there was nothing.
 * Then I added a rule to udev checking for serial == 42.
   (this is in rhel-6).
 * Then systemd + udev merged.
 * Then I changed the rule to check for serial != 1 instead, so we can
   use any serial but "1" which is the one the old broken devices had
   (this is in rhel-7).  March 2014 in upstream systemd.
 * Then all usb power management rules where dropped from systemd (June
   2015).  Which I figured today (Sept 2018), after wondering that the
   rules are gone in fedora 28.

So, three years ago the serial number check was dropped upstream, yet I
hav't seen a single report about autosuspend issues (or cpu usage for
usb emulation going up, which is the typical symtom).

So I figured I can stop worring that changing the serial number will
break things and just do it.

And even if it turns out autosuspend is still an issue:  I think
meanwhile we can really stop worrying about guests running in old qemu
versions with broken usb suspend (fixed in 0.13 !).  If needed we can
enable autosuspend unconditionally in guests.

Signed-off-by: Gerd Hoffmann <address@hidden>
Message-id: address@hidden


  Commit: 6e3c1a68f91d8de2a800d994edf0c9eedde6f090
      
https://github.com/qemu/qemu/commit/6e3c1a68f91d8de2a800d994edf0c9eedde6f090
  Author: Li Qiang <address@hidden>
  Date:   2019-01-30 (Wed, 30 Jan 2019)

  Changed paths:
    M hw/usb/dev-mtp.c

  Log Message:
  -----------
  usb: dev-mtp: close fd in usb_mtp_object_readdir()

Spotted by Coverity: CID 1397070

Signed-off-by: Li Qiang <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden

[ kraxel: dropped chunk which adds close() after successful
          fdopendir() call, that is not needed according to
          POSIX even though Coverity flags it as bug ]

Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 75a49fc61ab32a341de00bae6295603f4a08f14e
      
https://github.com/qemu/qemu/commit/75a49fc61ab32a341de00bae6295603f4a08f14e
  Author: Thomas Huth <address@hidden>
  Date:   2019-01-30 (Wed, 30 Jan 2019)

  Changed paths:
    M hw/usb/combined-packet.c
    M hw/usb/hcd-ehci-pci.c
    M hw/usb/hcd-ehci-sysbus.c
    M hw/usb/hcd-ehci.c
    M hw/usb/hcd-ehci.h

  Log Message:
  -----------
  hw/usb: Fix LGPL information in the file headers

It's either "GNU *Library* General Public version 2" or "GNU Lesser
General Public version *2.1*", but there was no "version 2.0" of the
"Lesser" library. So assume that version 2.1 is meant here.
Additionally, suggest that the user should have received a copy of
the LGPL, and not the GPL here.

Signed-off-by: Thomas Huth <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: a587c832a3f1d6d47dce93bda52c80cfa163e7cf
      
https://github.com/qemu/qemu/commit/a587c832a3f1d6d47dce93bda52c80cfa163e7cf
  Author: Yuri Benditovich <address@hidden>
  Date:   2019-01-30 (Wed, 30 Jan 2019)

  Changed paths:
    M hw/usb/hcd-xhci.c

  Log Message:
  -----------
  usb: XHCI shall not halt isochronous endpoints

According to the XHCI spec (4.10.2) the controller
never halts isochronous endpoints. This commit prevent
stop of isochronous streaming when sporadic errors
status received from backends.

Signed-off-by: Yuri Benditovich <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: b4329d1a2a42d3c49ac4b76ec86b6c9db19ea1e9
      
https://github.com/qemu/qemu/commit/b4329d1a2a42d3c49ac4b76ec86b6c9db19ea1e9
  Author: Yuri Benditovich <address@hidden>
  Date:   2019-01-30 (Wed, 30 Jan 2019)

  Changed paths:
    M hw/usb/hcd-xhci.c
    M hw/usb/hcd-xhci.h

  Log Message:
  -----------
  usb: implement XHCI underrun/overrun events

Implement underrun/overrun events of isochronous endpoints
according to XHCI spec (4.10.3.1)
Guest software restarts data streaming when receives these events.
The XHCI reports these events using interrupter assigned
to the slot (as these events do not have TRB), so current
commit adds the field of assigned interrupter to the
XHCISlot structure. Guest software assigns interrupter to the
slot on 'Address Device' and 'Evaluate Context' commands.

Signed-off-by: Yuri Benditovich <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 179fcf8a83a91c74e323b1fe1b5397520a8af047
      
https://github.com/qemu/qemu/commit/179fcf8a83a91c74e323b1fe1b5397520a8af047
  Author: Bandan Das <address@hidden>
  Date:   2019-01-30 (Wed, 30 Jan 2019)

  Changed paths:
    M hw/usb/dev-mtp.c

  Log Message:
  -----------
  usb-mtp: Reallocate buffer in multiples of MTP_WRITE_BUF_SZ

This is a "pre-patch" to breaking up the write buffer for
MTP writes. Instead of allocating a mtp buffer equal to size
sent by the initiator, we start with a small size and reallocate
multiples (of that small size) as needed.

Signed-off-by: Bandan Das <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: c1ef0f2519c706f738d76b9b68b6627c889bab14
      
https://github.com/qemu/qemu/commit/c1ef0f2519c706f738d76b9b68b6627c889bab14
  Author: Bandan Das <address@hidden>
  Date:   2019-01-30 (Wed, 30 Jan 2019)

  Changed paths:
    M hw/usb/dev-mtp.c

  Log Message:
  -----------
  usb-mtp: breakup MTP write into smaller chunks

For every MTP_WRITE_BUF_SZ copied, this patch writes it to file before
getting the next block of data. The file is kept opened for the
duration of the operation but the sanity checks on the write operation
are performed only once when the write operation starts. Additionally,
we also update the file size in the object metadata once the file has
completely been written.

Suggested-by: Gerd Hoffman <address@hidden>
Signed-off-by: Bandan Das <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: 49f9e8d660d41cbe325d554e742d7100d59a7abf
      
https://github.com/qemu/qemu/commit/49f9e8d660d41cbe325d554e742d7100d59a7abf
  Author: Bandan Das <address@hidden>
  Date:   2019-01-30 (Wed, 30 Jan 2019)

  Changed paths:
    M hw/usb/dev-mtp.c

  Log Message:
  -----------
  usb-mtp: replace the homebrew write with qemu_write_full

qemu_write_full takes care of partial blocking writes,
as in cases of larger file sizes

Suggested-by: Peter Maydell <address@hidden>
Signed-off-by: Bandan Das <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>


  Commit: aefcd2836620363020d53b18e712a3350116f332
      
https://github.com/qemu/qemu/commit/aefcd2836620363020d53b18e712a3350116f332
  Author: Peter Maydell <address@hidden>
  Date:   2019-01-31 (Thu, 31 Jan 2019)

  Changed paths:
    M hw/core/machine.c
    M hw/usb/combined-packet.c
    M hw/usb/dev-hid.c
    M hw/usb/dev-mtp.c
    M hw/usb/hcd-ehci-pci.c
    M hw/usb/hcd-ehci-sysbus.c
    M hw/usb/hcd-ehci.c
    M hw/usb/hcd-ehci.h
    M hw/usb/hcd-xhci.c
    M hw/usb/hcd-xhci.h

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/kraxel/tags/usb-20190130-pull-request' 
into staging

usb: xhci: fix iso transfers.
usb: mtp: break up writes, bugfixes.
usb: fix lgpl info in headers.
usb: hid: unique serials.

# gpg: Signature made Wed 30 Jan 2019 07:33:21 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <address@hidden>" [full]
# gpg:                 aka "Gerd Hoffmann <address@hidden>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <address@hidden>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/usb-20190130-pull-request:
  usb-mtp: replace the homebrew write with qemu_write_full
  usb-mtp: breakup MTP write into smaller chunks
  usb-mtp: Reallocate buffer in multiples of MTP_WRITE_BUF_SZ
  usb: implement XHCI underrun/overrun events
  usb: XHCI shall not halt isochronous endpoints
  hw/usb: Fix LGPL information in the file headers
  usb: dev-mtp: close fd in usb_mtp_object_readdir()
  usb: assign unique serial numbers to hid devices

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/460da1005d90...aefcd2836620



reply via email to

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