Commit Graph

12 Commits (3435dbdc1c75c2098a3d7ca987d8b4bdeb0d6632)

Author SHA1 Message Date
Felix Fietkau 173d93ea23 ramips: fix locking issues in the ethernet driver
The stats update needs to protect against being interrupted by a tasklet
The u64 stats seqlock needs to be initialized

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau ceff5d8c82 ramips: add missing unlock in fe_phy_link_adjust
Based on patch by Neil Brown

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
John Crispin bfed382540 ramips: fix build error caused by missing ifdef guard in hwnat code
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
John Crispin 424a9ae128 ramips: implement hardware NAT offload for MT7621
Supports IPv4 flow offloading on MT7621 for Routing, SNAT and DNAT

Supported are regular ethernet->ethernet connections, including one
802.1q VLAN and/or PPPoE encapsulation

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
NeilBrown f27336e115 ramips: mtk-mmc: don't advertise highmem support.
of_dma_configure() sets a default ->dma_mask of
DMA_BIT_MASK(32), claiming devices can DMA from
the full 32bit address space.
The mtk-mmc driver does not support access to
highmem pages, so it is really limited to the
bottom 512M (actually 448M due to 64M of IO space).
Setting ->dma_mask to NULL causes mmc_setup_queue()
to fall-back to using BLK_BOUNCE_HIGH to tell the
block layer to use a bounce-buffer for any highmem
pages requiring IO.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 6a621f4bd9 ramips: fix BUG_ON on mtk-mmc driver probe
Our .dts files only have one device defined and this is unlikely to
change, so statically initialize host->id to 0.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau f9b2d369a6 ramips: move mtk-mmc driver code out of patches-*/ and into files-*/
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau a276002079 ramips: remove dead (and potentially crashy) code in mt7621 gsw init
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Felix Fietkau 147b679891 ramips: rename ethernet priv->device field to dev to match upstream
Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Pawel Dembicki 39b5218434 ramips: mt7620: power up ephy port 4
In some boards port 4 of mt7620 switch is powered down in bootloader
configuration as lan/wan package leak mitigation.

Reset ephy port 4 to default settings to power up the port.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[clarify issue in commit message]
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Felix Fietkau 8a59f9590e ramips: fix MT7621 switch driver IRQ storm on init with linux 4.14
The hardware emits some interrupts while initializing and handling them
can mess up the state or cause infinite loops.
Fix this by disabling IRQs during init and re-enabling them afterwards

Signed-off-by: Felix Fietkau <nbd@nbd.name>
6 years ago
Roman Yeryomin f4e5880d0f ramips: preliminary support for 4.14
- removed upstreamed patches
- 0901-spansion_nand_id_fix.patch is disabled, not clear if it's needed

Signed-off-by: Roman Yeryomin <roman@advem.lv>
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago