Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 1998 22:08:55 -0700 (PDT)
From:      Bill Paul <wpaul@FreeBSD.ORG>
To:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   cvs commit: src/sys/pci if_tl.c if_tlreg.h
Message-ID:  <199809230508.WAA04226@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
wpaul       1998/09/22 22:08:55 PDT

  Modified files:
    sys/pci              if_tl.c if_tlreg.h 
  Log:
  Overhaul the ThunderLAN driver. This update includes the following
  changes:
  
  - Cleaned up register access macros so that they work like the XL
    driver macros (you can switch from PIO to memory-mapped mode
    using a single #define -- default is still memory mapped mode).
    The old 'struct overlayed onto the memory mapped register space'
    cruft has been removed.
  
  - Improved multicast filter code. The ThunderLAN has four entry
    perfect filter table in addition to the 64-bit hash table: we need
    one of the perfect filter entries for the station address, but we
    can use the other three for multicast filtering. We arrange to put
    the first three multicast group addresses in the perfect filter
    slots so that commonly joined groups like the all hosts group and
    the all routers group can be filtered without using up bits in the
    hash table.
  
    Note: in FreeBSD 3.0, multicast groups are stored in a doubly
    linked list, however new entries are added at the head of the list
    (thereby pushing existing entries down towards the tail). We want
    to update the filter starting from the oldest entry to the newest
    since the all hosts group is always joined first. This means we
    really want to start from the tail of the list, not the head, but
    to find the tail we first have to traverse the list all the way to
    the end and then add entries working backwards. This is a bit of a
    kludge and could be inefficient if the list is long.
  
  - Cleaned up autonegotiation code: tl_autoneg() wasn't always setting
    modes correctly.
  
  - Cleaned up ifmedia update and status routines as well.
  
  - Added tl_hardreset() routine to initialize the internal PHY according
    to the ThunderLAN manual.
  
  - Did away with the kludge where PHYs were treated as separate logical
    interfaces. This didn't really work, especially in the case of the
    newer Olicom 2326 adapters which use a Micro Linear ML6692 PHY which
    provides only 100Mbps support, relying on the internal PHY for 10Mbps
    support (both PHYs share the RJ45 port, with the 6692 doing all the
    autonegotiation work). This kludge resulted from my misunderstanding
    of the operation of the Compaq Netelligent Dual Port card (the tlan
    manual mentions multiple channels, but in a different context; this
    got me a little confused). The driver has been reported to work
    correctly with the dual port card.
  
  - Added dio_getbit/dio_setbit/dio_read/dio_write functions which carefully
    set the ThunderLAN's indirectly accessed internal registers. This makes
    the EEPROM reading code more reliable.
  
  Hopefully I won't have to touch this again before 3.0 goes out the door.
  I plan to import the 2.2.x version sometime this week.
  
  Approved-by: jkh
  
  Revision  Changes    Path
  1.15      +877 -801  src/sys/pci/if_tl.c
  1.6       +131 -230  src/sys/pci/if_tlreg.h



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