Showing error 557

User: Jiri Slaby
Error type: Calling function from invalid context
Error type description: Some function is called at inappropriate place like sleep inside critical sections or interrupt handlers
File location: drivers/usb/host/ohci-hub.c
Line in file: 194
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:19:02 UTC


Source:

164                                autostopped ? "auto-" : "");
165                break;
166        case OHCI_USB_OPER:
167                /* this can happen after resuming a swsusp snapshot */
168                ohci_dbg (ohci, "snapshot resume? reinit\n");
169                status = -EBUSY;
170                break;
171        default:                /* RESET, we lost power */
172                ohci_dbg (ohci, "lost power\n");
173                status = -EBUSY;
174        }
175        if (status == -EBUSY) {
176                if (!autostopped) {
177                        spin_unlock_irq (&ohci->lock);
178                        (void) ohci_init (ohci);
179                        status = ohci_restart (ohci);
180
181                        usb_root_hub_lost_power(hcd->self.root_hub);
182
183                        spin_lock_irq (&ohci->lock);
184                }
185                return status;
186        }
187        if (status != -EINPROGRESS)
188                return status;
189        if (autostopped)
190                goto skip_resume;
191        spin_unlock_irq (&ohci->lock);
192
193        /* Some controllers (lucent erratum) need extra-long delays */
194        msleep (20 /* usb 11.5.1.10 */ + 12 /* 32 msec counter */ + 1);
195
196        temp = ohci_readl (ohci, &ohci->regs->control);
197        temp &= OHCI_CTRL_HCFS;
198        if (temp != OHCI_USB_RESUME) {
199                ohci_err (ohci, "controller won't resume\n");
200                spin_lock_irq(&ohci->lock);
201                return -EBUSY;
202        }
203
204        /* disable old schedule state, reinit from scratch */
Show full sources