On 10/07/2013 06:52 PM, Xenia Ragiadakou wrote:
[snip]
+static int xhci_reset_ep0(struct xhci_hcd *xhci, struct usb_device *udev,
+ struct usb_host_endpoint *ep)
+{
+ struct xhci_virt_device *vdev;
+ struct xhci_input_control_ctx *ctrl_ctx;
+ struct xhci_slot_ctx *slot_ctx_out;
+ int ret;
+
+ vdev = xhci->devs[udev->slot_id];
+
+ /* reinitialize endpoint's ring and setup its input context based
+ * on its descriptors */
+ if (xhci_endpoint_init(xhci, vdev, udev, ep, GFP_NOIO) < 0) {
+ xhci_dbg_trace(xhci, trace_xhci_dbg_reset_ep,
+ "%s: failed to initialize ep 0", __func__);
+ return -ENOMEM;
+ }
+
+ /* issue an evaluate context command */
+ ctrl_ctx = xhci_get_input_control_ctx(xhci, vdev->in_ctx);
+ if (!ctrl_ctx) {
+ xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
+ __func__);
+
+ return -EINVAL;
+ }
+ ctrl_ctx->add_flags = cpu_to_le32(EP0_FLAG | SLOT_FLAG);
+ ctrl_ctx->drop_flags = 0;
+
Now, i see that here i should have not set the slot flag in the control
context's added flags because that will make xHC to update also the
slot's parameters (e.g max exit latency) which is not necessary.
Before i fix this I will wait for some other reviews.
By the way, that patch should have been sent as RFC in first place, but
i forgot to set appropriately the subject prefix :(
regards,
ksenia
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html