From: Yuval Mintz <Yuval.Mintz@qlogic.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <Ariel.Elior@qlogic.com>,
Michal Kalderon <Michal.Kalderon@qlogic.com>,
Yuval Mintz <Yuval.Mintz@qlogic.com>
Subject: [PATCH net-next 5/5] bnx2x: Fix timesync endianity
Date: Mon, 25 Aug 2014 17:48:33 +0300 [thread overview]
Message-ID: <1408978113-27902-6-git-send-email-Yuval.Mintz@qlogic.com> (raw)
In-Reply-To: <1408978113-27902-1-git-send-email-Yuval.Mintz@qlogic.com>
From: Michal Kalderon <Michal.Kalderon@qlogic.com>
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>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
index 798e97f..38acecd 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
@@ -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,
--
1.8.3.1
next prev parent reply other threads:[~2014-08-25 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 14:48 [PATCH net-next 0/5] bnx2x: `fixes' patch-series Yuval Mintz
2014-08-25 14:48 ` [PATCH net-next 1/5] bnx2x: ethtool -d might cause timeout in log Yuval Mintz
2014-08-25 14:48 ` [PATCH net-next 2/5] bnx2x: Fix stop-on-error Yuval Mintz
2014-08-25 14:48 ` [PATCH net-next 3/5] bnx2x: VF clean statistics Yuval Mintz
2014-08-25 14:48 ` [PATCH net-next 4/5] bnx2x: Be more forgiving toward SW GRO Yuval Mintz
2014-08-25 14:48 ` Yuval Mintz [this message]
2014-08-26 0:30 ` [PATCH net-next 0/5] bnx2x: `fixes' patch-series David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408978113-27902-6-git-send-email-Yuval.Mintz@qlogic.com \
--to=yuval.mintz@qlogic.com \
--cc=Ariel.Elior@qlogic.com \
--cc=Michal.Kalderon@qlogic.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).