Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Sep 2007 10:45:34 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/dev/hme if_hme.c if_hmevar.h
Message-ID:  <200709151045.l8FAjZt0037896@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
marius      2007-09-15 10:45:34 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_6)
    sys/dev/hme          if_hme.c if_hmevar.h 
  Log:
  MFC: if_hme.c 1.50, 1.51, 1.52, 1.53; if_hmevar.h 1.10
  
  o Revised MII support:
    - In hme_stop() mask all interrupts.
    - In hme_eint() print MIF register contents on MIF interrupts.
    - In hme_mifinit() don't bother to preserve the previous MIF config.
      This was mainly done in order to preserve the PHY select bit (external
      or internal PHY) but which only needs to be set as appropriate when
      reading from or writing to the desired PHY in hme_mii_{read,write}reg().
      Similarly don't bother to set the PHY select bit in hme_mii_statchg().
    - In hme_mii_{read,write}reg() ignore requests to PHYs other than the
      external and internal PHY one.
    - Move enabling/disabling the MII drivers of the external transceiver from
      hme_init_locked() and based on the sheer presence of an external one
      to hme_mifinit() and based on the currently selected media, defaulting
      to the internal transceiver when the media hasn't been set, yet.
      Invoke hme_mifinit() from the newly added hme_mediachange_locked() so
      the setting of the MII drivers is updated when changing media.
      These changes keep the MII bus from wedging (which manifests in the HME
      and the PHYs no longer being able to communicate with each other) when
      the PHY device drivers isolate the unused PHY in two-PHY configurations
      as present in f.e. Netra t1 100 while changing media, either from
      hme_init_locked() (see also below) or via ifconfig(8) (not with the
      RELENG_6 ifconfig(8) and miibus(4) though). They also allow for using
      both transceivers/PHYs.
    - In the newly added hme_mediachange_locked() also reset the PHYs in two-
      PHY configurations before invoking mii_mediachg(). This is required
      for successfully unisolating the previously unused PHY when switching
      between PHYs.
    - Now that changing media should no longer cause problems back out rev.
      1.27 and re-enable setting the current media in hme_init_locked() (see
      the commit message of rev. 1.23 for more info).
    These changes are roughly a merge of NetBSD hme.c rev. 1.32 - 1.35 (1.30
    was already fixed differently in our 1.36; 1.31 and 1.32 were wrong) with
    some parts reworked and things that don't make sense like setting the MII
    drivers and restoring the previous MIF and XIF settings in hme_mii_{read,
    write}reg() omitted.
  o Use the hme_tick() callout instead of if_slowtimo() for driving
    hme_watchdog() in order to avoid races accessing if_timer.
  o Use bus_get_dma_tag() so hme(4) works on platforms requiring it.
  o Don't bother to set if_mtu to ETHERMTU, ether_ifattach() does that.
  o Remove invalid BUS_DMA_ALLOCNOW when creating a tag which is used for
    a "static" memory allocation only.
  
  Revision   Changes    Path
  1.37.2.10  +112 -63   src/sys/dev/hme/if_hme.c
  1.8.2.2    +1 -0      src/sys/dev/hme/if_hmevar.h



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