/linux/sound/usb/ |
H A D | endpoint.c | 100 usb_free_coherent(u->ep->chip->dev, u->buffer_size, in release_urb_ctx() 133 static inline bool ep_state_running(struct snd_usb_endpoint *ep) in ep_state_running() argument 135 return atomic_read(&ep->state) == EP_STATE_RUNNING; in ep_state_running() 138 static inline bool ep_state_update(struct snd_usb_endpoint *ep, int old, int new) in ep_state_update() argument 140 return atomic_try_cmpxchg(&ep->state, &old, new); in ep_state_update() 146 * @ep: The snd_usb_endpoint 151 int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep) in snd_usb_endpoint_implicit_feedback_sink() argument 153 return ep->implicit_fb_sync && usb_pipeout(ep->pipe); in snd_usb_endpoint_implicit_feedback_sink() 163 static int slave_next_packet_size(struct snd_usb_endpoint *ep, in slave_next_packet_size() argument 170 if (ep->fill_max) in slave_next_packet_size() [all …]
|
H A D | midi2.c | 50 struct snd_usb_midi2_endpoint *ep; member 57 const struct usb_ms20_endpoint_descriptor *ms_ep; /* reference to EP descriptor */ 58 struct snd_usb_midi2_endpoint *pair; /* bidirectional pair EP */ 59 struct snd_usb_midi2_ump *rmidi; /* assigned UMP EP pair */ 60 struct snd_ump_endpoint *ump; /* assigned UMP EP */ 62 unsigned int endpoint; /* EP number */ 65 unsigned int interval; /* interval for INT EP */ 83 struct snd_ump_endpoint *ump; /* assigned UMP EP object */ 87 bool ump_parsed; /* Parsed UMP 1.1 EP/FB info*/ 105 static void do_submit_urbs_locked(struct snd_usb_midi2_endpoint *ep, in do_submit_urbs_locked() argument [all …]
|
/linux/drivers/usb/gadget/udc/aspeed-vhub/ |
H A D | epn.c | 32 #define CHECK(ep, expr, fmt...) \ argument 34 if (!(expr)) EPDBG(ep, "CHECK:" fmt); \ 37 #define CHECK(ep, expr, fmt...) do { } while(0) argument 40 static void ast_vhub_epn_kick(struct ast_vhub_ep *ep, struct ast_vhub_req *req) in ast_vhub_epn_kick() argument 51 if (chunk > ep->ep.maxpacket) in ast_vhub_epn_kick() 52 chunk = ep->ep.maxpacket; in ast_vhub_epn_kick() 53 else if ((chunk < ep->ep.maxpacket) || !req->req.zero) in ast_vhub_epn_kick() 56 EPVDBG(ep, "kick req %p act=%d/%d chunk=%d last=%d\n", in ast_vhub_epn_kick() 59 /* If DMA unavailable, using staging EP buffer */ in ast_vhub_epn_kick() 63 if (ep->epn.is_in) { in ast_vhub_epn_kick() [all …]
|
H A D | ep0.c | 29 int ast_vhub_reply(struct ast_vhub_ep *ep, char *ptr, int len) in ast_vhub_reply() argument 31 struct usb_request *req = &ep->ep0.req.req; in ast_vhub_reply() 34 if (WARN_ON(ep->d_idx != 0)) in ast_vhub_reply() 36 if (WARN_ON(!ep->ep0.dir_in)) in ast_vhub_reply() 53 spin_unlock(&ep->vhub->lock); in ast_vhub_reply() 54 if (ep->ep.ops->queue(&ep->ep, req, GFP_ATOMIC)) in ast_vhub_reply() 58 spin_lock(&ep->vhub->lock); in ast_vhub_reply() 62 int __ast_vhub_simple_reply(struct ast_vhub_ep *ep, int len, ...) in __ast_vhub_simple_reply() argument 64 u8 *buffer = ep->buf; in __ast_vhub_simple_reply() 70 /* Copy data directly into EP buffer */ in __ast_vhub_simple_reply() [all …]
|
/linux/drivers/infiniband/hw/cxgb4/ |
H A D | cm.c | 144 static void connect_reply_upcall(struct c4iw_ep *ep, int status); 163 static void deref_qp(struct c4iw_ep *ep) in deref_qp() argument 165 c4iw_qp_rem_ref(&ep->com.qp->ibqp); in deref_qp() 166 clear_bit(QP_REFERENCED, &ep->com.flags); in deref_qp() 167 set_bit(QP_DEREFED, &ep->com.history); in deref_qp() 170 static void ref_qp(struct c4iw_ep *ep) in ref_qp() argument 172 set_bit(QP_REFERENCED, &ep->com.flags); in ref_qp() 173 set_bit(QP_REFED, &ep->com.history); in ref_qp() 174 c4iw_qp_add_ref(&ep->com.qp->ibqp); in ref_qp() 177 static void start_ep_timer(struct c4iw_ep *ep) in start_ep_timer() argument [all …]
|
/linux/drivers/pci/controller/dwc/ |
H A D | pcie-designware-ep.c | 21 * @ep: DWC EP device 27 dw_pcie_ep_get_func_from_ep(struct dw_pcie_ep *ep, u8 func_no) in dw_pcie_ep_get_func_from_ep() argument 31 list_for_each_entry(ep_func, &ep->func_list, list) { in dw_pcie_ep_get_func_from_ep() 42 struct dw_pcie_ep *ep = &pci->ep; in __dw_pcie_ep_reset_bar() local 47 dw_pcie_ep_writel_dbi2(ep, func_no, reg, 0x0); in __dw_pcie_ep_reset_bar() 48 dw_pcie_ep_writel_dbi(ep, func_no, reg, 0x0); in __dw_pcie_ep_reset_bar() 50 dw_pcie_ep_writel_dbi2(ep, func_no, reg + 4, 0x0); in __dw_pcie_ep_reset_bar() 51 dw_pcie_ep_writel_dbi(ep, func_no, reg + 4, 0x0); in __dw_pcie_ep_reset_bar() 65 funcs = pci->ep.epc->max_functions; in dw_pcie_ep_reset_bar() 72 static u8 __dw_pcie_ep_find_next_cap(struct dw_pcie_ep *ep, u8 func_no, in __dw_pcie_ep_find_next_cap() argument [all …]
|
H A D | pci-exynos.c | 72 static void exynos_pcie_sideband_dbi_w_mode(struct exynos_pcie *ep, bool on) in exynos_pcie_sideband_dbi_w_mode() argument 76 val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_AWMISC); in exynos_pcie_sideband_dbi_w_mode() 81 exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_AWMISC); in exynos_pcie_sideband_dbi_w_mode() 84 static void exynos_pcie_sideband_dbi_r_mode(struct exynos_pcie *ep, bool on) in exynos_pcie_sideband_dbi_r_mode() argument 88 val = exynos_pcie_readl(ep->elbi_base, PCIE_ELBI_SLV_ARMISC); in exynos_pcie_sideband_dbi_r_mode() 93 exynos_pcie_writel(ep->elbi_base, val, PCIE_ELBI_SLV_ARMISC); in exynos_pcie_sideband_dbi_r_mode() 96 static void exynos_pcie_assert_core_reset(struct exynos_pcie *ep) in exynos_pcie_assert_core_reset() argument 100 val = exynos_pcie_readl(ep->elbi_base, PCIE_CORE_RESET); in exynos_pcie_assert_core_reset() 102 exynos_pcie_writel(ep->elbi_base, val, PCIE_CORE_RESET); in exynos_pcie_assert_core_reset() 103 exynos_pcie_writel(ep->elbi_base, 0, PCIE_STICKY_RESET); in exynos_pcie_assert_core_reset() [all …]
|
/linux/drivers/usb/gadget/udc/ |
H A D | fsl_qe_udc.c | 53 /*ep name is important in gadget, it should obey the convention of ep_match()*/ 77 static void done(struct qe_ep *ep, struct qe_req *req, int status) in done() argument 79 struct qe_udc *udc = ep->udc; in done() 80 unsigned char stopped = ep->stopped; in done() 84 * so here the req will be dropped from the ep->queue in done() 97 ep_is_in(ep) in done() 105 ep_is_in(ep) in done() 111 ep->ep.name, &req->req, status, in done() 115 ep->stopped = 1; in done() 118 usb_gadget_giveback_request(&ep->ep, &req->req); in done() [all …]
|
H A D | snps_udc_core.c | 41 static struct udc_request *udc_alloc_bna_dummy(struct udc_ep *ep); 194 DBG(dev, "dev ep int's = %08x\n", readl(&dev->regs->ep_irqsts)); in print_regs() 195 DBG(dev, "dev ep intmask = %08x\n", readl(&dev->regs->ep_irqmsk)); in print_regs() 232 /* mask all ep interrupts */ in udc_mask_unused_interrupts() 279 static int udc_set_txfifo_addr(struct udc_ep *ep) in udc_set_txfifo_addr() argument 285 if (!ep || !(ep->in)) in udc_set_txfifo_addr() 288 dev = ep->dev; in udc_set_txfifo_addr() 289 ep->txfifo = dev->txfifo; in udc_set_txfifo_addr() 291 /* traverse ep's */ in udc_set_txfifo_addr() 292 for (i = 0; i < ep->num; i++) { in udc_set_txfifo_addr() [all …]
|
H A D | r8a66597-udc.c | 35 static void irq_ep0_write(struct r8a66597_ep *ep, struct r8a66597_request *req); 36 static void irq_packet_write(struct r8a66597_ep *ep, 41 static void transfer_complete(struct r8a66597_ep *ep, 98 INIT_LIST_HEAD(&r8a66597->ep[0].queue); in r8a66597_usb_disconnect() 298 struct r8a66597_ep *ep = r8a66597->pipenum2ep[pipenum]; in pipe_change() local 300 if (ep->use_dma) in pipe_change() 301 r8a66597_bclr(r8a66597, DREQE, ep->fifosel); in pipe_change() 303 r8a66597_mdfy(r8a66597, pipenum, CURPIPE, ep->fifosel); in pipe_change() 307 if (r8a66597_is_sudmac(r8a66597) && ep->use_dma) in pipe_change() 308 r8a66597_bclr(r8a66597, mbw_value(r8a66597), ep->fifosel); in pipe_change() [all …]
|
H A D | net2280.c | 87 EP_INFO("ep-a", 89 EP_INFO("ep-b", 91 EP_INFO("ep-c", 93 EP_INFO("ep-d", 95 EP_INFO("ep-e", 97 EP_INFO("ep-f", 99 EP_INFO("ep-g", 101 EP_INFO("ep-h", 126 /* mode 0 == ep-{a,b,c,d} 1K fifo each 127 * mode 1 == ep-{a,b} 2K fifo each, ep-{c,d} unavailable [all …]
|
H A D | pch_udc.c | 23 #define UDC_EP_REG_SHIFT 0x20 /* Offset to next EP */ 174 #define PCH_UDC_CSR(ep) (UDC_CSR_ADDR + ep*4) argument 181 #define UDC_EPIN_IDX(ep) (ep * 2) argument 182 #define UDC_EPOUT_IDX(ep) (ep * 2 + 1) argument 190 #define PCH_UDC_USED_EP_NUM 4 /* EP number of EP's really used */ 194 /* Value of EP Buffer Size */ 199 /* Value of EP maximum packet size */ 270 * @ep: embedded ep request 276 * @offset_addr: offset address of ep register 284 struct usb_ep ep; member [all …]
|
H A D | goku_udc.c | 14 * - Endpoint numbering is fixed: ep{1,2,3}-bulk 15 * - Gadget drivers can choose ep maxpacket (8/16/32/64) 94 struct goku_ep *ep; in goku_ep_enable() local 99 ep = container_of(_ep, struct goku_ep, ep); in goku_ep_enable() 103 dev = ep->dev; in goku_ep_enable() 104 if (ep == &dev->ep[0]) in goku_ep_enable() 108 if (ep->num != usb_endpoint_num(desc)) in goku_ep_enable() 119 if ((readl(ep->reg_status) & EPxSTATUS_EP_MASK) in goku_ep_enable() 147 ep->is_in = usb_endpoint_dir_in(desc); in goku_ep_enable() 148 if (ep->is_in) { in goku_ep_enable() [all …]
|
H A D | m66592-udc.c | 35 static void irq_ep0_write(struct m66592_ep *ep, struct m66592_request *req); 36 static void irq_packet_write(struct m66592_ep *ep, struct m66592_request *req); 40 static void transfer_complete(struct m66592_ep *ep, 99 INIT_LIST_HEAD(&m66592->ep[0].queue); in m66592_usb_disconnect() 208 struct m66592_ep *ep = m66592->pipenum2ep[pipenum]; in pipe_change() local 211 if (ep->use_dma) in pipe_change() 214 m66592_mdfy(m66592, pipenum, M66592_CURPIPE, ep->fifosel); in pipe_change() 223 m66592_bset(m66592, mbw, ep->fifosel); in pipe_change() 300 static void pipe_initialize(struct m66592_ep *ep) in pipe_initialize() argument 302 struct m66592 *m66592 = ep->m66592; in pipe_initialize() [all …]
|
H A D | fusb300_udc.c | 33 static void done(struct fusb300_ep *ep, struct fusb300_request *req, 55 static void fusb300_ep_setting(struct fusb300_ep *ep, in fusb300_ep_setting() argument 58 ep->epnum = info.epnum; in fusb300_ep_setting() 59 ep->type = info.type; in fusb300_ep_setting() 62 static int fusb300_ep_release(struct fusb300_ep *ep) in fusb300_ep_release() argument 64 if (!ep->epnum) in fusb300_ep_release() 66 ep->epnum = 0; in fusb300_ep_release() 67 ep->stall = 0; in fusb300_ep_release() 68 ep->wedged = 0; in fusb300_ep_release() 73 u32 ep) in fusb300_set_fifo_entry() argument [all …]
|
H A D | aspeed_udc.c | 37 #define AST_UDC_EP_ACK_IER 0x10 /* Programmable ep Pool ACK Interrupt Enable Reg */ 38 #define AST_UDC_EP_NAK_IER 0x14 /* Programmable ep Pool NAK Interrupt Enable Reg */ 39 #define AST_UDC_EP_ACK_ISR 0x18 /* Programmable ep Pool ACK Interrupt Status Reg */ 40 #define AST_UDC_EP_NAK_ISR 0x1C /* Programmable ep Pool NAK Interrupt Status Reg */ 43 #define AST_VHUB_EP_DATA 0x28 /* Programmable ep Pool Data Toggle Value Set */ 85 /* EP isr reg */ 98 /* Programmable EP data toggle */ 122 /* EP config reg */ 136 /* EP DMA ctrl reg */ 145 /* EP DMA status reg */ [all …]
|
H A D | gr_udc.c | 90 static void gr_dbgprint_request(const char *str, struct gr_ep *ep, in gr_dbgprint_request() argument 93 int buflen = ep->is_in ? req->req.length : req->req.actual; in gr_dbgprint_request() 97 dev_dbg(ep->dev->dev, "%s: 0x%p, %d bytes data%s:\n", str, req, buflen, in gr_dbgprint_request() 111 static void gr_dbgprint_request(const char *str, struct gr_ep *ep, in gr_dbgprint_request() argument 124 static void gr_seq_ep_show(struct seq_file *seq, struct gr_ep *ep) in gr_seq_ep_show() argument 126 u32 epctrl = gr_read32(&ep->regs->epctrl); in gr_seq_ep_show() 127 u32 epstat = gr_read32(&ep->regs->epstat); in gr_seq_ep_show() 131 seq_printf(seq, "%s:\n", ep->ep.name); in gr_seq_ep_show() 136 seq_printf(seq, " dma_start = %d\n", ep->dma_start); in gr_seq_ep_show() 137 seq_printf(seq, " stopped = %d\n", ep->stopped); in gr_seq_ep_show() [all …]
|
H A D | net2272.c | 44 "ep-a", "ep-b", "ep-c", 60 * dma_ep: selects the endpoint for use with dma (1=ep-a, 2=ep-b) 89 * mode 0 == ep-{a,b,c} 512db each 90 * mode 1 == ep-a 1k, ep-{b,c} 512db 91 * mode 2 == ep-a 1k, ep-b 1k, ep-c 512db 92 * mode 3 == ep-a 1k, ep-b disabled, ep-c 512db 106 static void assert_out_naking(struct net2272_ep *ep, const char *where) in assert_out_naking() argument 114 tmp = net2272_ep_read(ep, EP_STAT0); in assert_out_naking() 116 dev_dbg(ep->dev->dev, "%s %s %02x !NAK\n", in assert_out_naking() 117 ep->ep.name, where, tmp); in assert_out_naking() [all …]
|
H A D | pxa27x_udc.c | 78 static void handle_ep(struct pxa_ep *ep); 138 struct pxa_ep *ep; in queues_dbg_show() local 147 ep = &udc->pxa_ep[i]; in queues_dbg_show() 148 maxpkt = ep->fifo_size; in queues_dbg_show() 150 EPNAME(ep), maxpkt, "pio"); in queues_dbg_show() 152 if (list_empty(&ep->queue)) { in queues_dbg_show() 157 list_for_each_entry(req, &ep->queue, queue) { in queues_dbg_show() 171 struct pxa_ep *ep; in eps_dbg_show() local 178 ep = &udc->pxa_ep[0]; in eps_dbg_show() 179 tmp = udc_ep_readl(ep, UDCCSR); in eps_dbg_show() [all …]
|
H A D | omap_udc.c | 119 static void use_ep(struct omap_ep *ep, u16 select) in use_ep() argument 121 u16 num = ep->bEndpointAddress & 0x0f; in use_ep() 123 if (ep->bEndpointAddress & USB_DIR_IN) in use_ep() 139 static void dma_channel_claim(struct omap_ep *ep, unsigned preferred); 146 struct omap_ep *ep = container_of(_ep, struct omap_ep, ep); in omap_ep_enable() local 154 || ep->bEndpointAddress != desc->bEndpointAddress in omap_ep_enable() 155 || ep->maxpacket < usb_endpoint_maxp(desc)) { in omap_ep_enable() 156 DBG("%s, bad ep or descriptor\n", __func__); in omap_ep_enable() 161 && maxp != ep->maxpacket) in omap_ep_enable() 162 || usb_endpoint_maxp(desc) > ep->maxpacket in omap_ep_enable() [all …]
|
/linux/drivers/usb/fotg210/ |
H A D | fotg210-udc.c | 40 static void fotg210_disable_fifo_int(struct fotg210_ep *ep) in fotg210_disable_fifo_int() argument 42 u32 value = ioread32(ep->fotg210->reg + FOTG210_DMISGR1); in fotg210_disable_fifo_int() 44 if (ep->dir_in) in fotg210_disable_fifo_int() 45 value |= DMISGR1_MF_IN_INT(ep->epnum - 1); in fotg210_disable_fifo_int() 47 value |= DMISGR1_MF_OUTSPK_INT(ep->epnum - 1); in fotg210_disable_fifo_int() 48 iowrite32(value, ep->fotg210->reg + FOTG210_DMISGR1); in fotg210_disable_fifo_int() 51 static void fotg210_enable_fifo_int(struct fotg210_ep *ep) in fotg210_enable_fifo_int() argument 53 u32 value = ioread32(ep->fotg210->reg + FOTG210_DMISGR1); in fotg210_enable_fifo_int() 55 if (ep->dir_in) in fotg210_enable_fifo_int() 56 value &= ~DMISGR1_MF_IN_INT(ep->epnum - 1); in fotg210_enable_fifo_int() [all …]
|
/linux/drivers/usb/gadget/udc/bdc/ |
H A D | bdc_ep.c | 51 /* Free the bdl during ep disable */ 52 static void ep_bd_list_free(struct bdc_ep *ep, u32 num_tabs) in ep_bd_list_free() argument 54 struct bd_list *bd_list = &ep->bd_list; in ep_bd_list_free() 55 struct bdc *bdc = ep->bdc; in ep_bd_list_free() 59 dev_dbg(bdc->dev, "%s ep:%s num_tabs:%d\n", in ep_bd_list_free() 60 __func__, ep->name, num_tabs); in ep_bd_list_free() 63 dev_dbg(bdc->dev, "%s already freed\n", ep->name); in ep_bd_list_free() 95 kfree(ep->bd_list.bd_table_array); in ep_bd_list_free() 120 /* Allocate the bdl for ep, during config ep */ 121 static int ep_bd_list_alloc(struct bdc_ep *ep) in ep_bd_list_alloc() argument [all …]
|
/linux/drivers/scsi/libfc/ |
H A D | fc_exch.c | 245 * @ep: Echange to be held 247 static inline void fc_exch_hold(struct fc_exch *ep) in fc_exch_hold() argument 249 atomic_inc(&ep->ex_refcnt); in fc_exch_hold() 255 * @ep: The exchange to that will use the header 262 static void fc_exch_setup_hdr(struct fc_exch *ep, struct fc_frame *fp, in fc_exch_setup_hdr() argument 268 fr_sof(fp) = ep->class; in fc_exch_setup_hdr() 269 if (ep->seq.cnt) in fc_exch_setup_hdr() 270 fr_sof(fp) = fc_sof_normal(ep->class); in fc_exch_setup_hdr() 274 if (fc_sof_needs_ack((enum fc_sof)ep->class)) in fc_exch_setup_hdr() 298 fh->fh_ox_id = htons(ep->oxid); in fc_exch_setup_hdr() [all …]
|
/linux/net/sctp/ |
H A D | endpointola.c | 41 static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, in sctp_endpoint_init() argument 48 ep->digest = kzalloc(SCTP_SIGNATURE_SIZE, gfp); in sctp_endpoint_init() 49 if (!ep->digest) in sctp_endpoint_init() 52 ep->asconf_enable = net->sctp.addip_enable; in sctp_endpoint_init() 53 ep->auth_enable = net->sctp.auth_enable; in sctp_endpoint_init() 54 if (ep->auth_enable) { in sctp_endpoint_init() 55 if (sctp_auth_init(ep, gfp)) in sctp_endpoint_init() 57 if (ep->asconf_enable) { in sctp_endpoint_init() 58 sctp_auth_ep_add_chunkid(ep, SCTP_CID_ASCONF); in sctp_endpoint_init() 59 sctp_auth_ep_add_chunkid(ep, SCTP_CID_ASCONF_ACK); in sctp_endpoint_init() [all …]
|
/linux/drivers/video/fbdev/ |
H A D | sunxvr500.c | 56 static int e3d_get_props(struct e3d_info *ep) in e3d_get_props() argument 58 ep->width = of_getintprop_default(ep->of_node, "width", 0); in e3d_get_props() 59 ep->height = of_getintprop_default(ep->of_node, "height", 0); in e3d_get_props() 60 ep->depth = of_getintprop_default(ep->of_node, "depth", 8); in e3d_get_props() 62 if (!ep->width || !ep->height) { in e3d_get_props() 64 pci_name(ep->pdev)); in e3d_get_props() 99 static void e3d_clut_write(struct e3d_info *ep, int index, u32 val) in e3d_clut_write() argument 101 void __iomem *ramdac = ep->ramdac; in e3d_clut_write() 104 spin_lock_irqsave(&ep->lock, flags); in e3d_clut_write() 109 spin_unlock_irqrestore(&ep->lock, flags); in e3d_clut_write() [all …]
|