summaryrefslogtreecommitdiffstats
path: root/drivers/net/enic/vnic_dev.c
diff options
context:
space:
mode:
authorVasanthy Kolluri <vkolluri@cisco.com>2011-03-08 15:35:30 +0000
committerDavid S. Miller <davem@davemloft.net>2011-03-14 14:49:29 -0700
commitea0f0d8bc6d13c2580d668ecf95297d5105a57fc (patch)
tree28bd119f7a175684ff5ffbb252a0d64a5fc981ab /drivers/net/enic/vnic_dev.c
parent1faa4356a3bd89ea11fb92752d897cff3a20ec0e (diff)
downloadop-kernel-dev-ea0f0d8bc6d13c2580d668ecf95297d5105a57fc.zip
op-kernel-dev-ea0f0d8bc6d13c2580d668ecf95297d5105a57fc.tar.gz
enic: Support newer version of firmware devcmd CMD_MCPU_FW_INFO
This patch provides support to the newer version of firmware devcmd CMD_MCPU_FW_INFO that returns additional information (ASIC type and revision) about the underlying hardware. This knowledge is required by the driver to implement any hardware specific features. Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David Wang <dwang2@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic/vnic_dev.c')
-rw-r--r--drivers/net/enic/vnic_dev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c
index c489e72..c089b36 100644
--- a/drivers/net/enic/vnic_dev.c
+++ b/drivers/net/enic/vnic_dev.c
@@ -408,10 +408,17 @@ int vnic_dev_fw_info(struct vnic_dev *vdev,
if (!vdev->fw_info)
return -ENOMEM;
+ memset(vdev->fw_info, 0, sizeof(struct vnic_devcmd_fw_info));
+
a0 = vdev->fw_info_pa;
+ a1 = sizeof(struct vnic_devcmd_fw_info);
/* only get fw_info once and cache it */
err = vnic_dev_cmd(vdev, CMD_MCPU_FW_INFO, &a0, &a1, wait);
+ if (err == ERR_ECMDUNKNOWN) {
+ err = vnic_dev_cmd(vdev, CMD_MCPU_FW_INFO_OLD,
+ &a0, &a1, wait);
+ }
}
*fw_info = vdev->fw_info;
OpenPOWER on IntegriCloud