Commit Graph

11 Commits

Author SHA1 Message Date
Rafal Jaworowski
fb20e2aeac tsec(4) cosmetics. 2009-02-17 16:02:45 +00:00
Rafal Jaworowski
371bf7cc81 tsec(4): Always try to resume the receiver.
This helps recover from RX stall under heavy loads.

Submitted by:	Piotr Ziecik kosmo ! semihalf dot com
2009-02-17 15:59:27 +00:00
Rafal Jaworowski
0390701af8 tsec(4): do not clear interrupt events register before use.
Prior to this fix, IEVENT register was always cleared before calling
tsec_error_intr_locked(), which prevented error recovery actions from
happening with polling enabled (and could lead to serious problems, including
controller hang).

Submitted by:	Marcin Ligenza marcinl ! pacomp dot com dot pl
2009-02-17 15:47:13 +00:00
Rafal Jaworowski
ab160495d3 Handle mbuf exhaustion scenario in tsec(4).
Without this fix the system would hang under heavy networking load.

Submitted by:	Leon Theunissen leon ! parsec dot co dot za
2009-02-17 15:39:16 +00:00
Rafal Jaworowski
64f90c9dff tsec(4) style improvements and clean-up. 2009-02-17 14:59:47 +00:00
Rafal Jaworowski
bd37530ee4 Additional features for the tsec(4) Ethernet driver.
- interrupt coalescing
  - polling
  - jumbo frames
  - multicast
  - VLAN tagging

The enhanced version of the chip (eTSEC) can also take advantage of:

  - TCP/IP checksum calculation h/w offloading

Obtained from:	Freescale, Semihalf
2009-02-17 14:57:05 +00:00
Rafal Jaworowski
321e12c82e tsec: Refactor driver's structure.
Split the driver into the core functionality part (sys/dev/tsec/if_tsec.c) and
the bus attachment (sys/dev/tsec/if_tsec_ocp.c).

This lets better integrate and maintain the driver in other environments with
different attachment abstractions (there is at least one other FreeBSD port --
MPC83xx -- which uses this TSEC driver, but with different local bus model
i.e. some OF derivative). While there, clean up and fix minor cosmetics.

Obtained from:	Semihalf
2008-08-26 10:41:49 +00:00
Rafal Jaworowski
5432bd9f6a tsec: Improve and clean up callouts.
- eliminate the unused tsec_tick_ch callout
- adjust and fix the main tsec callout handling
- minor naming improvements

Obtained from:	Semihalf
2008-08-26 09:38:28 +00:00
Rafal Jaworowski
772619e186 Convert TSEC watchdog to the new scheme.
Reviewed by:	imp, marcel
Approved by:	cognet (mentor)
2008-03-12 16:35:25 +00:00
Rafal Jaworowski
ecb1ab1761 Obtain TSEC h/w address from the parent bus (OCP) and not rely blindly on what
might be currently programmed into the registers.

Underlying firmware (U-Boot) would typically program MAC address into the
first unit only, and others are left uninitialized. It is now possible to
retrieve and program MAC address for all units properly, provided they were
passed on in the bootinfo metadata.

Reviewed by:	imp, marcel
Approved by:	cognet (mentor)
2008-03-12 16:32:08 +00:00
Rafal Jaworowski
67196661ab Support for Freescale integrated Three-Speed Ethernet Controller (TSEC).
TSEC is the MAC engine offering 10, 100 or 1000 Mbps speed and is found on
different Freescale parts (MPC83xx, MPC85xx). Depending on the silicon version
there are up to four TSEC units integrated on the chip.

This driver also works with the enhanced version of the controller (eTSEC),
which is backwards compatible, but doesn't take advantage of its additional
features (various off-loading mechanisms) at the moment.

Approved by:	cognet (mentor)
Obtained from:	Semihalf
MFp4:		e500
2008-03-03 19:03:44 +00:00