Skip to content

Commit dc4dff6

Browse files
vattunuru-mrvlmdevapraba
authored andcommitted
dma/cnxk: use ROC API for model check
Use ROC API to get the model details instead of local variable, which is getting wrong value in device probe(). Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
1 parent e697662 commit dc4dff6

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/dma/cnxk/cnxk_dmadev.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ cnxk_dmadev_vchan_setup(struct rte_dma_dev *dev, uint16_t vchan,
283283

284284
header = (union cnxk_dpi_instr_cmd *)&dpi_conf->cmd.u;
285285

286-
if (dpivf->is_cn10k)
286+
if (roc_model_is_cn10k())
287287
ret = cn10k_dmadev_setup_hdr(header, conf, dpivf);
288288
else
289289
ret = cn9k_dmadev_setup_hdr(header, conf);
@@ -654,7 +654,6 @@ cnxk_dmadev_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_pci_de
654654
dmadev->fp_obj->dev_private = dpivf;
655655
dmadev->dev_ops = &cnxk_dmadev_ops;
656656

657-
dpivf->is_cn10k = roc_model_is_cn10k();
658657
dpivf->mcs_lock = NULL;
659658
rdpi = &dpivf->rdpi;
660659

drivers/dma/cnxk/cnxk_dmadev.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ struct cnxk_dpi_vf_s {
119119
uint32_t aura;
120120
uint16_t num_vchans;
121121
uint16_t flag;
122-
uint8_t is_cn10k;
123122
} __plt_cache_aligned;
124123

125124
int cnxk_dmadev_copy(void *dev_private, uint16_t vchan, rte_iova_t src, rte_iova_t dst,

0 commit comments

Comments
 (0)