Home
last modified time | relevance | path

Searched refs:cons (Results 1 – 25 of 98) sorted by relevance

1234

/drivers/xen/xenbus/
Dxenbus_comms.c62 static int check_indexes(XENSTORE_RING_IDX cons, XENSTORE_RING_IDX prod) in check_indexes() argument
64 return ((prod - cons) <= XENSTORE_RING_SIZE); in check_indexes()
67 static void *get_output_chunk(XENSTORE_RING_IDX cons, in get_output_chunk() argument
72 if ((XENSTORE_RING_SIZE - (prod - cons)) < *len) in get_output_chunk()
73 *len = XENSTORE_RING_SIZE - (prod - cons); in get_output_chunk()
77 static const void *get_input_chunk(XENSTORE_RING_IDX cons, in get_input_chunk() argument
81 *len = XENSTORE_RING_SIZE - MASK_XENSTORE_IDX(cons); in get_input_chunk()
82 if ((prod - cons) < *len) in get_input_chunk()
83 *len = prod - cons; in get_input_chunk()
84 return buf + MASK_XENSTORE_IDX(cons); in get_input_chunk()
[all …]
Dxenbus_dev_frontend.c82 unsigned int cons; member
147 unsigned sz = min((unsigned)len - i, rb->len - rb->cons); in xenbus_file_read()
149 ret = copy_to_user(ubuf + i, &rb->msg[rb->cons], sz); in xenbus_file_read()
152 rb->cons += sz - ret; in xenbus_file_read()
161 if (rb->cons == rb->len) { in xenbus_file_read()
196 rb->cons = 0; in queue_reply()
/drivers/tty/serial/
Dkgdboc.c162 struct console *cons; in configure_kgdboc() local
185 cons = console_drivers; in configure_kgdboc()
186 while (cons) { in configure_kgdboc()
188 if (cons->device && cons->device(cons, &idx) == p && in configure_kgdboc()
193 cons = cons->next; in configure_kgdboc()
Dserial_core.c168 if (uart_console(uport) && uport->cons->cflag) { in uart_port_startup()
169 tty->termios.c_cflag = uport->cons->cflag; in uart_port_startup()
170 uport->cons->cflag = 0; in uart_port_startup()
252 uport->cons->cflag = tty->termios.c_cflag; in uart_shutdown()
1845 if (!(uart_console(port) && (port->cons->flags & CON_ENABLED))) { in uart_set_options()
1989 console_stop(uport->cons); in uart_suspend_port()
2030 termios.c_cflag = uport->cons->cflag; in uart_resume_port()
2042 console_start(uport->cons); in uart_resume_port()
2165 if (port->cons && !(port->cons->flags & CON_ENABLED)) in uart_configure_port()
2166 register_console(port->cons); in uart_configure_port()
[all …]
Dsccnxp.c927 s->uart.cons = &s->console; in sccnxp_probe()
928 s->uart.cons->device = uart_console_device; in sccnxp_probe()
929 s->uart.cons->write = sccnxp_console_write; in sccnxp_probe()
930 s->uart.cons->setup = sccnxp_console_setup; in sccnxp_probe()
931 s->uart.cons->flags = CON_PRINTBUFFER; in sccnxp_probe()
932 s->uart.cons->index = -1; in sccnxp_probe()
933 s->uart.cons->data = s; in sccnxp_probe()
934 strcpy(s->uart.cons->name, "ttySC"); in sccnxp_probe()
Dmsm_serial.c480 if (!port->cons || (port->cons && !(port->cons->flags & CON_ENABLED))) { in msm_startup()
1028 .cons = MSM_CONSOLE,
Dserial_txx9.c610 if (up->port.cons && up->port.line == up->port.cons->index) { in serial_txx9_shutdown()
836 if (up->port.line == up->port.cons->index) in serial_txx9_config_port()
992 .cons = SERIAL_TXX9_CONSOLE,
Dsuncore.c61 drv->cons = con; in sunserial_console_match()
Dsunsu.c339 if (up->port.cons != NULL && in receive_chars()
340 up->port.line == up->port.cons->index) in receive_chars()
362 if (up->port.cons != NULL && in receive_chars()
363 up->port.line == up->port.cons->index) { in receive_chars()
Dar933x_uart.c614 .cons = NULL, /* filled in runtime */
747 ar933x_uart_driver.cons = &ar933x_uart_console; in ar933x_uart_init()
/drivers/tty/hvc/
Dhvc_xen.c85 static inline void notify_daemon(struct xencons_info *cons) in notify_daemon() argument
88 notify_remote_via_evtchn(cons->evtchn); in notify_daemon()
94 XENCONS_RING_IDX cons, prod; in __write_console() local
98 cons = intf->out_cons; in __write_console()
101 BUG_ON((prod - cons) > sizeof(intf->out)); in __write_console()
103 while ((sent < len) && ((prod - cons) < sizeof(intf->out))) in __write_console()
117 struct xencons_info *cons = vtermno_to_xencons(vtermno); in domU_write_console() local
118 if (cons == NULL) in domU_write_console()
128 int sent = __write_console(cons, data, len); in domU_write_console()
143 XENCONS_RING_IDX cons, prod; in domU_read_console() local
[all …]
/drivers/char/
Dvirtio_console.c217 struct console cons; member
253 struct console *cons; in find_port_by_vtermno() local
257 list_for_each_entry(cons, &pdrvdata.consoles, list) { in find_port_by_vtermno()
258 if (cons->vtermno == vtermno) { in find_port_by_vtermno()
259 port = container_of(cons, struct port, cons); in find_port_by_vtermno()
341 if (port->cons.hvc) in is_console_port()
1190 hvc_resize(port->cons.hvc, port->cons.ws); in resize_console()
1258 port->cons.vtermno = pdrvdata.next_vtermno; in init_port_console()
1260 port->cons.hvc = hvc_alloc(port->cons.vtermno, 0, &hv_ops, PAGE_SIZE); in init_port_console()
1261 if (IS_ERR(port->cons.hvc)) { in init_port_console()
[all …]
/drivers/input/misc/
Dxen-kbdfront.c57 __u32 cons, prod; in input_handler() local
63 for (cons = page->in_cons; cons != prod; cons++) { in input_handler()
66 event = &XENKBD_IN_RING_REF(page, cons); in input_handler()
102 page->in_cons = cons; in input_handler()
/drivers/net/ethernet/mellanox/mlx4/
Den_tx.c195 ring->cons = 0xffffffff; in mlx4_en_activate_tx_ring()
229 return ring->prod - ring->cons > ring->full_size; in mlx4_en_is_tx_ring_full()
350 ring->cons += ring->last_nr_txbb; in mlx4_en_free_tx_buf()
352 ring->cons, ring->prod); in mlx4_en_free_tx_buf()
354 if ((u32) (ring->prod - ring->cons) > ring->size) { in mlx4_en_free_tx_buf()
360 while (ring->cons != ring->prod) { in mlx4_en_free_tx_buf()
362 ring->cons & ring->size_mask, in mlx4_en_free_tx_buf()
363 !!(ring->cons & ring->size), 0); in mlx4_en_free_tx_buf()
364 ring->cons += ring->last_nr_txbb; in mlx4_en_free_tx_buf()
407 ring_cons = ACCESS_ONCE(ring->cons); in mlx4_en_process_tx_cq()
[all …]
Den_rx.c242 BUG_ON((u32)(ring->prod - ring->cons) > ring->actual_size); in mlx4_en_is_ring_empty()
243 return ring->prod == ring->cons; in mlx4_en_is_ring_empty()
314 ring->cons, ring->prod); in mlx4_en_free_rx_buf()
318 index = ring->cons & ring->size_mask; in mlx4_en_free_rx_buf()
321 ++ring->cons; in mlx4_en_free_rx_buf()
370 ring->cons = 0; in mlx4_en_create_rx_ring()
436 ring->cons = 0; in mlx4_en_activate_rx_rings()
669 while ((u32) (ring->prod - ring->cons) < ring->actual_size) { in mlx4_en_refill_rx_buffers()
901 ring->cons = cq->mcq.cons_index; in mlx4_en_process_rx_cq()
/drivers/gpu/drm/qxl/
Dqxl_cmd.c88 ret = header->prod - header->cons < header->num_items; in qxl_check_header()
90 header->notify_on_cons = header->cons + 1; in qxl_check_header()
101 ret = header->prod == header->cons; in qxl_check_idle()
114 if (header->prod - header->cons == header->num_items) { in qxl_ring_push()
115 header->notify_on_cons = header->cons + 1; in qxl_ring_push()
160 if (header->cons == header->prod) { in qxl_ring_pop()
161 header->notify_on_prod = header->cons + 1; in qxl_ring_pop()
166 idx = header->cons & (ring->n_elements - 1); in qxl_ring_pop()
171 header->cons++; in qxl_ring_pop()
/drivers/s390/cio/
Ddevice_status.c182 cdev_irb->esw.esw0.erw.cons = irb->esw.esw0.erw.cons; in ccw_device_accumulate_esw()
183 if (irb->esw.esw0.erw.cons) in ccw_device_accumulate_esw()
301 !(cdev_irb->esw.esw0.erw.cons)) in ccw_device_accumulate_irb()
365 cdev->private->irb.esw.esw0.erw.cons = 1; in ccw_device_accumulate_basic_sense()
387 cdev->private->irb.esw.esw0.erw.cons = 1; in ccw_device_accumulate_and_sense()
/drivers/net/
Dxen-netfront.c400 RING_IDX cons, prod; in xennet_tx_buf_gc() local
410 for (cons = queue->tx.rsp_cons; cons != prod; cons++) { in xennet_tx_buf_gc()
413 txrsp = RING_GET_RESPONSE(&queue->tx, cons); in xennet_tx_buf_gc()
448 } while ((cons == prod) && (prod != queue->tx.sring->rsp_prod)); in xennet_tx_buf_gc()
755 RING_IDX cons = queue->rx.rsp_cons; in xennet_get_extras() local
762 if (unlikely(cons + 1 == rp)) { in xennet_get_extras()
770 RING_GET_RESPONSE(&queue->rx, ++cons); in xennet_get_extras()
783 skb = xennet_get_rx_skb(queue, cons); in xennet_get_extras()
784 ref = xennet_get_rx_ref(queue, cons); in xennet_get_extras()
788 queue->rx.rsp_cons = cons; in xennet_get_extras()
[all …]
/drivers/net/xen-netback/
Dnetback.c151 RING_IDX prod, cons; in xenvif_rx_ring_slots_available() local
155 cons = queue->rx.req_cons; in xenvif_rx_ring_slots_available()
157 if (prod - cons >= needed) in xenvif_rx_ring_slots_available()
836 RING_IDX cons = queue->tx.req_cons; in xenvif_tx_err() local
843 if (cons == end) in xenvif_tx_err()
845 txp = RING_GET_REQUEST(&queue->tx, cons++); in xenvif_tx_err()
847 queue->tx.req_cons = cons; in xenvif_tx_err()
864 RING_IDX cons = queue->tx.req_cons; in xenvif_count_requests() local
912 memcpy(txp, RING_GET_REQUEST(&queue->tx, cons + slots), in xenvif_count_requests()
950 xenvif_tx_err(queue, first, cons + slots); in xenvif_count_requests()
[all …]
/drivers/net/ethernet/broadcom/bnx2x/
Dbnx2x_cmn.h736 u16 cons; in bnx2x_tx_avail() local
739 cons = txdata->tx_bd_cons; in bnx2x_tx_avail()
741 used = SUB_S16(prod, cons); in bnx2x_tx_avail()
775 u16 cons; in bnx2x_has_rx_work() local
779 cons = RCQ_BD(fp->rx_comp_cons); in bnx2x_has_rx_work()
780 cqe = &fp->rx_comp_ring[cons]; in bnx2x_has_rx_work()
881 u16 cons, u16 prod) in bnx2x_reuse_rx_data() argument
883 struct sw_rx_bd *cons_rx_buf = &fp->rx_buf_ring[cons]; in bnx2x_reuse_rx_data()
885 struct eth_rx_bd *cons_bd = &fp->rx_desc_ring[cons]; in bnx2x_reuse_rx_data()
/drivers/net/hippi/
Drrunner.c1268 u32 index, cons; in rr_dump() local
1285 cons = rrpriv->dirty_tx; in rr_dump()
1287 index, cons); in rr_dump()
1300 if (rrpriv->tx_skbuff[cons]){ in rr_dump()
1301 len = min_t(int, 0x80, rrpriv->tx_skbuff[cons]->len); in rr_dump()
1302 … is valid - dumping data (0x%x bytes - skbuff len 0x%x)\n", cons, len, rrpriv->tx_skbuff[cons]->le… in rr_dump()
1304 rrpriv->tx_ring[cons].mode, in rr_dump()
1305 rrpriv->tx_ring[cons].size, in rr_dump()
1306 (unsigned long long) rrpriv->tx_ring[cons].addr.addrlo, in rr_dump()
1307 (unsigned long)rrpriv->tx_skbuff[cons]->data, in rr_dump()
[all …]
/drivers/net/ethernet/broadcom/
Db44.c619 u32 cur, cons; in b44_tx() local
626 for (cons = bp->tx_cons; cons != cur; cons = NEXT_TX(cons)) { in b44_tx()
627 struct ring_info *rp = &bp->tx_buffers[cons]; in b44_tx()
645 bp->tx_cons = cons; in b44_tx()
782 u32 cons, prod; in b44_rx() local
787 cons = bp->rx_cons; in b44_rx()
789 while (cons != prod && budget > 0) { in b44_rx()
790 struct ring_info *rp = &bp->rx_buffers[cons]; in b44_rx()
804 b44_recycle_rx(bp, cons, bp->rx_prod); in b44_rx()
827 skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod); in b44_rx()
[all …]
Dbnx2.c2816 u16 cons; in bnx2_get_hw_tx_cons() local
2820 cons = *bnapi->hw_tx_cons_ptr; in bnx2_get_hw_tx_cons()
2822 if (unlikely((cons & BNX2_MAX_TX_DESC_CNT) == BNX2_MAX_TX_DESC_CNT)) in bnx2_get_hw_tx_cons()
2823 cons++; in bnx2_get_hw_tx_cons()
2824 return cons; in bnx2_get_hw_tx_cons()
2930 u16 cons = rxr->rx_pg_cons; in bnx2_reuse_rx_skb_pages() local
2932 cons_rx_pg = &rxr->rx_pg_ring[cons]; in bnx2_reuse_rx_skb_pages()
2957 cons_rx_pg = &rxr->rx_pg_ring[cons]; in bnx2_reuse_rx_skb_pages()
2958 cons_bd = &rxr->rx_pg_desc_ring[BNX2_RX_RING(cons)] in bnx2_reuse_rx_skb_pages()
2959 [BNX2_RX_IDX(cons)]; in bnx2_reuse_rx_skb_pages()
[all …]
/drivers/net/ethernet/sun/
Dsunvnet.c517 u32 idx = dr->cons; in idx_is_pending()
548 dr->cons = next_idx(end, dr); in vnet_ack()
549 desc = vio_dring_entry(dr, dr->cons); in vnet_ack()
555 if (__vnet_tx_trigger(port, dr->cons) > 0) in vnet_ack()
1037 err = __vnet_tx_trigger(port, dr->cons); in vnet_start_xmit()
1326 dr->prod = dr->cons = 0; in vnet_port_alloc_tx_bufs()
/drivers/video/fbdev/
Dxen-fbfront.c117 u32 cons, prod; in xenfb_queue_full() local
120 cons = info->page->out_cons; in xenfb_queue_full()
121 return prod - cons == XENFB_OUT_RING_LEN; in xenfb_queue_full()

1234