lo. The bug with the usb hub is a simple fix. We're simply using handle_packet to pass USB_MSG_RESET when this should be passed to handle_msg:

hw/usb-hub.c - line 388:

           case PORT_RESET:
               if (dev) {
                   dev->handle_packet(dev,
                                      USB_MSG_RESET, 0, 0, NULL, 0);
                   port->wPortChange |= PORT_STAT_C_RESET;

The simple fix is to change the function call to dev->handle_msg(dev, USB_MSG_RESET) so that the state machine is correctly set up.

I'm going to go over the port status bits with a fine comb to make sure everything is looking good.

It also looks like we'll need to be able to propogate resume signal from usb_hub_attach to the uhci controller. This means putting the resume code in uhci_attach:

   // wakeup the controller if suspended
   if (s->cmd & UHCI_CMD_EGSM) {
       s->cmd |= UHCI_CMD_FGR;
       s->status |= UHCI_STS_RD;
       uhci_update_irq(s);
   }

into a static function inside usb-uhci.c and then setting up a way of calling this when the controller needs to be resumed. If a device is set for remote_wakeup then it can call this function to resume the bus if necessary.




_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to