All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] qed: Fix issues in UFP feature commit 'cac6f691'.
@ 2018-06-01  1:47 Sudarsana Reddy Kalluru
  2018-06-01  1:47 ` [PATCH net-next v2 1/2] qed: Fix shared memory inconsistency between driver and the MFW Sudarsana Reddy Kalluru
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sudarsana Reddy Kalluru @ 2018-06-01  1:47 UTC (permalink / raw)
  To: davem; +Cc: netdev, Ariel.Elior, Michal.Kalderon, Sudarsana Reddy Kalluru

From: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>

This patch series fixes couple of issues in the UFP feature commit,
   cac6f691: Add support for Unified Fabric Port.

Changes from previous version:
------------------------------
v2: Added "Fixes:" tag.

Please consider applying it to "net-next".

Sudarsana Reddy Kalluru (2):
  qed: Fix shared memory inconsistency between driver and the MFW.
  qed: Fix use of incorrect shmem address.

 drivers/net/ethernet/qlogic/qed/qed_hsi.h | 1 +
 drivers/net/ethernet/qlogic/qed/qed_mcp.c | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net-next v2 1/2] qed: Fix shared memory inconsistency between driver and the MFW.
  2018-06-01  1:47 [PATCH net-next v2 0/2] qed: Fix issues in UFP feature commit 'cac6f691' Sudarsana Reddy Kalluru
@ 2018-06-01  1:47 ` Sudarsana Reddy Kalluru
  2018-06-01  1:47 ` [PATCH net-next v2 2/2] qed: Fix use of incorrect shmem address Sudarsana Reddy Kalluru
  2018-06-04 14:11 ` [PATCH net-next v2 0/2] qed: Fix issues in UFP feature commit 'cac6f691' David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Sudarsana Reddy Kalluru @ 2018-06-01  1:47 UTC (permalink / raw)
  To: davem; +Cc: netdev, Ariel.Elior, Michal.Kalderon

The structure shared between driver and management firmware (MFW)
differ in sizes. The additional field defined by the MFW is not
relevant to the current driver. Add a dummy field to the structure.

Fixes: cac6f691 ("qed: Add support for Unified Fabric Port")
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Ariel Elior <ariel.elior@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 8e1e6e1..beba930 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_hsi.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_hsi.h
@@ -11996,6 +11996,7 @@ struct public_port {
 #define EEE_REMOTE_TW_RX_MASK   0xffff0000
 #define EEE_REMOTE_TW_RX_OFFSET 16
 
+	u32 reserved1;
 	u32 oem_cfg_port;
 #define OEM_CFG_CHANNEL_TYPE_MASK                       0x00000003
 #define OEM_CFG_CHANNEL_TYPE_OFFSET                     0
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net-next v2 2/2] qed: Fix use of incorrect shmem address.
  2018-06-01  1:47 [PATCH net-next v2 0/2] qed: Fix issues in UFP feature commit 'cac6f691' Sudarsana Reddy Kalluru
  2018-06-01  1:47 ` [PATCH net-next v2 1/2] qed: Fix shared memory inconsistency between driver and the MFW Sudarsana Reddy Kalluru
@ 2018-06-01  1:47 ` Sudarsana Reddy Kalluru
  2018-06-04 14:11 ` [PATCH net-next v2 0/2] qed: Fix issues in UFP feature commit 'cac6f691' David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Sudarsana Reddy Kalluru @ 2018-06-01  1:47 UTC (permalink / raw)
  To: davem; +Cc: netdev, Ariel.Elior, Michal.Kalderon

Incorrect shared memory address is used while deriving the values
for tc and pri_type. Use shmem address corresponding to 'oem_cfg_func'
where the management firmare saves tc/pri_type values.

Fixes: cac6f691 ("qed: Add support for Unified Fabric Port")
Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
Signed-off-by: Ariel Elior <ariel.elior@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_mcp.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
index 2612e3e..6f9927d 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
@@ -1514,9 +1514,10 @@ void qed_mcp_read_ufp_config(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
 	}
 
 	qed_mcp_get_shmem_func(p_hwfn, p_ptt, &shmem_info, MCP_PF_ID(p_hwfn));
-	val = (port_cfg & OEM_CFG_FUNC_TC_MASK) >> OEM_CFG_FUNC_TC_OFFSET;
+	val = (shmem_info.oem_cfg_func & OEM_CFG_FUNC_TC_MASK) >>
+		OEM_CFG_FUNC_TC_OFFSET;
 	p_hwfn->ufp_info.tc = (u8)val;
-	val = (port_cfg & OEM_CFG_FUNC_HOST_PRI_CTRL_MASK) >>
+	val = (shmem_info.oem_cfg_func & OEM_CFG_FUNC_HOST_PRI_CTRL_MASK) >>
 		OEM_CFG_FUNC_HOST_PRI_CTRL_OFFSET;
 	if (val == OEM_CFG_FUNC_HOST_PRI_CTRL_VNIC) {
 		p_hwfn->ufp_info.pri_type = QED_UFP_PRI_VNIC;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v2 0/2] qed: Fix issues in UFP feature commit 'cac6f691'.
  2018-06-01  1:47 [PATCH net-next v2 0/2] qed: Fix issues in UFP feature commit 'cac6f691' Sudarsana Reddy Kalluru
  2018-06-01  1:47 ` [PATCH net-next v2 1/2] qed: Fix shared memory inconsistency between driver and the MFW Sudarsana Reddy Kalluru
  2018-06-01  1:47 ` [PATCH net-next v2 2/2] qed: Fix use of incorrect shmem address Sudarsana Reddy Kalluru
@ 2018-06-04 14:11 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-06-04 14:11 UTC (permalink / raw)
  To: sudarsana.kalluru; +Cc: netdev, Ariel.Elior, Michal.Kalderon

From: Sudarsana Reddy Kalluru <sudarsana.kalluru@cavium.com>
Date: Thu, 31 May 2018 18:47:35 -0700

> From: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
> 
> This patch series fixes couple of issues in the UFP feature commit,
>    cac6f691: Add support for Unified Fabric Port.
> 
> Changes from previous version:
> ------------------------------
> v2: Added "Fixes:" tag.
> 
> Please consider applying it to "net-next".

Series applied, thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-04 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-01  1:47 [PATCH net-next v2 0/2] qed: Fix issues in UFP feature commit 'cac6f691' Sudarsana Reddy Kalluru
2018-06-01  1:47 ` [PATCH net-next v2 1/2] qed: Fix shared memory inconsistency between driver and the MFW Sudarsana Reddy Kalluru
2018-06-01  1:47 ` [PATCH net-next v2 2/2] qed: Fix use of incorrect shmem address Sudarsana Reddy Kalluru
2018-06-04 14:11 ` [PATCH net-next v2 0/2] qed: Fix issues in UFP feature commit 'cac6f691' 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.