diff options
author | Matt Carlson <mcarlson@broadcom.com> | 2010-07-11 05:31:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-11 20:07:42 -0400 |
commit | 6867c843813a801d5f568b6fb006695316714f1b (patch) | |
tree | eedcd0db062551aff3afa253e8cd91f09457cb63 /drivers/net | |
parent | 2138c002173abe3e439e213e5cc03b385b20508c (diff) |
tg3: Report driver version to firmware
This patch changes the code so that the driver version can be reported
to the firmware in addition to the current use.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/tg3.c | 8 | ||||
-rw-r--r-- | drivers/net/tg3.h | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index c91049bdaf63..e6da16a1f7bf 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/moduleparam.h> | 20 | #include <linux/moduleparam.h> |
21 | #include <linux/stringify.h> | ||
21 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
22 | #include <linux/types.h> | 23 | #include <linux/types.h> |
23 | #include <linux/compiler.h> | 24 | #include <linux/compiler.h> |
@@ -67,7 +68,10 @@ | |||
67 | #include "tg3.h" | 68 | #include "tg3.h" |
68 | 69 | ||
69 | #define DRV_MODULE_NAME "tg3" | 70 | #define DRV_MODULE_NAME "tg3" |
70 | #define DRV_MODULE_VERSION "3.111" | 71 | #define TG3_MAJ_NUM 3 |
72 | #define TG3_MIN_NUM 111 | ||
73 | #define DRV_MODULE_VERSION \ | ||
74 | __stringify(TG3_MAJ_NUM) "." __stringify(TG3_MIN_NUM) | ||
71 | #define DRV_MODULE_RELDATE "June 5, 2010" | 75 | #define DRV_MODULE_RELDATE "June 5, 2010" |
72 | 76 | ||
73 | #define TG3_DEF_MAC_MODE 0 | 77 | #define TG3_DEF_MAC_MODE 0 |
@@ -6629,7 +6633,7 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, int kind) | |||
6629 | apedata = tg3_ape_read32(tp, TG3_APE_HOST_INIT_COUNT); | 6633 | apedata = tg3_ape_read32(tp, TG3_APE_HOST_INIT_COUNT); |
6630 | tg3_ape_write32(tp, TG3_APE_HOST_INIT_COUNT, ++apedata); | 6634 | tg3_ape_write32(tp, TG3_APE_HOST_INIT_COUNT, ++apedata); |
6631 | tg3_ape_write32(tp, TG3_APE_HOST_DRIVER_ID, | 6635 | tg3_ape_write32(tp, TG3_APE_HOST_DRIVER_ID, |
6632 | APE_HOST_DRIVER_ID_MAGIC); | 6636 | APE_HOST_DRIVER_ID_MAGIC(TG3_MAJ_NUM, TG3_MIN_NUM)); |
6633 | tg3_ape_write32(tp, TG3_APE_HOST_BEHAVIOR, | 6637 | tg3_ape_write32(tp, TG3_APE_HOST_BEHAVIOR, |
6634 | APE_HOST_BEHAV_NO_PHYLOCK); | 6638 | APE_HOST_BEHAV_NO_PHYLOCK); |
6635 | 6639 | ||
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index b72ac52b33fd..be7ab91f4dda 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -2193,7 +2193,9 @@ | |||
2193 | #define APE_HOST_SEG_LEN_MAGIC 0x0000001c | 2193 | #define APE_HOST_SEG_LEN_MAGIC 0x0000001c |
2194 | #define TG3_APE_HOST_INIT_COUNT 0x4208 | 2194 | #define TG3_APE_HOST_INIT_COUNT 0x4208 |
2195 | #define TG3_APE_HOST_DRIVER_ID 0x420c | 2195 | #define TG3_APE_HOST_DRIVER_ID 0x420c |
2196 | #define APE_HOST_DRIVER_ID_MAGIC 0xf0035100 | 2196 | #define APE_HOST_DRIVER_ID_LINUX 0xf0000000 |
2197 | #define APE_HOST_DRIVER_ID_MAGIC(maj, min) \ | ||
2198 | (APE_HOST_DRIVER_ID_LINUX | (maj & 0xff) << 16 | (min & 0xff) << 8) | ||
2197 | #define TG3_APE_HOST_BEHAVIOR 0x4210 | 2199 | #define TG3_APE_HOST_BEHAVIOR 0x4210 |
2198 | #define APE_HOST_BEHAV_NO_PHYLOCK 0x00000001 | 2200 | #define APE_HOST_BEHAV_NO_PHYLOCK 0x00000001 |
2199 | #define TG3_APE_HOST_HEARTBEAT_INT_MS 0x4214 | 2201 | #define TG3_APE_HOST_HEARTBEAT_INT_MS 0x4214 |