diff options
author | Dariusz Swiderski <dms@cvs.openbsd.org> | 2009-10-11 23:54:50 +0000 |
---|---|---|
committer | Dariusz Swiderski <dms@cvs.openbsd.org> | 2009-10-11 23:54:50 +0000 |
commit | ecf765dd5674d2adff47fe11cc3a614b094d9118 (patch) | |
tree | 34143140472d33c86448f9605e46e5dc1b7cd0e4 /sys/dev/pci | |
parent | 628fe3d86d7e0cfc6a302fba3f53c288bacfa376 (diff) |
fix support for 82543GC. as per intel driver acrds <=82543 need to have their
phy reset before detection. problem spotted by merdely@, fixed thanks to
deraadt@ sending me his 82543GC :)
tested by merdely@, claudio@ and me
ok by claudio@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_em_hw.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/dev/pci/if_em_hw.c b/sys/dev/pci/if_em_hw.c index 7001a33aeff..5c80164c0e1 100644 --- a/sys/dev/pci/if_em_hw.c +++ b/sys/dev/pci/if_em_hw.c @@ -31,7 +31,7 @@ *******************************************************************************/ -/* $OpenBSD: if_em_hw.c,v 1.40 2009/10/11 00:18:37 dms Exp $ */ +/* $OpenBSD: if_em_hw.c,v 1.41 2009/10/11 23:54:49 dms Exp $ */ /* if_em_hw.c * Shared functions for accessing and configuring the MAC @@ -4246,7 +4246,15 @@ em_detect_gig_phy(struct em_hw *hw) hw->phy_type = em_phy_undefined; return E1000_SUCCESS; } - + + /* Up to 82543 (incl), we need reset the phy, or it might not get + * detected */ + if (hw->mac_type <= em_82543) { + ret_val = em_phy_hw_reset(hw); + if (ret_val) + return ret_val; + } + /* ESB-2 PHY reads require em_phy_gg82563 to be set because of a work- * around that forces PHY page 0 to be set or the reads fail. The rest of * the code in this routine uses em_read_phy_reg to read the PHY ID. |