drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
101
t7xx_dpmaif_irq_tx_done(dpmaif_ctrl, intr_status.intr_queues[i]);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
133
t7xx_dpmaif_irq_rx_done(dpmaif_ctrl, intr_status.intr_queues[i]);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
146
struct dpmaif_ctrl *dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
148
dpmaif_ctrl = isr_para->dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
149
if (dpmaif_ctrl->state != DPMAIF_STATE_PWRON) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
150
dev_err(dpmaif_ctrl->dev, "Interrupt received before initializing DPMAIF\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
154
t7xx_pcie_mac_clear_int(dpmaif_ctrl->t7xx_dev, isr_para->pcie_int);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
162
struct dpmaif_ctrl *dpmaif_ctrl = isr_para->dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
165
t7xx_pcie_mac_set_int(dpmaif_ctrl->t7xx_dev, isr_para->pcie_int);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
169
static void t7xx_dpmaif_isr_parameter_init(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
174
dpmaif_ctrl->rxq_int_mapping[DPF_RX_QNO0] = DPMAIF_INT;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
175
dpmaif_ctrl->rxq_int_mapping[DPF_RX_QNO1] = DPMAIF2_INT;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
178
isr_para = &dpmaif_ctrl->isr_para[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
179
isr_para->dpmaif_ctrl = dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
181
isr_para->pcie_int = dpmaif_ctrl->rxq_int_mapping[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
185
static void t7xx_dpmaif_register_pcie_irq(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
187
struct t7xx_pci_dev *t7xx_dev = dpmaif_ctrl->t7xx_dev;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
192
t7xx_dpmaif_isr_parameter_init(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
195
isr_para = &dpmaif_ctrl->isr_para[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
208
static int t7xx_dpmaif_rxtx_sw_allocs(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
214
ret = t7xx_dpmaif_bat_alloc(dpmaif_ctrl, &dpmaif_ctrl->bat_req, BAT_TYPE_NORMAL);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
216
dev_err(dpmaif_ctrl->dev, "Failed to allocate normal BAT table: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
220
ret = t7xx_dpmaif_bat_alloc(dpmaif_ctrl, &dpmaif_ctrl->bat_frag, BAT_TYPE_FRAG);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
222
dev_err(dpmaif_ctrl->dev, "Failed to allocate frag BAT table: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
227
rx_q = &dpmaif_ctrl->rxq[rx_idx];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
229
rx_q->dpmaif_ctrl = dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
236
tx_q = &dpmaif_ctrl->txq[tx_idx];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
238
tx_q->dpmaif_ctrl = dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
244
ret = t7xx_dpmaif_tx_thread_init(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
246
dev_err(dpmaif_ctrl->dev, "Failed to start TX thread\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
250
ret = t7xx_dpmaif_bat_rel_wq_alloc(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
257
t7xx_dpmaif_tx_thread_rel(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
261
tx_q = &dpmaif_ctrl->txq[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
267
rx_q = &dpmaif_ctrl->rxq[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
271
t7xx_dpmaif_bat_free(dpmaif_ctrl, &dpmaif_ctrl->bat_frag);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
274
t7xx_dpmaif_bat_free(dpmaif_ctrl, &dpmaif_ctrl->bat_req);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
279
static void t7xx_dpmaif_sw_release(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
285
t7xx_dpmaif_tx_thread_rel(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
286
t7xx_dpmaif_bat_wq_rel(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
289
tx_q = &dpmaif_ctrl->txq[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
294
rx_q = &dpmaif_ctrl->rxq[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
299
static int t7xx_dpmaif_start(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
301
struct dpmaif_hw_info *hw_info = &dpmaif_ctrl->hw_info;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
308
if (dpmaif_ctrl->state == DPMAIF_STATE_PWRON)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
314
rxq = &dpmaif_ctrl->rxq[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
327
bitmap_zero(dpmaif_ctrl->bat_req.bat_bitmap, dpmaif_ctrl->bat_req.bat_size_cnt);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
328
buf_cnt = dpmaif_ctrl->bat_req.bat_size_cnt - 1;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
329
ret = t7xx_dpmaif_rx_buf_alloc(dpmaif_ctrl, &dpmaif_ctrl->bat_req, 0, buf_cnt, true);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
331
dev_err(dpmaif_ctrl->dev, "Failed to allocate RX buffer: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
335
buf_cnt = dpmaif_ctrl->bat_frag.bat_size_cnt - 1;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
336
ret = t7xx_dpmaif_rx_frag_alloc(dpmaif_ctrl, &dpmaif_ctrl->bat_frag, buf_cnt, true);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
338
dev_err(dpmaif_ctrl->dev, "Failed to allocate frag RX buffer: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
343
txq = &dpmaif_ctrl->txq[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
352
dev_err(dpmaif_ctrl->dev, "Failed to initialize DPMAIF HW: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
366
dpmaif_ctrl->state = DPMAIF_STATE_PWRON;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
367
t7xx_dpmaif_enable_irq(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
368
wake_up(&dpmaif_ctrl->tx_wq);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
372
t7xx_dpmaif_bat_free(rxq->dpmaif_ctrl, rxq->bat_frag);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
375
t7xx_dpmaif_bat_free(rxq->dpmaif_ctrl, rxq->bat_req);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
380
static void t7xx_dpmaif_stop_sw(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
382
t7xx_dpmaif_tx_stop(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
383
t7xx_dpmaif_rx_stop(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
386
static void t7xx_dpmaif_stop_hw(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
388
t7xx_dpmaif_hw_stop_all_txq(&dpmaif_ctrl->hw_info);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
389
t7xx_dpmaif_hw_stop_all_rxq(&dpmaif_ctrl->hw_info);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
392
static int t7xx_dpmaif_stop(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
394
if (!dpmaif_ctrl->dpmaif_sw_init_done) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
395
dev_err(dpmaif_ctrl->dev, "dpmaif SW init fail\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
399
if (dpmaif_ctrl->state == DPMAIF_STATE_PWROFF)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
402
t7xx_dpmaif_disable_irq(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
403
dpmaif_ctrl->state = DPMAIF_STATE_PWROFF;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
404
t7xx_dpmaif_stop_sw(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
405
t7xx_dpmaif_tx_clear(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
406
t7xx_dpmaif_rx_clear(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
412
struct dpmaif_ctrl *dpmaif_ctrl = param;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
414
t7xx_dpmaif_tx_stop(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
415
t7xx_dpmaif_hw_stop_all_txq(&dpmaif_ctrl->hw_info);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
416
t7xx_dpmaif_hw_stop_all_rxq(&dpmaif_ctrl->hw_info);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
417
t7xx_dpmaif_disable_irq(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
418
t7xx_dpmaif_rx_stop(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
422
static void t7xx_dpmaif_unmask_dlq_intr(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
427
t7xx_dpmaif_dlq_unmask_rx_done(&dpmaif_ctrl->hw_info, qno);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
430
static void t7xx_dpmaif_start_txrx_qs(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
437
txq = &dpmaif_ctrl->txq[que_cnt];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
442
rxq = &dpmaif_ctrl->rxq[que_cnt];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
449
struct dpmaif_ctrl *dpmaif_ctrl = param;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
451
if (!dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
454
t7xx_dpmaif_start_txrx_qs(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
455
t7xx_dpmaif_enable_irq(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
456
t7xx_dpmaif_unmask_dlq_intr(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
457
t7xx_dpmaif_start_hw(&dpmaif_ctrl->hw_info);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
458
wake_up(&dpmaif_ctrl->tx_wq);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
462
static int t7xx_dpmaif_pm_entity_init(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
464
struct md_pm_entity *dpmaif_pm_entity = &dpmaif_ctrl->dpmaif_pm_entity;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
473
dpmaif_pm_entity->entity_param = dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
475
ret = t7xx_pci_pm_entity_register(dpmaif_ctrl->t7xx_dev, dpmaif_pm_entity);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
477
dev_err(dpmaif_ctrl->dev, "dpmaif register pm_entity fail\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
482
static int t7xx_dpmaif_pm_entity_release(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
484
struct md_pm_entity *dpmaif_pm_entity = &dpmaif_ctrl->dpmaif_pm_entity;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
487
ret = t7xx_pci_pm_entity_unregister(dpmaif_ctrl->t7xx_dev, dpmaif_pm_entity);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
489
dev_err(dpmaif_ctrl->dev, "dpmaif register pm_entity fail\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
494
int t7xx_dpmaif_md_state_callback(struct dpmaif_ctrl *dpmaif_ctrl, enum md_state state)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
500
ret = t7xx_dpmaif_start(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
504
ret = t7xx_dpmaif_stop(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
508
ret = t7xx_dpmaif_stop(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
512
t7xx_dpmaif_stop_hw(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
535
struct dpmaif_ctrl *t7xx_dpmaif_hif_init(struct t7xx_pci_dev *t7xx_dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
539
struct dpmaif_ctrl *dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
545
dpmaif_ctrl = devm_kzalloc(dev, sizeof(*dpmaif_ctrl), GFP_KERNEL);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
546
if (!dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
549
dpmaif_ctrl->t7xx_dev = t7xx_dev;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
550
dpmaif_ctrl->callbacks = callbacks;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
551
dpmaif_ctrl->dev = dev;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
552
dpmaif_ctrl->dpmaif_sw_init_done = false;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
553
dpmaif_ctrl->hw_info.dev = dev;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
554
dpmaif_ctrl->hw_info.pcie_base = t7xx_dev->base_addr.pcie_ext_reg_base -
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
557
ret = t7xx_dpmaif_pm_entity_init(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
561
t7xx_dpmaif_register_pcie_irq(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
562
t7xx_dpmaif_disable_irq(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
564
ret = t7xx_dpmaif_rxtx_sw_allocs(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
566
t7xx_dpmaif_pm_entity_release(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
571
dpmaif_ctrl->dpmaif_sw_init_done = true;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
572
return dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
575
void t7xx_dpmaif_hif_exit(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
577
if (dpmaif_ctrl->dpmaif_sw_init_done) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
578
t7xx_dpmaif_stop(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
579
t7xx_dpmaif_pm_entity_release(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
58
static void t7xx_dpmaif_enable_irq(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
580
t7xx_dpmaif_sw_release(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
581
dpmaif_ctrl->dpmaif_sw_init_done = false;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
63
for (i = 0; i < ARRAY_SIZE(dpmaif_ctrl->isr_para); i++) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
64
isr_para = &dpmaif_ctrl->isr_para[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
65
t7xx_pcie_mac_set_int(dpmaif_ctrl->t7xx_dev, isr_para->pcie_int);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
69
static void t7xx_dpmaif_disable_irq(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
74
for (i = 0; i < ARRAY_SIZE(dpmaif_ctrl->isr_para); i++) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
75
isr_para = &dpmaif_ctrl->isr_para[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
76
t7xx_pcie_mac_clear_int(dpmaif_ctrl->t7xx_dev, isr_para->pcie_int);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
82
struct dpmaif_ctrl *dpmaif_ctrl = isr_para->dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
84
struct device *dev = dpmaif_ctrl->dev;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
89
hw_info = &dpmaif_ctrl->hw_info;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.c
96
t7xx_pcie_mac_clear_int_status(dpmaif_ctrl->t7xx_dev, isr_para->pcie_int);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.h
115
struct dpmaif_ctrl *dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.h
140
struct dpmaif_ctrl *dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.h
145
struct dpmaif_ctrl *dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.h
194
struct dpmaif_ctrl *t7xx_dpmaif_hif_init(struct t7xx_pci_dev *t7xx_dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.h
196
void t7xx_dpmaif_hif_exit(struct dpmaif_ctrl *dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif.h
197
int t7xx_dpmaif_md_state_callback(struct dpmaif_ctrl *dpmaif_ctrl, enum md_state state);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1002
t7xx_unmap_bat_page(dpmaif_ctrl->dev, bat_req->bat_skb, i);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1004
t7xx_unmap_bat_skb(dpmaif_ctrl->dev, bat_req->bat_skb, i);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1008
t7xx_dpmaif_base_free(dpmaif_ctrl, bat_req);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1021
rxq->pit_base = dma_alloc_coherent(rxq->dpmaif_ctrl->dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1027
rxq->bat_req = &rxq->dpmaif_ctrl->bat_req;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1030
rxq->bat_frag = &rxq->dpmaif_ctrl->bat_frag;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1037
if (!rxq->dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1040
t7xx_dpmaif_bat_free(rxq->dpmaif_ctrl, rxq->bat_req);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1041
t7xx_dpmaif_bat_free(rxq->dpmaif_ctrl, rxq->bat_frag);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1044
dma_free_coherent(rxq->dpmaif_ctrl->dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1055
dev_err(queue->dpmaif_ctrl->dev, "Failed to allocate RX buffers: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1067
struct dpmaif_ctrl *dpmaif_ctrl = container_of(work, struct dpmaif_ctrl, bat_release_work);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1071
ret = pm_runtime_resume_and_get(dpmaif_ctrl->dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1075
t7xx_pci_disable_sleep(dpmaif_ctrl->t7xx_dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1078
rxq = &dpmaif_ctrl->rxq[DPF_RX_QNO_DFT];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1079
if (t7xx_pci_sleep_disable_complete(dpmaif_ctrl->t7xx_dev)) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1084
t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1085
pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1088
int t7xx_dpmaif_bat_rel_wq_alloc(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1090
dpmaif_ctrl->bat_release_wq = alloc_workqueue("dpmaif_bat_release_work_queue",
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1093
if (!dpmaif_ctrl->bat_release_wq)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1096
INIT_WORK(&dpmaif_ctrl->bat_release_work, t7xx_dpmaif_bat_release_work);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
110
dev_err(dpmaif_ctrl->dev, "RX BAT flow check fail\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1100
void t7xx_dpmaif_bat_wq_rel(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1102
flush_work(&dpmaif_ctrl->bat_release_work);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1104
if (dpmaif_ctrl->bat_release_wq) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1105
destroy_workqueue(dpmaif_ctrl->bat_release_wq);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1106
dpmaif_ctrl->bat_release_wq = NULL;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1116
void t7xx_dpmaif_rx_stop(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1121
struct dpmaif_rx_queue *rxq = &dpmaif_ctrl->rxq[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1127
dev_err(dpmaif_ctrl->dev, "Stop RX SW failed\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
114
static bool t7xx_alloc_and_map_skb_info(const struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1146
dev_err(rxq->dpmaif_ctrl->dev, "Stop RX SW failed, %d\n", cnt);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1167
void t7xx_dpmaif_rx_clear(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
1172
t7xx_dpmaif_stop_rxq(&dpmaif_ctrl->rxq[i]);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
124
data_bus_addr = dma_map_single(dpmaif_ctrl->dev, skb->data, size, DMA_FROM_DEVICE);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
125
if (dma_mapping_error(dpmaif_ctrl->dev, data_bus_addr)) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
126
dev_err_ratelimited(dpmaif_ctrl->dev, "DMA mapping error\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
165
int t7xx_dpmaif_rx_buf_alloc(struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
196
!t7xx_alloc_and_map_skb_info(dpmaif_ctrl, bat_req->pkt_buf_sz, cur_skb))
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
207
ret = t7xx_dpmaif_update_bat_wr_idx(dpmaif_ctrl, q_num, i);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
214
ret = t7xx_dpmaif_dl_snd_hw_bat_cnt(&dpmaif_ctrl->hw_info, i);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
218
hw_wr_idx = t7xx_dpmaif_dl_get_bat_wr_idx(&dpmaif_ctrl->hw_info,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
222
dev_err(dpmaif_ctrl->dev, "Write index mismatch in RX ring\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
231
t7xx_unmap_bat_skb(dpmaif_ctrl->dev, bat_req->bat_skb, i);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
239
struct dpmaif_hw_info *hw_info = &rxq->dpmaif_ctrl->hw_info;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
247
dev_err(rxq->dpmaif_ctrl->dev, "Invalid PIT release index\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
259
dev_err(rxq->dpmaif_ctrl->dev, "PIT release failure: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
320
int t7xx_dpmaif_rx_frag_alloc(struct dpmaif_ctrl *dpmaif_ctrl, struct dpmaif_bat_request *bat_req,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
334
dev_err(dpmaif_ctrl->dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
356
data_base_addr = dma_map_page(dpmaif_ctrl->dev, page, offset,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
358
if (dma_mapping_error(dpmaif_ctrl->dev, data_base_addr)) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
360
dev_err(dpmaif_ctrl->dev, "DMA mapping fail\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
380
t7xx_dpmaif_dl_snd_hw_frg_cnt(&dpmaif_ctrl->hw_info, i);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
386
t7xx_unmap_bat_page(dpmaif_ctrl->dev, bat_req->bat_skb, i);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
399
struct device *dev = rxq->dpmaif_ctrl->dev;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
443
dev_err(rxq->dpmaif_ctrl->dev, "Failed to set frag data to skb: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
509
struct dpmaif_hw_info *hw_info = &rxq->dpmaif_ctrl->hw_info;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
587
dev_err(rxq->dpmaif_ctrl->dev, "Release PKT BAT failed: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
591
ret = t7xx_dpmaif_rx_buf_alloc(rxq->dpmaif_ctrl, rxq->bat_req, rxq->index, bid_cnt, false);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
593
dev_err(rxq->dpmaif_ctrl->dev, "Allocate new RX buffer failed: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
609
dev_err(rxq->dpmaif_ctrl->dev, "Release BAT entry failed: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
613
return t7xx_dpmaif_rx_frag_alloc(rxq->dpmaif_ctrl, rxq->bat_frag, bid_cnt, false);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
633
struct device *dev = rxq->dpmaif_ctrl->dev;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
677
dev_err(rxq->dpmaif_ctrl->dev, "RX set data to skb failed: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
687
struct dpmaif_ctrl *dpmaif_ctrl = rxq->dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
690
queue_work(dpmaif_ctrl->bat_release_wq, &dpmaif_ctrl->bat_release_work);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
694
dev_err(dpmaif_ctrl->dev, "RXQ%u update PIT failed: %d\n", rxq->index, ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
702
struct dpmaif_ctrl *dpmaif_ctrl = rxq->dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
720
dpmaif_ctrl->callbacks->recv_skb(dpmaif_ctrl->t7xx_dev->ccmni_ctlb, skb, &rxq->napi);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
727
struct device *dev = rxq->dpmaif_ctrl->dev;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
81
static int t7xx_dpmaif_update_bat_wr_idx(struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
811
hw_wr_idx = t7xx_dpmaif_dl_dlq_pit_get_wr_idx(&rxq->dpmaif_ctrl->hw_info, rxq->index);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
818
static int t7xx_dpmaif_napi_rx_data_collect(struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
822
struct dpmaif_rx_queue *rxq = &dpmaif_ctrl->rxq[q_num];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
832
dev_err(dpmaif_ctrl->dev, "dlq%u rx ERR:%d\n", rxq->index, ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
84
struct dpmaif_rx_queue *rxq = &dpmaif_ctrl->rxq[q_num];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
840
struct t7xx_pci_dev *t7xx_dev = rxq->dpmaif_ctrl->t7xx_dev;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
849
pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
850
dev_err(rxq->dpmaif_ctrl->dev, "Work RXQ: %d has not been started\n", rxq->index);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
868
int rx_cnt = t7xx_dpmaif_napi_rx_data_collect(rxq->dpmaif_ctrl, rxq->index,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
879
t7xx_dpmaif_clr_ip_busy_sts(&rxq->dpmaif_ctrl->hw_info);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
882
t7xx_dpmaif_clr_ip_busy_sts(&rxq->dpmaif_ctrl->hw_info);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
883
t7xx_dpmaif_dlq_unmask_rx_done(&rxq->dpmaif_ctrl->hw_info, rxq->index);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
884
t7xx_pci_enable_sleep(rxq->dpmaif_ctrl->t7xx_dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
885
pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
888
t7xx_dpmaif_clr_ip_busy_sts(&rxq->dpmaif_ctrl->hw_info);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
89
dev_err(dpmaif_ctrl->dev, "RX queue %d has not been started\n", rxq->index);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
894
void t7xx_dpmaif_irq_rx_done(struct dpmaif_ctrl *dpmaif_ctrl, const unsigned int que_mask)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
897
struct dpmaif_ctrl *ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
902
dev_err(dpmaif_ctrl->dev, "Invalid RXQ number: %u\n", qno);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
906
rxq = &dpmaif_ctrl->rxq[qno];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
907
ctrl = rxq->dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
922
static void t7xx_dpmaif_base_free(const struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
926
dma_free_coherent(dpmaif_ctrl->dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
944
int t7xx_dpmaif_bat_alloc(const struct dpmaif_ctrl *dpmaif_ctrl, struct dpmaif_bat_request *bat_req,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
963
bat_req->bat_base = dma_alloc_coherent(dpmaif_ctrl->dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
970
bat_req->bat_skb = devm_kzalloc(dpmaif_ctrl->dev, bat_req->bat_size_cnt * sw_buf_size,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
984
t7xx_dpmaif_base_free(dpmaif_ctrl, bat_req);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c
989
void t7xx_dpmaif_bat_free(const struct dpmaif_ctrl *dpmaif_ctrl, struct dpmaif_bat_request *bat_req)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h
100
int t7xx_dpmaif_bat_rel_wq_alloc(struct dpmaif_ctrl *dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h
101
int t7xx_dpmaif_rx_buf_alloc(struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h
105
int t7xx_dpmaif_rx_frag_alloc(struct dpmaif_ctrl *dpmaif_ctrl, struct dpmaif_bat_request *bat_req,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h
107
void t7xx_dpmaif_rx_stop(struct dpmaif_ctrl *dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h
108
void t7xx_dpmaif_irq_rx_done(struct dpmaif_ctrl *dpmaif_ctrl, const unsigned int que_mask);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h
110
void t7xx_dpmaif_bat_wq_rel(struct dpmaif_ctrl *dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h
111
int t7xx_dpmaif_bat_alloc(const struct dpmaif_ctrl *dpmaif_ctrl, struct dpmaif_bat_request *bat_req,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h
113
void t7xx_dpmaif_bat_free(const struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.h
99
void t7xx_dpmaif_rx_clear(struct dpmaif_ctrl *dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
103
dma_unmap_single(dpmaif_ctrl->dev, cur_drb_skb->bus_addr,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
108
dev_err(dpmaif_ctrl->dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
125
cb->state_notify(dpmaif_ctrl->t7xx_dev, DMPAIF_TXQ_STATE_IRQ, txq->index);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
129
dev_err(dpmaif_ctrl->dev, "txq%u: DRB not marked as the last one\n", q_num);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
134
static int t7xx_dpmaif_tx_release(struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
137
struct dpmaif_tx_queue *txq = &dpmaif_ctrl->txq[q_num];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
141
t7xx_dpmaif_update_drb_rd_idx(dpmaif_ctrl, q_num);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
148
real_rel_cnt = t7xx_dpmaif_release_tx_buffer(dpmaif_ctrl, q_num, real_rel_cnt);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
155
return !!t7xx_dpmaif_update_drb_rd_idx(txq->dpmaif_ctrl, txq->index);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
161
struct dpmaif_ctrl *dpmaif_ctrl = txq->dpmaif_ctrl;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
165
ret = pm_runtime_resume_and_get(dpmaif_ctrl->dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
170
t7xx_pci_disable_sleep(dpmaif_ctrl->t7xx_dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
171
if (t7xx_pci_sleep_disable_complete(dpmaif_ctrl->t7xx_dev)) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
172
hw_info = &dpmaif_ctrl->hw_info;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
173
ret = t7xx_dpmaif_tx_release(dpmaif_ctrl, txq->index, txq->drb_size_cnt);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
177
queue_work(dpmaif_ctrl->txq[txq->index].worker,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
178
&dpmaif_ctrl->txq[txq->index].dpmaif_tx_work);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
187
t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
188
pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
191
static void t7xx_setup_msg_drb(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int q_num,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
195
struct dpmaif_drb *drb_base = dpmaif_ctrl->txq[q_num].drb_base;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
207
static void t7xx_setup_payload_drb(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int q_num,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
211
struct dpmaif_drb *drb_base = dpmaif_ctrl->txq[q_num].drb_base;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
224
static void t7xx_record_drb_skb(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int q_num,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
229
struct dpmaif_drb_skb *drb_skb_base = dpmaif_ctrl->txq[q_num].drb_skb_base;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
241
static int t7xx_dpmaif_add_skb_to_ring(struct dpmaif_ctrl *dpmaif_ctrl, struct sk_buff *skb)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
243
struct dpmaif_callbacks *cb = dpmaif_ctrl->callbacks;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
252
txq = &dpmaif_ctrl->txq[skb_cb->txq_number];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
253
if (!txq->que_started || dpmaif_ctrl->state != DPMAIF_STATE_PWRON)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
262
dev_warn_ratelimited(dpmaif_ctrl->dev, "frag_list not supported\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
274
t7xx_setup_msg_drb(dpmaif_ctrl, txq->index, cur_idx, skb->len, 0, skb_cb->netif_idx);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
275
t7xx_record_drb_skb(dpmaif_ctrl, txq->index, cur_idx, skb, true, 0, 0, 0, 0);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
296
bus_addr = dma_map_single(dpmaif_ctrl->dev, data_addr, data_len, DMA_TO_DEVICE);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
297
if (dma_mapping_error(dpmaif_ctrl->dev, bus_addr))
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
303
t7xx_setup_payload_drb(dpmaif_ctrl, txq->index, cur_idx, bus_addr, data_len,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
305
t7xx_record_drb_skb(dpmaif_ctrl, txq->index, cur_idx, skb, false, is_frag,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
311
cb->state_notify(dpmaif_ctrl->t7xx_dev, DMPAIF_TXQ_STATE_FULL, txq->index);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
323
dma_unmap_single(dpmaif_ctrl->dev, drb_skb->bus_addr,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
333
static bool t7xx_tx_lists_are_all_empty(const struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
338
if (!skb_queue_empty(&dpmaif_ctrl->txq[i].tx_skb_head))
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
346
static struct dpmaif_tx_queue *t7xx_select_tx_queue(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
350
txq = &dpmaif_ctrl->txq[DPMAIF_TX_DEFAULT_QUEUE];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
393
ret = t7xx_dpmaif_add_skb_to_ring(txq->dpmaif_ctrl, skb);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
395
dev_err(txq->dpmaif_ctrl->dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
410
static void t7xx_do_tx_hw_push(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
418
txq = t7xx_select_tx_queue(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
431
if (!t7xx_pci_sleep_disable_complete(dpmaif_ctrl->t7xx_dev))
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
437
t7xx_dpmaif_ul_update_hw_drb_cnt(&dpmaif_ctrl->hw_info, txq->index,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
441
} while (!t7xx_tx_lists_are_all_empty(dpmaif_ctrl) && !kthread_should_stop() &&
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
442
(dpmaif_ctrl->state == DPMAIF_STATE_PWRON));
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
447
struct dpmaif_ctrl *dpmaif_ctrl = arg;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
451
if (t7xx_tx_lists_are_all_empty(dpmaif_ctrl) ||
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
452
dpmaif_ctrl->state != DPMAIF_STATE_PWRON) {
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
453
if (wait_event_interruptible(dpmaif_ctrl->tx_wq,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
454
(!t7xx_tx_lists_are_all_empty(dpmaif_ctrl) &&
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
455
dpmaif_ctrl->state == DPMAIF_STATE_PWRON) ||
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
463
ret = pm_runtime_resume_and_get(dpmaif_ctrl->dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
467
t7xx_pci_disable_sleep(dpmaif_ctrl->t7xx_dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
468
t7xx_do_tx_hw_push(dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
469
t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
470
pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
476
int t7xx_dpmaif_tx_thread_init(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
478
init_waitqueue_head(&dpmaif_ctrl->tx_wq);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
479
dpmaif_ctrl->tx_thread = kthread_run(t7xx_dpmaif_tx_hw_push_thread,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
480
dpmaif_ctrl, "dpmaif_tx_hw_push");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
481
return PTR_ERR_OR_ZERO(dpmaif_ctrl->tx_thread);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
484
void t7xx_dpmaif_tx_thread_rel(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
486
if (dpmaif_ctrl->tx_thread)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
487
kthread_stop(dpmaif_ctrl->tx_thread);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
505
int t7xx_dpmaif_tx_send_skb(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int txq_number,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
508
struct dpmaif_tx_queue *txq = &dpmaif_ctrl->txq[txq_number];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
509
struct dpmaif_callbacks *cb = dpmaif_ctrl->callbacks;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
51
static unsigned int t7xx_dpmaif_update_drb_rd_idx(struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
513
cb->state_notify(dpmaif_ctrl->t7xx_dev, DMPAIF_TXQ_STATE_FULL, txq_number);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
520
wake_up(&dpmaif_ctrl->tx_wq);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
525
void t7xx_dpmaif_irq_tx_done(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int que_mask)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
531
queue_work(dpmaif_ctrl->txq[i].worker, &dpmaif_ctrl->txq[i].dpmaif_tx_work);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
54
struct dpmaif_tx_queue *txq = &dpmaif_ctrl->txq[q_num];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
545
txq->drb_base = dma_alloc_coherent(txq->dpmaif_ctrl->dev, brb_pd_size,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
551
txq->drb_skb_base = devm_kzalloc(txq->dpmaif_ctrl->dev, brb_skb_size, GFP_KERNEL);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
553
dma_free_coherent(txq->dpmaif_ctrl->dev, brb_pd_size,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
575
dma_unmap_single(txq->dpmaif_ctrl->dev, drb_skb->bus_addr,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
588
dma_free_coherent(txq->dpmaif_ctrl->dev,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
615
dev_err(txq->dpmaif_ctrl->dev, "Failed to initialize DRB buffers: %d\n", ret);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
62
new_hw_rd_idx = t7xx_dpmaif_ul_get_rd_idx(&dpmaif_ctrl->hw_info, q_num);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
64
dev_err(dpmaif_ctrl->dev, "Out of range read index: %u\n", new_hw_rd_idx);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
640
void t7xx_dpmaif_tx_stop(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
648
txq = &dpmaif_ctrl->txq[i];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
656
dev_err(dpmaif_ctrl->dev, "TX queue stop failed\n");
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
676
void t7xx_dpmaif_tx_clear(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
681
t7xx_dpmaif_txq_flush_rel(&dpmaif_ctrl->txq[i]);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
80
static unsigned int t7xx_dpmaif_release_tx_buffer(struct dpmaif_ctrl *dpmaif_ctrl,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
83
struct dpmaif_tx_queue *txq = &dpmaif_ctrl->txq[q_num];
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c
84
struct dpmaif_callbacks *cb = dpmaif_ctrl->callbacks;
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.h
68
int t7xx_dpmaif_tx_send_skb(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int txq_number,
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.h
70
void t7xx_dpmaif_tx_thread_rel(struct dpmaif_ctrl *dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.h
71
int t7xx_dpmaif_tx_thread_init(struct dpmaif_ctrl *dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.h
73
void t7xx_dpmaif_irq_tx_done(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int que_mask);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.h
75
void t7xx_dpmaif_tx_stop(struct dpmaif_ctrl *dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.h
76
void t7xx_dpmaif_tx_clear(struct dpmaif_ctrl *dpmaif_ctrl);
drivers/net/wwan/t7xx/t7xx_netdev.c
49
struct dpmaif_ctrl *ctrl;
drivers/net/wwan/t7xx/t7xx_netdev.h
44
struct dpmaif_ctrl *hif_ctrl;