Home
last modified time | relevance | path

Searched refs:num_sgs (Results 1 – 25 of 45) sorted by relevance

12

/drivers/dma/
Ddma-axi-dmac.c115 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 …]
Dstm32-dma.c194 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/
Dvhci_tx.c80 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()
Dstub_tx.c176 !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()
Dstub_main.c310 if (urb->num_sgs) { in stub_free_priv_and_urb()
313 urb->num_sgs = 0; in stub_free_priv_and_urb()
Dvhci_rx.c98 if (urb->num_sgs) in vhci_recv_ret_submit()
Dusbip_common.c707 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/
Dusb.c396 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/
Dtrace.h220 __field(unsigned, num_sgs)
234 __entry->num_sgs = req->num_sgs;
246 __entry->num_mapped_sgs, __entry->num_sgs, __entry->stream_id,
Dcore.c826 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/
Dhsdma-mt7621.c139 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/
Ddevio.c409 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 …]
Durb.c481 } 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()
Dhcd.c1374 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/
Dralink-gdma.c102 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/
Dusbnet.c1320 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/
Dxhci-trace.h262 __field(int, num_sgs)
277 __entry->num_sgs = urb->num_sgs;
294 __entry->num_sgs, __entry->stream, __entry->flags
Dxhci-ring.c794 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/
Ddw-axi-dmac-platform.c762 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/
Dcdnsp-ring.c623 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()
Dcdnsp-trace.h470 __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/
Dmtk-hsdma.c418 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/
Df_tcm.c228 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/
Dhost.c404 if (urb->num_sgs || urb->sg || urb->transfer_buffer_length == 0) in ci_hdrc_alloc_dma_aligned_buffer()
/drivers/usb/mon/
Dmon_bin.c412 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()

12