summaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/cxgb3_main.c
diff options
context:
space:
mode:
authorDivy Le Ray <divy@chelsio.com>2007-01-31 04:43:45 +0100
committerJeff Garzik <jeff@garzik.org>2007-02-05 22:58:49 +0100
commit4aac38990843b4f165ccf467b772e18827bff84c (patch)
tree0143837e7200c6e8243fb2da7adaeebd448aafc3 /drivers/net/cxgb3/cxgb3_main.c
parentgit-netdev-all: chelsio fix (diff)
downloadlinux-4aac38990843b4f165ccf467b772e18827bff84c.tar.xz
linux-4aac38990843b4f165ccf467b772e18827bff84c.zip
cxgb3 - FW versioning
Clean up FW version checking. The supported FW version is now 3.1. Signed-off-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cxgb3/cxgb3_main.c')
-rw-r--r--drivers/net/cxgb3/cxgb3_main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
index 54c49acd86b4..804414637ec7 100644
--- a/drivers/net/cxgb3/cxgb3_main.c
+++ b/drivers/net/cxgb3/cxgb3_main.c
@@ -665,11 +665,8 @@ static int cxgb_up(struct adapter *adap)
if (!(adap->flags & FULL_INIT_DONE)) {
err = t3_check_fw_version(adap);
- if (err) {
- dev_err(&adap->pdev->dev,
- "adapter FW is not compatible with driver\n");
+ if (err)
goto out;
- }
err = init_dummy_netdevs(adap);
if (err)
@@ -1002,10 +999,14 @@ static void get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
strcpy(info->bus_info, pci_name(adapter->pdev));
if (!fw_vers)
strcpy(info->fw_version, "N/A");
- else
+ else {
snprintf(info->fw_version, sizeof(info->fw_version),
- "%s %u.%u", (fw_vers >> 24) ? "T" : "N",
- (fw_vers >> 12) & 0xfff, fw_vers & 0xfff);
+ "%s %u.%u.%u",
+ G_FW_VERSION_TYPE(fw_vers) ? "T" : "N",
+ G_FW_VERSION_MAJOR(fw_vers),
+ G_FW_VERSION_MINOR(fw_vers),
+ G_FW_VERSION_MICRO(fw_vers));
+ }
}
static void get_strings(struct net_device *dev, u32 stringset, u8 * data)