enic: be less verbose about non-critical firmware errors
authorStefan Assmann <sassmann@kpanic.de>
Thu, 4 Apr 2013 06:57:08 +0000 (06:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2013 16:00:16 +0000 (12:00 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cisco/enic/vnic_dev.c

index 605b222..97455c5 100644 (file)
@@ -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",