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

Re: [Xen-devel] [PATCH 2/4] usb: Introduce Xen pvUSB frontend



On Thu, 2015-02-26 at 14:35 +0100, Juergen Gross wrote:
> +
> +               /* reset completion */
> +               if ((info->ports[wIndex].status &
> USB_PORT_STAT_RESET) != 0 &&
> +                   time_after_eq(jiffies,
> info->ports[wIndex].timeout)) {
> +                       info->ports[wIndex].status |=
> +                               USB_PORT_STAT_C_RESET << 16;
> +                       info->ports[wIndex].status &=
> ~USB_PORT_STAT_RESET;
> +
> +                       if (info->devices[wIndex].status !=
> +                           USB_STATE_NOTATTACHED) {
> +                               info->ports[wIndex].status |=
> +                                       USB_PORT_STAT_ENABLE;
> +                               info->devices[wIndex].status =
> +                                       USB_STATE_DEFAULT;
> +                       }
> +
> +                       switch (info->devices[wIndex].speed) {
> +                       case USB_SPEED_LOW:
> +                               info->ports[wIndex].status |=
> +                                       USB_PORT_STAT_LOW_SPEED;
> +                               break;
> +                       case USB_SPEED_HIGH:
> +                               info->ports[wIndex].status |=
> +                                       USB_PORT_STAT_HIGH_SPEED;
> +                               break;
> +                       default:
> +                               break;
> +                       }
> +               }
> +
> +               ((u16 *)buf)[0] =
> cpu_to_le16(info->ports[wIndex].status);
> +               ((u16 *)buf)[1] =
> cpu_to_le16(info->ports[wIndex].status >> 16);

Why in two chunks?
        Regards
                Oliver
> +               break;


-- 
Oliver Neukum <oneukum@xxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.