Commit Graph

6 Commits

Author SHA1 Message Date
Oleksandr Tymoshenko
e523262107 [if_dwc] add support for multi-descriptor packets in TX path
Original if_dwc driver used m_defrag as an implementation shortcut but on
1000Mb networks it affects performance. Implement multi-descriptor support for
TX path.

Tested on RK3399-Firefly, patch adds ~15% of network throughput.

Reviewed By:	manu
Differential Revision:	https://reviews.freebsd.org/D27520
2020-12-23 12:29:29 -08:00
Oleksandr Tymoshenko
824cfb4729 Improve Rockchip's integration of if_dwc
- Do not rely on U-Boot for clocks configuration, enable and set frequencies
    in the driver's attach method.
- Adjust MAC settings according to detected linespeed on RK3399 and RK3328.
- Add support for RMII PHY mode on RK3328.

Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D26006
2020-08-10 19:37:06 +00:00
Michal Meloun
b72e2878ab Improve if_dwc:
- refactorize packet receive path. Make sure that we don't leak mbufs
   and/or that we don't create holes in RX descriptor ring
 - slightly simplify handling with TX descriptors

MFC after:	4 weeks
2020-06-19 19:26:55 +00:00
Michal Meloun
7ed7d9798b Fix style(9). Strip write only variables.
Not a functional change.

MFC after:	1 week
2020-04-29 14:36:50 +00:00
Jared McNeill
e7502187c2 Set txbuf_map array size to TX_DESC_COUNT instead of RX_DESC_COUNT. 2016-04-29 21:46:43 +00:00
Luiz Otavio O Souza
5df539274f Add alternate descriptors support for if_dwc.
This also adds a newbus interface that allows a SoC to override the
following settings:

 - if_dwc specific SoC initialization;
 - if_dwc descriptor type;
 - if_dwc MII clock.

This seems to be an old version of the hardware descriptors but it is
still in use in a few SoCs (namely Allwinner A20 and Amlogic at least).

Tested on Cubieboard2 and Banana pi.

Tested for regressions on Altera Cyclone by br@ (old version).

Obtained from:	NetBSD
2015-09-20 14:13:29 +00:00