/drivers/dma/ |
D | dma-axi-dmac.c | 115 unsigned int num_sgs; member 234 if (desc->num_submitted == desc->num_sgs || in axi_dmac_start_transfer() 263 desc->num_sgs == 1) in axi_dmac_start_transfer() 304 for (i = 0; i < desc->num_sgs; i++) { in axi_dmac_dequeue_partial_xfers() 351 for (i = start; i < active->num_sgs; i++) { in axi_dmac_compute_residue() 392 if (active->num_completed == active->num_sgs || in axi_dmac_transfer_done() 475 static struct axi_dmac_desc *axi_dmac_alloc_desc(unsigned int num_sgs) in axi_dmac_alloc_desc() argument 480 desc = kzalloc(struct_size(desc, sg, num_sgs), GFP_NOWAIT); in axi_dmac_alloc_desc() 484 for (i = 0; i < num_sgs; i++) in axi_dmac_alloc_desc() 487 desc->num_sgs = num_sgs; in axi_dmac_alloc_desc() [all …]
|
D | stm32-dma.c | 194 u32 num_sgs; member 563 if (chan->next_sg == chan->desc->num_sgs) in stm32_dma_start_transfer() 608 if (chan->next_sg == chan->desc->num_sgs) in stm32_dma_configure_next_sg() 636 if (chan->next_sg == chan->desc->num_sgs) { in stm32_dma_handle_chan_done() 921 desc->num_sgs = sg_len; in stm32_dma_prep_slave_sg() 1007 desc->num_sgs = num_periods; in stm32_dma_prep_dma_cyclic() 1021 u32 num_sgs, best_burst, dma_burst, threshold; in stm32_dma_prep_dma_memcpy() local 1024 num_sgs = DIV_ROUND_UP(len, STM32_DMA_ALIGNED_MAX_DATA_ITEMS); in stm32_dma_prep_dma_memcpy() 1025 desc = kzalloc(struct_size(desc, sg_req, num_sgs), GFP_NOWAIT); in stm32_dma_prep_dma_memcpy() 1059 desc->num_sgs = num_sgs; in stm32_dma_prep_dma_memcpy() [all …]
|
/drivers/usb/usbip/ |
D | vhci_tx.c | 80 if (urb->num_sgs && usb_pipeout(urb->pipe)) in vhci_send_cmd_submit() 81 iovnum = 2 + urb->num_sgs; in vhci_send_cmd_submit() 91 if (urb->num_sgs) in vhci_send_cmd_submit() 106 if (urb->num_sgs && in vhci_send_cmd_submit() 108 for_each_sg(urb->sg, sg, urb->num_sgs, i) { in vhci_send_cmd_submit()
|
D | stub_tx.c | 176 !urb->num_sgs) { in stub_send_ret_submit() 186 urb->num_sgs) in stub_send_ret_submit() 187 iovnum = 1 + urb->num_sgs; in stub_send_ret_submit() 240 if (urb->num_sgs) { in stub_send_ret_submit() 244 for_each_sg(urb->sg, sg, urb->num_sgs, i) { in stub_send_ret_submit()
|
D | stub_main.c | 310 if (urb->num_sgs) { in stub_free_priv_and_urb() 313 urb->num_sgs = 0; in stub_free_priv_and_urb()
|
D | vhci_rx.c | 98 if (urb->num_sgs) in vhci_recv_ret_submit()
|
D | usbip_common.c | 707 if (urb->num_sgs) { in usbip_recv_xbuff() 709 for_each_sg(urb->sg, sg, urb->num_sgs, i) { in usbip_recv_xbuff()
|
/drivers/net/wireless/mediatek/mt76/ |
D | usb.c | 396 for (j = nsgs; j < urb->num_sgs; j++) in mt76u_fill_rx_sg() 398 urb->num_sgs = i; in mt76u_fill_rx_sg() 401 urb->num_sgs = max_t(int, i, urb->num_sgs); in mt76u_fill_rx_sg() 402 urb->transfer_buffer_length = urb->num_sgs * q->buf_size; in mt76u_fill_rx_sg() 403 sg_init_marker(urb->sg, urb->num_sgs); in mt76u_fill_rx_sg() 463 for (i = 0; i < urb->num_sgs; i++) in mt76u_urb_free() 570 u8 *data = urb->num_sgs ? sg_virt(&urb->sg[0]) : urb->transfer_buffer; in mt76u_process_rx_entry() 571 int data_len = urb->num_sgs ? urb->sg[0].length : urb->actual_length; in mt76u_process_rx_entry() 589 while (len > 0 && nsgs < urb->num_sgs) { in mt76u_process_rx_entry() 895 urb->num_sgs = skb_to_sgvec(skb, urb->sg, 0, skb->len); in mt76u_tx_setup_buffers() [all …]
|
/drivers/usb/gadget/udc/ |
D | trace.h | 220 __field(unsigned, num_sgs) 234 __entry->num_sgs = req->num_sgs; 246 __entry->num_mapped_sgs, __entry->num_sgs, __entry->stream_id,
|
D | core.c | 826 if (req->num_sgs) { in usb_gadget_map_request_by_dev() 829 mapped = dma_map_sg(dev, req->sg, req->num_sgs, in usb_gadget_map_request_by_dev() 875 dma_unmap_sg(dev, req->sg, req->num_sgs, in usb_gadget_unmap_request_by_dev()
|
/drivers/staging/mt7621-dma/ |
D | hsdma-mt7621.c | 139 unsigned int num_sgs; member 326 chan->desc->num_sgs = DIV_ROUND_UP(len, HSDMA_MAX_PLEN); in mtk_hsdma_start_transfer() 330 for (i = 0; i < chan->desc->num_sgs; i++) { in mtk_hsdma_start_transfer() 361 for (i = 0; i < chan->desc->num_sgs; i++) { in mtk_hsdma_start_transfer() 410 if (chan->next_sg == desc->num_sgs) { in mtk_hsdma_chan_done()
|
/drivers/usb/core/ |
D | devio.c | 409 for (i = 0; i < as->urb->num_sgs; i++) { in free_async() 528 if (urb->num_sgs == 0) { in snoop_urb_data() 534 for (i = 0; i < urb->num_sgs && len; i++) { in snoop_urb_data() 551 if (urb->num_sgs == 0) { in copy_urb_data_to_user() 557 for (i = 0; i < urb->num_sgs && len; i++) { in copy_urb_data_to_user() 1614 int i, ret, num_sgs = 0, ifnum = -1; in proc_do_submiturb() local 1709 num_sgs = DIV_ROUND_UP(uurb->buffer_length, USB_SG_SIZE); in proc_do_submiturb() 1710 if (num_sgs == 1 || num_sgs > ps->dev->bus->sg_tablesize) in proc_do_submiturb() 1711 num_sgs = 0; in proc_do_submiturb() 1783 num_sgs = 0; in proc_do_submiturb() [all …]
|
D | urb.c | 481 } else if (urb->num_sgs && !urb->dev->bus->no_sg_constraint && in usb_submit_urb() 486 for_each_sg(urb->sg, sg, urb->num_sgs - 1, i) in usb_submit_urb()
|
D | hcd.c | 1374 urb->num_sgs, in usb_hcd_unmap_urb_for_dma() 1466 if (urb->num_sgs) { in usb_hcd_map_urb_for_dma() 1478 urb->num_sgs, in usb_hcd_map_urb_for_dma() 1485 if (n != urb->num_sgs) in usb_hcd_map_urb_for_dma()
|
/drivers/staging/ralink-gdma/ |
D | ralink-gdma.c | 102 unsigned int num_sgs; member 440 if (chan->next_sg == desc->num_sgs) in gdma_dma_chan_irq() 445 if (chan->next_sg == desc->num_sgs) { in gdma_dma_chan_irq() 549 desc->num_sgs = sg_len; in gdma_dma_prep_slave_sg() 596 desc->num_sgs = num_periods; in gdma_dma_prep_dma_memcpy() 643 desc->num_sgs = num_periods; in gdma_dma_prep_dma_cyclic()
|
/drivers/net/usb/ |
D | usbnet.c | 1320 unsigned num_sgs, total_len = 0; in build_dma_sg() local 1323 num_sgs = skb_shinfo(skb)->nr_frags + 1; in build_dma_sg() 1324 if (num_sgs == 1) in build_dma_sg() 1328 urb->sg = kmalloc_array(num_sgs + 1, sizeof(struct scatterlist), in build_dma_sg() 1333 urb->num_sgs = num_sgs; in build_dma_sg() 1334 sg_init_table(urb->sg, urb->num_sgs + 1); in build_dma_sg() 1406 if (skb_tailroom(skb) && !urb->num_sgs) { in usbnet_start_xmit() 1409 } else if (urb->num_sgs) in usbnet_start_xmit() 1410 sg_set_buf(&urb->sg[urb->num_sgs++], in usbnet_start_xmit()
|
/drivers/usb/host/ |
D | xhci-trace.h | 262 __field(int, num_sgs) 277 __entry->num_sgs = urb->num_sgs; 294 __entry->num_sgs, __entry->stream, __entry->flags
|
D | xhci-ring.c | 794 if (urb->num_sgs) { in xhci_unmap_td_bounce_buffer() 795 len = sg_pcopy_from_buffer(urb->sg, urb->num_sgs, seg->bounce_buf, in xhci_unmap_td_bounce_buffer() 3555 if (urb->num_sgs) { in xhci_align_td() 3556 len = sg_pcopy_to_buffer(urb->sg, urb->num_sgs, in xhci_align_td() 3599 unsigned int start_cycle, num_sgs = 0; in xhci_queue_bulk_tx() local 3611 if (urb->num_sgs && !(urb->transfer_flags & URB_DMA_MAP_SINGLE)) { in xhci_queue_bulk_tx() 3612 num_sgs = urb->num_mapped_sgs; in xhci_queue_bulk_tx() 3717 --num_sgs; in xhci_queue_bulk_tx() 3720 if (num_sgs != 0 && sg) { in xhci_queue_bulk_tx()
|
/drivers/dma/dw-axi-dmac/ |
D | dw-axi-dmac-platform.c | 762 u32 len, num_sgs = 0; in dw_axi_dma_chan_prep_slave_sg() local 780 num_sgs += DIV_ROUND_UP(sg_dma_len(sg), axi_block_len); in dw_axi_dma_chan_prep_slave_sg() 782 desc = axi_desc_alloc(num_sgs); in dw_axi_dma_chan_prep_slave_sg() 809 set_desc_last(&desc->hw_desc[num_sgs - 1]); in dw_axi_dma_chan_prep_slave_sg() 813 hw_desc = &desc->hw_desc[--num_sgs]; in dw_axi_dma_chan_prep_slave_sg() 816 } while (num_sgs); in dw_axi_dma_chan_prep_slave_sg()
|
/drivers/usb/cdns3/ |
D | cdnsp-ring.c | 623 len = sg_pcopy_from_buffer(preq->request.sg, preq->request.num_sgs, in cdnsp_unmap_td_bounce_buffer() 1720 for_each_sg(preq->request.sg, sg, preq->request.num_sgs, i) { in count_sg_trbs_needed() 1860 unsigned int start_cycle, num_sgs = 0; in cdnsp_queue_bulk_tx() local 1880 if (preq->request.num_sgs) { in cdnsp_queue_bulk_tx() 1881 num_sgs = preq->request.num_sgs; in cdnsp_queue_bulk_tx() 1987 --num_sgs; in cdnsp_queue_bulk_tx() 1989 if (num_sgs != 0) { in cdnsp_queue_bulk_tx()
|
D | cdnsp-trace.h | 470 __field(unsigned int, num_sgs) 488 __entry->num_sgs = req->request.num_sgs; 500 __entry->sg, __entry->num_sgs, __entry->num_mapped_sgs
|
/drivers/dma/mediatek/ |
D | mtk-hsdma.c | 418 u16 reserved, prev, tlen, num_sgs; in mtk_hsdma_issue_pending_vdesc() local 428 num_sgs = DIV_ROUND_UP(hvd->len, MTK_HSDMA_MAX_LEN); in mtk_hsdma_issue_pending_vdesc() 429 reserved = min_t(u16, num_sgs, atomic_read(&pc->nr_free)); in mtk_hsdma_issue_pending_vdesc()
|
/drivers/usb/gadget/function/ |
D | f_tcm.c | 228 fu->bot_req_in->num_sgs = se_cmd->t_data_nents; in bot_send_read_response() 267 fu->bot_req_out->num_sgs = se_cmd->t_data_nents; in bot_send_write_request() 530 stream->req_in->num_sgs = se_cmd->t_data_nents; in uasp_prepare_r_request() 965 if (req->num_sgs == 0) { in usbg_data_write_cmpl() 993 req->num_sgs = se_cmd->t_data_nents; in usbg_prepare_w_request()
|
/drivers/usb/chipidea/ |
D | host.c | 404 if (urb->num_sgs || urb->sg || urb->transfer_buffer_length == 0) in ci_hdrc_alloc_dma_aligned_buffer()
|
/drivers/usb/mon/ |
D | mon_bin.c | 412 if (urb->num_sgs == 0) { in mon_bin_get_data() 428 for_each_sg(urb->sg, sg, urb->num_sgs, i) { in mon_bin_get_data()
|