]> bbs.cooldavid.org Git - net-next-2.6.git/commit
e1000e: Fix/cleanup PHY reset code for ICHx/PCHx
authorBruce Allan <bruce.w.allan@intel.com>
Mon, 10 May 2010 15:02:32 +0000 (15:02 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 May 2010 06:31:14 +0000 (23:31 -0700)
commite98cac447cc1cc418dff1d610a5c79c4f2bdec7f
treefbb290c330f7ffdbb574132460f18f9261cacba9
parenta305595b127fdbe7ab5ba458f7ee470a82a3b82c
e1000e: Fix/cleanup PHY reset code for ICHx/PCHx

i) Fixes a bug where e1000_sw_lcd_config_ich8lan() was calling
e1000_lan_init_done_ich8lan() to poll the STATUS.LAN_INIT_DONE bit to
make sure the MAC had completed the PHY configuration.  However,
e1000_lan_init_done_ich8lan() had already been called in one of the two
places where PHY reset occurs for ICHx/PCHx parts, which caused the second
call to busy-wait for 150 msec because the LAN_INIT_DONE bit had already
been checked and cleared.

ii) Cleanup the two separate PHY reset code paths, i.e. the full-chip reset
in e1000_reset_hw_ich8lan() and the PHY-only reset in
e1000_phy_hw_reset_ich8lan().  There was duplicate code in both paths to be
performed post-reset that are now combined into one new function -
e1000_post_phy_reset_ich8lan().  This cleanup also included moving the
clearing of the PHY Reset Asserted bit in the STATUS register (now done for
all ICH/PCH parts) and the check for the indication from h/w that basic
configuration has completed back to where it previously was in
e1000_get_cfg_done_ich8lan().

iii) Corrected a few comments

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e1000e/ich8lan.c