Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Mar 2011 22:20:44 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/dev/dc if_dc.c if_dcreg.h
Message-ID:  <201103272220.p2RMKxx5003916@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help

yongari     2011-03-27 22:20:44 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_8)
    sys/dev/dc           if_dc.c if_dcreg.h 
  Log:
  SVN rev 220066 on 2011-03-27 22:20:44Z by yongari
  
  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
  
  Revision   Changes    Path
  1.201.2.5  +123 -31   src/sys/dev/dc/if_dc.c
  1.57.2.4   +1 -0      src/sys/dev/dc/if_dcreg.h



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103272220.p2RMKxx5003916>