Revision fbf9db64 hw/usb-ehci.c

b/hw/usb-ehci.c
863 863

  
864 864
    if (!(val & PORTSC_PRESET) &&(*portsc & PORTSC_PRESET)) {
865 865
        trace_usb_ehci_port_reset(port, 0);
866
        usb_attach(&s->ports[port], dev);
867

  
868
        // TODO how to handle reset of ports with no device
869 866
        if (dev) {
867
            usb_attach(&s->ports[port], dev);
870 868
            usb_send_msg(dev, USB_MSG_RESET);
871
        }
872

  
873
        if (s->ports[port].dev) {
874 869
            *portsc &= ~PORTSC_CSC;
875 870
        }
876 871

  

Also available in: Unified diff