rpipe 309 drivers/staging/wusbcore/wa-hc.h void __rpipe_get(struct wa_rpipe *rpipe) rpipe 311 drivers/staging/wusbcore/wa-hc.h kref_get(&rpipe->refcnt); rpipe 315 drivers/staging/wusbcore/wa-hc.h static inline void rpipe_put(struct wa_rpipe *rpipe) rpipe 317 drivers/staging/wusbcore/wa-hc.h kref_put(&rpipe->refcnt, rpipe_destroy); rpipe 325 drivers/staging/wusbcore/wa-hc.h static inline void rpipe_avail_dec(struct wa_rpipe *rpipe) rpipe 327 drivers/staging/wusbcore/wa-hc.h atomic_dec(&rpipe->segs_available); rpipe 333 drivers/staging/wusbcore/wa-hc.h static inline int rpipe_avail_inc(struct wa_rpipe *rpipe) rpipe 335 drivers/staging/wusbcore/wa-hc.h return atomic_inc_return(&rpipe->segs_available) > 0 rpipe 336 drivers/staging/wusbcore/wa-hc.h && !list_empty(&rpipe->seg_list); rpipe 126 drivers/staging/wusbcore/wa-rpipe.c static void rpipe_init(struct wa_rpipe *rpipe) rpipe 128 drivers/staging/wusbcore/wa-rpipe.c kref_init(&rpipe->refcnt); rpipe 129 drivers/staging/wusbcore/wa-rpipe.c spin_lock_init(&rpipe->seg_lock); rpipe 130 drivers/staging/wusbcore/wa-rpipe.c INIT_LIST_HEAD(&rpipe->seg_list); rpipe 131 drivers/staging/wusbcore/wa-rpipe.c INIT_LIST_HEAD(&rpipe->list_node); rpipe 158 drivers/staging/wusbcore/wa-rpipe.c struct wa_rpipe *rpipe = container_of(_rpipe, struct wa_rpipe, refcnt); rpipe 159 drivers/staging/wusbcore/wa-rpipe.c u8 index = le16_to_cpu(rpipe->descr.wRPipeIndex); rpipe 161 drivers/staging/wusbcore/wa-rpipe.c if (rpipe->ep) rpipe 162 drivers/staging/wusbcore/wa-rpipe.c rpipe->ep->hcpriv = NULL; rpipe 163 drivers/staging/wusbcore/wa-rpipe.c rpipe_put_idx(rpipe->wa, index); rpipe 164 drivers/staging/wusbcore/wa-rpipe.c wa_put(rpipe->wa); rpipe 165 drivers/staging/wusbcore/wa-rpipe.c kfree(rpipe); rpipe 184 drivers/staging/wusbcore/wa-rpipe.c struct wa_rpipe *rpipe; rpipe 187 drivers/staging/wusbcore/wa-rpipe.c rpipe = kzalloc(sizeof(*rpipe), gfp); rpipe 188 drivers/staging/wusbcore/wa-rpipe.c if (rpipe == NULL) rpipe 190 drivers/staging/wusbcore/wa-rpipe.c rpipe_init(rpipe); rpipe 197 drivers/staging/wusbcore/wa-rpipe.c result = __rpipe_get_descr(wa, &rpipe->descr, rpipe_idx); rpipe 201 drivers/staging/wusbcore/wa-rpipe.c else if ((rpipe->descr.bmCharacteristics & crs) != 0) rpipe 206 drivers/staging/wusbcore/wa-rpipe.c kfree(rpipe); rpipe 211 drivers/staging/wusbcore/wa-rpipe.c rpipe->wa = wa_get(wa); rpipe 212 drivers/staging/wusbcore/wa-rpipe.c *prpipe = rpipe; rpipe 299 drivers/staging/wusbcore/wa-rpipe.c static int rpipe_aim(struct wa_rpipe *rpipe, struct wahc *wa, rpipe 316 drivers/staging/wusbcore/wa-rpipe.c __rpipe_reset(wa, le16_to_cpu(rpipe->descr.wRPipeIndex)); rpipe 317 drivers/staging/wusbcore/wa-rpipe.c atomic_set(&rpipe->segs_available, rpipe 318 drivers/staging/wusbcore/wa-rpipe.c le16_to_cpu(rpipe->descr.wRequests)); rpipe 321 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.wBlocks = cpu_to_le16(16); /* given */ rpipe 324 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.wMaxPacketSize = epcd->wOverTheAirPacketSize; rpipe 326 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.wMaxPacketSize = ep->desc.wMaxPacketSize; rpipe 328 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.hwa_bMaxBurst = max(min_t(unsigned int, rpipe 330 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.hwa_bDeviceInfoIndex = rpipe 333 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.bSpeed = usb_pipeendpoint(urb->pipe) == 0 ? rpipe 338 drivers/staging/wusbcore/wa-rpipe.c le16_to_cpu(rpipe->descr.wRPipeIndex), rpipe 339 drivers/staging/wusbcore/wa-rpipe.c usb_pipeendpoint(urb->pipe), rpipe->descr.bSpeed); rpipe 341 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.hwa_reserved = 0; rpipe 343 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.bEndpointAddress = ep->desc.bEndpointAddress; rpipe 345 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.bDataSequence = 0; rpipe 348 drivers/staging/wusbcore/wa-rpipe.c ack_window = 0xFFFFFFFF >> (32 - rpipe->descr.hwa_bMaxBurst); rpipe 349 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.dwCurrentWindow = cpu_to_le32(ack_window); rpipe 352 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.bMaxDataSequence = epcd_max_sequence - 1; rpipe 353 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.bInterval = ep->desc.bInterval; rpipe 355 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.bOverTheAirInterval = epcd->bOverTheAirInterval; rpipe 357 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.bOverTheAirInterval = 0; /* 0 if not isoc */ rpipe 359 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.bmAttribute = (ep->desc.bmAttributes & rpipe 362 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.bmRetryOptions = (wa->wusb->retry_count & 0xF); rpipe 364 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.wNumTransactionErrors = 0; rpipe 365 drivers/staging/wusbcore/wa-rpipe.c result = __rpipe_set_descr(wa, &rpipe->descr, rpipe 366 drivers/staging/wusbcore/wa-rpipe.c le16_to_cpu(rpipe->descr.wRPipeIndex)); rpipe 382 drivers/staging/wusbcore/wa-rpipe.c static int rpipe_check_aim(const struct wa_rpipe *rpipe, const struct wahc *wa, rpipe 392 drivers/staging/wusbcore/wa-rpipe.c if (rpipe->descr.rdf != (val)) { \ rpipe 395 drivers/staging/wusbcore/wa-rpipe.c rpipe->descr.rdf, (val)); \ rpipe 428 drivers/staging/wusbcore/wa-rpipe.c struct wa_rpipe *rpipe; rpipe 432 drivers/staging/wusbcore/wa-rpipe.c rpipe = ep->hcpriv; rpipe 433 drivers/staging/wusbcore/wa-rpipe.c if (rpipe != NULL) { rpipe 435 drivers/staging/wusbcore/wa-rpipe.c result = rpipe_check_aim(rpipe, wa, ep, urb, gfp); rpipe 439 drivers/staging/wusbcore/wa-rpipe.c __rpipe_get(rpipe); rpipe 442 drivers/staging/wusbcore/wa-rpipe.c le16_to_cpu(rpipe->descr.wRPipeIndex)); rpipe 447 drivers/staging/wusbcore/wa-rpipe.c result = rpipe_get_idle(&rpipe, wa, 1 << eptype, gfp); rpipe 450 drivers/staging/wusbcore/wa-rpipe.c result = rpipe_aim(rpipe, wa, ep, urb, gfp); rpipe 452 drivers/staging/wusbcore/wa-rpipe.c rpipe_put(rpipe); rpipe 455 drivers/staging/wusbcore/wa-rpipe.c ep->hcpriv = rpipe; rpipe 456 drivers/staging/wusbcore/wa-rpipe.c rpipe->ep = ep; rpipe 457 drivers/staging/wusbcore/wa-rpipe.c __rpipe_get(rpipe); /* for caching into ep->hcpriv */ rpipe 460 drivers/staging/wusbcore/wa-rpipe.c le16_to_cpu(rpipe->descr.wRPipeIndex)); rpipe 503 drivers/staging/wusbcore/wa-rpipe.c struct wa_rpipe *rpipe; rpipe 506 drivers/staging/wusbcore/wa-rpipe.c rpipe = ep->hcpriv; rpipe 507 drivers/staging/wusbcore/wa-rpipe.c if (rpipe != NULL) { rpipe 508 drivers/staging/wusbcore/wa-rpipe.c u16 index = le16_to_cpu(rpipe->descr.wRPipeIndex); rpipe 515 drivers/staging/wusbcore/wa-rpipe.c rpipe_put(rpipe); rpipe 524 drivers/staging/wusbcore/wa-rpipe.c struct wa_rpipe *rpipe; rpipe 527 drivers/staging/wusbcore/wa-rpipe.c rpipe = ep->hcpriv; rpipe 528 drivers/staging/wusbcore/wa-rpipe.c if (rpipe != NULL) { rpipe 529 drivers/staging/wusbcore/wa-rpipe.c u16 index = le16_to_cpu(rpipe->descr.wRPipeIndex); rpipe 96 drivers/staging/wusbcore/wa-xfer.c static int __wa_xfer_delayed_run(struct wa_rpipe *rpipe, int *dto_waiting); rpipe 223 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe; rpipe 227 drivers/staging/wusbcore/wa-xfer.c rpipe = list_first_entry(&wa->rpipe_delayed_list, rpipe 229 drivers/staging/wusbcore/wa-xfer.c __wa_xfer_delayed_run(rpipe, &dto_waiting); rpipe 234 drivers/staging/wusbcore/wa-xfer.c le16_to_cpu(rpipe->descr.wRPipeIndex)); rpipe 235 drivers/staging/wusbcore/wa-xfer.c list_del_init(&rpipe->list_node); rpipe 242 drivers/staging/wusbcore/wa-xfer.c static void wa_add_delayed_rpipe(struct wahc *wa, struct wa_rpipe *rpipe) rpipe 248 drivers/staging/wusbcore/wa-xfer.c if (list_empty(&rpipe->list_node)) { rpipe 250 drivers/staging/wusbcore/wa-xfer.c __func__, le16_to_cpu(rpipe->descr.wRPipeIndex)); rpipe 251 drivers/staging/wusbcore/wa-xfer.c list_add_tail(&rpipe->list_node, &wa->rpipe_delayed_list); rpipe 449 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe = xfer->ep->hcpriv; rpipe 472 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 499 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe = xfer->ep->hcpriv; rpipe 506 drivers/staging/wusbcore/wa-xfer.c b->cmd.wRPipe = rpipe->descr.wRPipeIndex; rpipe 585 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe = xfer->ep->hcpriv; rpipe 587 drivers/staging/wusbcore/wa-xfer.c switch (rpipe->descr.bmAttribute & 0x3) { rpipe 609 drivers/staging/wusbcore/wa-xfer.c maxpktsize = le16_to_cpu(rpipe->descr.wMaxPacketSize); rpipe 610 drivers/staging/wusbcore/wa-xfer.c xfer->seg_size = le16_to_cpu(rpipe->descr.wBlocks) rpipe 623 drivers/staging/wusbcore/wa-xfer.c if ((rpipe->descr.bmAttribute & 0x3) == USB_ENDPOINT_XFER_ISOC) { rpipe 683 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe = xfer->ep->hcpriv; rpipe 689 drivers/staging/wusbcore/wa-xfer.c xfer_hdr0->wRPipe = rpipe->descr.wRPipeIndex; rpipe 738 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe; rpipe 832 drivers/staging/wusbcore/wa-xfer.c rpipe = xfer->ep->hcpriv; rpipe 841 drivers/staging/wusbcore/wa-xfer.c rpipe_ready = rpipe_avail_inc(rpipe); rpipe 852 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 875 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe; rpipe 898 drivers/staging/wusbcore/wa-xfer.c rpipe = xfer->ep->hcpriv; rpipe 910 drivers/staging/wusbcore/wa-xfer.c rpipe_ready = rpipe_avail_inc(rpipe); rpipe 918 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 948 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe; rpipe 973 drivers/staging/wusbcore/wa-xfer.c rpipe = xfer->ep->hcpriv; rpipe 988 drivers/staging/wusbcore/wa-xfer.c rpipe_ready = rpipe_avail_inc(rpipe); rpipe 994 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 1376 drivers/staging/wusbcore/wa-xfer.c static int __wa_seg_submit(struct wa_rpipe *rpipe, struct wa_xfer *xfer, rpipe 1430 drivers/staging/wusbcore/wa-xfer.c rpipe_avail_dec(rpipe); rpipe 1451 drivers/staging/wusbcore/wa-xfer.c static int __wa_xfer_delayed_run(struct wa_rpipe *rpipe, int *dto_waiting) rpipe 1454 drivers/staging/wusbcore/wa-xfer.c struct device *dev = &rpipe->wa->usb_iface->dev; rpipe 1461 drivers/staging/wusbcore/wa-xfer.c spin_lock_irqsave(&rpipe->seg_lock, flags); rpipe 1462 drivers/staging/wusbcore/wa-xfer.c while (atomic_read(&rpipe->segs_available) > 0 rpipe 1463 drivers/staging/wusbcore/wa-xfer.c && !list_empty(&rpipe->seg_list) rpipe 1464 drivers/staging/wusbcore/wa-xfer.c && (dto_acquired = __wa_dto_try_get(rpipe->wa))) { rpipe 1465 drivers/staging/wusbcore/wa-xfer.c seg = list_first_entry(&(rpipe->seg_list), struct wa_seg, rpipe 1475 drivers/staging/wusbcore/wa-xfer.c result = __wa_seg_submit(rpipe, xfer, seg, &dto_done); rpipe 1478 drivers/staging/wusbcore/wa-xfer.c __wa_dto_put(rpipe->wa); rpipe 1481 drivers/staging/wusbcore/wa-xfer.c atomic_read(&rpipe->segs_available), result); rpipe 1485 drivers/staging/wusbcore/wa-xfer.c spin_unlock_irqrestore(&rpipe->seg_lock, flags); rpipe 1497 drivers/staging/wusbcore/wa-xfer.c spin_lock_irqsave(&rpipe->seg_lock, flags); rpipe 1505 drivers/staging/wusbcore/wa-xfer.c if (!dto_acquired && !list_empty(&rpipe->seg_list) rpipe 1506 drivers/staging/wusbcore/wa-xfer.c && (atomic_read(&rpipe->segs_available) == rpipe 1507 drivers/staging/wusbcore/wa-xfer.c le16_to_cpu(rpipe->descr.wRequests))) rpipe 1510 drivers/staging/wusbcore/wa-xfer.c spin_unlock_irqrestore(&rpipe->seg_lock, flags); rpipe 1515 drivers/staging/wusbcore/wa-xfer.c static void wa_xfer_delayed_run(struct wa_rpipe *rpipe) rpipe 1518 drivers/staging/wusbcore/wa-xfer.c int dto_done = __wa_xfer_delayed_run(rpipe, &dto_waiting); rpipe 1529 drivers/staging/wusbcore/wa-xfer.c wa_add_delayed_rpipe(rpipe->wa, rpipe); rpipe 1531 drivers/staging/wusbcore/wa-xfer.c wa_check_for_delayed_rpipes(rpipe->wa); rpipe 1549 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe = xfer->ep->hcpriv; rpipe 1550 drivers/staging/wusbcore/wa-xfer.c size_t maxrequests = le16_to_cpu(rpipe->descr.wRequests); rpipe 1558 drivers/staging/wusbcore/wa-xfer.c BUG_ON(atomic_read(&rpipe->segs_available) > maxrequests); rpipe 1560 drivers/staging/wusbcore/wa-xfer.c spin_lock_irqsave(&rpipe->seg_lock, flags); rpipe 1564 drivers/staging/wusbcore/wa-xfer.c available = atomic_read(&rpipe->segs_available); rpipe 1565 drivers/staging/wusbcore/wa-xfer.c empty = list_empty(&rpipe->seg_list); rpipe 1572 drivers/staging/wusbcore/wa-xfer.c dto_acquired = __wa_dto_try_get(rpipe->wa); rpipe 1575 drivers/staging/wusbcore/wa-xfer.c result = __wa_seg_submit(rpipe, xfer, seg, rpipe 1581 drivers/staging/wusbcore/wa-xfer.c __wa_dto_put(rpipe->wa); rpipe 1594 drivers/staging/wusbcore/wa-xfer.c list_add_tail(&seg->list_node, &rpipe->seg_list); rpipe 1603 drivers/staging/wusbcore/wa-xfer.c if (!dto_acquired && !list_empty(&rpipe->seg_list) rpipe 1604 drivers/staging/wusbcore/wa-xfer.c && (atomic_read(&rpipe->segs_available) == rpipe 1605 drivers/staging/wusbcore/wa-xfer.c le16_to_cpu(rpipe->descr.wRequests))) rpipe 1607 drivers/staging/wusbcore/wa-xfer.c spin_unlock_irqrestore(&rpipe->seg_lock, flags); rpipe 1610 drivers/staging/wusbcore/wa-xfer.c wa_add_delayed_rpipe(rpipe->wa, rpipe); rpipe 1612 drivers/staging/wusbcore/wa-xfer.c wa_check_for_delayed_rpipes(rpipe->wa); rpipe 1789 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe; rpipe 1793 drivers/staging/wusbcore/wa-xfer.c rpipe = ep->hcpriv; rpipe 1803 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 1924 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe; rpipe 1948 drivers/staging/wusbcore/wa-xfer.c rpipe = xfer->ep->hcpriv; rpipe 1949 drivers/staging/wusbcore/wa-xfer.c if (rpipe == NULL) { rpipe 1979 drivers/staging/wusbcore/wa-xfer.c spin_lock(&rpipe->seg_lock); rpipe 2033 drivers/staging/wusbcore/wa-xfer.c rpipe_ready = rpipe_avail_inc(rpipe); rpipe 2039 drivers/staging/wusbcore/wa-xfer.c spin_unlock(&rpipe->seg_lock); rpipe 2046 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 2129 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe = xfer->ep->hcpriv; rpipe 2140 drivers/staging/wusbcore/wa-xfer.c rpipe_avail_inc(rpipe); rpipe 2284 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe; rpipe 2296 drivers/staging/wusbcore/wa-xfer.c rpipe = xfer->ep->hcpriv; rpipe 2353 drivers/staging/wusbcore/wa-xfer.c rpipe_ready = rpipe_avail_inc(rpipe); rpipe 2360 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 2380 drivers/staging/wusbcore/wa-xfer.c rpipe_ready = rpipe_avail_inc(rpipe); rpipe 2403 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 2438 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe; rpipe 2462 drivers/staging/wusbcore/wa-xfer.c rpipe = xfer->ep->hcpriv; rpipe 2550 drivers/staging/wusbcore/wa-xfer.c rpipe_ready = rpipe_avail_inc(rpipe); rpipe 2561 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 2588 drivers/staging/wusbcore/wa-xfer.c struct wa_rpipe *rpipe; rpipe 2603 drivers/staging/wusbcore/wa-xfer.c rpipe = xfer->ep->hcpriv; rpipe 2665 drivers/staging/wusbcore/wa-xfer.c rpipe_ready = rpipe_avail_inc(rpipe); rpipe 2673 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe); rpipe 2697 drivers/staging/wusbcore/wa-xfer.c rpipe_ready = rpipe_avail_inc(rpipe); rpipe 2707 drivers/staging/wusbcore/wa-xfer.c wa_xfer_delayed_run(rpipe);