Skip to contentSkip to conversation

Patch "ibmvnic: Fix endian error when requesting device capabilities" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jun 15, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ibmvnic: Fix endian error when requesting device capabilities

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ibmvnic-fix-endian-error-when-requesting-device-capabilities.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Jun 15 09:31:48 CEST 2017

From: Thomas Falcon <[email protected]>
Date: Tue, 23 May 2017 21:53:27 -0400
Subject: ibmvnic: Fix endian error when requesting device capabilities

From: Thomas Falcon <[email protected]>

[ Upstream commit 28f4d16570dcf440e54a4d72666d5be452f27d0e ]

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.

---
 drivers/net/ethernet/ibm/ibmvnic.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/ibm/ibmvnic.c +2 -2
@@ -2400,10 +2400,10 @@ static void handle_request_cap_rsp(union
 	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:

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/ibmvnic-fix-endian-error-when-requesting-device-capabilities.patch queue-4.9/ibmvnic-fix-endian-errors-in-error-reporting-output.patch