diff options
author | Vasanthy Kolluri <vkolluri@cisco.com> | 2011-03-08 10:35:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-14 17:49:29 -0400 |
commit | ea0f0d8bc6d13c2580d668ecf95297d5105a57fc (patch) | |
tree | 28bd119f7a175684ff5ffbb252a0d64a5fc981ab /drivers/net/enic/vnic_dev.c | |
parent | 1faa4356a3bd89ea11fb92752d897cff3a20ec0e (diff) |
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.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c index c489e72107de..c089b362a36f 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, | |||
408 | if (!vdev->fw_info) | 408 | if (!vdev->fw_info) |
409 | return -ENOMEM; | 409 | return -ENOMEM; |
410 | 410 | ||
411 | memset(vdev->fw_info, 0, sizeof(struct vnic_devcmd_fw_info)); | ||
412 | |||
411 | a0 = vdev->fw_info_pa; | 413 | a0 = vdev->fw_info_pa; |
414 | a1 = sizeof(struct vnic_devcmd_fw_info); | ||
412 | 415 | ||
413 | /* only get fw_info once and cache it */ | 416 | /* only get fw_info once and cache it */ |
414 | err = vnic_dev_cmd(vdev, CMD_MCPU_FW_INFO, &a0, &a1, wait); | 417 | err = vnic_dev_cmd(vdev, CMD_MCPU_FW_INFO, &a0, &a1, wait); |
418 | if (err == ERR_ECMDUNKNOWN) { | ||
419 | err = vnic_dev_cmd(vdev, CMD_MCPU_FW_INFO_OLD, | ||
420 | &a0, &a1, wait); | ||
421 | } | ||
415 | } | 422 | } |
416 | 423 | ||
417 | *fw_info = vdev->fw_info; | 424 | *fw_info = vdev->fw_info; |