Lines Matching +full:0 +full:x0000001

44 #define DMA_ADDR_HIGH(dma_addr) ((u32)(((dma_addr) >> 32) & 0xFFFFFFFF))
46 #define DMA_ADDR_HIGH(dma_addr) ((u32)(0))
48 #define DMA_ADDR_LOW(dma_addr) ((u32)((dma_addr) & 0xFFFFFFFF))
55 #define TSNEP_TX_TYPE_MAP BIT(0)
71 #define TSNEP_XDP_TX BIT(0)
91 if (active != 0) in tsnep_irq()
95 if ((active & ECM_INT_LINK) != 0) in tsnep_irq()
98 /* handle TX/RX queue 0 interrupt */ in tsnep_irq()
99 if ((active & adapter->queue[0].irq_mask) != 0) { in tsnep_irq()
100 if (napi_schedule_prep(&adapter->queue[0].napi)) { in tsnep_irq()
101 tsnep_disable_irq(adapter, adapter->queue[0].irq_mask); in tsnep_irq()
103 __napi_schedule(&adapter->queue[0].napi); in tsnep_irq()
137 return 0; in tsnep_set_irq_coalesce()
165 if (retval != 0) in tsnep_mdiobus_read()
187 if (retval != 0) in tsnep_mdiobus_write()
190 return 0; in tsnep_mdiobus_write()
262 memset(&ethtool_keee, 0, sizeof(ethtool_keee)); in tsnep_phy_open()
268 return 0; in tsnep_phy_open()
282 memset(tx->entry, 0, sizeof(tx->entry)); in tsnep_tx_ring_cleanup()
284 for (i = 0; i < TSNEP_RING_PAGE_COUNT; i++) { in tsnep_tx_ring_cleanup()
289 tx->page_dma[i] = 0; in tsnep_tx_ring_cleanup()
302 for (i = 0; i < TSNEP_RING_PAGE_COUNT; i++) { in tsnep_tx_ring_create()
310 for (j = 0; j < TSNEP_RING_ENTRIES_PER_PAGE; j++) { in tsnep_tx_ring_create()
320 for (i = 0; i < TSNEP_RING_SIZE; i++) { in tsnep_tx_ring_create()
326 return 0; in tsnep_tx_ring_create()
337 dma = tx->entry[0].desc_dma | TSNEP_RESET_OWNER_COUNTER; in tsnep_tx_init()
340 tx->write = 0; in tsnep_tx_init()
341 tx->read = 0; in tsnep_tx_init()
370 ((val & TSNEP_CONTROL_TX_ENABLE) == 0), 10000, in tsnep_tx_disable()
385 entry->properties = 0; in tsnep_tx_activate()
421 if (tx->increment_owner_counter < 0) in tsnep_tx_activate()
458 *dma = skb_frag_dma_map(dmadev, frag, 0, len, DMA_TO_DEVICE); in tsnep_tx_map_frag()
477 mapped = 0; in tsnep_tx_map_frag()
488 int map_len = 0; in tsnep_tx_map()
492 for (i = 0; i < count; i++) { in tsnep_tx_map()
507 mapped = 0; in tsnep_tx_map()
514 if (mapped < 0) in tsnep_tx_map()
534 int map_len = 0; in tsnep_tx_unmap()
537 for (i = 0; i < count; i++) { in tsnep_tx_unmap()
552 entry->len = 0; in tsnep_tx_unmap()
568 if (skb_shinfo(skb)->nr_frags > 0) in tsnep_xmit_frame_ring()
584 if (retval < 0) { in tsnep_xmit_frame_ring()
598 for (i = 0; i < count; i++) in tsnep_xmit_frame_ring()
626 int map_len = 0; in tsnep_xdp_tx_map()
633 for (i = 0; i < count; i++) { in tsnep_xdp_tx_map()
696 if (retval < 0) { in tsnep_xdp_xmit_frame_ring()
706 for (i = 0; i < count; i++) in tsnep_xdp_xmit_frame_ring()
798 for (i = 0; i < batch; i++) in tsnep_xdp_xmit_zc()
815 int xsk_frames = 0; in tsnep_tx_poll()
840 skb_shinfo(entry->skb)->nr_frags > 0) in tsnep_tx_poll()
863 memset(&hwtstamps, 0, sizeof(hwtstamps)); in tsnep_tx_poll()
901 return budget != 0; in tsnep_tx_poll()
936 return 0; in tsnep_tx_open()
950 for (i = 0; i < TSNEP_RING_SIZE; i++) { in tsnep_rx_ring_cleanup()
964 memset(rx->entry, 0, sizeof(rx->entry)); in tsnep_rx_ring_cleanup()
966 for (i = 0; i < TSNEP_RING_PAGE_COUNT; i++) { in tsnep_rx_ring_cleanup()
971 rx->page_dma[i] = 0; in tsnep_rx_ring_cleanup()
980 struct page_pool_params pp_params = { 0 }; in tsnep_rx_ring_create()
985 for (i = 0; i < TSNEP_RING_PAGE_COUNT; i++) { in tsnep_rx_ring_create()
993 for (j = 0; j < TSNEP_RING_ENTRIES_PER_PAGE; j++) { in tsnep_rx_ring_create()
1004 pp_params.order = 0; in tsnep_rx_ring_create()
1018 for (i = 0; i < TSNEP_RING_SIZE; i++) { in tsnep_rx_ring_create()
1024 return 0; in tsnep_rx_ring_create()
1035 dma = rx->entry[0].desc_dma | TSNEP_RESET_OWNER_COUNTER; in tsnep_rx_init()
1038 rx->write = 0; in tsnep_rx_init()
1039 rx->read = 0; in tsnep_rx_init()
1058 ((val & TSNEP_CONTROL_RX_ENABLE) == 0), 10000, in tsnep_rx_disable()
1092 for (i = 0; i < TSNEP_RING_SIZE - 1; i++) { in tsnep_rx_alloc_page_buffer()
1101 return 0; in tsnep_rx_alloc_page_buffer()
1123 return 0; in tsnep_rx_alloc_buffer()
1147 if (rx->increment_owner_counter < 0) in tsnep_rx_activate()
1167 for (i = 0; i < count && !alloc_failed; i++) { in tsnep_rx_alloc()
1175 if (i == 0 && reuse) in tsnep_rx_alloc()
1225 for (i = 0; i < allocated; i++) { in tsnep_rx_alloc_zc()
1232 if (i == 0) { in tsnep_rx_alloc_zc()
1251 for (i = 0; i < TSNEP_RING_SIZE; i++) { in tsnep_rx_free_zc()
1299 if (xdp_do_redirect(rx->adapter->netdev, xdp, prog) < 0) in tsnep_xdp_run_prog()
1334 if (xdp_do_redirect(rx->adapter->netdev, xdp, prog) < 0) in tsnep_xdp_run_prog_zc()
1395 memset(hwtstamps, 0, sizeof(*hwtstamps)); in tsnep_build_skb()
1438 int xdp_status = 0; in tsnep_rx_poll()
1439 int done = 0; in tsnep_rx_poll()
1541 int xdp_status = 0; in tsnep_rx_poll_zc()
1543 int done = 0; in tsnep_rx_poll_zc()
1694 return 0; in tsnep_rx_open()
1716 for (i = 0; i < TSNEP_RING_SIZE; i++) { in tsnep_rx_reopen()
1722 entry->desc->properties = 0; in tsnep_rx_reopen()
1723 entry->desc_wb->properties = 0; in tsnep_rx_reopen()
1752 for (i = 0; i < TSNEP_RING_SIZE; i++) { in tsnep_rx_reopen_xsk()
1768 entry->desc->properties = 0; in tsnep_rx_reopen_xsk()
1769 entry->desc_wb->properties = 0; in tsnep_rx_reopen_xsk()
1805 int done = 0; in tsnep_poll()
1810 /* handle case where we are called by netpoll with a budget of 0 */ in tsnep_poll()
1811 if (unlikely(budget <= 0)) in tsnep_poll()
1867 retval = request_irq(queue->irq, handler, 0, queue->name, dev); in tsnep_request_irq()
1870 memset(queue->name, 0, sizeof(queue->name)); in tsnep_request_irq()
1889 memset(queue->name, 0, sizeof(queue->name)); in tsnep_free_irq()
1924 rx->tx_queue_index = 0; in tsnep_queue_open()
1959 return 0; in tsnep_queue_open()
1999 for (i = 0; i < adapter->num_queues; i++) { in tsnep_netdev_open()
2011 retval = tsnep_queue_open(adapter, &adapter->queue[i], i == 0); in tsnep_netdev_open()
2030 for (i = 0; i < adapter->num_queues; i++) in tsnep_netdev_open()
2033 return 0; in tsnep_netdev_open()
2038 for (i = 0; i < adapter->num_queues; i++) { in tsnep_netdev_open()
2039 tsnep_queue_close(&adapter->queue[i], i == 0); in tsnep_netdev_open()
2057 for (i = 0; i < adapter->num_queues; i++) { in tsnep_netdev_close()
2060 tsnep_queue_close(&adapter->queue[i], i == 0); in tsnep_netdev_close()
2068 return 0; in tsnep_netdev_close()
2108 return 0; in tsnep_enable_xsk()
2141 queue_mapping = 0; in tsnep_netdev_xmit_frame()
2160 u16 rx_filter = 0; in tsnep_netdev_set_multicast()
2180 for (i = 0; i < adapter->num_tx_queues; i++) { in tsnep_netdev_get_stats64()
2185 for (i = 0; i < adapter->num_rx_queues; i++) { in tsnep_netdev_get_stats64()
2242 return 0; in tsnep_netdev_set_mac_address()
2251 int retval = 0; in tsnep_netdev_set_features()
2320 for (nxmit = 0; nxmit < n; nxmit++) { in tsnep_netdev_xdp_xmit()
2355 return 0; in tsnep_netdev_xsk_wakeup()
2381 iowrite16(0, adapter->addr + TSNEP_RX_FILTER); in tsnep_mac_init()
2405 return 0; in tsnep_mac_init()
2416 return 0; in tsnep_mdio_init()
2438 adapter->mdiobus->phy_mask = 0x0000001; in tsnep_mdio_init()
2459 0); in tsnep_phy_init()
2467 return 0; in tsnep_phy_init()
2479 retval = platform_get_irq(adapter->pdev, 0); in tsnep_queue_init()
2482 if (retval < 0) in tsnep_queue_init()
2487 adapter->queue[0].adapter = adapter; in tsnep_queue_init()
2488 adapter->queue[0].irq = retval; in tsnep_queue_init()
2489 adapter->queue[0].tx = &adapter->tx[0]; in tsnep_queue_init()
2490 adapter->queue[0].tx->adapter = adapter; in tsnep_queue_init()
2491 adapter->queue[0].tx->addr = adapter->addr + TSNEP_QUEUE(0); in tsnep_queue_init()
2492 adapter->queue[0].tx->queue_index = 0; in tsnep_queue_init()
2493 adapter->queue[0].rx = &adapter->rx[0]; in tsnep_queue_init()
2494 adapter->queue[0].rx->adapter = adapter; in tsnep_queue_init()
2495 adapter->queue[0].rx->addr = adapter->addr + TSNEP_QUEUE(0); in tsnep_queue_init()
2496 adapter->queue[0].rx->queue_index = 0; in tsnep_queue_init()
2497 adapter->queue[0].irq_mask = irq_mask; in tsnep_queue_init()
2498 adapter->queue[0].irq_delay_addr = adapter->addr + ECM_INT_DELAY; in tsnep_queue_init()
2499 retval = tsnep_set_irq_coalesce(&adapter->queue[0], in tsnep_queue_init()
2501 if (retval < 0) in tsnep_queue_init()
2504 adapter->netdev->irq = adapter->queue[0].irq; in tsnep_queue_init()
2512 if (retval < 0) in tsnep_queue_init()
2534 if (retval < 0) in tsnep_queue_init()
2538 return 0; in tsnep_queue_init()
2574 adapter->addr = devm_platform_get_and_ioremap_resource(pdev, 0, &io); in tsnep_probe()
2646 return 0; in tsnep_probe()