diff options
author | Divy Le Ray <divy@chelsio.com> | 2007-08-21 23:49:36 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:50:50 -0400 |
commit | 167cdf5fbc64ab8f4eae2cd6d9d0892478d569d7 (patch) | |
tree | a1796dba0def322c8d50966b5afd18dd9548d1e2 | |
parent | c64c2eaeaaf04f9c8a303508f804ba256435d79f (diff) |
cxgb3 - log adapter serial number
Log HW serial number when cxgb3 module is loaded.
Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/net/cxgb3/common.h | 2 | ||||
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 6 | ||||
-rw-r--r-- | drivers/net/cxgb3/t3_hw.c | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/drivers/net/cxgb3/common.h b/drivers/net/cxgb3/common.h index d6c77607a114..510e93f90b91 100644 --- a/drivers/net/cxgb3/common.h +++ b/drivers/net/cxgb3/common.h | |||
@@ -97,6 +97,7 @@ enum { | |||
97 | MAX_NPORTS = 2, /* max # of ports */ | 97 | MAX_NPORTS = 2, /* max # of ports */ |
98 | MAX_FRAME_SIZE = 10240, /* max MAC frame size, including header + FCS */ | 98 | MAX_FRAME_SIZE = 10240, /* max MAC frame size, including header + FCS */ |
99 | EEPROMSIZE = 8192, /* Serial EEPROM size */ | 99 | EEPROMSIZE = 8192, /* Serial EEPROM size */ |
100 | SERNUM_LEN = 16, /* Serial # length */ | ||
100 | RSS_TABLE_SIZE = 64, /* size of RSS lookup and mapping tables */ | 101 | RSS_TABLE_SIZE = 64, /* size of RSS lookup and mapping tables */ |
101 | TCB_SIZE = 128, /* TCB size */ | 102 | TCB_SIZE = 128, /* TCB size */ |
102 | NMTUS = 16, /* size of MTU table */ | 103 | NMTUS = 16, /* size of MTU table */ |
@@ -391,6 +392,7 @@ struct vpd_params { | |||
391 | unsigned int uclk; | 392 | unsigned int uclk; |
392 | unsigned int mdc; | 393 | unsigned int mdc; |
393 | unsigned int mem_timing; | 394 | unsigned int mem_timing; |
395 | u8 sn[SERNUM_LEN + 1]; | ||
394 | u8 eth_base[6]; | 396 | u8 eth_base[6]; |
395 | u8 port_type[MAX_NPORTS]; | 397 | u8 port_type[MAX_NPORTS]; |
396 | unsigned short xauicfg[2]; | 398 | unsigned short xauicfg[2]; |
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index c00f2df05bcc..3ee465dd0b08 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -2360,10 +2360,12 @@ static void __devinit print_port_info(struct adapter *adap, | |||
2360 | (adap->flags & USING_MSIX) ? " MSI-X" : | 2360 | (adap->flags & USING_MSIX) ? " MSI-X" : |
2361 | (adap->flags & USING_MSI) ? " MSI" : ""); | 2361 | (adap->flags & USING_MSI) ? " MSI" : ""); |
2362 | if (adap->name == dev->name && adap->params.vpd.mclk) | 2362 | if (adap->name == dev->name && adap->params.vpd.mclk) |
2363 | printk(KERN_INFO "%s: %uMB CM, %uMB PMTX, %uMB PMRX\n", | 2363 | printk(KERN_INFO |
2364 | "%s: %uMB CM, %uMB PMTX, %uMB PMRX, S/N: %s\n", | ||
2364 | adap->name, t3_mc7_size(&adap->cm) >> 20, | 2365 | adap->name, t3_mc7_size(&adap->cm) >> 20, |
2365 | t3_mc7_size(&adap->pmtx) >> 20, | 2366 | t3_mc7_size(&adap->pmtx) >> 20, |
2366 | t3_mc7_size(&adap->pmrx) >> 20); | 2367 | t3_mc7_size(&adap->pmrx) >> 20, |
2368 | adap->params.vpd.sn); | ||
2367 | } | 2369 | } |
2368 | } | 2370 | } |
2369 | 2371 | ||
diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c index b02d15daf5d9..3f7f06b6ee65 100644 --- a/drivers/net/cxgb3/t3_hw.c +++ b/drivers/net/cxgb3/t3_hw.c | |||
@@ -505,7 +505,7 @@ struct t3_vpd { | |||
505 | u8 vpdr_len[2]; | 505 | u8 vpdr_len[2]; |
506 | VPD_ENTRY(pn, 16); /* part number */ | 506 | VPD_ENTRY(pn, 16); /* part number */ |
507 | VPD_ENTRY(ec, 16); /* EC level */ | 507 | VPD_ENTRY(ec, 16); /* EC level */ |
508 | VPD_ENTRY(sn, 16); /* serial number */ | 508 | VPD_ENTRY(sn, SERNUM_LEN); /* serial number */ |
509 | VPD_ENTRY(na, 12); /* MAC address base */ | 509 | VPD_ENTRY(na, 12); /* MAC address base */ |
510 | VPD_ENTRY(cclk, 6); /* core clock */ | 510 | VPD_ENTRY(cclk, 6); /* core clock */ |
511 | VPD_ENTRY(mclk, 6); /* mem clock */ | 511 | VPD_ENTRY(mclk, 6); /* mem clock */ |
@@ -648,6 +648,7 @@ static int get_vpd_params(struct adapter *adapter, struct vpd_params *p) | |||
648 | p->uclk = simple_strtoul(vpd.uclk_data, NULL, 10); | 648 | p->uclk = simple_strtoul(vpd.uclk_data, NULL, 10); |
649 | p->mdc = simple_strtoul(vpd.mdc_data, NULL, 10); | 649 | p->mdc = simple_strtoul(vpd.mdc_data, NULL, 10); |
650 | p->mem_timing = simple_strtoul(vpd.mt_data, NULL, 10); | 650 | p->mem_timing = simple_strtoul(vpd.mt_data, NULL, 10); |
651 | memcpy(p->sn, vpd.sn_data, SERNUM_LEN); | ||
651 | 652 | ||
652 | /* Old eeproms didn't have port information */ | 653 | /* Old eeproms didn't have port information */ |
653 | if (adapter->params.rev == 0 && !vpd.port0_data[0]) { | 654 | if (adapter->params.rev == 0 && !vpd.port0_data[0]) { |