• Home
  • Raw
  • Download

Lines Matching refs:urb

133 	struct urb *urb;  in carl9170_usb_submit_data_urb()  local
139 urb = usb_get_from_anchor(&ar->tx_wait); in carl9170_usb_submit_data_urb()
140 if (!urb) in carl9170_usb_submit_data_urb()
143 usb_anchor_urb(urb, &ar->tx_anch); in carl9170_usb_submit_data_urb()
145 err = usb_submit_urb(urb, GFP_ATOMIC); in carl9170_usb_submit_data_urb()
149 urb->status); in carl9170_usb_submit_data_urb()
152 usb_unanchor_urb(urb); in carl9170_usb_submit_data_urb()
153 usb_anchor_urb(urb, &ar->tx_err); in carl9170_usb_submit_data_urb()
156 usb_free_urb(urb); in carl9170_usb_submit_data_urb()
165 static void carl9170_usb_tx_data_complete(struct urb *urb) in carl9170_usb_tx_data_complete() argument
167 struct ar9170 *ar = usb_get_intfdata(usb_ifnum_to_if(urb->dev, 0)); in carl9170_usb_tx_data_complete()
170 dev_kfree_skb_irq(urb->context); in carl9170_usb_tx_data_complete()
176 switch (urb->status) { in carl9170_usb_tx_data_complete()
179 carl9170_tx_callback(ar, (void *)urb->context); in carl9170_usb_tx_data_complete()
192 usb_anchor_urb(urb, &ar->tx_err); in carl9170_usb_tx_data_complete()
199 urb->status); in carl9170_usb_tx_data_complete()
202 usb_anchor_urb(urb, &ar->tx_err); in carl9170_usb_tx_data_complete()
212 struct urb *urb; in carl9170_usb_submit_cmd_urb() local
220 urb = usb_get_from_anchor(&ar->tx_cmd); in carl9170_usb_submit_cmd_urb()
221 if (!urb) { in carl9170_usb_submit_cmd_urb()
226 usb_anchor_urb(urb, &ar->tx_anch); in carl9170_usb_submit_cmd_urb()
227 err = usb_submit_urb(urb, GFP_ATOMIC); in carl9170_usb_submit_cmd_urb()
229 usb_unanchor_urb(urb); in carl9170_usb_submit_cmd_urb()
232 usb_free_urb(urb); in carl9170_usb_submit_cmd_urb()
237 static void carl9170_usb_cmd_complete(struct urb *urb) in carl9170_usb_cmd_complete() argument
239 struct ar9170 *ar = urb->context; in carl9170_usb_cmd_complete()
247 switch (urb->status) { in carl9170_usb_cmd_complete()
260 err = urb->status; in carl9170_usb_cmd_complete()
275 static void carl9170_usb_rx_irq_complete(struct urb *urb) in carl9170_usb_rx_irq_complete() argument
277 struct ar9170 *ar = urb->context; in carl9170_usb_rx_irq_complete()
282 switch (urb->status) { in carl9170_usb_rx_irq_complete()
305 carl9170_handle_command_response(ar, urb->transfer_buffer, in carl9170_usb_rx_irq_complete()
306 urb->actual_length); in carl9170_usb_rx_irq_complete()
309 usb_anchor_urb(urb, &ar->rx_anch); in carl9170_usb_rx_irq_complete()
310 if (unlikely(usb_submit_urb(urb, GFP_ATOMIC))) in carl9170_usb_rx_irq_complete()
311 usb_unanchor_urb(urb); in carl9170_usb_rx_irq_complete()
316 struct urb *urb; in carl9170_usb_submit_rx_urb() local
322 urb = usb_get_from_anchor(&ar->rx_pool); in carl9170_usb_submit_rx_urb()
323 if (urb) { in carl9170_usb_submit_rx_urb()
324 usb_anchor_urb(urb, &ar->rx_anch); in carl9170_usb_submit_rx_urb()
325 err = usb_submit_urb(urb, gfp); in carl9170_usb_submit_rx_urb()
327 usb_unanchor_urb(urb); in carl9170_usb_submit_rx_urb()
328 usb_anchor_urb(urb, &ar->rx_pool); in carl9170_usb_submit_rx_urb()
333 usb_free_urb(urb); in carl9170_usb_submit_rx_urb()
342 struct urb *urb; in carl9170_usb_rx_work() local
346 urb = usb_get_from_anchor(&ar->rx_work); in carl9170_usb_rx_work()
347 if (!urb) in carl9170_usb_rx_work()
352 carl9170_rx(ar, urb->transfer_buffer, in carl9170_usb_rx_work()
353 urb->actual_length); in carl9170_usb_rx_work()
356 usb_anchor_urb(urb, &ar->rx_pool); in carl9170_usb_rx_work()
359 usb_free_urb(urb); in carl9170_usb_rx_work()
367 struct urb *urb; in carl9170_usb_handle_tx_err() local
369 while ((urb = usb_get_from_anchor(&ar->tx_err))) { in carl9170_usb_handle_tx_err()
370 struct sk_buff *skb = (void *)urb->context; in carl9170_usb_handle_tx_err()
374 usb_free_urb(urb); in carl9170_usb_handle_tx_err()
396 static void carl9170_usb_rx_complete(struct urb *urb) in carl9170_usb_rx_complete() argument
398 struct ar9170 *ar = (struct ar9170 *)urb->context; in carl9170_usb_rx_complete()
406 switch (urb->status) { in carl9170_usb_rx_complete()
409 usb_anchor_urb(urb, &ar->rx_work); in carl9170_usb_rx_complete()
422 usb_anchor_urb(urb, &ar->rx_pool); in carl9170_usb_rx_complete()
457 static struct urb *carl9170_usb_alloc_rx_urb(struct ar9170 *ar, gfp_t gfp) in carl9170_usb_alloc_rx_urb()
459 struct urb *urb; in carl9170_usb_alloc_rx_urb() local
466 urb = usb_alloc_urb(0, gfp); in carl9170_usb_alloc_rx_urb()
467 if (!urb) { in carl9170_usb_alloc_rx_urb()
472 usb_fill_bulk_urb(urb, ar->udev, usb_rcvbulkpipe(ar->udev, in carl9170_usb_alloc_rx_urb()
476 urb->transfer_flags |= URB_FREE_BUFFER; in carl9170_usb_alloc_rx_urb()
478 return urb; in carl9170_usb_alloc_rx_urb()
483 struct urb *urb = NULL; in carl9170_usb_send_rx_irq_urb() local
487 urb = usb_alloc_urb(0, GFP_KERNEL); in carl9170_usb_send_rx_irq_urb()
488 if (!urb) in carl9170_usb_send_rx_irq_urb()
495 usb_fill_int_urb(urb, ar->udev, usb_rcvintpipe(ar->udev, in carl9170_usb_send_rx_irq_urb()
499 urb->transfer_flags |= URB_FREE_BUFFER; in carl9170_usb_send_rx_irq_urb()
501 usb_anchor_urb(urb, &ar->rx_anch); in carl9170_usb_send_rx_irq_urb()
502 err = usb_submit_urb(urb, GFP_KERNEL); in carl9170_usb_send_rx_irq_urb()
504 usb_unanchor_urb(urb); in carl9170_usb_send_rx_irq_urb()
507 usb_free_urb(urb); in carl9170_usb_send_rx_irq_urb()
513 struct urb *urb; in carl9170_usb_init_rx_bulk_urbs() local
527 urb = carl9170_usb_alloc_rx_urb(ar, GFP_KERNEL); in carl9170_usb_init_rx_bulk_urbs()
528 if (!urb) { in carl9170_usb_init_rx_bulk_urbs()
533 usb_anchor_urb(urb, &ar->rx_pool); in carl9170_usb_init_rx_bulk_urbs()
535 usb_free_urb(urb); in carl9170_usb_init_rx_bulk_urbs()
556 struct urb *urb; in carl9170_usb_flush() local
559 while ((urb = usb_get_from_anchor(&ar->tx_wait))) { in carl9170_usb_flush()
560 struct sk_buff *skb = (void *)urb->context; in carl9170_usb_flush()
563 usb_free_urb(urb); in carl9170_usb_flush()
605 struct urb *urb; in __carl9170_exec_cmd() local
618 urb = usb_alloc_urb(0, GFP_ATOMIC); in __carl9170_exec_cmd()
619 if (!urb) { in __carl9170_exec_cmd()
625 usb_fill_bulk_urb(urb, ar->udev, in __carl9170_exec_cmd()
630 usb_fill_int_urb(urb, ar->udev, in __carl9170_exec_cmd()
636 urb->transfer_flags |= URB_FREE_BUFFER; in __carl9170_exec_cmd()
638 usb_anchor_urb(urb, &ar->tx_cmd); in __carl9170_exec_cmd()
639 usb_free_urb(urb); in __carl9170_exec_cmd()
715 struct urb *urb; in carl9170_usb_tx() local
723 urb = usb_alloc_urb(0, GFP_ATOMIC); in carl9170_usb_tx()
724 if (!urb) in carl9170_usb_tx()
739 usb_fill_bulk_urb(urb, ar->udev, usb_sndbulkpipe(ar->udev, in carl9170_usb_tx()
743 urb->transfer_flags |= URB_ZERO_PACKET; in carl9170_usb_tx()
745 usb_anchor_urb(urb, &ar->tx_wait); in carl9170_usb_tx()
747 usb_free_urb(urb); in carl9170_usb_tx()