]> git.openfabrics.org - compat-rdma/compat-rdma.git/commitdiff
qed: Fix shmem structure inconsistency between driver and the mfw.
authorMichal Kalderon <michal.kalderon@cavium.com>
Sun, 21 Oct 2018 08:56:18 +0000 (11:56 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Tue, 23 Oct 2018 18:41:03 +0000 (13:41 -0500)
The structure shared between driver and the management FW (mfw) differ in
sizes. This would lead to issues when driver try to access the structure
members which are not-aligned with the mfw copy e.g., data_ptr usage in the
case of mfw_tlv request.
Align the driver structure with mfw copy, add reserved field(s) to driver
structure for the members not used by the driver.

Fixes: dd006921d67f ("qed: Add MFW interfaces for TLV request support.)
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
linux-next-cherry-picks/0047-qed-Fix-shmem-structure-inconsistency-between-driver.patch [new file with mode: 0644]

diff --git a/linux-next-cherry-picks/0047-qed-Fix-shmem-structure-inconsistency-between-driver.patch b/linux-next-cherry-picks/0047-qed-Fix-shmem-structure-inconsistency-between-driver.patch
new file mode 100644 (file)
index 0000000..06c104b
--- /dev/null
@@ -0,0 +1,35 @@
+From 5f672090e44f4951084c5e1d6b0668a5fc422af8 Mon Sep 17 00:00:00 2001
+From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
+Date: Thu, 27 Sep 2018 04:12:10 -0700
+Subject: [PATCH] qed: Fix shmem structure inconsistency between driver and the
+ mfw.
+
+The structure shared between driver and the management FW (mfw) differ in
+sizes. This would lead to issues when driver try to access the structure
+members which are not-aligned with the mfw copy e.g., data_ptr usage in the
+case of mfw_tlv request.
+Align the driver structure with mfw copy, add reserved field(s) to driver
+structure for the members not used by the driver.
+
+Fixes: dd006921d67f ("qed: Add MFW interfaces for TLV request support.)
+Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
+Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
+---
+ drivers/net/ethernet/qlogic/qed/qed_hsi.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/net/ethernet/qlogic/qed/qed_hsi.h b/drivers/net/ethernet/qlogic/qed/qed_hsi.h
+index 9b3ef00e..a713826 100644
+--- a/drivers/net/ethernet/qlogic/qed/qed_hsi.h
++++ b/drivers/net/ethernet/qlogic/qed/qed_hsi.h
+@@ -11987,6 +11987,7 @@ struct public_global {
+       u32 running_bundle_id;
+       s32 external_temperature;
+       u32 mdump_reason;
++      u64 reserved;
+       u32 data_ptr;
+       u32 data_size;
+ };
+-- 
+1.8.3.1
+