/drivers/usb/core/ |
D | urb.c | 11 #define to_urb(d) container_of(d, struct urb, kref) 16 struct urb *urb = to_urb(kref); in urb_destroy() local 18 if (urb->transfer_flags & URB_FREE_BUFFER) in urb_destroy() 19 kfree(urb->transfer_buffer); in urb_destroy() 21 kfree(urb); in urb_destroy() 38 void usb_init_urb(struct urb *urb) in usb_init_urb() argument 40 if (urb) { in usb_init_urb() 41 memset(urb, 0, sizeof(*urb)); in usb_init_urb() 42 kref_init(&urb->kref); in usb_init_urb() 43 INIT_LIST_HEAD(&urb->anchor_list); in usb_init_urb() [all …]
|
D | hcd.c | 486 static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) in rh_call_control() argument 490 u8 *ubuf = urb->transfer_buffer; in rh_call_control() 502 status = usb_hcd_link_urb_to_ep(hcd, urb); in rh_call_control() 506 urb->hcpriv = hcd; /* Indicate it's queued */ in rh_call_control() 508 cmd = (struct usb_ctrlrequest *) urb->setup_packet; in rh_call_control() 514 if (wLength > urb->transfer_buffer_length) in rh_call_control() 531 urb->actual_length = 0; in rh_call_control() 628 urb->actual_length = rh_string(wValue & 0xff, in rh_call_control() 717 if (urb->transfer_buffer_length < len) in rh_call_control() 718 len = urb->transfer_buffer_length; in rh_call_control() [all …]
|
/drivers/isdn/hisax/ |
D | st5481_usb.c | 18 static int st5481_isoc_flatten(struct urb *urb); 28 static void usb_next_ctrl_msg(struct urb *urb, in usb_next_ctrl_msg() argument 42 urb->setup_packet = in usb_next_ctrl_msg() 46 ((struct ctrl_msg *)urb->setup_packet)->dr.bRequest, in usb_next_ctrl_msg() 47 ((struct ctrl_msg *)urb->setup_packet)->dr.wValue, in usb_next_ctrl_msg() 48 ((struct ctrl_msg *)urb->setup_packet)->dr.wIndex); in usb_next_ctrl_msg() 51 urb->dev = adapter->usb_dev; in usb_next_ctrl_msg() 53 SUBMIT_URB(urb, GFP_ATOMIC); in usb_next_ctrl_msg() 82 usb_next_ctrl_msg(ctrl->urb, adapter); in usb_ctrl_msg() 128 static void usb_ctrl_complete(struct urb *urb) in usb_ctrl_complete() argument [all …]
|
/drivers/usb/c67x00/ |
D | c67x00-sched.c | 76 struct urb *urb; member 89 struct urb *urb; member 155 dev_dbg(dev, "urb: 0x%p\n", td->urb); in dbg_td() 212 static void c67x00_release_urb(struct c67x00_hcd *c67x00, struct urb *urb) in c67x00_release_urb() argument 217 BUG_ON(!urb); in c67x00_release_urb() 221 if (usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS) { in c67x00_release_urb() 233 if (urb == td->urb) in c67x00_release_urb() 234 td->urb = NULL; in c67x00_release_urb() 236 urbp = urb->hcpriv; in c67x00_release_urb() 237 urb->hcpriv = NULL; in c67x00_release_urb() [all …]
|
/drivers/usb/usbip/ |
D | stub_rx.c | 28 static int is_clear_halt_cmd(struct urb *urb) in is_clear_halt_cmd() argument 32 req = (struct usb_ctrlrequest *) urb->setup_packet; in is_clear_halt_cmd() 39 static int is_set_interface_cmd(struct urb *urb) in is_set_interface_cmd() argument 43 req = (struct usb_ctrlrequest *) urb->setup_packet; in is_set_interface_cmd() 49 static int is_set_configuration_cmd(struct urb *urb) in is_set_configuration_cmd() argument 53 req = (struct usb_ctrlrequest *) urb->setup_packet; in is_set_configuration_cmd() 59 static int is_reset_device_cmd(struct urb *urb) in is_reset_device_cmd() argument 65 req = (struct usb_ctrlrequest *) urb->setup_packet; in is_reset_device_cmd() 78 static int tweak_clear_halt_cmd(struct urb *urb) in tweak_clear_halt_cmd() argument 86 req = (struct usb_ctrlrequest *) urb->setup_packet; in tweak_clear_halt_cmd() [all …]
|
D | stub_tx.c | 28 struct urb *urb = priv->urb; in stub_free_priv_and_urb() local 30 kfree(urb->setup_packet); in stub_free_priv_and_urb() 31 urb->setup_packet = NULL; in stub_free_priv_and_urb() 33 kfree(urb->transfer_buffer); in stub_free_priv_and_urb() 34 urb->transfer_buffer = NULL; in stub_free_priv_and_urb() 38 usb_free_urb(urb); in stub_free_priv_and_urb() 68 void stub_complete(struct urb *urb) in stub_complete() argument 70 struct stub_priv *priv = (struct stub_priv *) urb->context; in stub_complete() 74 usbip_dbg_stub_tx("complete! status %d\n", urb->status); in stub_complete() 76 switch (urb->status) { in stub_complete() [all …]
|
D | usbip_common.c | 234 void usbip_dump_urb(struct urb *urb) in usbip_dump_urb() argument 238 if (!urb) { in usbip_dump_urb() 243 if (!urb->dev) { in usbip_dump_urb() 248 dev = &urb->dev->dev; in usbip_dump_urb() 250 usbip_dump_usb_device(urb->dev); in usbip_dump_urb() 252 dev_dbg(dev, " pipe :%08x ", urb->pipe); in usbip_dump_urb() 254 usbip_dump_pipe(urb->pipe); in usbip_dump_urb() 256 dev_dbg(dev, " status :%d\n", urb->status); in usbip_dump_urb() 257 dev_dbg(dev, " transfer_flags :%08X\n", urb->transfer_flags); in usbip_dump_urb() 259 urb->transfer_buffer_length); in usbip_dump_urb() [all …]
|
D | vhci_rx.c | 27 struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, __u32 seqnum) in pickup_urb_and_free_priv() 30 struct urb *urb = NULL; in pickup_urb_and_free_priv() local 37 urb = priv->urb; in pickup_urb_and_free_priv() 38 status = urb->status; in pickup_urb_and_free_priv() 46 dev_dbg(&urb->dev->dev, in pickup_urb_and_free_priv() 54 dev_dbg(&urb->dev->dev, in pickup_urb_and_free_priv() 61 urb->hcpriv = NULL; in pickup_urb_and_free_priv() 66 return urb; in pickup_urb_and_free_priv() 74 struct urb *urb; in vhci_recv_ret_submit() local 78 urb = pickup_urb_and_free_priv(vdev, pdu->base.seqnum); in vhci_recv_ret_submit() [all …]
|
/drivers/bluetooth/ |
D | bpa10x.c | 61 static void bpa10x_tx_complete(struct urb *urb) in bpa10x_tx_complete() argument 63 struct sk_buff *skb = urb->context; in bpa10x_tx_complete() 67 urb, urb->status, urb->actual_length); in bpa10x_tx_complete() 72 if (!urb->status) in bpa10x_tx_complete() 73 hdev->stat.byte_tx += urb->transfer_buffer_length; in bpa10x_tx_complete() 78 kfree(urb->setup_packet); in bpa10x_tx_complete() 99 static void bpa10x_rx_complete(struct urb *urb) in bpa10x_rx_complete() argument 101 struct hci_dev *hdev = urb->context; in bpa10x_rx_complete() 106 urb, urb->status, urb->actual_length); in bpa10x_rx_complete() 111 if (urb->status == 0) { in bpa10x_rx_complete() [all …]
|
/drivers/net/wireless/ath/carl9170/ |
D | usb.c | 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 [all …]
|
/drivers/usb/musb/ |
D | musb_host.c | 105 struct urb *urb, int is_out, 226 struct urb *urb = next_urb(qh); in musb_start_urb() local 227 void *buf = urb->transfer_buffer; in musb_start_urb() 242 buf = urb->setup_packet; in musb_start_urb() 248 offset = urb->iso_frame_desc[0].offset; in musb_start_urb() 249 len = urb->iso_frame_desc[0].length; in musb_start_urb() 253 buf = urb->transfer_buffer + urb->actual_length; in musb_start_urb() 254 len = urb->transfer_buffer_length - urb->actual_length; in musb_start_urb() 257 trace_musb_urb_start(musb, urb); in musb_start_urb() 261 musb_ep_program(musb, epnum, urb, !is_in, buf, offset, len); in musb_start_urb() [all …]
|
/drivers/media/usb/gspca/ |
D | benq.c | 43 static void sd_isoc_irq(struct urb *urb); 87 struct urb *urb; in sd_start() local 97 urb = usb_alloc_urb(SD_NPKT, GFP_KERNEL); in sd_start() 98 if (!urb) in sd_start() 100 gspca_dev->urb[n] = urb; in sd_start() 101 urb->transfer_buffer = usb_alloc_coherent(gspca_dev->dev, in sd_start() 104 &urb->transfer_dma); in sd_start() 106 if (urb->transfer_buffer == NULL) { in sd_start() 110 urb->dev = gspca_dev->dev; in sd_start() 111 urb->context = gspca_dev; in sd_start() [all …]
|
/drivers/usb/host/ |
D | ehci-q.c | 165 struct urb *urb, u32 token) in ehci_clear_tt_buffer() argument 174 if (urb->dev->tt && !usb_pipeint(urb->pipe) && !qh->clearing_tt) { in ehci_clear_tt_buffer() 176 struct usb_device *tt = urb->dev->tt->hub; in ehci_clear_tt_buffer() 179 urb->dev->ttport, urb->dev->devnum, in ehci_clear_tt_buffer() 180 usb_pipeendpoint(urb->pipe), token); in ehci_clear_tt_buffer() 183 || urb->dev->tt->hub != in ehci_clear_tt_buffer() 185 if (usb_hub_clear_tt_buffer(urb) == 0) in ehci_clear_tt_buffer() 198 struct urb *urb, in qtd_copy_status() argument 207 urb->actual_length += length - QTD_LENGTH (token); in qtd_copy_status() 210 if (unlikely(urb->unlinked)) in qtd_copy_status() [all …]
|
D | u132-hcd.c | 141 struct urb *urb; member 170 struct urb *urb_list[ENDP_QUEUE_SIZE]; 512 struct urb *urb, int status) in u132_hcd_giveback_urb() argument 517 urb->error_count = 0; in u132_hcd_giveback_urb() 519 usb_hcd_unlink_urb_from_ep(hcd, urb); in u132_hcd_giveback_urb() 530 urbq->urb; in u132_hcd_giveback_urb() 542 usb_hcd_giveback_urb(hcd, urb, status); in u132_hcd_giveback_urb() 546 struct urb *urb, int status) in u132_hcd_forget_urb() argument 552 struct urb *urb, int status) in u132_hcd_abandon_urb() argument 556 urb->error_count = 0; in u132_hcd_abandon_urb() [all …]
|
D | r8a66597-hcd.c | 339 get_urb_to_r8a66597_dev(struct r8a66597 *r8a66597, struct urb *urb) in get_urb_to_r8a66597_dev() argument 341 if (usb_pipedevice(urb->pipe) == 0) in get_urb_to_r8a66597_dev() 344 return dev_get_drvdata(&urb->dev->dev); in get_urb_to_r8a66597_dev() 348 struct urb *urb, u8 addr) in make_r8a66597_device() argument 351 int usb_address = urb->setup_packet[2]; /* urb->pipe is address 0 */ in make_r8a66597_device() 357 dev_set_drvdata(&urb->dev->dev, dev); in make_r8a66597_device() 358 dev->udev = urb->dev; in make_r8a66597_device() 367 get_port_number(r8a66597, urb->dev->devpath, in make_r8a66597_device() 369 if (!is_child_device(urb->dev->devpath)) in make_r8a66597_device() 373 get_r8a66597_usb_speed(urb->dev->speed), in make_r8a66597_device() [all …]
|
D | fhci-q.c | 165 static void free_urb_priv(struct fhci_hcd *fhci, struct urb *urb) in free_urb_priv() argument 168 struct urb_priv *urb_priv = urb->hcpriv; in free_urb_priv() 184 urb->hcpriv = NULL; in free_urb_priv() 193 void fhci_urb_complete_free(struct fhci_hcd *fhci, struct urb *urb) in fhci_urb_complete_free() argument 195 free_urb_priv(fhci, urb); in fhci_urb_complete_free() 197 if (urb->status == -EINPROGRESS) { in fhci_urb_complete_free() 198 if (urb->actual_length != urb->transfer_buffer_length && in fhci_urb_complete_free() 199 urb->transfer_flags & URB_SHORT_NOT_OK) in fhci_urb_complete_free() 200 urb->status = -EREMOTEIO; in fhci_urb_complete_free() 202 urb->status = 0; in fhci_urb_complete_free() [all …]
|
D | imx21-hcd.c | 154 static void schedule_nonisoc_etd(struct imx21 *imx21, struct urb *urb); 201 etd->urb = NULL; in reset_etd() 228 int etd_num, struct urb *urb, u8 dir, u16 maxpacket) in setup_etd_dword0() argument 231 ((u32) usb_pipedevice(urb->pipe)) << DW0_ADDRESS | in setup_etd_dword0() 232 ((u32) usb_pipeendpoint(urb->pipe) << DW0_ENDPNT) | in setup_etd_dword0() 234 ((u32) ((urb->dev->speed == USB_SPEED_LOW) ? in setup_etd_dword0() 236 ((u32) fmt_urb_to_etd[usb_pipetype(urb->pipe)] << DW0_FORMAT) | in setup_etd_dword0() 408 struct urb_priv *urb_priv = etd->urb->hcpriv; in activate_queued_etd() 516 &ep_priv->ep->urb_list, struct urb, urb_list)); in ep_idle() 520 static void urb_done(struct usb_hcd *hcd, struct urb *urb, int status) in urb_done() argument [all …]
|
/drivers/media/usb/stk1160/ |
D | stk1160-video.c | 227 static void stk1160_process_isoc(struct stk1160 *dev, struct urb *urb) in stk1160_process_isoc() argument 237 if (urb->status < 0) { in stk1160_process_isoc() 239 print_err_status(dev, -1, urb->status); in stk1160_process_isoc() 243 for (i = 0; i < urb->number_of_packets; i++) { in stk1160_process_isoc() 244 status = urb->iso_frame_desc[i].status; in stk1160_process_isoc() 251 p = urb->transfer_buffer + urb->iso_frame_desc[i].offset; in stk1160_process_isoc() 252 len = urb->iso_frame_desc[i].actual_length; in stk1160_process_isoc() 305 static void stk1160_isoc_irq(struct urb *urb) in stk1160_isoc_irq() argument 308 struct stk1160 *dev = urb->context; in stk1160_isoc_irq() 310 switch (urb->status) { in stk1160_isoc_irq() [all …]
|
/drivers/usb/misc/ |
D | usbtest.c | 20 static void complicated_callback(struct urb *urb); 258 static void simple_callback(struct urb *urb) in simple_callback() argument 260 complete(urb->context); in simple_callback() 263 static struct urb *usbtest_alloc_urb( in usbtest_alloc_urb() 272 struct urb *urb; in usbtest_alloc_urb() local 274 urb = usb_alloc_urb(0, GFP_KERNEL); in usbtest_alloc_urb() 275 if (!urb) in usbtest_alloc_urb() 276 return urb; in usbtest_alloc_urb() 279 usb_fill_int_urb(urb, udev, pipe, NULL, bytes, complete_fn, in usbtest_alloc_urb() 282 usb_fill_bulk_urb(urb, udev, pipe, NULL, bytes, complete_fn, in usbtest_alloc_urb() [all …]
|
/drivers/usb/host/whci/ |
D | qset.c | 52 static void qset_fill_qh(struct whc *whc, struct whc_qset *qset, struct urb *urb) in qset_fill_qh() argument 54 struct usb_device *usb_dev = urb->dev; in qset_fill_qh() 60 is_out = usb_pipeout(urb->pipe); in qset_fill_qh() 62 qset->max_packet = le16_to_cpu(urb->ep->desc.wMaxPacketSize); in qset_fill_qh() 78 if (usb_pipecontrol(urb->pipe)) in qset_fill_qh() 90 QH_INFO1_EP(usb_pipeendpoint(urb->pipe)) in qset_fill_qh() 92 | usb_pipe_to_qh_type(urb->pipe) in qset_fill_qh() 157 struct whc_qset *get_qset(struct whc *whc, struct urb *urb, in get_qset() argument 162 qset = urb->ep->hcpriv; in get_qset() 168 qset->ep = urb->ep; in get_qset() [all …]
|
/drivers/media/rc/ |
D | ttusbir.c | 44 struct urb *urb[NUM_URBS]; member 47 struct urb *bulk_urb; 94 static void ttusbir_bulk_complete(struct urb *urb) in ttusbir_bulk_complete() argument 96 struct ttusbir *tt = urb->context; in ttusbir_bulk_complete() 100 switch (urb->status) { in ttusbir_bulk_complete() 106 usb_unlink_urb(urb); in ttusbir_bulk_complete() 110 dev_dbg(tt->dev, "Error: urb status = %d\n", urb->status); in ttusbir_bulk_complete() 172 static void ttusbir_urb_complete(struct urb *urb) in ttusbir_urb_complete() argument 174 struct ttusbir *tt = urb->context; in ttusbir_urb_complete() 177 switch (urb->status) { in ttusbir_urb_complete() [all …]
|
/drivers/nfc/nfcmrvl/ |
D | usb.c | 68 static void nfcmrvl_bulk_complete(struct urb *urb) in nfcmrvl_bulk_complete() argument 70 struct nfcmrvl_usb_drv_data *drv_data = urb->context; in nfcmrvl_bulk_complete() 75 urb, urb->status, urb->actual_length); in nfcmrvl_bulk_complete() 80 if (!urb->status) { in nfcmrvl_bulk_complete() 81 skb = nci_skb_alloc(drv_data->priv->ndev, urb->actual_length, in nfcmrvl_bulk_complete() 86 memcpy(skb_put(skb, urb->actual_length), in nfcmrvl_bulk_complete() 87 urb->transfer_buffer, urb->actual_length); in nfcmrvl_bulk_complete() 97 usb_anchor_urb(urb, &drv_data->bulk_anchor); in nfcmrvl_bulk_complete() 100 err = usb_submit_urb(urb, GFP_ATOMIC); in nfcmrvl_bulk_complete() 107 "urb %p failed to resubmit (%d)\n", urb, -err); in nfcmrvl_bulk_complete() [all …]
|
/drivers/usb/renesas_usbhs/ |
D | mod_host.c | 74 struct urb *urb; member 165 struct urb *urb, in usbhsh_ureq_alloc() argument 175 ureq->urb = urb; in usbhsh_ureq_alloc() 176 usbhsh_urb_to_ureq(urb) = ureq; in usbhsh_ureq_alloc() 184 usbhsh_urb_to_ureq(ureq->urb) = NULL; in usbhsh_ureq_free() 185 ureq->urb = NULL; in usbhsh_ureq_free() 209 struct urb *urb, in usbhsh_endpoint_sequence_save() argument 212 int len = urb->actual_length; in usbhsh_endpoint_sequence_save() 213 int maxp = usb_endpoint_maxp(&urb->ep->desc); in usbhsh_endpoint_sequence_save() 217 if (usb_pipecontrol(urb->pipe)) in usbhsh_endpoint_sequence_save() [all …]
|
/drivers/media/usb/dvb-usb/ |
D | usb-urb.c | 14 static void usb_urb_complete(struct urb *urb) in usb_urb_complete() argument 16 struct usb_data_stream *stream = urb->context; in usb_urb_complete() 17 int ptype = usb_pipetype(urb->pipe); in usb_urb_complete() 23 urb->status,urb->actual_length,urb->transfer_buffer_length, in usb_urb_complete() 24 urb->number_of_packets,urb->error_count); in usb_urb_complete() 26 switch (urb->status) { in usb_urb_complete() 35 deb_ts("urb completition error %d.\n", urb->status); in usb_urb_complete() 39 b = (u8 *) urb->transfer_buffer; in usb_urb_complete() 42 for (i = 0; i < urb->number_of_packets; i++) { in usb_urb_complete() 44 if (urb->iso_frame_desc[i].status != 0) in usb_urb_complete() [all …]
|
/drivers/staging/comedi/drivers/ |
D | usbduxsigma.c | 146 struct urb **ai_urbs; 147 struct urb **ao_urbs; 149 struct urb *pwm_urb; 179 static void usbduxsigma_unlink_urbs(struct urb **urbs, int num_urbs) in usbduxsigma_unlink_urbs() 212 struct urb *urb) in usbduxsigma_ai_handle_urb() argument 221 if ((urb->actual_length > 0) && (urb->status != -EXDEV)) { in usbduxsigma_ai_handle_urb() 246 urb->dev = comedi_to_usb_dev(dev); in usbduxsigma_ai_handle_urb() 247 ret = usb_submit_urb(urb, GFP_ATOMIC); in usbduxsigma_ai_handle_urb() 259 static void usbduxsigma_ai_urb_complete(struct urb *urb) in usbduxsigma_ai_urb_complete() argument 261 struct comedi_device *dev = urb->context; in usbduxsigma_ai_urb_complete() [all …]
|