Loading hw/usb/dev-hub.c +5 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ typedef struct USBHubPort { USBPort port; uint16_t wPortStatus; uint16_t wPortChange; uint16_t wPortChange_reported; } USBHubPort; typedef struct USBHubState { Loading Loading @@ -467,9 +468,12 @@ static void usb_hub_handle_data(USBDevice *dev, USBPacket *p) status = 0; for(i = 0; i < NUM_PORTS; i++) { port = &s->ports[i]; if (port->wPortChange) if (port->wPortChange && port->wPortChange_reported != port->wPortChange) { status |= (1 << (i + 1)); } port->wPortChange_reported = port->wPortChange; } if (status != 0) { for(i = 0; i < n; i++) { buf[i] = status >> (8 * i); Loading Loading
hw/usb/dev-hub.c +5 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ typedef struct USBHubPort { USBPort port; uint16_t wPortStatus; uint16_t wPortChange; uint16_t wPortChange_reported; } USBHubPort; typedef struct USBHubState { Loading Loading @@ -467,9 +468,12 @@ static void usb_hub_handle_data(USBDevice *dev, USBPacket *p) status = 0; for(i = 0; i < NUM_PORTS; i++) { port = &s->ports[i]; if (port->wPortChange) if (port->wPortChange && port->wPortChange_reported != port->wPortChange) { status |= (1 << (i + 1)); } port->wPortChange_reported = port->wPortChange; } if (status != 0) { for(i = 0; i < n; i++) { buf[i] = status >> (8 * i); Loading