Lines Matching refs:ll2
41 #define QED_LL2_RX_REGISTERED(ll2) ((ll2)->rx_queue.b_cb_registered) argument
42 #define QED_LL2_TX_REGISTERED(ll2) ((ll2)->tx_queue.b_cb_registered) argument
106 if (cdev->ll2->cbs && cdev->ll2->cbs->tx_cb) in qed_ll2b_complete_tx_packet()
107 cdev->ll2->cbs->tx_cb(cdev->ll2->cb_cookie, skb, in qed_ll2b_complete_tx_packet()
116 size_t size = cdev->ll2->rx_size + NET_SKB_PAD + in qed_ll2_alloc_buffer()
127 cdev->ll2->rx_size, DMA_FROM_DEVICE); in qed_ll2_alloc_buffer()
140 spin_lock_bh(&cdev->ll2->lock); in qed_ll2_dealloc_buffer()
143 cdev->ll2->rx_size, DMA_FROM_DEVICE); in qed_ll2_dealloc_buffer()
147 cdev->ll2->rx_cnt--; in qed_ll2_dealloc_buffer()
148 if (!cdev->ll2->rx_cnt) in qed_ll2_dealloc_buffer()
151 spin_unlock_bh(&cdev->ll2->lock); in qed_ll2_dealloc_buffer()
160 list_for_each_entry_safe(buffer, tmp_buffer, &cdev->ll2->list, list) in qed_ll2_kill_buffers()
204 cdev->ll2->rx_size, DMA_FROM_DEVICE); in qed_ll2b_complete_rx_packet()
225 if (cdev->ll2->cbs && cdev->ll2->cbs->rx_cb) { in qed_ll2b_complete_rx_packet()
229 cdev->ll2->cbs->rx_cb(cdev->ll2->cb_cookie, skb, in qed_ll2b_complete_rx_packet()
245 rc = qed_ll2_post_rx_buffer(p_hwfn, cdev->ll2->handle, in qed_ll2b_complete_rx_packet()
2374 cdev->ll2->cbs = ops; in qed_ll2_register_cb_ops()
2375 cdev->ll2->cb_cookie = cookie; in qed_ll2_register_cb_ops()
2456 rc = qed_ll2_terminate_connection(p_hwfn, cdev->ll2->handle); in __qed_ll2_stop()
2460 qed_ll2_release_connection(p_hwfn, cdev->ll2->handle); in __qed_ll2_stop()
2471 if (cdev->ll2->handle == QED_LL2_UNUSED_HANDLE) in qed_ll2_stop()
2496 cdev->ll2->handle = QED_LL2_UNUSED_HANDLE; in qed_ll2_stop()
2527 &cdev->ll2->handle, false); in __qed_ll2_start()
2535 rc = qed_ll2_establish_connection(p_hwfn, cdev->ll2->handle); in __qed_ll2_start()
2542 spin_lock_bh(&cdev->ll2->lock); in __qed_ll2_start()
2543 rx_cnt = cdev->ll2->rx_cnt; in __qed_ll2_start()
2544 list_for_each_entry_safe(buffer, tmp_buffer, &cdev->ll2->list, list) { in __qed_ll2_start()
2546 cdev->ll2->handle, in __qed_ll2_start()
2552 cdev->ll2->rx_size, DMA_FROM_DEVICE); in __qed_ll2_start()
2560 spin_unlock_bh(&cdev->ll2->lock); in __qed_ll2_start()
2562 if (rx_cnt == cdev->ll2->rx_cnt) { in __qed_ll2_start()
2566 cdev->ll2->rx_cnt = rx_cnt; in __qed_ll2_start()
2571 qed_ll2_terminate_connection(p_hwfn, cdev->ll2->handle); in __qed_ll2_start()
2573 qed_ll2_release_connection(p_hwfn, cdev->ll2->handle); in __qed_ll2_start()
2589 WARN_ON(!cdev->ll2->cbs); in qed_ll2_start()
2592 INIT_LIST_HEAD(&cdev->ll2->list); in qed_ll2_start()
2593 spin_lock_init(&cdev->ll2->lock); in qed_ll2_start()
2595 cdev->ll2->rx_size = PRM_DMA_PAD_BYTES_NUM + ETH_HLEN + in qed_ll2_start()
2604 rx_num_desc, cdev->ll2->rx_size); in qed_ll2_start()
2620 list_add_tail(&buffer->list, &cdev->ll2->list); in qed_ll2_start()
2672 cdev->ll2->handle = QED_LL2_UNUSED_HANDLE; in qed_ll2_start()
2737 rc = qed_ll2_prepare_tx_packet(p_hwfn, cdev->ll2->handle, in qed_ll2_start_xmit()
2756 cdev->ll2->handle, in qed_ll2_start_xmit()
2781 if (!cdev->ll2) in qed_ll2_stats()
2784 rc = qed_ll2_get_stats(p_hwfn, cdev->ll2->handle, stats); in qed_ll2_stats()
2793 cdev->ll2->handle, stats); in qed_ll2_stats()
2814 cdev->ll2 = kzalloc(sizeof(*cdev->ll2), GFP_KERNEL); in qed_ll2_alloc_if()
2815 return cdev->ll2 ? 0 : -ENOMEM; in qed_ll2_alloc_if()
2820 kfree(cdev->ll2); in qed_ll2_dealloc_if()
2821 cdev->ll2 = NULL; in qed_ll2_dealloc_if()