qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] usb: Add read support for HCIVERSION register to XHCI
@ 2020-03-30 21:44 Cameron Esfahani via
  2020-03-31  7:52 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 9+ messages in thread
From: Cameron Esfahani via @ 2020-03-30 21:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: kraxel

macOS will read HCIVERSION separate from CAPLENGTH.  Add a distinct
handler for that register.

Signed-off-by: Cameron Esfahani <dirty@apple.com>
---
 hw/usb/hcd-xhci.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index b330e36fe6..061f8438de 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -2739,6 +2739,9 @@ static uint64_t xhci_cap_read(void *ptr, hwaddr reg, unsigned size)
     case 0x00: /* HCIVERSION, CAPLENGTH */
         ret = 0x01000000 | LEN_CAP;
         break;
+    case 0x02: /* HCIVERSION */
+        ret = 0x0100;
+        break;
     case 0x04: /* HCSPARAMS 1 */
         ret = ((xhci->numports_2+xhci->numports_3)<<24)
             | (xhci->numintrs<<8) | xhci->numslots;
-- 
2.24.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-06 22:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-30 21:44 [PATCH v1] usb: Add read support for HCIVERSION register to XHCI Cameron Esfahani via
2020-03-31  7:52 ` Philippe Mathieu-Daudé
2020-03-31  9:57   ` Cameron Esfahani via
2020-03-31 10:24     ` Cameron Esfahani via
2020-03-31 11:02     ` Philippe Mathieu-Daudé
2020-04-01 11:23       ` Cédric Le Goater
2020-04-03  0:48         ` Andrew Jeffery
2020-04-06 22:54         ` Cameron Esfahani via
2020-03-31 14:42     ` 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).