enetc: Fix endianness issues for enetc_qos
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Thu, 19 Nov 2020 10:12:15 +0000 (12:12 +0200)
committerXiaobo Xie <xiaobo.xie@nxp.com>
Thu, 29 Apr 2021 07:59:57 +0000 (09:59 +0200)
commit5316b1611e6cc6ceb2284515ecbfacabd129c24f
tree1ae1a03ad881731be4cd4fc7372937dcfde935a7
parentf182c7aeb81b77801e1992b7a972545734b34ee7
enetc: Fix endianness issues for enetc_qos

Currently the control buffer descriptor (cbd) fields have endianness
restrictions while the commands passed into the control buffers
don't (with one exception). This patch fixes offending code,
by adding endianness accessors for cbd fields and removing the
unnecessary ones in case of data buffer fields. Currently there's
no need to convert all commands to little endian format, the patch
only focuses on fixing current endianness issues reported by sparse.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 0dfd294c92411da47041cca4ef790ee6112d6b68)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
drivers/net/ethernet/freescale/enetc/enetc_qos.c