Lines Matching +full:bit +full:- +full:banging

1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * Copyright 2005-2006 Fen Systems Ltd.
5 * Copyright 2006-2013 Solarflare Communications Inc.
12 #include <linux/i2c-algo-bit.h>
24 return efx->type->revision; in ef4_nic_rev()
39 return ((ef4_qword_t *) (channel->eventq.buf.addr)) + in ef4_event()
40 (index & channel->eventq_mask); in ef4_event()
50 * Note that using a single 64-bit comparison is incorrect; even
55 return !(EF4_DWORD_IS_ALL_ONES(event->dword[0]) | in ef4_event_present()
56 EF4_DWORD_IS_ALL_ONES(event->dword[1])); in ef4_event_present()
65 return ((ef4_qword_t *) (tx_queue->txd.buf.addr)) + index; in ef4_tx_desc()
71 if (tx_queue->queue & EF4_TXQ_TYPE_OFFLOAD) in ef4_tx_queue_partner()
72 return tx_queue - EF4_TXQ_TYPE_OFFLOAD; in ef4_tx_queue_partner()
83 unsigned int empty_read_count = READ_ONCE(tx_queue->empty_read_count); in __ef4_nic_tx_is_empty()
104 tx_queue->empty_read_count = 0; in ef4_nic_may_push_tx_desc()
105 return was_empty && tx_queue->write_count - write_count == 1; in ef4_nic_may_push_tx_desc()
112 return ((ef4_qword_t *) (rx_queue->rxd.buf.addr)) + index; in ef4_rx_desc()
137 /* NIC-generic software stats */
145 * struct falcon_board_type - board operations and type information
148 * @init_phy: Do board-specific PHY initialisation
151 * @monitor: Board-specific health check function
163 * struct falcon_board - board information
167 * @i2c_adap: I2C adapter for on-board peripherals
168 * @i2c_data: Data for bit-banging algorithm
182 * struct falcon_spi_device - a Falcon SPI (Serial Peripheral Interface) device
187 * Some devices with 9-bit addresses (e.g. AT25040A EEPROM)
188 * use bit 3 of the command byte as address bit A8, rather
189 * than having a two-byte address. If this flag is set, then
210 return spi->size != 0; in falcon_spi_present()
265 * struct falcon_nic_data - Falcon NIC state
296 struct falcon_nic_data *data = efx->nic_data; in falcon_board()
297 return &data->board; in falcon_board()
317 return tx_queue->efx->type->tx_probe(tx_queue); in ef4_nic_probe_tx()
321 tx_queue->efx->type->tx_init(tx_queue); in ef4_nic_init_tx()
325 tx_queue->efx->type->tx_remove(tx_queue); in ef4_nic_remove_tx()
329 tx_queue->efx->type->tx_write(tx_queue); in ef4_nic_push_buffers()
335 return rx_queue->efx->type->rx_probe(rx_queue); in ef4_nic_probe_rx()
339 rx_queue->efx->type->rx_init(rx_queue); in ef4_nic_init_rx()
343 rx_queue->efx->type->rx_remove(rx_queue); in ef4_nic_remove_rx()
347 rx_queue->efx->type->rx_write(rx_queue); in ef4_nic_notify_rx_desc()
351 rx_queue->efx->type->rx_defer_refill(rx_queue); in ef4_nic_generate_fill_event()
357 return channel->efx->type->ev_probe(channel); in ef4_nic_probe_eventq()
361 return channel->efx->type->ev_init(channel); in ef4_nic_init_eventq()
365 channel->efx->type->ev_fini(channel); in ef4_nic_fini_eventq()
369 channel->efx->type->ev_remove(channel); in ef4_nic_remove_eventq()
374 return channel->efx->type->ev_process(channel, quota); in ef4_nic_process_eventq()
378 channel->efx->type->ev_read_ack(channel); in ef4_nic_eventq_read_ack()
435 /* Some statistics are computed as A - B where A and B each increase
449 if ((s64)(diff - *stat) > 0) in ef4_update_diff_stat()
466 return READ_ONCE(channel->event_test_cpu); in ef4_nic_event_test_irq_cpu()
470 return READ_ONCE(efx->last_irq_cpu); in ef4_nic_irq_test_irq_cpu()