1 Subject: [1/2,2.6.28] cxgb3 - eeprom read fixes
2 Date: Sat, 08 Nov 2008 22:55:28 -0000
3 From: Divy Le Ray <divy@chelsio.com>
4 Acked-by: Karsten Keil <kkeil@novell.com>
7 From: Divy Le Ray <divy@chelsio.com>
9 Protect against invalid phy entries in the eeprom.
10 Extend eeprom access timeout.
12 Signed-off-by: Divy Le Ray <divy@chelsio.com>
15 drivers/net/cxgb3/t3_hw.c | 8 +++++++-
16 1 files changed, 7 insertions(+), 1 deletions(-)
20 To unsubscribe from this list: send the line "unsubscribe netdev" in
21 the body of a message to majordomo@vger.kernel.org
22 More majordomo info at http://vger.kernel.org/majordomo-info.html
24 diff --git a/drivers/net/cxgb3/t3_hw.c b/drivers/net/cxgb3/t3_hw.c
25 index 968f64b..9a0898b 100644
26 --- a/drivers/net/cxgb3/t3_hw.c
27 +++ b/drivers/net/cxgb3/t3_hw.c
28 @@ -572,7 +572,7 @@ struct t3_vpd {
29 u32 pad; /* for multiple-of-4 sizing and alignment */
32 -#define EEPROM_MAX_POLL 4
33 +#define EEPROM_MAX_POLL 40
34 #define EEPROM_STAT_ADDR 0x4000
35 #define VPD_BASE 0xc00
37 @@ -3690,6 +3690,12 @@ int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
40 pti = &port_types[adapter->params.vpd.port_type[j]];
41 + if (!pti->phy_prep) {
42 + CH_ALERT(adapter, "Invalid port type index %d\n",
43 + adapter->params.vpd.port_type[j]);
47 ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,