* [PATCH net] be2net: Fix endian issue in logical link config command
@ 2017-03-30 4:58 Suresh Reddy
2017-03-30 22:59 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Suresh Reddy @ 2017-03-30 4:58 UTC (permalink / raw)
To: netdev
Use cpu_to_le32() for link_config variable in set_logical_link_config
command as this variable is of type u32.
Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 0e74529..7c027d7 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -4939,8 +4939,9 @@ static int
__be_cmd_set_logical_link_config(struct be_adapter *adapter,
int link_state, int version, u8 domain)
{
- struct be_mcc_wrb *wrb;
struct be_cmd_req_set_ll_link *req;
+ struct be_mcc_wrb *wrb;
+ u32 link_config = 0;
int status;
mutex_lock(&adapter->mcc_lock);
@@ -4962,10 +4963,12 @@ __be_cmd_set_logical_link_config(struct be_adapter *adapter,
if (link_state == IFLA_VF_LINK_STATE_ENABLE ||
link_state == IFLA_VF_LINK_STATE_AUTO)
- req->link_config |= PLINK_ENABLE;
+ link_config |= PLINK_ENABLE;
if (link_state == IFLA_VF_LINK_STATE_AUTO)
- req->link_config |= PLINK_TRACK;
+ link_config |= PLINK_TRACK;
+
+ req->link_config = cpu_to_le32(link_config);
status = be_mcc_notify_wait(adapter);
err:
--
2.10.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] be2net: Fix endian issue in logical link config command
2017-03-30 4:58 [PATCH net] be2net: Fix endian issue in logical link config command Suresh Reddy
@ 2017-03-30 22:59 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-03-30 22:59 UTC (permalink / raw)
To: suresh.reddy; +Cc: netdev
From: Suresh Reddy <suresh.reddy@broadcom.com>
Date: Thu, 30 Mar 2017 00:58:32 -0400
> Use cpu_to_le32() for link_config variable in set_logical_link_config
> command as this variable is of type u32.
>
> Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-30 22:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30 4:58 [PATCH net] be2net: Fix endian issue in logical link config command Suresh Reddy
2017-03-30 22:59 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.