All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/3] qed*: Bug fix series.
@ 2017-05-04  6:52 Sudarsana Reddy Kalluru
  2017-05-04  6:52 ` [PATCH net 1/3] qed*: Fix possible overflow for status block id field Sudarsana Reddy Kalluru
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Sudarsana Reddy Kalluru @ 2017-05-04  6:52 UTC (permalink / raw)
  To: davem; +Cc: netdev, Yuval.Mintz, Sudarsana Reddy Kalluru

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

The series contains minor bug fixes for qed/qede drivers.

Please consider applying it to 'net' branch.

Sudarsana Reddy Kalluru (3):
  qed*: Fix possible overflow for status block id field.
  qed: Fix overriding of supported autoneg value.
  qede: Fix possible misconfiguration of advertised autoneg value.

 drivers/net/ethernet/qlogic/qed/qed_dev.c       | 11 +++++++----
 drivers/net/ethernet/qlogic/qed/qed_dev_api.h   |  4 ++--
 drivers/net/ethernet/qlogic/qed/qed_main.c      |  8 ++++++--
 drivers/net/ethernet/qlogic/qed/qed_mcp.h       |  1 +
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 10 +++++++---
 include/linux/qed/qed_if.h                      |  2 +-
 6 files changed, 24 insertions(+), 12 deletions(-)

-- 
1.8.3.1

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

* [PATCH net 1/3] qed*: Fix possible overflow for status block id field.
  2017-05-04  6:52 [PATCH net 0/3] qed*: Bug fix series Sudarsana Reddy Kalluru
@ 2017-05-04  6:52 ` Sudarsana Reddy Kalluru
  2017-05-04  6:52 ` [PATCH net 2/3] qed: Fix overriding of supported autoneg value Sudarsana Reddy Kalluru
  2017-05-04  6:52 ` [PATCH net 3/3] qede: Fix possible misconfiguration of advertised " Sudarsana Reddy Kalluru
  2 siblings, 0 replies; 7+ messages in thread
From: Sudarsana Reddy Kalluru @ 2017-05-04  6:52 UTC (permalink / raw)
  To: davem; +Cc: netdev, Yuval.Mintz

Value for status block id could be more than 256 in 100G mode, need to
update its data type from u8 to u16.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_dev.c       | 8 ++++----
 drivers/net/ethernet/qlogic/qed/qed_dev_api.h   | 4 ++--
 drivers/net/ethernet/qlogic/qed/qed_main.c      | 2 +-
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 5 ++---
 include/linux/qed/qed_if.h                      | 2 +-
 5 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 5f31140..5c6874a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -3586,7 +3586,7 @@ static int qed_set_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
 }
 
 int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
-			 u16 coalesce, u8 qid, u16 sb_id)
+			 u16 coalesce, u16 qid, u16 sb_id)
 {
 	struct ustorm_eth_queue_zone eth_qzone;
 	u8 timeset, timer_res;
@@ -3607,7 +3607,7 @@ int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
 	}
 	timeset = (u8)(coalesce >> timer_res);
 
-	rc = qed_fw_l2_queue(p_hwfn, (u16)qid, &fw_qid);
+	rc = qed_fw_l2_queue(p_hwfn, qid, &fw_qid);
 	if (rc)
 		return rc;
 
@@ -3628,7 +3628,7 @@ int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
 }
 
 int qed_set_txq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
-			 u16 coalesce, u8 qid, u16 sb_id)
+			 u16 coalesce, u16 qid, u16 sb_id)
 {
 	struct xstorm_eth_queue_zone eth_qzone;
 	u8 timeset, timer_res;
@@ -3649,7 +3649,7 @@ int qed_set_txq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
 	}
 	timeset = (u8)(coalesce >> timer_res);
 
-	rc = qed_fw_l2_queue(p_hwfn, (u16)qid, &fw_qid);
+	rc = qed_fw_l2_queue(p_hwfn, qid, &fw_qid);
 	if (rc)
 		return rc;
 
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev_api.h b/drivers/net/ethernet/qlogic/qed/qed_dev_api.h
index cefe3ee..12d16c0 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev_api.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev_api.h
@@ -454,7 +454,7 @@ int qed_final_cleanup(struct qed_hwfn *p_hwfn,
  * @return int
  */
 int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
-			 u16 coalesce, u8 qid, u16 sb_id);
+			 u16 coalesce, u16 qid, u16 sb_id);
 
 /**
  * @brief qed_set_txq_coalesce - Configure coalesce parameters for a Tx queue
@@ -471,7 +471,7 @@ int qed_set_rxq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
  * @return int
  */
 int qed_set_txq_coalesce(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt,
-			 u16 coalesce, u8 qid, u16 sb_id);
+			 u16 coalesce, u16 qid, u16 sb_id);
 
 const char *qed_hw_get_resc_name(enum qed_resources res_id);
 #endif
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index 59992cf..a5eef1a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -1521,7 +1521,7 @@ static void qed_get_coalesce(struct qed_dev *cdev, u16 *rx_coal, u16 *tx_coal)
 }
 
 static int qed_set_coalesce(struct qed_dev *cdev, u16 rx_coal, u16 tx_coal,
-			    u8 qid, u16 sb_id)
+			    u16 qid, u16 sb_id)
 {
 	struct qed_hwfn *hwfn;
 	struct qed_ptt *ptt;
diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index 4dcfe96..b22753c 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -706,8 +706,7 @@ static int qede_set_coalesce(struct net_device *dev,
 {
 	struct qede_dev *edev = netdev_priv(dev);
 	int i, rc = 0;
-	u16 rxc, txc;
-	u8 sb_id;
+	u16 rxc, txc, sb_id;
 
 	if (!netif_running(dev)) {
 		DP_INFO(edev, "Interface is down\n");
@@ -729,7 +728,7 @@ static int qede_set_coalesce(struct net_device *dev,
 	for_each_queue(i) {
 		sb_id = edev->fp_array[i].sb_info->igu_sb_id;
 		rc = edev->ops->common->set_coalesce(edev->cdev, rxc, txc,
-						     (u8)i, sb_id);
+						     (u16)i, sb_id);
 		if (rc) {
 			DP_INFO(edev, "Set coalesce error, rc = %d\n", rc);
 			return rc;
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
index 5544d7b..c70ac13 100644
--- a/include/linux/qed/qed_if.h
+++ b/include/linux/qed/qed_if.h
@@ -635,7 +635,7 @@ struct qed_common_ops {
  * @return 0 on success, error otherwise.
  */
 	int (*set_coalesce)(struct qed_dev *cdev, u16 rx_coal, u16 tx_coal,
-			    u8 qid, u16 sb_id);
+			    u16 qid, u16 sb_id);
 
 /**
  * @brief set_led - Configure LED mode
-- 
1.8.3.1

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

* [PATCH net 2/3] qed: Fix overriding of supported autoneg value.
  2017-05-04  6:52 [PATCH net 0/3] qed*: Bug fix series Sudarsana Reddy Kalluru
  2017-05-04  6:52 ` [PATCH net 1/3] qed*: Fix possible overflow for status block id field Sudarsana Reddy Kalluru
@ 2017-05-04  6:52 ` Sudarsana Reddy Kalluru
  2017-05-04  7:20   ` Leon Romanovsky
  2017-05-04  6:52 ` [PATCH net 3/3] qede: Fix possible misconfiguration of advertised " Sudarsana Reddy Kalluru
  2 siblings, 1 reply; 7+ messages in thread
From: Sudarsana Reddy Kalluru @ 2017-05-04  6:52 UTC (permalink / raw)
  To: davem; +Cc: netdev, Yuval.Mintz

Driver currently uses advertised-autoneg value to populate the
supported-autoneg field. When advertised field is updated, user gets
the same value for supported field. Supported-autoneg value need to be
populated from the link capabilities value returned by the MFW.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
---
 drivers/net/ethernet/qlogic/qed/qed_dev.c  | 3 +++
 drivers/net/ethernet/qlogic/qed/qed_main.c | 6 +++++-
 drivers/net/ethernet/qlogic/qed/qed_mcp.h  | 1 +
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index 5c6874a..bb70522 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -2536,6 +2536,9 @@ static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
 		DP_NOTICE(p_hwfn, "Unknown Speed in 0x%08x\n", link_temp);
 	}
 
+	p_hwfn->mcp_info->link_capabilities.default_speed_autoneg =
+		link->speed.autoneg;
+
 	link_temp &= NVM_CFG1_PORT_DRV_FLOW_CONTROL_MASK;
 	link_temp >>= NVM_CFG1_PORT_DRV_FLOW_CONTROL_OFFSET;
 	link->pause.autoneg = !!(link_temp &
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index a5eef1a..b7ad36b 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -1372,7 +1372,7 @@ static void qed_fill_link(struct qed_hwfn *hwfn,
 
 	/* TODO - at the moment assume supported and advertised speed equal */
 	if_link->supported_caps = QED_LM_FIBRE_BIT;
-	if (params.speed.autoneg)
+	if (link_caps.default_speed_autoneg)
 		if_link->supported_caps |= QED_LM_Autoneg_BIT;
 	if (params.pause.autoneg ||
 	    (params.pause.forced_rx && params.pause.forced_tx))
@@ -1382,6 +1382,10 @@ static void qed_fill_link(struct qed_hwfn *hwfn,
 		if_link->supported_caps |= QED_LM_Pause_BIT;
 
 	if_link->advertised_caps = if_link->supported_caps;
+	if (params.speed.autoneg)
+		if_link->advertised_caps |= QED_LM_Autoneg_BIT;
+	else
+		if_link->advertised_caps &= ~QED_LM_Autoneg_BIT;
 	if (params.speed.advertised_speeds &
 	    NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_1G)
 		if_link->advertised_caps |= QED_LM_1000baseT_Half_BIT |
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.h b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
index 5ae35d6..937496d 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
@@ -61,6 +61,7 @@ struct qed_mcp_link_params {
 
 struct qed_mcp_link_capabilities {
 	u32 speed_capabilities;
+	bool default_speed_autoneg;	/* In Mb/s */
 };
 
 struct qed_mcp_link_state {
-- 
1.8.3.1

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

* [PATCH net 3/3] qede: Fix possible misconfiguration of advertised autoneg value.
  2017-05-04  6:52 [PATCH net 0/3] qed*: Bug fix series Sudarsana Reddy Kalluru
  2017-05-04  6:52 ` [PATCH net 1/3] qed*: Fix possible overflow for status block id field Sudarsana Reddy Kalluru
  2017-05-04  6:52 ` [PATCH net 2/3] qed: Fix overriding of supported autoneg value Sudarsana Reddy Kalluru
@ 2017-05-04  6:52 ` Sudarsana Reddy Kalluru
  2 siblings, 0 replies; 7+ messages in thread
From: Sudarsana Reddy Kalluru @ 2017-05-04  6:52 UTC (permalink / raw)
  To: davem; +Cc: netdev, Yuval.Mintz

Fail the configuration of advertised speed-autoneg value if the config
update is not supported.

Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
---
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
index b22753c..172b292 100644
--- a/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qede/qede_ethtool.c
@@ -493,6 +493,11 @@ static int qede_set_link_ksettings(struct net_device *dev,
 	params.override_flags |= QED_LINK_OVERRIDE_SPEED_ADV_SPEEDS;
 	params.override_flags |= QED_LINK_OVERRIDE_SPEED_AUTONEG;
 	if (base->autoneg == AUTONEG_ENABLE) {
+		if (!(current_link.supported_caps & QED_LM_Autoneg_BIT)) {
+			DP_INFO(edev, "Auto negotiation is not supported\n");
+			return -EOPNOTSUPP;
+		}
+
 		params.autoneg = true;
 		params.forced_speed = 0;
 		QEDE_ETHTOOL_TO_DRV_CAPS(params.adv_speeds, cmd, advertising)
-- 
1.8.3.1

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

* Re: [PATCH net 2/3] qed: Fix overriding of supported autoneg value.
  2017-05-04  6:52 ` [PATCH net 2/3] qed: Fix overriding of supported autoneg value Sudarsana Reddy Kalluru
@ 2017-05-04  7:20   ` Leon Romanovsky
  2017-05-04  8:02     ` Kalluru, Sudarsana
  0 siblings, 1 reply; 7+ messages in thread
From: Leon Romanovsky @ 2017-05-04  7:20 UTC (permalink / raw)
  To: Sudarsana Reddy Kalluru; +Cc: davem, netdev, Yuval.Mintz

[-- Attachment #1: Type: text/plain, Size: 2912 bytes --]

On Wed, May 03, 2017 at 11:52:08PM -0700, Sudarsana Reddy Kalluru wrote:
> Driver currently uses advertised-autoneg value to populate the
> supported-autoneg field. When advertised field is updated, user gets
> the same value for supported field. Supported-autoneg value need to be
> populated from the link capabilities value returned by the MFW.
>
> Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
> ---
>  drivers/net/ethernet/qlogic/qed/qed_dev.c  | 3 +++
>  drivers/net/ethernet/qlogic/qed/qed_main.c | 6 +++++-
>  drivers/net/ethernet/qlogic/qed/qed_mcp.h  | 1 +
>  3 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c
> index 5c6874a..bb70522 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
> @@ -2536,6 +2536,9 @@ static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
>  		DP_NOTICE(p_hwfn, "Unknown Speed in 0x%08x\n", link_temp);
>  	}
>
> +	p_hwfn->mcp_info->link_capabilities.default_speed_autoneg =
> +		link->speed.autoneg;
> +
>  	link_temp &= NVM_CFG1_PORT_DRV_FLOW_CONTROL_MASK;
>  	link_temp >>= NVM_CFG1_PORT_DRV_FLOW_CONTROL_OFFSET;
>  	link->pause.autoneg = !!(link_temp &
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
> index a5eef1a..b7ad36b 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_main.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
> @@ -1372,7 +1372,7 @@ static void qed_fill_link(struct qed_hwfn *hwfn,
>
>  	/* TODO - at the moment assume supported and advertised speed equal */
>  	if_link->supported_caps = QED_LM_FIBRE_BIT;
> -	if (params.speed.autoneg)
> +	if (link_caps.default_speed_autoneg)
>  		if_link->supported_caps |= QED_LM_Autoneg_BIT;
>  	if (params.pause.autoneg ||
>  	    (params.pause.forced_rx && params.pause.forced_tx))
> @@ -1382,6 +1382,10 @@ static void qed_fill_link(struct qed_hwfn *hwfn,
>  		if_link->supported_caps |= QED_LM_Pause_BIT;
>
>  	if_link->advertised_caps = if_link->supported_caps;
> +	if (params.speed.autoneg)
> +		if_link->advertised_caps |= QED_LM_Autoneg_BIT;
> +	else
> +		if_link->advertised_caps &= ~QED_LM_Autoneg_BIT;
>  	if (params.speed.advertised_speeds &
>  	    NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_1G)
>  		if_link->advertised_caps |= QED_LM_1000baseT_Half_BIT |
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.h b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
> index 5ae35d6..937496d 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_mcp.h
> +++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
> @@ -61,6 +61,7 @@ struct qed_mcp_link_params {
>
>  struct qed_mcp_link_capabilities {
>  	u32 speed_capabilities;
> +	bool default_speed_autoneg;	/* In Mb/s */

bool variable in Mb/s ?????

>  };
>
>  struct qed_mcp_link_state {
> --
> 1.8.3.1
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* RE: [PATCH net 2/3] qed: Fix overriding of supported autoneg value.
  2017-05-04  7:20   ` Leon Romanovsky
@ 2017-05-04  8:02     ` Kalluru, Sudarsana
  2017-05-04 13:40       ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Kalluru, Sudarsana @ 2017-05-04  8:02 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: davem, netdev, Mintz, Yuval



-----Original Message-----
From: Leon Romanovsky [mailto:leon@kernel.org] 
Sent: 04 May 2017 12:51
To: Kalluru, Sudarsana <Sudarsana.Kalluru@cavium.com>
Cc: davem@davemloft.net; netdev@vger.kernel.org; Mintz, Yuval <Yuval.Mintz@cavium.com>
Subject: Re: [PATCH net 2/3] qed: Fix overriding of supported autoneg value.

On Wed, May 03, 2017 at 11:52:08PM -0700, Sudarsana Reddy Kalluru wrote:
> Driver currently uses advertised-autoneg value to populate the 
> supported-autoneg field. When advertised field is updated, user gets 
> the same value for supported field. Supported-autoneg value need to be 
> populated from the link capabilities value returned by the MFW.
>
> Signed-off-by: Sudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
> ---
>  drivers/net/ethernet/qlogic/qed/qed_dev.c  | 3 +++  
> drivers/net/ethernet/qlogic/qed/qed_main.c | 6 +++++-  
> drivers/net/ethernet/qlogic/qed/qed_mcp.h  | 1 +
>  3 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c 
> b/drivers/net/ethernet/qlogic/qed/qed_dev.c
> index 5c6874a..bb70522 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
> @@ -2536,6 +2536,9 @@ static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
>  		DP_NOTICE(p_hwfn, "Unknown Speed in 0x%08x\n", link_temp);
>  	}
>
> +	p_hwfn->mcp_info->link_capabilities.default_speed_autoneg =
> +		link->speed.autoneg;
> +
>  	link_temp &= NVM_CFG1_PORT_DRV_FLOW_CONTROL_MASK;
>  	link_temp >>= NVM_CFG1_PORT_DRV_FLOW_CONTROL_OFFSET;
>  	link->pause.autoneg = !!(link_temp & diff --git 
> a/drivers/net/ethernet/qlogic/qed/qed_main.c 
> b/drivers/net/ethernet/qlogic/qed/qed_main.c
> index a5eef1a..b7ad36b 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_main.c
> +++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
> @@ -1372,7 +1372,7 @@ static void qed_fill_link(struct qed_hwfn *hwfn,
>
>  	/* TODO - at the moment assume supported and advertised speed equal */
>  	if_link->supported_caps = QED_LM_FIBRE_BIT;
> -	if (params.speed.autoneg)
> +	if (link_caps.default_speed_autoneg)
>  		if_link->supported_caps |= QED_LM_Autoneg_BIT;
>  	if (params.pause.autoneg ||
>  	    (params.pause.forced_rx && params.pause.forced_tx)) @@ -1382,6 
> +1382,10 @@ static void qed_fill_link(struct qed_hwfn *hwfn,
>  		if_link->supported_caps |= QED_LM_Pause_BIT;
>
>  	if_link->advertised_caps = if_link->supported_caps;
> +	if (params.speed.autoneg)
> +		if_link->advertised_caps |= QED_LM_Autoneg_BIT;
> +	else
> +		if_link->advertised_caps &= ~QED_LM_Autoneg_BIT;
>  	if (params.speed.advertised_speeds &
>  	    NVM_CFG1_PORT_DRV_SPEED_CAPABILITY_MASK_1G)
>  		if_link->advertised_caps |= QED_LM_1000baseT_Half_BIT | diff --git 
> a/drivers/net/ethernet/qlogic/qed/qed_mcp.h 
> b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
> index 5ae35d6..937496d 100644
> --- a/drivers/net/ethernet/qlogic/qed/qed_mcp.h
> +++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.h
> @@ -61,6 +61,7 @@ struct qed_mcp_link_params {
>
>  struct qed_mcp_link_capabilities {
>  	u32 speed_capabilities;
> +	bool default_speed_autoneg;	/* In Mb/s */

bool variable in Mb/s ?????

Thanks. It's an incorrect comment.

Dave, please let us know if re-spin is required for this. If not required, will plan to clean it up in the next series.

>  };
>
>  struct qed_mcp_link_state {
> --
> 1.8.3.1
>

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

* Re: [PATCH net 2/3] qed: Fix overriding of supported autoneg value.
  2017-05-04  8:02     ` Kalluru, Sudarsana
@ 2017-05-04 13:40       ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2017-05-04 13:40 UTC (permalink / raw)
  To: Sudarsana.Kalluru; +Cc: leon, netdev, Yuval.Mintz

From: "Kalluru, Sudarsana" <Sudarsana.Kalluru@cavium.com>
Date: Thu, 4 May 2017 08:02:52 +0000

> Dave, please let us know if re-spin is required for this. If not required, will plan to clean it up in the next series.

Please fix this now.

Thanks.

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

end of thread, other threads:[~2017-05-04 13:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04  6:52 [PATCH net 0/3] qed*: Bug fix series Sudarsana Reddy Kalluru
2017-05-04  6:52 ` [PATCH net 1/3] qed*: Fix possible overflow for status block id field Sudarsana Reddy Kalluru
2017-05-04  6:52 ` [PATCH net 2/3] qed: Fix overriding of supported autoneg value Sudarsana Reddy Kalluru
2017-05-04  7:20   ` Leon Romanovsky
2017-05-04  8:02     ` Kalluru, Sudarsana
2017-05-04 13:40       ` David Miller
2017-05-04  6:52 ` [PATCH net 3/3] qede: Fix possible misconfiguration of advertised " Sudarsana Reddy Kalluru

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.