USB: UHCI: acquire spinlock before calling start_rh()
[platform/adaptation/renesas_rcar/renesas_kernel.git] / drivers / usb / host / uhci-q.c
index 64e57bf..d3ade40 100644 (file)
@@ -565,7 +565,7 @@ static void uhci_unlink_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
        qh->unlink_frame = uhci->frame_number;
 
        /* Force an interrupt so we know when the QH is fully unlinked */
-       if (list_empty(&uhci->skel_unlink_qh->node))
+       if (list_empty(&uhci->skel_unlink_qh->node) || uhci->is_stopped)
                uhci_set_next_interrupt(uhci);
 
        /* Move the QH from its old list to the end of the unlinking list */
@@ -1422,7 +1422,6 @@ static int uhci_urb_enqueue(struct usb_hcd *hcd,
                goto err_submit_failed;
 
        /* Add this URB to the QH */
-       urbp->qh = qh;
        list_add_tail(&urbp->node, &qh->queue);
 
        /* If the new URB is the first and only one on this QH then either
@@ -1668,7 +1667,7 @@ static int uhci_advance_check(struct uhci_hcd *uhci, struct uhci_qh *qh)
                        qh->advance_jiffies = jiffies;
                        goto done;
                }
-               ret = 0;
+               ret = uhci->is_stopped;
        }
 
        /* The queue hasn't advanced; check for timeout */