Showing error 1220

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: drivers/usb/host/ohci-hcd.c
Line in file: 825
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

 795
 796        if (ints & OHCI_INTR_RHSC) {
 797                ohci_vdbg(ohci, "rhsc\n");
 798                ohci->next_statechange = jiffies + STATECHANGE_DELAY;
 799                ohci_writel(ohci, OHCI_INTR_RD | OHCI_INTR_RHSC,
 800                                &regs->intrstatus);
 801
 802                /* NOTE: Vendors didn't always make the same implementation
 803                 * choices for RHSC.  Many followed the spec; RHSC triggers
 804                 * on an edge, like setting and maybe clearing a port status
 805                 * change bit.  With others it's level-triggered, active
 806                 * until khubd clears all the port status change bits.  We'll
 807                 * always disable it here and rely on polling until khubd
 808                 * re-enables it.
 809                 */
 810                ohci_writel(ohci, OHCI_INTR_RHSC, &regs->intrdisable);
 811                usb_hcd_poll_rh_status(hcd);
 812        }
 813
 814        /* For connect and disconnect events, we expect the controller
 815         * to turn on RHSC along with RD.  But for remote wakeup events
 816         * this might not happen.
 817         */
 818        else if (ints & OHCI_INTR_RD) {
 819                ohci_vdbg(ohci, "resume detect\n");
 820                ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus);
 821                hcd->poll_rh = 1;
 822                if (ohci->autostop) {
 823                        spin_lock (&ohci->lock);
 824                        ohci_rh_resume (ohci);
 825                        spin_unlock (&ohci->lock);
 826                } else
 827                        usb_hcd_resume_root_hub(hcd);
 828        }
 829
 830        if (ints & OHCI_INTR_WDH) {
 831                spin_lock (&ohci->lock);
 832                dl_done_list (ohci);
 833                spin_unlock (&ohci->lock);
 834        }
 835
Show full sources