Lines Matching refs:ev

150 	 * + FFS_NO_SETUP       -> FFS_SETUP_PENDING  -- P: ev.waitq.lock
152 * + FFS_SETUP_PENDING -> FFS_NO_SETUP -- P: ev.waitq.lock
154 * + FFS_SETUP_PENDING -> FFS_SETUP_CANCELED -- P: ev.waitq.lock
172 } ev; /* the whole structure, P: ev.waitq.lock */
356 req->zero = len < le16_to_cpu(ffs->ev.setup.wLength);
358 spin_unlock_irq(&ffs->ev.waitq.lock);
389 if (ffs->ev.can_stall) {
475 spin_lock_irq(&ffs->ev.waitq.lock);
490 if (!(ffs->ev.setup.bRequestType & USB_DIR_IN)) {
491 spin_unlock_irq(&ffs->ev.waitq.lock);
497 len = min(len, (size_t)le16_to_cpu(ffs->ev.setup.wLength));
499 spin_unlock_irq(&ffs->ev.waitq.lock);
507 spin_lock_irq(&ffs->ev.waitq.lock);
524 spin_unlock_irq(&ffs->ev.waitq.lock);
545 * We are holding ffs->ev.waitq.lock and ffs->mutex and we need
554 events[i].type = ffs->ev.types[i];
556 events[i].u.setup = ffs->ev.setup;
561 if (n < ffs->ev.count) {
562 ffs->ev.count -= n;
563 memmove(ffs->ev.types, ffs->ev.types + n,
564 ffs->ev.count * sizeof *ffs->ev.types);
566 ffs->ev.count = 0;
569 spin_unlock_irq(&ffs->ev.waitq.lock);
605 spin_lock_irq(&ffs->ev.waitq.lock);
619 if ((file->f_flags & O_NONBLOCK) && !ffs->ev.count) {
624 if (wait_event_interruptible_exclusive_locked_irq(ffs->ev.waitq,
625 ffs->ev.count)) {
631 min(n, (size_t)ffs->ev.count));
634 if (ffs->ev.setup.bRequestType & USB_DIR_IN) {
635 spin_unlock_irq(&ffs->ev.waitq.lock);
640 len = min(len, (size_t)le16_to_cpu(ffs->ev.setup.wLength));
642 spin_unlock_irq(&ffs->ev.waitq.lock);
652 spin_lock_irq(&ffs->ev.waitq.lock);
671 spin_unlock_irq(&ffs->ev.waitq.lock);
1257 BUG_ON(waitqueue_active(&ffs->ev.waitq) ||
1288 init_waitqueue_head(&ffs->ev.waitq);
1292 ffs->ev.can_stall = 1;
1334 ffs->ev.count = 0;
1999 u8 *ev = ffs->ev.types, *out = ev;
2000 unsigned n = ffs->ev.count;
2001 for (; n; --n, ++ev)
2002 if ((*ev == rem_type1 || *ev == rem_type2) == neg)
2003 *out++ = *ev;
2005 pr_vdebug("purging event %d\n", *ev);
2006 ffs->ev.count = out - ffs->ev.types;
2010 ffs->ev.types[ffs->ev.count++] = type;
2011 wake_up_locked(&ffs->ev.waitq);
2018 spin_lock_irqsave(&ffs->ev.waitq.lock, flags);
2020 spin_unlock_irqrestore(&ffs->ev.waitq.lock, flags);
2342 spin_lock_irqsave(&ffs->ev.waitq.lock, flags);
2343 ffs->ev.setup = *creq;
2344 ffs->ev.setup.wIndex = cpu_to_le16(ret);
2346 spin_unlock_irqrestore(&ffs->ev.waitq.lock, flags);