mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-28 22:21:49 +01:00
driver: net: fsl-mc: Prepare extended cfg for DPNI create
Management Complex FW 9.0 puts a new requirement to prepare extended parameters which should be provided as input in dpni_create. extended parameters includes traffic class and IP reassembly configurations. So prepare extended parameters with default "0" as input for dpni_create. Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com> Reviewed-by: York Sun <york.sun@nxp.com>
This commit is contained in:
parent
53e353fc3e
commit
879a59ac90
@ -1004,6 +1004,8 @@ static int dpni_init(void)
|
|||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct dpni_attr dpni_attr;
|
struct dpni_attr dpni_attr;
|
||||||
|
uint8_t ext_cfg_buf[256] = {0};
|
||||||
|
struct dpni_extended_cfg dpni_extended_cfg;
|
||||||
struct dpni_cfg dpni_cfg;
|
struct dpni_cfg dpni_cfg;
|
||||||
|
|
||||||
dflt_dpni = (struct fsl_dpni_obj *)malloc(sizeof(struct fsl_dpni_obj));
|
dflt_dpni = (struct fsl_dpni_obj *)malloc(sizeof(struct fsl_dpni_obj));
|
||||||
@ -1013,10 +1015,19 @@ static int dpni_init(void)
|
|||||||
goto err_malloc;
|
goto err_malloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memset(&dpni_extended_cfg, 0, sizeof(dpni_extended_cfg));
|
||||||
|
err = dpni_prepare_extended_cfg(&dpni_extended_cfg, &ext_cfg_buf[0]);
|
||||||
|
if (err < 0) {
|
||||||
|
err = -ENODEV;
|
||||||
|
printf("dpni_prepare_extended_cfg() failed: %d\n", err);
|
||||||
|
goto err_prepare_extended_cfg;
|
||||||
|
}
|
||||||
|
|
||||||
memset(&dpni_cfg, 0, sizeof(dpni_cfg));
|
memset(&dpni_cfg, 0, sizeof(dpni_cfg));
|
||||||
dpni_cfg.adv.options = DPNI_OPT_UNICAST_FILTER |
|
dpni_cfg.adv.options = DPNI_OPT_UNICAST_FILTER |
|
||||||
DPNI_OPT_MULTICAST_FILTER;
|
DPNI_OPT_MULTICAST_FILTER;
|
||||||
|
|
||||||
|
dpni_cfg.adv.ext_cfg_iova = (uint64_t)&ext_cfg_buf[0];
|
||||||
err = dpni_create(dflt_mc_io, MC_CMD_NO_FLAGS, &dpni_cfg,
|
err = dpni_create(dflt_mc_io, MC_CMD_NO_FLAGS, &dpni_cfg,
|
||||||
&dflt_dpni->dpni_handle);
|
&dflt_dpni->dpni_handle);
|
||||||
|
|
||||||
@ -1057,11 +1068,12 @@ static int dpni_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_close:
|
err_close:
|
||||||
free(dflt_dpni);
|
|
||||||
err_get_attr:
|
err_get_attr:
|
||||||
dpni_close(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle);
|
dpni_close(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle);
|
||||||
dpni_destroy(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle);
|
dpni_destroy(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpni->dpni_handle);
|
||||||
err_create:
|
err_create:
|
||||||
|
err_prepare_extended_cfg:
|
||||||
|
free(dflt_dpni);
|
||||||
err_malloc:
|
err_malloc:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user