<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/txp, branch releng/7.3</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F7.3</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F7.3'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2009-09-11T17:25:24Z</updated>
<entry>
<title>MFC r196721:</title>
<updated>2009-09-11T17:25:24Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-09-11T17:25:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=529ef89fbedd64ab0ed20972e75c5511ea978128'/>
<id>urn:sha1:529ef89fbedd64ab0ed20972e75c5511ea978128</id>
<content type='text'>
  Make sure rx descriptor ring align on 16 bytes. I guess the
  alignment requirement could be multiple of 4 bytes but I think
  using descriptor size would make intention clearer.
  Previously the size of rx descriptor was not power of 2 so it
  caused panic in bus_dmamem_alloc(9).

  Reported by:	Jeff Blank (jb000003 &lt;&gt; mr-happy dot com)
</content>
</entry>
<entry>
<title>MFC r189714:</title>
<updated>2009-03-22T06:26:47Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-03-22T06:26:47Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c90a44013881232c6d1111ca6ba96018bc19cd01'/>
<id>urn:sha1:c90a44013881232c6d1111ca6ba96018bc19cd01</id>
<content type='text'>
  bus_dma(9) conversion and make txp(4) work on all architectures.
  o Header file cleanup.
  o bus_dma(9) conversion.
    - Removed all consumers of vtophys(9) and converted to use
      bus_dma(9).
    - Typhoon2 functional specification says the controller supports
      64bit DMA addressing. However all Typhoon controllers are known
      to lack of DAC support so 64bit DMA support was disabled.
    - The hardware can't handle more 16 fragmented Tx DMA segments so
      teach txp(4) to collapse these segments to be less than 16.
    - Added Rx buffer alignment requirements(4 bytes alignment) and
      implemented fixup code to align receive frame. Previously
      txp(4) always copied Rx frame to align it on 2 byte boundary
      but its copy overhead is much higher than unaligned access on
      i386/amd64. Alignment fixup code is now applied only for
      strict-alignment architectures. With this change i386 and
      amd64 will get instant Rx performance boost. Typhoon2 datasheet
      mentions a command that pads arbitrary bytes in Rx buffer but
      that command does not work.
    - Nuked pointer trick in descriptor ring. This does not work on
      sparc64 and replaced it with bcopy. Alternatively txp(4) can
      embed a 32 bits index value into the descriptor and compute
      real buffer address but it may make code complicated.
    - Added endianness support code in various Tx/Rx/command/response
      descriptor access. With this change txp(4) should work on all
      architectures.
  o Added comments for known firmware bugs(Tx checksum offloading,
    TSO, VLAN stripping and Rx buffer padding control).
  o Prefer faster memory space register access to I/O space access.
    Added fall-back mechanism to use alternative I/O space access.
    The hardware supports both memory and I/O mapped access. Users
    can still force to use old I/O space access by setting
    hw.txp.prefer_iomap tunable to 1 in /boot/loader.conf.
  o Added experimental suspend/resume methods.
  o Nuke error prone Rx buffer handling code and implemented local
    buffer management with TAILQ. Be definition the controller can't
    pass the last received frame to host if no Rx free buffers are
    available to use as head and tail pointer of Rx descriptor ring
    can't have the same value. In that case the Rx buffer pointer in
    Rx buffer ring still holds a valid buffer and txp_rxbuf_reclaim()
    can't fill Rx buffers as the first buffer is still valid. Instead
    of relying on the value of Rx buffer ring, introduce local buffer
    management code to handle empty buffer situation. This should fix
    a long standing bug which completely hangs the controller under
    high network load. I could easily trigger the issue by sending 64
    bytes UDP frames with netperf. I have no idea how this bugs was
    not fixed for a long time.
  o Converted ithread interrupt handler to filter based one.
  o Rearranged txp_detach routine such that it's now used for general
    clean-up routine.
  o Show sleep image version on device attach time. This will help
    to know what action should be taken depending on sleep image
    version. The version information in datasheet was wrong for newer
    NV images so I followed Linux which seems to correctly extract
    version numbers from response descriptors.
  o Firmware image is no longer downloaded in device attach time. Now
    it is reloaded whenever if_init is invoked. This is to ensure
    correct operation of hardware when something goes wrong.
    Previously the controller always run without regard to running
    state of firmware. This change will add additional controller
    initialization time but it give more robust operation as txp(4)
    always start off from a known state. The controller is put into
    sleep state until administrator explicitly up the interface.
  o As firmware is loaded in if_init handler, it's now possible to
    implement real watchdog timeout handler. When watchdog timer is
    expired, full-reset the controller and initialize the hardware
    again as most other drivers do. While I'm here use our own timer
    for watchdog instead of using if_watchdog/if_timer interface.
  o Instead of masking specific interrupts with TXP_IMR register,
    program TXP_IER register with the interrupts to be raised and
    use TXP_IMR to toggle interrupt generation.
  o Implemented txp_wait() to wait a specific state of a controller.
  o Separate boot related code from txp_download_fw() and name it
    txp_boot() to handle boot process.
  o Added bus_barrier(9) to host to ARM communication.
  o Added endianness to all typhoon command processing. The ARM93C
    always expects little-endian format of command/data.
  o Removed __STRICT_ALIGNMENT which is not valid on FreeBSD.
    __NO_STRICT_ALIGNMENT is provided for that purpose on FreeBSD.
    Previously __STRICT_ALIGNMENT was unconditionally defined for
    all architectures.
  o Rewrote SIOCSIFCAP ioctl handler such that each capability can be
    controlled by ifconfig(8). Note, disabling VLAN hardware tagging
    has no effect due to the bug of firmware.
  o Don't send TXP_CMD_CLEAR_STATISTICS to clear MAC statistics in
    txp_tick(). The command is not atomic. Instead, just read the
    statistics and reflect saved statistics to the statistics.
    dev.txp.%d.stats sysctl node provides detailed MAC statistics.
    This also reduces a lot of waste of CPU cycles as processing a
    command ring takes a very long time on ARM93C. Note, Rx
    multicast and broadcast statistics does not seem to right. It
    might be another bug of firmware.
  o Implemented link state change handling in txp_tick(). Now sending
    packets is allowed only after establishing a valid link. Also
    invoke link state change notification whenever its state is
    changed so pseudo drivers like lagg(4) that relies on link state
    can work with failover or link aggregation without hacks.
    if_baudrate is updated to resolved speed so SNMP agents can get
    correct bandwidth parameters.
  o Overhauled Tx routine such that it now honors number of allowable
    DMA segments and checks for 4 free descriptors before trying to
    send a frame. A frame may require  4 descriptors(1 frame
    descriptor, 1 or more frame descriptors, 1 TSO option descriptor,
    one free descriptor to prevent descriptor wrap-around) at least
    so it's necessary to check available free descriptors prior to
    setting up DMA operation.
  o Added a sysctl variable dev.txp.%d.process_limit to control
    how many received frames should be served in Rx handler. Valid
    ranges are 16 to 128(default 64) in unit of frames.
  o Added ALTQ(4) support.
  o Added missing IFCAP_VLAN_HWCSUM as txp(4) can offload checksum
    calculation as well as VLAN tag insertion/stripping.
  o Fixed media header length for VLAN.
  o Don't set if_mtu in device attach, it's already set in
    ether_ifattach().
  o Enabled MWI.
  o Fixed module unload panic when bpf listeners are active.
  o Rearranged ethernet address programming logic such that it works
     on strict-alignment architectures.
  o Removed unused member variables in softc.
  o Added support for WOL.
  o Removed now unused TXP_PCI_LOMEM/TXP_PCI_LOIO.
  o Added wakeup command TXP_BOOTCMD_WAKEUP definition.
  o Added a new firmware version query command, TXP_CMD_READ_VERSION.
  o Removed volatile keyword in softc as bus_dmamap_sync(9) should
    take care of this.
  o Removed embedded union trick of a structure used to to access
    a pointer on LP64 systems.
  o Added a few TSO related definitions for struct txp_tcpseg_desc.
    However TSO is not used at all due to the limitation of hardware.
  o Redefined PKT_MAX_PKTLEN to theoretical maximum size of a frame.
  o Switched from bus_space_{read|write}_4 to bus_{read|write}_4.
  o Added a new macro TXP_DESC_INC to compute next descriptor index.

  Tested by:	don.nasco &lt;&gt; gmail dot com
</content>
</entry>
<entry>
<title>MFC r189690:</title>
<updated>2009-03-22T06:21:35Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-03-22T06:21:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=57724e7ccd8c759cbe8ed523c2c0d9d10905a688'/>
<id>urn:sha1:57724e7ccd8c759cbe8ed523c2c0d9d10905a688</id>
<content type='text'>
  Replace local CRC32 routine with ether_crc32_be(). This should
  have happened long time ago. Also simplify Rx filter logic.
</content>
</entry>
<entry>
<title>MFC r189689:</title>
<updated>2009-03-22T06:16:44Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-03-22T06:16:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=df2bae7d47603ec61716ad3f1fd616759b9255fa'/>
<id>urn:sha1:df2bae7d47603ec61716ad3f1fd616759b9255fa</id>
<content type='text'>
  s/u_int8_t/uint8_t/g
  s/u_int16_t/uint16_t/g
  s/u_int32_t/uint32_t/g
  s/u_int64_t/uint64_t/g
</content>
</entry>
<entry>
<title>MFC r189688:</title>
<updated>2009-03-22T06:11:35Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-03-22T06:11:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=08adbd6752067e9df574e8bbd7a84464dc36cbe3'/>
<id>urn:sha1:08adbd6752067e9df574e8bbd7a84464dc36cbe3</id>
<content type='text'>
  style(9) - space after keywords.
</content>
</entry>
<entry>
<title>MFC r189687:</title>
<updated>2009-03-22T06:07:03Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-03-22T06:07:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=089ecc74544a07d92c699ebd075609152c0f9a9c'/>
<id>urn:sha1:089ecc74544a07d92c699ebd075609152c0f9a9c</id>
<content type='text'>
  Remove return statement at the end of function that returns void.
</content>
</entry>
<entry>
<title>MFC r189686:</title>
<updated>2009-03-22T06:04:16Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-03-22T06:04:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=178e22c81364c228ea9154a4fb6cb81eb17bae08'/>
<id>urn:sha1:178e22c81364c228ea9154a4fb6cb81eb17bae08</id>
<content type='text'>
  Remove extra tab characters.
</content>
</entry>
<entry>
<title>MFC r189685:</title>
<updated>2009-03-22T06:01:33Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-03-22T06:01:33Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3476d767126ef378a6ea9dc850ec2bb0734250a5'/>
<id>urn:sha1:3476d767126ef378a6ea9dc850ec2bb0734250a5</id>
<content type='text'>
  K&amp;R -&gt; ANSI C function definitions.
</content>
</entry>
<entry>
<title>Merge r189004.</title>
<updated>2009-03-19T17:06:04Z</updated>
<author>
<name>Roman Divacky</name>
<email>rdivacky@FreeBSD.org</email>
</author>
<published>2009-03-19T17:06:04Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1afb4edc7a10392913bcccbb48de7ccd58f1dca9'/>
<id>urn:sha1:1afb4edc7a10392913bcccbb48de7ccd58f1dca9</id>
<content type='text'>
Requested by:	yongari
Approved by:	ed (mentor)
</content>
</entry>
<entry>
<title>MFC r189022:</title>
<updated>2009-03-19T01:07:21Z</updated>
<author>
<name>Pyun YongHyeon</name>
<email>yongari@FreeBSD.org</email>
</author>
<published>2009-03-19T01:07:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=cd64ad52810ac57c8b65d45a14f0673491ab359a'/>
<id>urn:sha1:cd64ad52810ac57c8b65d45a14f0673491ab359a</id>
<content type='text'>
  Update to latest 3Com firmware image. The latest fimware is
  required to make 3CR990 familiy controllers run on NV flash
  firmware version 03.001.008.
  The latest firmware added HMAC digest information so teach txp(4)
  to pass them to sleep image before downloading is started.

  While I'm here restore previous IMR/IER register if firmware
  downloading have failed.

  PR:	kern/89876, kern/132047
</content>
</entry>
</feed>
