mirror of https://gitee.com/openkylin/qemu.git
usb: fix for usb-host
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJdw9vwAAoJEEy22O7T6HE4TZ8QALK4kZWEJ9OnH+5mOmzWvAFr nVFF/OAP0UUi9qAbPFO/pSkTdGlhtyEoKqXmdAQfmkm6orLgUijUaSu1PJWwev/T W/2vis27EmZIZ4eVM/nVck3k5KqAiFJ65T2zror1hdbW59GsfXn859jktRMeMKsl oufiALoMidmNdK8ipK2TeeI2DviULH74tdncR43F6yal7i//PGF4oxUz8XEiYLie +AIS0ZnLuYZvnwy2jrozKivslcL12zXs8JKvuOUtH6+OSAXfrBfxyT4kJKqfCMb4 9B+fRUeA6wnGspsWFZ3kh+wvZFvZ2A/ik4ZERpzk4jZJ7TujA/9ED5VvTiq8aGjJ Y1uHDnv71pj6sXHQyH9jTmxlt49dT3DGzlb+vET6doigZtEtd5vKbg8TKtwVcZ9G g8B5MpORRA3X5PtkbKV+TOsnnG1A+zWABARkgF1hxZZfSVNRIlj65eEqLQ/1HrVx m4PJp7xdNgKskYp5YqcDFaOBVHtN/MJEfsDMq4a6v2EEau6wrEY3NtwmwDlVTkoz GHklyf9NQAnlM96AxaMq90ZmggkLSZ140m2hnXUj2iARh2mfU4ikJVdI6ceuk8no Rci2DiDuquSNeGv7iQ5H4xFiU/n27jIoCKz/EEGsS24SUAmA7pZI+S9cf3Es0pv1 E0aIA//TgbM/dD0bjRBR =Z9u4 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/usb-20191107-pull-request' into staging usb: fix for usb-host # gpg: Signature made Thu 07 Nov 2019 08:55:12 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/usb-20191107-pull-request: usb-host: add option to allow all resets. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
1cee80fa66
|
@ -86,7 +86,9 @@ struct USBHostDevice {
|
|||
uint32_t options;
|
||||
uint32_t loglevel;
|
||||
bool needs_autoscan;
|
||||
bool allow_guest_reset;
|
||||
bool allow_one_guest_reset;
|
||||
bool allow_all_guest_resets;
|
||||
|
||||
/* state */
|
||||
QTAILQ_ENTRY(USBHostDevice) next;
|
||||
int seen, errcount;
|
||||
|
@ -1462,10 +1464,10 @@ static void usb_host_handle_reset(USBDevice *udev)
|
|||
USBHostDevice *s = USB_HOST_DEVICE(udev);
|
||||
int rc;
|
||||
|
||||
if (!s->allow_guest_reset) {
|
||||
if (!s->allow_one_guest_reset && !s->allow_all_guest_resets) {
|
||||
return;
|
||||
}
|
||||
if (udev->addr == 0) {
|
||||
if (!s->allow_all_guest_resets && udev->addr == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1586,7 +1588,10 @@ static Property usb_host_dev_properties[] = {
|
|||
DEFINE_PROP_UINT32("productid", USBHostDevice, match.product_id, 0),
|
||||
DEFINE_PROP_UINT32("isobufs", USBHostDevice, iso_urb_count, 4),
|
||||
DEFINE_PROP_UINT32("isobsize", USBHostDevice, iso_urb_frames, 32),
|
||||
DEFINE_PROP_BOOL("guest-reset", USBHostDevice, allow_guest_reset, true),
|
||||
DEFINE_PROP_BOOL("guest-reset", USBHostDevice,
|
||||
allow_one_guest_reset, true),
|
||||
DEFINE_PROP_BOOL("guest-resets-all", USBHostDevice,
|
||||
allow_all_guest_resets, false),
|
||||
DEFINE_PROP_UINT32("loglevel", USBHostDevice, loglevel,
|
||||
LIBUSB_LOG_LEVEL_WARNING),
|
||||
DEFINE_PROP_BIT("pipeline", USBHostDevice, options,
|
||||
|
|
Loading…
Reference in New Issue