Home
last modified time | relevance | path

Searched refs:fifo (Results 1 – 25 of 29) sorted by relevance

12

/linux-4.19.296/lib/
Dkfifo.c33 static inline unsigned int kfifo_unused(struct __kfifo *fifo) in kfifo_unused() argument
35 return (fifo->mask + 1) - (fifo->in - fifo->out); in kfifo_unused()
38 int __kfifo_alloc(struct __kfifo *fifo, unsigned int size, in __kfifo_alloc() argument
47 fifo->in = 0; in __kfifo_alloc()
48 fifo->out = 0; in __kfifo_alloc()
49 fifo->esize = esize; in __kfifo_alloc()
52 fifo->data = NULL; in __kfifo_alloc()
53 fifo->mask = 0; in __kfifo_alloc()
57 fifo->data = kmalloc_array(esize, size, gfp_mask); in __kfifo_alloc()
59 if (!fifo->data) { in __kfifo_alloc()
[all …]
/linux-4.19.296/include/linux/
Dkfifo.h116 #define __is_kfifo_ptr(fifo) \ argument
117 (sizeof(*fifo) == sizeof(STRUCT_KFIFO_PTR(typeof(*(fifo)->type))))
124 #define DECLARE_KFIFO_PTR(fifo, type) STRUCT_KFIFO_PTR(type) fifo argument
132 #define DECLARE_KFIFO(fifo, type, size) STRUCT_KFIFO(type, size) fifo argument
138 #define INIT_KFIFO(fifo) \ argument
140 typeof(&(fifo)) __tmp = &(fifo); \
157 #define DEFINE_KFIFO(fifo, type, size) \ argument
158 DECLARE_KFIFO(fifo, type, size) = \
159 (typeof(fifo)) { \
164 .mask = __is_kfifo_ptr(&(fifo)) ? \
[all …]
/linux-4.19.296/drivers/isdn/hisax/
Dhfc_usb.c209 static void collect_rx_frame(usb_fifo *fifo, __u8 *data, int len,
452 start_isoc_chain(usb_fifo *fifo, int num_packets_per_urb, in start_isoc_chain() argument
458 fifo->fifonum); in start_isoc_chain()
462 if (!(fifo->iso[i].purb)) { in start_isoc_chain()
463 fifo->iso[i].purb = in start_isoc_chain()
465 if (!(fifo->iso[i].purb)) { in start_isoc_chain()
468 fifo->fifonum); in start_isoc_chain()
470 fifo->iso[i].owner_fifo = (struct usb_fifo *) fifo; in start_isoc_chain()
474 (fifo->usb_packet_maxlen * in start_isoc_chain()
476 fill_isoc_urb(fifo->iso[i].purb, in start_isoc_chain()
[all …]
Dst5481.h239 struct fifo { struct
247 static inline void fifo_init(struct fifo *fifo, int size) in fifo_init() argument
249 fifo->r = fifo->w = fifo->count = 0; in fifo_init()
250 fifo->size = size; in fifo_init()
251 spin_lock_init(&fifo->lock); in fifo_init()
257 static inline int fifo_add(struct fifo *fifo) in fifo_add() argument
262 if (!fifo) { in fifo_add()
266 spin_lock_irqsave(&fifo->lock, flags); in fifo_add()
267 if (fifo->count == fifo->size) { in fifo_add()
272 index = fifo->w++ & (fifo->size - 1); in fifo_add()
[all …]
Dhfc_sx.c83 fifo_select(struct IsdnCardState *cs, u_char fifo) in fifo_select() argument
85 if (fifo == cs->hw.hfcsx.last_fifo) in fifo_select()
89 byteout(cs->hw.hfcsx.base, fifo); in fifo_select()
92 byteout(cs->hw.hfcsx.base, fifo); in fifo_select()
101 reset_fifo(struct IsdnCardState *cs, u_char fifo) in reset_fifo() argument
103 fifo_select(cs, fifo); /* first select the fifo */ in reset_fifo()
117 write_fifo(struct IsdnCardState *cs, struct sk_buff *skb, u_char fifo, int trans_max) in write_fifo() argument
124 if (fifo & 1) return (0); /* no write fifo */ in write_fifo()
126 fifo_select(cs, fifo); in write_fifo()
127 if (fifo & 4) { in write_fifo()
[all …]
Dhisax.h700 unsigned char fifo; member
727 unsigned char fifo; member
752 unsigned char fifo; member
Dhfc_pci.c217 static void hfcpci_clear_fifo_rx(struct IsdnCardState *cs, int fifo) in hfcpci_clear_fifo_rx() argument
221 if (fifo) { in hfcpci_clear_fifo_rx()
231 cs->hw.hfcpci.last_bfifo_cnt[fifo] = 0; in hfcpci_clear_fifo_rx()
244 static void hfcpci_clear_fifo_tx(struct IsdnCardState *cs, int fifo) in hfcpci_clear_fifo_tx() argument
248 if (fifo) { in hfcpci_clear_fifo_tx()
1652 cs->hw.hfcpci.fifo = 255; in setup_hfcpci()
Dhfcscard.c228 cs->hw.hfcD.fifo = 255; in setup_hfcs()
/linux-4.19.296/drivers/isdn/hardware/mISDN/
Dhfcsusb.c817 hfcsusb_rx_frame(struct usb_fifo *fifo, __u8 *data, unsigned int len, in hfcsusb_rx_frame() argument
820 struct hfcsusb *hw = fifo->hw; in hfcsusb_rx_frame()
823 int fifon = fifo->fifonum; in hfcsusb_rx_frame()
832 fifo->dch, fifo->bch, fifo->ech); in hfcsusb_rx_frame()
837 if ((!!fifo->dch + !!fifo->bch + !!fifo->ech) != 1) { in hfcsusb_rx_frame()
844 if (fifo->dch) { in hfcsusb_rx_frame()
845 rx_skb = fifo->dch->rx_skb; in hfcsusb_rx_frame()
846 maxlen = fifo->dch->maxlen; in hfcsusb_rx_frame()
849 if (fifo->bch) { in hfcsusb_rx_frame()
850 if (test_bit(FLG_RX_OFF, &fifo->bch->Flags)) { in hfcsusb_rx_frame()
[all …]
Dhfcpci.c336 hfcpci_clear_fifo_rx(struct hfc_pci *hc, int fifo) in hfcpci_clear_fifo_rx() argument
341 if (fifo) { in hfcpci_clear_fifo_rx()
351 hc->hw.last_bfifo_cnt[fifo] = 0; in hfcpci_clear_fifo_rx()
365 static void hfcpci_clear_fifo_tx(struct hfc_pci *hc, int fifo) in hfcpci_clear_fifo_tx() argument
370 if (fifo) { in hfcpci_clear_fifo_tx()
380 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx()
383 fifo, bzt->f1, bzt->f2, in hfcpci_clear_fifo_tx()
394 if (hc->bch[fifo].debug & DEBUG_HW_BCHANNEL) in hfcpci_clear_fifo_tx()
397 fifo, bzt->f1, bzt->f2, in hfcpci_clear_fifo_tx()
/linux-4.19.296/drivers/media/radio/
Dradio-cadet.c130 unsigned fifo = 0; in cadet_gettune() local
145 fifo = (fifo << 1) | ((inb(dev->io + 1) >> 7) & 0x01); in cadet_gettune()
157 return fifo; in cadet_gettune()
163 unsigned freq = 0, test, fifo = 0; in cadet_getfreq() local
168 fifo = cadet_gettune(dev); in cadet_getfreq()
174 return ((fifo & 0x7fff) - 450) * 16; in cadet_getfreq()
178 if ((fifo & 0x01) != 0) in cadet_getfreq()
181 fifo = fifo >> 1; in cadet_getfreq()
188 static void cadet_settune(struct cadet *dev, unsigned fifo) in cadet_settune() argument
198 test = (fifo >> 23) & 0x02; /* Align data for SDO */ in cadet_settune()
[all …]
/linux-4.19.296/include/linux/fsl/bestcomm/
Dgen_bd.h26 bcom_gen_bd_rx_init(int queue_len, phys_addr_t fifo,
37 bcom_gen_bd_tx_init(int queue_len, phys_addr_t fifo,
49 phys_addr_t fifo, int maxbufsize);
51 phys_addr_t fifo);
Dfec.h41 bcom_fec_rx_init(int queue_len, phys_addr_t fifo, int maxbufsize);
51 bcom_fec_tx_init(int queue_len, phys_addr_t fifo);
/linux-4.19.296/drivers/misc/
Daspeed-lpc-snoop.c67 struct kfifo fifo; member
93 if (kfifo_is_empty(&chan->fifo)) { in snoop_file_read()
97 !kfifo_is_empty(&chan->fifo)); in snoop_file_read()
101 ret = kfifo_to_user(&chan->fifo, buffer, count, &copied); in snoop_file_read()
114 return !kfifo_is_empty(&chan->fifo) ? EPOLLIN : 0; in snoop_file_poll()
127 if (!kfifo_initialized(&chan->fifo)) in put_fifo_with_discard()
129 if (kfifo_is_full(&chan->fifo)) in put_fifo_with_discard()
130 kfifo_skip(&chan->fifo); in put_fifo_with_discard()
131 kfifo_put(&chan->fifo, val); in put_fifo_with_discard()
201 rc = kfifo_alloc(&lpc_snoop->chan[channel].fifo, in aspeed_lpc_enable_snoop()
[all …]
Dhpilo.h162 struct fifo { struct
179 #define FIFOHANDLESIZE (sizeof(struct fifo) - sizeof(u64))
181 ((struct fifo *)(((char *)(_fifo)) - FIFOHANDLESIZE))
Dhpilo.c66 struct fifo *fifo_q = FIFOBARTOHANDLE(fifobar); in fifo_enqueue()
85 struct fifo *fifo_q = FIFOBARTOHANDLE(fifobar); in fifo_dequeue()
108 struct fifo *fifo_q = FIFOBARTOHANDLE(fifobar); in fifo_check_recv()
208 struct fifo *fifo_q = base_addr; in fifo_setup()
/linux-4.19.296/include/linux/spi/
Dcc2520.h18 int fifo; member
/linux-4.19.296/drivers/media/rc/
Dite-cir.c615 int fifo, read = 0; in it87_get_rx_bytes() local
620 fifo = inb(dev->cir_addr + IT87_RSR) & IT87_RXFBC; in it87_get_rx_bytes()
622 while (fifo > 0 && buf_size > 0) { in it87_get_rx_bytes()
624 fifo--; in it87_get_rx_bytes()
840 int fifo, read = 0; in it8708_get_rx_bytes() local
845 fifo = inb(dev->cir_addr + IT8708_C0RFSR) & IT85_RXFBC; in it8708_get_rx_bytes()
847 while (fifo > 0 && buf_size > 0) { in it8708_get_rx_bytes()
849 fifo--; in it8708_get_rx_bytes()
1131 int fifo, read = 0; in it8709_get_rx_bytes() local
1136 fifo = it8709_rm(dev, IT8709_RFSR) & IT85_RXFBC; in it8709_get_rx_bytes()
[all …]
/linux-4.19.296/drivers/char/
Dsonypi.c489 struct kfifo fifo; member
879 kfifo_in_locked(&sonypi_device.fifo, (unsigned char *)&event, in sonypi_irq()
905 kfifo_reset(&sonypi_device.fifo); in sonypi_misc_open()
918 if ((kfifo_len(&sonypi_device.fifo) == 0) && in sonypi_misc_read()
923 kfifo_len(&sonypi_device.fifo) != 0); in sonypi_misc_read()
928 (kfifo_out_locked(&sonypi_device.fifo, &c, sizeof(c), in sonypi_misc_read()
946 if (kfifo_len(&sonypi_device.fifo)) in sonypi_misc_poll()
1314 error = kfifo_alloc(&sonypi_device.fifo, SONYPI_BUF_SIZE, GFP_KERNEL); in sonypi_probe()
1421 kfifo_free(&sonypi_device.fifo); in sonypi_probe()
1449 kfifo_free(&sonypi_device.fifo); in sonypi_remove()
/linux-4.19.296/drivers/parport/
Dparport_ip32.c178 void __iomem *fifo; member
1412 writeb(*bufp, priv->regs.fifo); in parport_ip32_fifo_write_block_pio()
1415 writesb(priv->regs.fifo, bufp, count); in parport_ip32_fifo_write_block_pio()
1577 writeb(0x00, priv->regs.fifo); in parport_ip32_get_fifo_residue()
1905 writeb((u8)i, priv->regs.fifo); in parport_ip32_fifo_supported()
1924 if (readb(priv->regs.fifo) != (u8)i) { in parport_ip32_fifo_supported()
1964 writeb(0xaa, priv->regs.fifo); in parport_ip32_fifo_supported()
2019 .fifo = r_base_hi(0), in parport_ip32_make_isa_registers()
/linux-4.19.296/include/linux/mtd/
Dsh_flctl.h150 resource_size_t fifo; member
/linux-4.19.296/drivers/iio/buffer/
DKconfig45 A simple fifo based on kfifo. Note that this currently provides
/linux-4.19.296/drivers/hid/
Dwacom_sys.c60 struct kfifo_rec_ptr_2 *fifo, in wacom_wac_queue_insert() argument
65 while (kfifo_avail(fifo) < size) { in wacom_wac_queue_insert()
70 kfifo_skip(fifo); in wacom_wac_queue_insert()
73 kfifo_in(fifo, raw_data, size); in wacom_wac_queue_insert()
77 struct kfifo_rec_ptr_2 *fifo) in wacom_wac_queue_flush() argument
79 while (!kfifo_is_empty(fifo)) { in wacom_wac_queue_flush()
84 size = kfifo_out(fifo, buf, sizeof(buf)); in wacom_wac_queue_flush()
/linux-4.19.296/drivers/ptp/
Dptp_sysfs.c107 static DEVICE_ATTR(fifo, 0444, extts_fifo_show, NULL);
/linux-4.19.296/block/
Dbfq-iosched.h264 struct list_head fifo; member

12