Patchwork [net-next,5/7] be2net: supress printing error when mac query fails for VF

login
register
mail settings
Submitter Ajit Khaparde
Date July 23, 2010, noon
Message ID <20100723120008.GA24995@serverengines.com>
Download mbox | patch
Permalink /patch/59773/
State Accepted
Delegated to: David Miller
Headers show

Comments

Ajit Khaparde - July 23, 2010, noon
When a virtual function driver in initialized, the network mac
query command can fail. Skip display of error message in that case.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
 drivers/net/benet/be_cmds.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
David Miller - July 23, 2010, 7:38 p.m.
From: Ajit Khaparde <ajitk@serverengines.com>
Date: Fri, 23 Jul 2010 17:30:24 +0530

> -	} else if (compl_status != MCC_STATUS_NOT_SUPPORTED) {
> +	} else if ((compl_status != MCC_STATUS_NOT_SUPPORTED) &&
> +			(compl->tag0 != OPCODE_COMMON_NTWK_MAC_QUERY)) {

I'll fix up this formatting when applying this patch but please be mindful
of this in the future, it should look like:


	} else if ((compl_status != MCC_STATUS_NOT_SUPPORTED) &&
		   (compl->tag0 != OPCODE_COMMON_NTWK_MAC_QUERY)) {
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - July 23, 2010, 7:44 p.m.
From: Ajit Khaparde <ajitk@serverengines.com>
Date: Fri, 23 Jul 2010 17:30:24 +0530

> When a virtual function driver in initialized, the network mac
> query command can fail. Skip display of error message in that case.
> 
> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 32ae324..cf3af05 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -76,7 +76,8 @@  static int be_mcc_compl_process(struct be_adapter *adapter,
 						sizeof(resp->hw_stats));
 			netdev_stats_update(adapter);
 		}
-	} else if (compl_status != MCC_STATUS_NOT_SUPPORTED) {
+	} else if ((compl_status != MCC_STATUS_NOT_SUPPORTED) &&
+			(compl->tag0 != OPCODE_COMMON_NTWK_MAC_QUERY)) {
 		extd_status = (compl->status >> CQE_STATUS_EXTD_SHIFT) &
 				CQE_STATUS_EXTD_MASK;
 		dev_warn(&adapter->pdev->dev,