From 286e6743957e850f10cade7b2abddbf9572467a8 Mon Sep 17 00:00:00 2001 From: Mandy Lavi Date: Tue, 28 May 2013 11:06:07 +0300 Subject: fmd: applied the appropriate liodn_offset to all VSPs CR:ENGR00263170 The previous default liodn_offset is no longer valid in sdk1.4 Signed-off-by: Mandy Lavi Change-Id: I9acbe9433e4c569b197139d5d9201af740f318f0 Reviewed-on: http://git.am.freescale.net:8181/2732 Tested-by: Review Code-CDREVIEW Reviewed-by: Bulie Radu-Andrei-B37577 Reviewed-by: Fleming Andrew-AFLEMING diff --git a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm.c b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm.c index c958675..3c372a3 100644 --- a/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm.c +++ b/drivers/net/ethernet/freescale/fman/src/wrapper/lnxwrp_ioctls_fm.c @@ -2790,7 +2790,12 @@ invalid_port_id: #endif if (copy_from_user(¶m, (void *)arg, sizeof(param))) RETURN_ERROR(MINOR, E_WRITE_FAILED, NO_MSG); - param.p_fm = p_LnxWrpFmDev->h_Dev; + { + uint8_t portId = param.port_params.port_id; + param.p_fm = p_LnxWrpFmDev->h_Dev; + param.liodn_offset = + p_LnxWrpFmDev->rxPorts[portId].settings.param.specificParams.rxParams.liodnOffset; + } param.id = FM_VSP_Config((t_FmVspParams *)¶m); #if defined(CONFIG_COMPAT) diff --git a/include/uapi/linux/fmd/Peripherals/fm_ioctls.h b/include/uapi/linux/fmd/Peripherals/fm_ioctls.h index 42c01b7..54e65b7 100644 --- a/include/uapi/linux/fmd/Peripherals/fm_ioctls.h +++ b/include/uapi/linux/fmd/Peripherals/fm_ioctls.h @@ -249,7 +249,7 @@ typedef struct ioc_fm_vsp_params_t { struct { ioc_fm_port_type port_type; /**< Port type */ uint8_t port_id; /**< Port Id - relative to type */ - } portParams; + } port_params; uint8_t relative_profile_id; /**< VSP Id - relative to VSP's range defined in relevant FM object */ void *id; /**< return value */ -- cgit v0.10.2