* [Qemu-devel] [PULL] usb patch queue
@ 2011-07-20 10:23 Gerd Hoffmann
2011-07-20 10:23 ` [Qemu-devel] [PATCH 1/2] usb-hid: fixup changed tracking Gerd Hoffmann
2011-07-20 10:23 ` [Qemu-devel] [PATCH 2/2] usb-uhci: fix irq handling on error Gerd Hoffmann
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2011-07-20 10:23 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Hi,
Tiny usb patch queue with two small fixes.
please pull for 0.15,
Gerd
The following changes since commit 03ff09580ef6cbc4a893b6e3e6bbff33180ec70a:
Merge remote-tracking branch 'agraf/xen-next' into staging (2011-07-19 08:04:35 -0500)
are available in the git repository at:
git://git.kraxel.org/qemu usb.20
Gerd Hoffmann (2):
usb-hid: fixup changed tracking.
usb-uhci: fix irq handling on error.
hw/usb-hid.c | 9 ++++-----
hw/usb-uhci.c | 6 ++++++
2 files changed, 10 insertions(+), 5 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 1/2] usb-hid: fixup changed tracking.
2011-07-20 10:23 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann
@ 2011-07-20 10:23 ` Gerd Hoffmann
2011-07-20 10:23 ` [Qemu-devel] [PATCH 2/2] usb-uhci: fix irq handling on error Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2011-07-20 10:23 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Remove leftover calls to usb_hid_changed().
Take care to update the changed flag after delivering a event via
GET_REPORT like we do when sending events via interrupt endpoint.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb-hid.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/usb-hid.c b/hw/usb-hid.c
index d711b5c..b812da2 100644
--- a/hw/usb-hid.c
+++ b/hw/usb-hid.c
@@ -531,18 +531,15 @@ static void usb_keyboard_process_keycode(USBHIDState *hs)
case 0xe0:
if (s->modifiers & (1 << 9)) {
s->modifiers ^= 3 << 8;
- usb_hid_changed(hs);
return;
}
case 0xe1 ... 0xe7:
if (keycode & (1 << 7)) {
s->modifiers &= ~(1 << (hid_code & 0x0f));
- usb_hid_changed(hs);
return;
}
case 0xe8 ... 0xef:
s->modifiers |= 1 << (hid_code & 0x0f);
- usb_hid_changed(hs);
return;
}
@@ -769,10 +766,12 @@ static int usb_hid_handle_control(USBDevice *dev, USBPacket *p,
}
break;
case GET_REPORT:
- if (s->kind == USB_MOUSE || s->kind == USB_TABLET)
+ if (s->kind == USB_MOUSE || s->kind == USB_TABLET) {
ret = usb_pointer_poll(s, data, length);
- else if (s->kind == USB_KEYBOARD)
+ } else if (s->kind == USB_KEYBOARD) {
ret = usb_keyboard_poll(s, data, length);
+ }
+ s->changed = s->n > 0;
break;
case SET_REPORT:
if (s->kind == USB_KEYBOARD)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 2/2] usb-uhci: fix irq handling on error.
2011-07-20 10:23 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann
2011-07-20 10:23 ` [Qemu-devel] [PATCH 1/2] usb-hid: fixup changed tracking Gerd Hoffmann
@ 2011-07-20 10:23 ` Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2011-07-20 10:23 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Spec on UHCI_STS_USBERR: "If the TD on which the error interrupt
occurred also had its IOC bit set, both this bit and Bit 0 are set."
Make UHCI emulation do that.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/usb-uhci.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c
index 2ef4c5b..da74c57 100644
--- a/hw/usb-uhci.c
+++ b/hw/usb-uhci.c
@@ -730,6 +730,9 @@ out:
td->ctrl |= TD_CTRL_STALL;
td->ctrl &= ~TD_CTRL_ACTIVE;
s->status |= UHCI_STS_USBERR;
+ if (td->ctrl & TD_CTRL_IOC) {
+ *int_mask |= 0x01;
+ }
uhci_update_irq(s);
return 1;
@@ -737,6 +740,9 @@ out:
td->ctrl |= TD_CTRL_BABBLE | TD_CTRL_STALL;
td->ctrl &= ~TD_CTRL_ACTIVE;
s->status |= UHCI_STS_USBERR;
+ if (td->ctrl & TD_CTRL_IOC) {
+ *int_mask |= 0x01;
+ }
uhci_update_irq(s);
/* frame interrupted */
return -1;
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-20 10:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20 10:23 [Qemu-devel] [PULL] usb patch queue Gerd Hoffmann
2011-07-20 10:23 ` [Qemu-devel] [PATCH 1/2] usb-hid: fixup changed tracking Gerd Hoffmann
2011-07-20 10:23 ` [Qemu-devel] [PATCH 2/2] usb-uhci: fix irq handling on error Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).