* [PATCH net] ibmvnic: Fix endian error when requesting device capabilities
@ 2017-02-15 16:32 Thomas Falcon
2017-02-15 19:48 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Falcon @ 2017-02-15 16:32 UTC (permalink / raw)
To: netdev; +Cc: nfont, jallen
When a vNIC client driver requests a faulty device setting, the
server returns an acceptable value for the client to request.
This 64 bit value was incorrectly being swapped as a 32 bit value,
resulting in loss of data. This patch corrects that by using
the 64 bit swap function.
Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 5b66b4f..158b49a 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2389,10 +2389,10 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq,
case PARTIALSUCCESS:
dev_info(dev, "req=%lld, rsp=%ld in %s queue, retrying.\n",
*req_value,
- (long int)be32_to_cpu(crq->request_capability_rsp.
+ (long int)be64_to_cpu(crq->request_capability_rsp.
number), name);
release_sub_crqs_no_irqs(adapter);
- *req_value = be32_to_cpu(crq->request_capability_rsp.number);
+ *req_value = be64_to_cpu(crq->request_capability_rsp.number);
init_sub_crqs(adapter, 1);
return;
default:
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] ibmvnic: Fix endian error when requesting device capabilities
2017-02-15 16:32 [PATCH net] ibmvnic: Fix endian error when requesting device capabilities Thomas Falcon
@ 2017-02-15 19:48 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-02-15 19:48 UTC (permalink / raw)
To: tlfalcon; +Cc: netdev, nfont, jallen
From: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Date: Wed, 15 Feb 2017 10:32:11 -0600
> When a vNIC client driver requests a faulty device setting, the
> server returns an acceptable value for the client to request.
> This 64 bit value was incorrectly being swapped as a 32 bit value,
> resulting in loss of data. This patch corrects that by using
> the 64 bit swap function.
>
> Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-15 19:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 16:32 [PATCH net] ibmvnic: Fix endian error when requesting device capabilities Thomas Falcon
2017-02-15 19:48 ` David Miller
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).