qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Large USB patch


From: Lonnie Mendez
Subject: Re: [Qemu-devel] Large USB patch
Date: Fri, 28 Apr 2006 20:03:35 -0500
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]