summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorMarian-Cristian Rotariu <marian.rotariu@freescale.com>2014-10-29 14:50:20 (GMT)
committerMadalin Bucur <madalin.bucur@freescale.com>2015-03-11 16:05:52 (GMT)
commit2e7cdc3c7b1787f7843173aa553ec1858311d3ca (patch)
tree87d3fa1619f83fb367d8ad07ca57e75400295395 /drivers/net
parentc1f241ed11f1d78c19af6e0b49443d87f19f04c5 (diff)
downloadlinux-fsl-qoriq-2e7cdc3c7b1787f7843173aa553ec1858311d3ca.tar.xz
dpaa_eth: make the common code endian portable
The parse results structure is in the main memory and is used by the FMan, which is BE. Also, the release function for an SG table entry should use the address in a proper CPU endianness. Signed-off-by: Marian-Cristian Rotariu <marian.rotariu@freescale.com> Change-Id: Iddc6ee051426a1a584e3a8b15a18b6b1544d8b49 Reviewed-on: http://git.am.freescale.net:8181/22451 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/32500
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c
index 6a393fe..eae02e1 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_common.c
@@ -1541,7 +1541,7 @@ void dpa_release_sgt(struct qm_sg_entry *sgt)
DPA_BUG_ON(sgt[i].extension);
bmb[j].hi = sgt[i].addr_hi;
- bmb[j].lo = sgt[i].addr_lo;
+ bmb[j].lo = be32_to_cpu(sgt[i].addr_lo);
j++; i++;
} while (j < ARRAY_SIZE(bmb) &&
@@ -1656,13 +1656,13 @@ int dpa_enable_tx_csum(struct dpa_priv_s *priv,
*/
switch (ethertype) {
case ETH_P_IP:
- parse_result->l3r = FM_L3_PARSE_RESULT_IPV4;
+ parse_result->l3r = cpu_to_be16(FM_L3_PARSE_RESULT_IPV4);
iph = ip_hdr(skb);
DPA_BUG_ON(iph == NULL);
l4_proto = iph->protocol;
break;
case ETH_P_IPV6:
- parse_result->l3r = FM_L3_PARSE_RESULT_IPV6;
+ parse_result->l3r = cpu_to_be16(FM_L3_PARSE_RESULT_IPV6);
ipv6h = ipv6_hdr(skb);
DPA_BUG_ON(ipv6h == NULL);
l4_proto = ipv6h->nexthdr;