]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r213841,218787-218788:
authoryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 27 Mar 2011 22:20:44 +0000 (22:20 +0000)
committeryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 27 Mar 2011 22:20:44 +0000 (22:20 +0000)
commit149508ac19f6f17e65c9fc4f05abed17ba38138f
tree003221d3bdf8d1381b8b05ba6b1cb948fd2bde98
parent85903d67bc492c5d7b1ba4fe5170a4d1a97a5bbd
MFC r213841,218787-218788:
r213841:
  It seems some multi-port dc(4) controllers shares SROM of the first
  port such that reading station address from second port always
  returned 0xFF:0xFF:0xFF:0xFF:0xFF:0xFF Unfortunately it seems there
  is no easy way to know whether SROM is shared or not. Workaround
  the issue by traversing dc(4) device list and see whether we're
  using second port and use station address of controller 0 as base
  station address of second port.

  PR: kern/79262

r218787:
  When driver have to use base softc due to lack of SROM on second
  port, copy SROM information from base softc as well and run SROM
  parser again.  This change is necessary for some dual port
  controllers to make dc(4) correctly detect PHY media based on first
  port configuration table.
  While I'm here add a check for validity of the base softc before
  duplicating SROM contents from base softc. If driver failed to
  attach to the first port it can access invalid area.

  PR: kern/79262
  Reviewed by: marius

r218788:
  Apply special PHY initialization code for 21143 controllers before
  any other media configuration. Otherwise some 21143 controller
  cannot establish a link. While I'm here remove the PHY
  initialization code in dc_setcfg(). Since dc_setcfg() is called
  whenever link state is changed, having the PHY initialization code
  in dc_setcfg() resulted in continuous link flips.
  After driver resets SIA, use default SIA transmit/receive
  configuration instead of disabling autosense/autonegotiation.
  Otherwise, controller fails to establish a link as well as losing
  auto-negotiation capability. For manual media configuration, always
  configure 21143 controller with specified media to ensure media
  change. This change makes ANA-6922 establish link with/without
  auto-negotiation.

  While I'm here be more strict on link UP/DOWN detection logic.

  Many thanks to marius who fixed several bugs in initial patch and
  even tested the patch on a couple of dc(4) controllers.

  PR: kern/79262
  Reviewed by: marius
  Tested by: marius

git-svn-id: svn://svn.freebsd.org/base/stable/8@220066 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/dc/if_dc.c
sys/dev/dc/if_dcreg.h