]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.drivers/cxgb3-eeprom-read-fixes.patch
Add a patch to fix Intel E100 wake-on-lan problems.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / cxgb3-eeprom-read-fixes.patch
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>
5 Reference: bnc#446739
6
7 From: Divy Le Ray <divy@chelsio.com>
8
9 Protect against invalid phy entries in the eeprom.
10 Extend eeprom access timeout.
11
12 Signed-off-by: Divy Le Ray <divy@chelsio.com>
13 ---
14
15 drivers/net/cxgb3/t3_hw.c | 8 +++++++-
16 1 files changed, 7 insertions(+), 1 deletions(-)
17
18
19 --
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
23
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 */
30 };
31
32 -#define EEPROM_MAX_POLL 4
33 +#define EEPROM_MAX_POLL 40
34 #define EEPROM_STAT_ADDR 0x4000
35 #define VPD_BASE 0xc00
36
37 @@ -3690,6 +3690,12 @@ int t3_prep_adapter(struct adapter *adapter, const struct adapter_info *ai,
38 ;
39
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]);
44 + return -EINVAL;
45 + }
46 +
47 ret = pti->phy_prep(&p->phy, adapter, ai->phy_base_addr + j,
48 ai->mdio_ops);
49 if (ret)