On 01/13/12 16:19, Anthony Liguori wrote:
> On 01/13/2012 04:18 AM, Gerd Hoffmann wrote:
>>    Hi,
>>
>> Here comes the usb patch queue.  It features the patches posted a week
>> ago for review with some minor tweaks according to the review comments:
>> The comment in usb-audio was fixed and xhci got a codestyle cleanup.  No
>> actual code changes.  I've also included the usb-redir patches posted by
>> Hans earlier this week.
>>
> 
> cc1: warnings being treated as errors
> /home/anthony/git/qemu/hw/usb-xhci.c: In function ‘xhci_process_commands’:
> /home/anthony/git/qemu/hw/usb-xhci.c:2143:9: error: case value ‘48’ not
> in enumerated type ‘TRBType’
> /home/anthony/git/qemu/hw/usb-xhci.c:2147:9: error: case value ‘49’ not
> in enumerated type ‘TRBType’
> /home/anthony/git/qemu/hw/usb-xhci.c:2152:9: error: case value ‘50’ not
> in enumerated type ‘TRBType’
> make[1]: *** [usb-xhci.o] Error 1

Fixed & pushed to git://git.kraxel.org/qemu usb.37

diff between usb.36 and usb.37 attached for reference.

cheers,
  Gerd

diff --git a/hw/usb-xhci.c b/hw/usb-xhci.c
index 0c5007b..28fe9de 100644
--- a/hw/usb-xhci.c
+++ b/hw/usb-xhci.c
@@ -177,7 +177,11 @@ typedef enum TRBType {
     ER_DOORBELL,
     ER_HOST_CONTROLLER,
     ER_DEVICE_NOTIFICATION,
-    ER_MFINDEX_WRAP
+    ER_MFINDEX_WRAP,
+    /* vendor specific bits */
+    CR_VENDOR_VIA_CHALLENGE_RESPONSE = 48,
+    CR_VENDOR_NEC_FIRMWARE_REVISION  = 49,
+    CR_VENDOR_NEC_CHALLENGE_RESPONSE = 50,
 } TRBType;
 
 #define CR_LINK TR_LINK
@@ -2140,18 +2144,15 @@ static void xhci_process_commands(XHCIState *xhci)
         case CR_GET_PORT_BANDWIDTH:
             event.ccode = xhci_get_port_bandwidth(xhci, trb.parameter);
             break;
-        case 48:
-            /* VIA challenge response */
+        case CR_VENDOR_VIA_CHALLENGE_RESPONSE:
             xhci_via_challenge(trb.parameter);
             break;
-        case 49:
-            /* NEC get FW revision */
+        case CR_VENDOR_NEC_FIRMWARE_REVISION:
             event.type = 48; /* NEC reply */
             event.length = 0x3025;
             break;
-        case 50:
+        case CR_VENDOR_NEC_CHALLENGE_RESPONSE:
         {
-            /* NEC challenge response */
             uint32_t chi = trb.parameter >> 32;
             uint32_t clo = trb.parameter;
             uint32_t val = xhci_nec_challenge(chi, clo);

Reply via email to