| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Some broken ISPs (e.g. Comcast) send DHCPv6 packets with hop limit=0.
This trips up the TTL=0 check in the PPE if enabled.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
|
|
|
| |
Since kernel 4.10 commit 61e84623ace3 ("net: centralize net_device
min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which
is [68, 1500] by default.
It's necessary to set a max_mtu if a mtu > 1500 is supported.
Signed-off-by: Mathias Kresin <dev@kresin.me>
(backported from 5da2c68d001ee44b15a58639ed03a0ebb6f68020)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit b40316c21a960d332bc9b04ee1791b8aafcf8786.
That change causes ramips/mt7620 to fail with:
drivers/net/ethernet/mtk/gsw_mt7620.c: In function 'mt7620_hw_init':
drivers/net/ethernet/mtk/gsw_mt7620.c:171:14: error: 'mdio_mode' undeclared (first use in this function); did you mean 'd_move'?
} else if (!mdio_mode) {
^~~~~~~~~
d_move
Back it out for now to restore compilation.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To share mdio addr for IntPHY and ExtPHY,
as described in the documentation (MT7620_ProgrammingGuide.pdf).
(refer: http://download.villagetelco.org/hardware/MT7620/MT7620_ProgrammingGuide.pdf)
when port4 setup to work as gmac mode, dts like:
&gsw {
mediatek,port4 = "gmac";
};
we should set SYSCFG1.GE2_MODE==0x0 (RGMII).
but SYSCFG1.GE2_MODE may have been set to 3(RJ-45) by uboot/default
so we need to re-set it to 0x0
before this changes:
gsw: 4FE + 2GE may not work correctly and MDIO addr 4 cannot be used by ExtPHY
after this changes:
gsw: 4FE + 2GE works and MDIO addr 4 can be used by ExtPHY
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
(cherry picked from commit f6d81e2fa1f110d8025eaa434d67d0014aca1d42)
|
|
|
|
|
|
|
|
|
|
|
| |
When PHY's are defined on the MDIO bus in the DTS, gigabit support was
being masked out for no apparent reason, pegging all such ports to 10/100.
If gigabit support must be disabled for some reason, there should be a
"max-speed" property in the DTS.
Reported-by: James McKenzie <openwrt@madingley.org>
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
(cherry picked from commit 379fe506729a20c5fdb072840cb662b032e90c36)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the NAPI or netdev frag cache along with other drivers can lead to
32 KiB pages being held for a long time, despite only being used for
very few page fragment.
This can happen if the ethernet driver grabs one or two fragments for rx
ring refill, while other drivers use (and free up) the remaining
fragments. The 32 KiB higher-order page can only be freed once all users
have freed their fragments, which only happens after the rings of all
drivers holding the fragments have wrapped around.
Depending on the traffic patterns, this can waste a lot of memory and
look a lot like a memory leak
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
| |
This reverts commit a098a78a33a6b096d15c9982b5d6457988e09f03.
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
| |
This reverts commit 2ad4daf5794b08878467c1dac5bef7487109e4da.
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
| |
This reverts commit 5f7396ebef09b224edf08b0bda113613a42f0928.
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
| |
This reverts commit 1f786257147f978ce4c5750fdc404851453fafcb.
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
| |
This reverts commit edea934799911c54ffa7024ef9a650f9dfc8c695.
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
| |
This reverts commit e07baec9faf487fd143976636025b5da55e13c20.
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
| |
This reverts commit 2d401925b9bdf34de800fff57f593a3665de2a6a.
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
|
|
|
|
| |
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Fixes: f079b6406348 ("staging: mt7621-eth: add gigabit switch driver (GSW)")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
In case of error, the function of_phy_connect() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().
Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
This is an amagalmation of two upstream commits dealing with whitespace
and dead code removal. I'm synching instead of having two separate commits
as they go out of order compared to previous commits here.
Tested on GnuBee PC1.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mostly whitespace cleanups. Some unneeded code was removed.
MMC init was also moved to the probe function as in
6069bdd0871a20b5adce8d2f677946e05a2da609
The cleanup commits are over 100, making it hard to do them individually.
Tested on GnuBee PC1 with an SD card being used as swap.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
|
|
| |
These resources are extracted from devicetree, so they aren't
needed here.
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code currently defines:
and then compiles code only if they are defined.
We might want to disable some of these via devicetree one
day, but for now just remove the #defines and the
conditions - all the code for different ports is
easy to identify.
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As the Interrupts for the PCI adapters are listed in
devicetree we shouldn't need to have them explicit in the code.
The simplest way to do this is to use of_irq_parse_and_map_pci()
and specify an interrupt-map which identifies the different
PCI hosts by bus/slot numbers.
This has the advantage that the hwirq number are mapped to virq
numbers for us, so the ugly hack can go.
Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
| |
Remove the owner assignment form the platform driver as
platform_driver_register() already initializes the owner.
Found using coccinelle.
Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
|
|
|
|
| |
This will make it easier to port upstream code.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
|
| |
The driver messes with the pin control settings - MMC and NAND are
mutually exclusive
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Based on patch by Neil Brown
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
| |
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
- 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>
|