Patchwork [net-next] enic: be less verbose about non-critical firmware errors

login
register
mail settings
Submitter Stefan Assmann
Date April 4, 2013, 4:57 p.m.
Message ID <1365094628-21520-1-git-send-email-sassmann@kpanic.de>
Download mbox | patch
Permalink /patch/233878/
State Accepted
Delegated to: David Miller
Headers show

Comments

Stefan Assmann - April 4, 2013, 4:57 p.m.
If a feature is not supported by firmware no need to print an error message.
This surpresses the following harmless message on boot up and ethtool query.
enic: Error 1 devcmd 36

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
 drivers/net/ethernet/cisco/enic/vnic_dev.c | 3 +++
 1 file changed, 3 insertions(+)
David Miller - April 8, 2013, 4 p.m.
From: Stefan Assmann <sassmann@kpanic.de>
Date: Thu,  4 Apr 2013 18:57:08 +0200

> If a feature is not supported by firmware no need to print an error message.
> This surpresses the following harmless message on boot up and ethtool query.
> enic: Error 1 devcmd 36
> 
> Signed-off-by: Stefan Assmann <sassmann@kpanic.de>

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/ethernet/cisco/enic/vnic_dev.c b/drivers/net/ethernet/cisco/enic/vnic_dev.c
index 605b222..97455c5 100644
--- a/drivers/net/ethernet/cisco/enic/vnic_dev.c
+++ b/drivers/net/ethernet/cisco/enic/vnic_dev.c
@@ -308,6 +308,9 @@  static int _vnic_dev_cmd(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd,
 
 			if (status & STAT_ERROR) {
 				err = (int)readq(&devcmd->args[0]);
+				if (err == ERR_EINVAL &&
+				    cmd == CMD_CAPABILITY)
+					return err;
 				if (err != ERR_ECMDUNKNOWN ||
 				    cmd != CMD_CAPABILITY)
 					pr_err("Error %d devcmd %d\n",