bnx2x: Fix timesync endianity
authorMichal Kalderon <Michal.Kalderon@qlogic.com>
Mon, 25 Aug 2014 14:48:33 +0000 (17:48 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Aug 2014 00:30:22 +0000 (17:30 -0700)
Commit eeed018cbfa30 ("bnx2x: Add timestamping and PTP hardware clock support")
has a missing conversion to LE32, which will prevent the feature from working
on big endian machines.

Signed-off-by: Michal Kalderon <Michal.Kalderon@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: Ariel Elior <Ariel.Elior@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c

index 798e97fb63f7df540dc5cb36ce12376abc0be96e..38acecdd8e9b0a6ebbb649d5bfc24fd467a06464 100644 (file)
@@ -5877,8 +5877,10 @@ int bnx2x_func_send_set_timesync(struct bnx2x *bp,
                set_timesync_params->add_sub_drift_adjust_value;
        rdata->drift_adjust_value = set_timesync_params->drift_adjust_value;
        rdata->drift_adjust_period = set_timesync_params->drift_adjust_period;
-       rdata->offset_delta.lo = U64_LO(set_timesync_params->offset_delta);
-       rdata->offset_delta.hi = U64_HI(set_timesync_params->offset_delta);
+       rdata->offset_delta.lo =
+               cpu_to_le32(U64_LO(set_timesync_params->offset_delta));
+       rdata->offset_delta.hi =
+               cpu_to_le32(U64_HI(set_timesync_params->offset_delta));
 
        DP(BNX2X_MSG_SP, "Set timesync command params: drift_cmd = %d, offset_cmd = %d, add_sub_drift = %d, drift_val = %d, drift_period = %d, offset_lo = %d, offset_hi = %d\n",
           rdata->drift_adjust_cmd, rdata->offset_cmd,