Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -1148,7 +1148,7 @@ $(eval $(call KernelPackage,nft-bridge))
|
||||
|
||||
define KernelPackage/nft-dup-inet
|
||||
SUBMENU:=$(NF_MENU)
|
||||
TITLE:=Netfilter nf_tables dup in ip/ip6/inet familly support
|
||||
TITLE:=Netfilter nf_tables dup in ip/ip6/inet family support
|
||||
DEPENDS:=+kmod-nft-core +kmod-nf-conntrack +IPV6:kmod-nf-conntrack6
|
||||
KCONFIG:= \
|
||||
CONFIG_NF_DUP_IPV4 \
|
||||
|
||||
@@ -20,7 +20,7 @@ define KernelPackage/leds-ubnt-ledbar
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/leds-ubnt-ledbar.ko
|
||||
AUTOLOAD:=$(call AutoProbe,leds-ubnt-ledbar,1)
|
||||
DEPENDS:=+kmod-i2c-core
|
||||
DEPENDS:=@TARGET_mediatek_mt7622||TARGET_ramips_mt7621 +kmod-i2c-core
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-ubnt-ledbar/description
|
||||
|
||||
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
|
||||
PKG_SOURCE_DATE:=2023-04-17
|
||||
PKG_SOURCE_VERSION:=7de5440a520f9c6687358c7ef88ac4aad0ff98a5
|
||||
PKG_MIRROR_HASH:=aaf6aef1c991c67b6ef43b4c7f102ba94319bf522f620e93293d031b8333bd8f
|
||||
PKG_SOURCE_DATE:=2023-06-04
|
||||
PKG_SOURCE_VERSION:=ec9dba72124597b7224bbfe75960386dc320f4bd
|
||||
PKG_MIRROR_HASH:=baee39a3882a2b03fc83a3a6a8963c340fa8d884c7a8c9e80e7d2dddc50e24bd
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@@ -47,8 +47,6 @@
|
||||
status = "okay";
|
||||
|
||||
nand {
|
||||
nand-is-boot-medium;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From 43ed6fff01333868a1d0e19876f67c22d9939952 Mon Sep 17 00:00:00 2001
|
||||
From: Yuval Shaia <yshaia@marvell.com>
|
||||
Date: Wed, 13 Oct 2021 09:49:21 +0300
|
||||
Subject: [PATCH] net: mvneta: Delete unused variable
|
||||
|
||||
The variable pp is not in use - delete it.
|
||||
|
||||
Signed-off-by: Yuval Shaia <yshaia@marvell.com>
|
||||
Link: https://lore.kernel.org/r/20211013064921.26346-1-yshaia@marvell.com
|
||||
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||
---
|
||||
drivers/net/ethernet/marvell/mvneta.c | 11 +++++------
|
||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -1914,7 +1914,7 @@ static int mvneta_rx_refill(struct mvnet
|
||||
}
|
||||
|
||||
/* Handle tx checksum */
|
||||
-static u32 mvneta_skb_tx_csum(struct mvneta_port *pp, struct sk_buff *skb)
|
||||
+static u32 mvneta_skb_tx_csum(struct sk_buff *skb)
|
||||
{
|
||||
if (skb->ip_summed == CHECKSUM_PARTIAL) {
|
||||
int ip_hdr_len = 0;
|
||||
@@ -2595,8 +2595,7 @@ err_drop_frame:
|
||||
}
|
||||
|
||||
static inline void
|
||||
-mvneta_tso_put_hdr(struct sk_buff *skb,
|
||||
- struct mvneta_port *pp, struct mvneta_tx_queue *txq)
|
||||
+mvneta_tso_put_hdr(struct sk_buff *skb, struct mvneta_tx_queue *txq)
|
||||
{
|
||||
int hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
|
||||
struct mvneta_tx_buf *buf = &txq->buf[txq->txq_put_index];
|
||||
@@ -2604,7 +2603,7 @@ mvneta_tso_put_hdr(struct sk_buff *skb,
|
||||
|
||||
tx_desc = mvneta_txq_next_desc_get(txq);
|
||||
tx_desc->data_size = hdr_len;
|
||||
- tx_desc->command = mvneta_skb_tx_csum(pp, skb);
|
||||
+ tx_desc->command = mvneta_skb_tx_csum(skb);
|
||||
tx_desc->command |= MVNETA_TXD_F_DESC;
|
||||
tx_desc->buf_phys_addr = txq->tso_hdrs_phys +
|
||||
txq->txq_put_index * TSO_HEADER_SIZE;
|
||||
@@ -2681,7 +2680,7 @@ static int mvneta_tx_tso(struct sk_buff
|
||||
hdr = txq->tso_hdrs + txq->txq_put_index * TSO_HEADER_SIZE;
|
||||
tso_build_hdr(skb, hdr, &tso, data_left, total_len == 0);
|
||||
|
||||
- mvneta_tso_put_hdr(skb, pp, txq);
|
||||
+ mvneta_tso_put_hdr(skb, txq);
|
||||
|
||||
while (data_left > 0) {
|
||||
int size;
|
||||
@@ -2799,7 +2798,7 @@ static netdev_tx_t mvneta_tx(struct sk_b
|
||||
/* Get a descriptor for the first part of the packet */
|
||||
tx_desc = mvneta_txq_next_desc_get(txq);
|
||||
|
||||
- tx_cmd = mvneta_skb_tx_csum(pp, skb);
|
||||
+ tx_cmd = mvneta_skb_tx_csum(skb);
|
||||
|
||||
tx_desc->data_size = skb_headlen(skb);
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
From 0cf39c6543469aae4a30cba354243125514ed568 Mon Sep 17 00:00:00 2001
|
||||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
||||
Date: Wed, 29 Mar 2023 13:11:17 +0100
|
||||
Subject: [PATCH] net: mvneta: fix potential double-frees in
|
||||
mvneta_txq_sw_deinit()
|
||||
|
||||
Reported on the Turris forum, mvneta provokes kernel warnings in the
|
||||
architecture DMA mapping code when mvneta_setup_txqs() fails to
|
||||
allocate memory. This happens because when mvneta_cleanup_txqs() is
|
||||
called in the mvneta_stop() path, we leave pointers in the structure
|
||||
that have been freed.
|
||||
|
||||
Then on mvneta_open(), we call mvneta_setup_txqs(), which starts
|
||||
allocating memory. On memory allocation failure, mvneta_cleanup_txqs()
|
||||
will walk all the queues freeing any non-NULL pointers - which includes
|
||||
pointers that were previously freed in mvneta_stop().
|
||||
|
||||
Fix this by setting these pointers to NULL to prevent double-freeing
|
||||
of the same memory.
|
||||
|
||||
Link: https://forum.turris.cz/t/random-kernel-exceptions-on-hbl-tos-7-0/18865/8
|
||||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
drivers/net/ethernet/marvell/mvneta.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -3481,6 +3481,8 @@ static void mvneta_txq_sw_deinit(struct
|
||||
|
||||
netdev_tx_reset_queue(nq);
|
||||
|
||||
+ txq->buf = NULL;
|
||||
+ txq->tso_hdrs = NULL;
|
||||
txq->descs = NULL;
|
||||
txq->last_desc = 0;
|
||||
txq->next_desc_to_proc = 0;
|
||||
@@ -1,94 +0,0 @@
|
||||
From ca71e00839fcdd26f122fb6d9e97903c9fe198f7 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Date: Sat, 6 May 2023 08:08:35 +0200
|
||||
Subject: [PATCH] binfmt_elf: dynamically allocate note.data in
|
||||
parse_elf_properties
|
||||
|
||||
Dynamically allocate note.data in parse_elf_properties to fix
|
||||
compilation warning on some arch.
|
||||
|
||||
On some arch note.data exceet the stack limit for a single function and
|
||||
this cause the following compilation warning:
|
||||
fs/binfmt_elf.c: In function 'parse_elf_properties.isra':
|
||||
fs/binfmt_elf.c:821:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
|
||||
821 | }
|
||||
| ^
|
||||
cc1: all warnings being treated as errors
|
||||
|
||||
Fix this by dynamically allocating the array.
|
||||
|
||||
Fixes: 00e19ceec80b ("ELF: Add ELF program property parsing support")
|
||||
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
||||
Cc: stable@vger.kernel.org # v5.8+
|
||||
---
|
||||
fs/binfmt_elf.c | 32 +++++++++++++++++++++++---------
|
||||
1 file changed, 23 insertions(+), 9 deletions(-)
|
||||
|
||||
--- a/fs/binfmt_elf.c
|
||||
+++ b/fs/binfmt_elf.c
|
||||
@@ -768,7 +768,7 @@ static int parse_elf_properties(struct f
|
||||
{
|
||||
union {
|
||||
struct elf_note nhdr;
|
||||
- char data[NOTE_DATA_SZ];
|
||||
+ char *data;
|
||||
} note;
|
||||
loff_t pos;
|
||||
ssize_t n;
|
||||
@@ -788,26 +788,38 @@ static int parse_elf_properties(struct f
|
||||
if (phdr->p_filesz > sizeof(note))
|
||||
return -ENOEXEC;
|
||||
|
||||
+ note.data = kcalloc(NOTE_DATA_SZ, sizeof(*note.data), GFP_KERNEL);
|
||||
+ if (!note.data)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
pos = phdr->p_offset;
|
||||
n = kernel_read(f, ¬e, phdr->p_filesz, &pos);
|
||||
|
||||
BUILD_BUG_ON(sizeof(note) < sizeof(note.nhdr) + NOTE_NAME_SZ);
|
||||
- if (n < 0 || n < sizeof(note.nhdr) + NOTE_NAME_SZ)
|
||||
- return -EIO;
|
||||
+ if (n < 0 || n < sizeof(note.nhdr) + NOTE_NAME_SZ) {
|
||||
+ ret = -EIO;
|
||||
+ goto exit;
|
||||
+ }
|
||||
|
||||
if (note.nhdr.n_type != NT_GNU_PROPERTY_TYPE_0 ||
|
||||
note.nhdr.n_namesz != NOTE_NAME_SZ ||
|
||||
strncmp(note.data + sizeof(note.nhdr),
|
||||
- GNU_PROPERTY_TYPE_0_NAME, n - sizeof(note.nhdr)))
|
||||
- return -ENOEXEC;
|
||||
+ GNU_PROPERTY_TYPE_0_NAME, n - sizeof(note.nhdr))) {
|
||||
+ ret = -ENOEXEC;
|
||||
+ goto exit;
|
||||
+ }
|
||||
|
||||
off = round_up(sizeof(note.nhdr) + NOTE_NAME_SZ,
|
||||
ELF_GNU_PROPERTY_ALIGN);
|
||||
- if (off > n)
|
||||
- return -ENOEXEC;
|
||||
-
|
||||
- if (note.nhdr.n_descsz > n - off)
|
||||
- return -ENOEXEC;
|
||||
+ if (off > n) {
|
||||
+ ret = -ENOEXEC;
|
||||
+ goto exit;
|
||||
+ }
|
||||
+
|
||||
+ if (note.nhdr.n_descsz > n - off) {
|
||||
+ ret = -ENOEXEC;
|
||||
+ goto exit;
|
||||
+ }
|
||||
datasz = off + note.nhdr.n_descsz;
|
||||
|
||||
have_prev_type = false;
|
||||
@@ -817,6 +829,8 @@ static int parse_elf_properties(struct f
|
||||
have_prev_type = true;
|
||||
} while (!ret);
|
||||
|
||||
+exit:
|
||||
+ kfree(note.data);
|
||||
return ret == -ENOENT ? 0 : ret;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
From d6d80269cf5c79f9dfe7d69f8b41a72015c89748 Mon Sep 17 00:00:00 2001
|
||||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
||||
Date: Mon, 3 Apr 2023 19:30:20 +0100
|
||||
Subject: [PATCH 1/5] net: mvneta: fix transmit path dma-unmapping on error
|
||||
|
||||
The transmit code assumes that the transmit descriptors that are used
|
||||
begin with the first descriptor in the ring, but this may not be the
|
||||
case. Fix this by providing a new function that dma-unmaps a range of
|
||||
numbered descriptor entries, and use that to do the unmapping.
|
||||
|
||||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
drivers/net/ethernet/marvell/mvneta.c | 53 +++++++++++++++++----------
|
||||
1 file changed, 33 insertions(+), 20 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -2647,14 +2647,40 @@ mvneta_tso_put_data(struct net_device *d
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static void mvneta_release_descs(struct mvneta_port *pp,
|
||||
+ struct mvneta_tx_queue *txq,
|
||||
+ int first, int num)
|
||||
+{
|
||||
+ int desc_idx, i;
|
||||
+
|
||||
+ desc_idx = first + num;
|
||||
+ if (desc_idx >= txq->size)
|
||||
+ desc_idx -= txq->size;
|
||||
+
|
||||
+ for (i = num; i >= 0; i--) {
|
||||
+ struct mvneta_tx_desc *tx_desc = txq->descs + desc_idx;
|
||||
+
|
||||
+ if (!IS_TSO_HEADER(txq, tx_desc->buf_phys_addr))
|
||||
+ dma_unmap_single(pp->dev->dev.parent,
|
||||
+ tx_desc->buf_phys_addr,
|
||||
+ tx_desc->data_size,
|
||||
+ DMA_TO_DEVICE);
|
||||
+
|
||||
+ mvneta_txq_desc_put(txq);
|
||||
+
|
||||
+ if (desc_idx == 0)
|
||||
+ desc_idx = txq->size;
|
||||
+ desc_idx -= 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static int mvneta_tx_tso(struct sk_buff *skb, struct net_device *dev,
|
||||
struct mvneta_tx_queue *txq)
|
||||
{
|
||||
int hdr_len, total_len, data_left;
|
||||
- int desc_count = 0;
|
||||
+ int first_desc, desc_count = 0;
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
struct tso_t tso;
|
||||
- int i;
|
||||
|
||||
/* Count needed descriptors */
|
||||
if ((txq->count + tso_count_descs(skb)) >= txq->size)
|
||||
@@ -2665,6 +2691,8 @@ static int mvneta_tx_tso(struct sk_buff
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ first_desc = txq->txq_put_index;
|
||||
+
|
||||
/* Initialize the TSO handler, and prepare the first payload */
|
||||
hdr_len = tso_start(skb, &tso);
|
||||
|
||||
@@ -2705,15 +2733,7 @@ err_release:
|
||||
/* Release all used data descriptors; header descriptors must not
|
||||
* be DMA-unmapped.
|
||||
*/
|
||||
- for (i = desc_count - 1; i >= 0; i--) {
|
||||
- struct mvneta_tx_desc *tx_desc = txq->descs + i;
|
||||
- if (!IS_TSO_HEADER(txq, tx_desc->buf_phys_addr))
|
||||
- dma_unmap_single(pp->dev->dev.parent,
|
||||
- tx_desc->buf_phys_addr,
|
||||
- tx_desc->data_size,
|
||||
- DMA_TO_DEVICE);
|
||||
- mvneta_txq_desc_put(txq);
|
||||
- }
|
||||
+ mvneta_release_descs(pp, txq, first_desc, desc_count - 1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2723,6 +2743,7 @@ static int mvneta_tx_frag_process(struct
|
||||
{
|
||||
struct mvneta_tx_desc *tx_desc;
|
||||
int i, nr_frags = skb_shinfo(skb)->nr_frags;
|
||||
+ int first_desc = txq->txq_put_index;
|
||||
|
||||
for (i = 0; i < nr_frags; i++) {
|
||||
struct mvneta_tx_buf *buf = &txq->buf[txq->txq_put_index];
|
||||
@@ -2761,15 +2782,7 @@ error:
|
||||
/* Release all descriptors that were used to map fragments of
|
||||
* this packet, as well as the corresponding DMA mappings
|
||||
*/
|
||||
- for (i = i - 1; i >= 0; i--) {
|
||||
- tx_desc = txq->descs + i;
|
||||
- dma_unmap_single(pp->dev->dev.parent,
|
||||
- tx_desc->buf_phys_addr,
|
||||
- tx_desc->data_size,
|
||||
- DMA_TO_DEVICE);
|
||||
- mvneta_txq_desc_put(txq);
|
||||
- }
|
||||
-
|
||||
+ mvneta_release_descs(pp, txq, first_desc, i - 1);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From e3c77d0a1b635d114c147fd2078afb57ed558b81 Mon Sep 17 00:00:00 2001
|
||||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
||||
Date: Mon, 3 Apr 2023 19:30:25 +0100
|
||||
Subject: [PATCH 2/5] net: mvneta: mark mapped and tso buffers separately
|
||||
|
||||
Mark dma-mapped skbs and TSO buffers separately, so we can use
|
||||
buf->type to identify their differences.
|
||||
|
||||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
drivers/net/ethernet/marvell/mvneta.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -607,6 +607,7 @@ struct mvneta_rx_desc {
|
||||
#endif
|
||||
|
||||
enum mvneta_tx_buf_type {
|
||||
+ MVNETA_TYPE_TSO,
|
||||
MVNETA_TYPE_SKB,
|
||||
MVNETA_TYPE_XDP_TX,
|
||||
MVNETA_TYPE_XDP_NDO,
|
||||
@@ -1852,7 +1853,8 @@ static void mvneta_txq_bufs_free(struct
|
||||
dma_unmap_single(pp->dev->dev.parent,
|
||||
tx_desc->buf_phys_addr,
|
||||
tx_desc->data_size, DMA_TO_DEVICE);
|
||||
- if (buf->type == MVNETA_TYPE_SKB && buf->skb) {
|
||||
+ if ((buf->type == MVNETA_TYPE_TSO ||
|
||||
+ buf->type == MVNETA_TYPE_SKB) && buf->skb) {
|
||||
bytes_compl += buf->skb->len;
|
||||
pkts_compl++;
|
||||
dev_kfree_skb_any(buf->skb);
|
||||
@@ -2607,7 +2609,7 @@ mvneta_tso_put_hdr(struct sk_buff *skb,
|
||||
tx_desc->command |= MVNETA_TXD_F_DESC;
|
||||
tx_desc->buf_phys_addr = txq->tso_hdrs_phys +
|
||||
txq->txq_put_index * TSO_HEADER_SIZE;
|
||||
- buf->type = MVNETA_TYPE_SKB;
|
||||
+ buf->type = MVNETA_TYPE_TSO;
|
||||
buf->skb = NULL;
|
||||
|
||||
mvneta_txq_inc_put(txq);
|
||||
@@ -0,0 +1,59 @@
|
||||
From fe2abc1abc0dfc6c13fe8f189216f00dbbb33044 Mon Sep 17 00:00:00 2001
|
||||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
||||
Date: Mon, 3 Apr 2023 19:30:30 +0100
|
||||
Subject: [PATCH 3/5] net: mvneta: use buf->type to determine whether to
|
||||
dma-unmap
|
||||
|
||||
Now that we use a different buffer type for TSO headers, we can use
|
||||
buf->type to determine whether the original buffer was DMA-mapped or
|
||||
not. The rules are:
|
||||
|
||||
MVNETA_TYPE_XDP_TX - from a DMA pool, no unmap is required
|
||||
MVNETA_TYPE_XDP_NDO - dma_map_single()'d
|
||||
MVNETA_TYPE_SKB - normal skbuff, dma_map_single()'d
|
||||
MVNETA_TYPE_TSO - from the TSO buffer area
|
||||
|
||||
This means we only need to call dma_unmap_single() on the XDP_NDO and
|
||||
SKB types of buffer, and we no longer need the private IS_TSO_HEADER()
|
||||
which relies on the TSO region being contiguously allocated.
|
||||
|
||||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
drivers/net/ethernet/marvell/mvneta.c | 11 ++++-------
|
||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -334,10 +334,6 @@
|
||||
MVNETA_SKB_HEADROOM))
|
||||
#define MVNETA_MAX_RX_BUF_SIZE (PAGE_SIZE - MVNETA_SKB_PAD)
|
||||
|
||||
-#define IS_TSO_HEADER(txq, addr) \
|
||||
- ((addr >= txq->tso_hdrs_phys) && \
|
||||
- (addr < txq->tso_hdrs_phys + txq->size * TSO_HEADER_SIZE))
|
||||
-
|
||||
#define MVNETA_RX_GET_BM_POOL_ID(rxd) \
|
||||
(((rxd)->status & MVNETA_RXD_BM_POOL_MASK) >> MVNETA_RXD_BM_POOL_SHIFT)
|
||||
|
||||
@@ -1848,8 +1844,8 @@ static void mvneta_txq_bufs_free(struct
|
||||
|
||||
mvneta_txq_inc_get(txq);
|
||||
|
||||
- if (!IS_TSO_HEADER(txq, tx_desc->buf_phys_addr) &&
|
||||
- buf->type != MVNETA_TYPE_XDP_TX)
|
||||
+ if (buf->type == MVNETA_TYPE_XDP_NDO ||
|
||||
+ buf->type == MVNETA_TYPE_SKB)
|
||||
dma_unmap_single(pp->dev->dev.parent,
|
||||
tx_desc->buf_phys_addr,
|
||||
tx_desc->data_size, DMA_TO_DEVICE);
|
||||
@@ -2661,8 +2657,9 @@ static void mvneta_release_descs(struct
|
||||
|
||||
for (i = num; i >= 0; i--) {
|
||||
struct mvneta_tx_desc *tx_desc = txq->descs + desc_idx;
|
||||
+ struct mvneta_tx_buf *buf = &txq->buf[desc_idx];
|
||||
|
||||
- if (!IS_TSO_HEADER(txq, tx_desc->buf_phys_addr))
|
||||
+ if (buf->type == MVNETA_TYPE_SKB)
|
||||
dma_unmap_single(pp->dev->dev.parent,
|
||||
tx_desc->buf_phys_addr,
|
||||
tx_desc->data_size,
|
||||
@@ -0,0 +1,65 @@
|
||||
From 210ca75d4949f1ace8ea53a75148806cc28224a0 Mon Sep 17 00:00:00 2001
|
||||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
||||
Date: Mon, 3 Apr 2023 19:30:35 +0100
|
||||
Subject: [PATCH 4/5] net: mvneta: move tso_build_hdr() into
|
||||
mvneta_tso_put_hdr()
|
||||
|
||||
Move tso_build_hdr() into mvneta_tso_put_hdr() so that all the TSO
|
||||
header building code is in one place.
|
||||
|
||||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
drivers/net/ethernet/marvell/mvneta.c | 22 +++++++++++-----------
|
||||
1 file changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -2592,19 +2592,24 @@ err_drop_frame:
|
||||
return rx_done;
|
||||
}
|
||||
|
||||
-static inline void
|
||||
-mvneta_tso_put_hdr(struct sk_buff *skb, struct mvneta_tx_queue *txq)
|
||||
+static void mvneta_tso_put_hdr(struct sk_buff *skb, struct mvneta_tx_queue *txq,
|
||||
+ struct tso_t *tso, int size, bool is_last)
|
||||
{
|
||||
- int hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
|
||||
+ int tso_offset, hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
|
||||
struct mvneta_tx_buf *buf = &txq->buf[txq->txq_put_index];
|
||||
struct mvneta_tx_desc *tx_desc;
|
||||
+ char *hdr;
|
||||
+
|
||||
+ tso_offset = txq->txq_put_index * TSO_HEADER_SIZE;
|
||||
+
|
||||
+ hdr = txq->tso_hdrs + tso_offset;
|
||||
+ tso_build_hdr(skb, hdr, tso, size, is_last);
|
||||
|
||||
tx_desc = mvneta_txq_next_desc_get(txq);
|
||||
tx_desc->data_size = hdr_len;
|
||||
tx_desc->command = mvneta_skb_tx_csum(skb);
|
||||
tx_desc->command |= MVNETA_TXD_F_DESC;
|
||||
- tx_desc->buf_phys_addr = txq->tso_hdrs_phys +
|
||||
- txq->txq_put_index * TSO_HEADER_SIZE;
|
||||
+ tx_desc->buf_phys_addr = txq->tso_hdrs_phys + tso_offset;
|
||||
buf->type = MVNETA_TYPE_TSO;
|
||||
buf->skb = NULL;
|
||||
|
||||
@@ -2697,17 +2702,12 @@ static int mvneta_tx_tso(struct sk_buff
|
||||
|
||||
total_len = skb->len - hdr_len;
|
||||
while (total_len > 0) {
|
||||
- char *hdr;
|
||||
-
|
||||
data_left = min_t(int, skb_shinfo(skb)->gso_size, total_len);
|
||||
total_len -= data_left;
|
||||
desc_count++;
|
||||
|
||||
/* prepare packet headers: MAC + IP + TCP */
|
||||
- hdr = txq->tso_hdrs + txq->txq_put_index * TSO_HEADER_SIZE;
|
||||
- tso_build_hdr(skb, hdr, &tso, data_left, total_len == 0);
|
||||
-
|
||||
- mvneta_tso_put_hdr(skb, txq);
|
||||
+ mvneta_tso_put_hdr(skb, txq, &tso, data_left, total_len == 0);
|
||||
|
||||
while (data_left > 0) {
|
||||
int size;
|
||||
@@ -0,0 +1,179 @@
|
||||
From 58d50fb089da553023df5a05f5ae86feaacc7f24 Mon Sep 17 00:00:00 2001
|
||||
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
||||
Date: Mon, 3 Apr 2023 19:30:40 +0100
|
||||
Subject: [PATCH 5/5] net: mvneta: allocate TSO header DMA memory in chunks
|
||||
|
||||
Now that we no longer need to check whether the DMA address is within
|
||||
the TSO header DMA memory range for the queue, we can allocate the TSO
|
||||
header DMA memory in chunks rather than one contiguous order-6 chunk,
|
||||
which can stress the kernel's memory subsystems to allocate.
|
||||
|
||||
Instead, use order-1 (8k) allocations, which will result in 32 order-1
|
||||
pages containing 32 TSO headers.
|
||||
|
||||
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
||||
---
|
||||
drivers/net/ethernet/marvell/mvneta.c | 88 +++++++++++++++++++++------
|
||||
1 file changed, 70 insertions(+), 18 deletions(-)
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -314,6 +314,15 @@
|
||||
|
||||
#define MVNETA_MAX_SKB_DESCS (MVNETA_MAX_TSO_SEGS * 2 + MAX_SKB_FRAGS)
|
||||
|
||||
+/* The size of a TSO header page */
|
||||
+#define MVNETA_TSO_PAGE_SIZE (2 * PAGE_SIZE)
|
||||
+
|
||||
+/* Number of TSO headers per page. This should be a power of 2 */
|
||||
+#define MVNETA_TSO_PER_PAGE (MVNETA_TSO_PAGE_SIZE / TSO_HEADER_SIZE)
|
||||
+
|
||||
+/* Maximum number of TSO header pages */
|
||||
+#define MVNETA_MAX_TSO_PAGES (MVNETA_MAX_TXD / MVNETA_TSO_PER_PAGE)
|
||||
+
|
||||
/* descriptor aligned size */
|
||||
#define MVNETA_DESC_ALIGNED_SIZE 32
|
||||
|
||||
@@ -656,10 +665,10 @@ struct mvneta_tx_queue {
|
||||
int next_desc_to_proc;
|
||||
|
||||
/* DMA buffers for TSO headers */
|
||||
- char *tso_hdrs;
|
||||
+ char *tso_hdrs[MVNETA_MAX_TSO_PAGES];
|
||||
|
||||
/* DMA address of TSO headers */
|
||||
- dma_addr_t tso_hdrs_phys;
|
||||
+ dma_addr_t tso_hdrs_phys[MVNETA_MAX_TSO_PAGES];
|
||||
|
||||
/* Affinity mask for CPUs*/
|
||||
cpumask_t affinity_mask;
|
||||
@@ -2592,24 +2601,71 @@ err_drop_frame:
|
||||
return rx_done;
|
||||
}
|
||||
|
||||
+static void mvneta_free_tso_hdrs(struct mvneta_port *pp,
|
||||
+ struct mvneta_tx_queue *txq)
|
||||
+{
|
||||
+ struct device *dev = pp->dev->dev.parent;
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < MVNETA_MAX_TSO_PAGES; i++) {
|
||||
+ if (txq->tso_hdrs[i]) {
|
||||
+ dma_free_coherent(dev, MVNETA_TSO_PAGE_SIZE,
|
||||
+ txq->tso_hdrs[i],
|
||||
+ txq->tso_hdrs_phys[i]);
|
||||
+ txq->tso_hdrs[i] = NULL;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int mvneta_alloc_tso_hdrs(struct mvneta_port *pp,
|
||||
+ struct mvneta_tx_queue *txq)
|
||||
+{
|
||||
+ struct device *dev = pp->dev->dev.parent;
|
||||
+ int i, num;
|
||||
+
|
||||
+ num = DIV_ROUND_UP(txq->size, MVNETA_TSO_PER_PAGE);
|
||||
+ for (i = 0; i < num; i++) {
|
||||
+ txq->tso_hdrs[i] = dma_alloc_coherent(dev, MVNETA_TSO_PAGE_SIZE,
|
||||
+ &txq->tso_hdrs_phys[i],
|
||||
+ GFP_KERNEL);
|
||||
+ if (!txq->tso_hdrs[i]) {
|
||||
+ mvneta_free_tso_hdrs(pp, txq);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static char *mvneta_get_tso_hdr(struct mvneta_tx_queue *txq, dma_addr_t *dma)
|
||||
+{
|
||||
+ int index, offset;
|
||||
+
|
||||
+ index = txq->txq_put_index / MVNETA_TSO_PER_PAGE;
|
||||
+ offset = (txq->txq_put_index % MVNETA_TSO_PER_PAGE) * TSO_HEADER_SIZE;
|
||||
+
|
||||
+ *dma = txq->tso_hdrs_phys[index] + offset;
|
||||
+
|
||||
+ return txq->tso_hdrs[index] + offset;
|
||||
+}
|
||||
+
|
||||
static void mvneta_tso_put_hdr(struct sk_buff *skb, struct mvneta_tx_queue *txq,
|
||||
struct tso_t *tso, int size, bool is_last)
|
||||
{
|
||||
- int tso_offset, hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
|
||||
+ int hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
|
||||
struct mvneta_tx_buf *buf = &txq->buf[txq->txq_put_index];
|
||||
struct mvneta_tx_desc *tx_desc;
|
||||
+ dma_addr_t hdr_phys;
|
||||
char *hdr;
|
||||
|
||||
- tso_offset = txq->txq_put_index * TSO_HEADER_SIZE;
|
||||
-
|
||||
- hdr = txq->tso_hdrs + tso_offset;
|
||||
+ hdr = mvneta_get_tso_hdr(txq, &hdr_phys);
|
||||
tso_build_hdr(skb, hdr, tso, size, is_last);
|
||||
|
||||
tx_desc = mvneta_txq_next_desc_get(txq);
|
||||
tx_desc->data_size = hdr_len;
|
||||
tx_desc->command = mvneta_skb_tx_csum(skb);
|
||||
tx_desc->command |= MVNETA_TXD_F_DESC;
|
||||
- tx_desc->buf_phys_addr = txq->tso_hdrs_phys + tso_offset;
|
||||
+ tx_desc->buf_phys_addr = hdr_phys;
|
||||
buf->type = MVNETA_TYPE_TSO;
|
||||
buf->skb = NULL;
|
||||
|
||||
@@ -3401,7 +3457,7 @@ static void mvneta_rxq_deinit(struct mvn
|
||||
static int mvneta_txq_sw_init(struct mvneta_port *pp,
|
||||
struct mvneta_tx_queue *txq)
|
||||
{
|
||||
- int cpu;
|
||||
+ int cpu, err;
|
||||
|
||||
txq->size = pp->tx_ring_size;
|
||||
|
||||
@@ -3426,11 +3482,9 @@ static int mvneta_txq_sw_init(struct mvn
|
||||
return -ENOMEM;
|
||||
|
||||
/* Allocate DMA buffers for TSO MAC/IP/TCP headers */
|
||||
- txq->tso_hdrs = dma_alloc_coherent(pp->dev->dev.parent,
|
||||
- txq->size * TSO_HEADER_SIZE,
|
||||
- &txq->tso_hdrs_phys, GFP_KERNEL);
|
||||
- if (!txq->tso_hdrs)
|
||||
- return -ENOMEM;
|
||||
+ err = mvneta_alloc_tso_hdrs(pp, txq);
|
||||
+ if (err)
|
||||
+ return err;
|
||||
|
||||
/* Setup XPS mapping */
|
||||
if (pp->neta_armada3700)
|
||||
@@ -3482,10 +3536,7 @@ static void mvneta_txq_sw_deinit(struct
|
||||
|
||||
kfree(txq->buf);
|
||||
|
||||
- if (txq->tso_hdrs)
|
||||
- dma_free_coherent(pp->dev->dev.parent,
|
||||
- txq->size * TSO_HEADER_SIZE,
|
||||
- txq->tso_hdrs, txq->tso_hdrs_phys);
|
||||
+ mvneta_free_tso_hdrs(pp, txq);
|
||||
if (txq->descs)
|
||||
dma_free_coherent(pp->dev->dev.parent,
|
||||
txq->size * MVNETA_DESC_ALIGNED_SIZE,
|
||||
@@ -3494,7 +3545,6 @@ static void mvneta_txq_sw_deinit(struct
|
||||
netdev_tx_reset_queue(nq);
|
||||
|
||||
txq->buf = NULL;
|
||||
- txq->tso_hdrs = NULL;
|
||||
txq->descs = NULL;
|
||||
txq->last_desc = 0;
|
||||
txq->next_desc_to_proc = 0;
|
||||
@@ -5543,6 +5593,8 @@ static int __init mvneta_driver_init(voi
|
||||
{
|
||||
int ret;
|
||||
|
||||
+ BUILD_BUG_ON_NOT_POWER_OF_2(MVNETA_TSO_PER_PAGE);
|
||||
+
|
||||
ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "net/mvneta:online",
|
||||
mvneta_cpu_online,
|
||||
mvneta_cpu_down_prepare);
|
||||
@@ -82,6 +82,7 @@ ipq40xx_setup_interfaces()
|
||||
ucidef_set_interface_lan "sw-eth1 sw-eth2"
|
||||
;;
|
||||
aruba,ap-303h|\
|
||||
buffalo,wtr-m2133hp|\
|
||||
ezviz,cs-w3-wd1200g-eup|\
|
||||
netgear,rbr50|\
|
||||
netgear,rbs50|\
|
||||
|
||||
@@ -417,6 +417,35 @@
|
||||
qcom,ath10k-calibration-variant = "Buffalo-WTR-M2133HP";
|
||||
};
|
||||
|
||||
&switch {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&swport2 {
|
||||
status = "okay";
|
||||
label = "lan3";
|
||||
};
|
||||
|
||||
&swport3 {
|
||||
status = "okay";
|
||||
label = "lan2";
|
||||
};
|
||||
|
||||
&swport4 {
|
||||
status = "okay";
|
||||
label = "lan1";
|
||||
};
|
||||
|
||||
&swport5 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac {
|
||||
status = "okay";
|
||||
nvmem-cell-names = "mac-address";
|
||||
nvmem-cells = <&macaddr_orgdata_20>;
|
||||
};
|
||||
|
||||
&mdio {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&mdio_pins>;
|
||||
|
||||
@@ -305,8 +305,7 @@ define Device/buffalo_wtr-m2133hp
|
||||
BLOCKSIZE := 128k
|
||||
PAGESIZE := 2048
|
||||
endef
|
||||
# Missing DSA Setup
|
||||
#TARGET_DEVICES += buffalo_wtr-m2133hp
|
||||
TARGET_DEVICES += buffalo_wtr-m2133hp
|
||||
|
||||
define Device/cellc_rtl30vw
|
||||
KERNEL_SUFFIX := -zImage.itb
|
||||
|
||||
@@ -245,7 +245,7 @@ define Device/nec_wg2600hp3
|
||||
pad-rootfs | append-metadata
|
||||
DEVICE_PACKAGES := -kmod-ata-ahci -kmod-ata-ahci-platform \
|
||||
-kmod-usb-ohci -kmod-usb2 -kmod-usb-ledtrig-usbport \
|
||||
-kmod-usb-phy-qcom-dwc3 -kmod-usb3 -kmod-usb-dwc3-qcom \
|
||||
-kmod-phy-qcom-ipq806x-usb -kmod-usb3 -kmod-usb-dwc3-qcom \
|
||||
ath10k-firmware-qca9984-ct
|
||||
endef
|
||||
TARGET_DEVICES += nec_wg2600hp3
|
||||
|
||||
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -4943,6 +4943,16 @@ static int mvneta_setup_tc(struct net_de
|
||||
@@ -5006,6 +5006,16 @@ static int mvneta_setup_tc(struct net_de
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
static const struct net_device_ops mvneta_netdev_ops = {
|
||||
.ndo_open = mvneta_open,
|
||||
.ndo_stop = mvneta_stop,
|
||||
@@ -4953,6 +4963,9 @@ static const struct net_device_ops mvnet
|
||||
@@ -5016,6 +5026,9 @@ static const struct net_device_ops mvnet
|
||||
.ndo_fix_features = mvneta_fix_features,
|
||||
.ndo_get_stats64 = mvneta_get_stats64,
|
||||
.ndo_eth_ioctl = mvneta_ioctl,
|
||||
|
||||
@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#include <linux/bpf_trace.h>
|
||||
|
||||
/* Registers */
|
||||
@@ -4903,14 +4904,14 @@ static void mvneta_setup_rx_prio_map(str
|
||||
@@ -4966,14 +4967,14 @@ static void mvneta_setup_rx_prio_map(str
|
||||
}
|
||||
|
||||
static int mvneta_setup_mqprio(struct net_device *dev,
|
||||
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
if (num_tc > rxq_number)
|
||||
return -EINVAL;
|
||||
@@ -4921,13 +4922,15 @@ static int mvneta_setup_mqprio(struct ne
|
||||
@@ -4984,13 +4985,15 @@ static int mvneta_setup_mqprio(struct ne
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -4910,7 +4910,9 @@ static int mvneta_setup_mqprio(struct ne
|
||||
@@ -4973,7 +4973,9 @@ static int mvneta_setup_mqprio(struct ne
|
||||
u8 num_tc;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||||
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||||
@@ -493,7 +493,6 @@ struct mvneta_port {
|
||||
@@ -498,7 +498,6 @@ struct mvneta_port {
|
||||
u8 mcast_count[256];
|
||||
u16 tx_ring_size;
|
||||
u16 rx_ring_size;
|
||||
@@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
phy_interface_t phy_interface;
|
||||
struct device_node *dn;
|
||||
@@ -4892,13 +4891,12 @@ static void mvneta_clear_rx_prio_map(str
|
||||
@@ -4955,13 +4954,12 @@ static void mvneta_clear_rx_prio_map(str
|
||||
mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, 0);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val);
|
||||
}
|
||||
@@ -4907,8 +4905,8 @@ static int mvneta_setup_mqprio(struct ne
|
||||
@@ -4970,8 +4968,8 @@ static int mvneta_setup_mqprio(struct ne
|
||||
struct tc_mqprio_qopt_offload *mqprio)
|
||||
{
|
||||
struct mvneta_port *pp = netdev_priv(dev);
|
||||
@@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
|
||||
if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS)
|
||||
return 0;
|
||||
@@ -4918,21 +4916,28 @@ static int mvneta_setup_mqprio(struct ne
|
||||
@@ -4981,21 +4979,28 @@ static int mvneta_setup_mqprio(struct ne
|
||||
if (num_tc > rxq_number)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
#define MVNETA_LPI_CTRL_0 0x2cc0
|
||||
#define MVNETA_LPI_CTRL_1 0x2cc4
|
||||
#define MVNETA_LPI_REQUEST_ENABLE BIT(0)
|
||||
@@ -4901,11 +4928,74 @@ static void mvneta_map_vlan_prio_to_rxq(
|
||||
@@ -4964,11 +4991,74 @@ static void mvneta_map_vlan_prio_to_rxq(
|
||||
mvreg_write(pp, MVNETA_VLAN_PRIO_TO_RXQ, val);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
u8 num_tc;
|
||||
|
||||
if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS)
|
||||
@@ -4919,6 +5009,7 @@ static int mvneta_setup_mqprio(struct ne
|
||||
@@ -4982,6 +5072,7 @@ static int mvneta_setup_mqprio(struct ne
|
||||
mvneta_clear_rx_prio_map(pp);
|
||||
|
||||
if (!num_tc) {
|
||||
@@ -146,7 +146,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||
netdev_reset_tc(dev);
|
||||
return 0;
|
||||
}
|
||||
@@ -4939,6 +5030,33 @@ static int mvneta_setup_mqprio(struct ne
|
||||
@@ -5002,6 +5093,33 @@ static int mvneta_setup_mqprio(struct ne
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ CONFIG_CRC16=y
|
||||
CONFIG_CRC32_SLICEBY8=y
|
||||
CONFIG_CROSS_MEMORY_ATTACH=y
|
||||
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
|
||||
CONFIG_CRYPTO_LZ4=y
|
||||
CONFIG_CRYPTO_RNG2=y
|
||||
CONFIG_DEBUG_ALIGN_RODATA=y
|
||||
CONFIG_DEBUG_BUGVERBOSE=y
|
||||
@@ -165,6 +166,7 @@ CONFIG_LEDS_TRIGGER_ONESHOT=y
|
||||
CONFIG_LIBFDT=y
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_LOCK_DEBUGGING_SUPPORT=y
|
||||
CONFIG_LZ4_COMPRESS=y
|
||||
CONFIG_LZ4_DECOMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
# CONFIG_MACH_OX810SE is not set
|
||||
@@ -242,6 +244,7 @@ CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIO=y
|
||||
CONFIG_SERIO_LIBPS2=y
|
||||
CONFIG_SERIO_SERPORT=y
|
||||
CONFIG_SGL_ALLOC=y
|
||||
CONFIG_SLUB_DEBUG=y
|
||||
CONFIG_SOCK_DIAG=y
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
|
||||
@@ -237,6 +237,7 @@ TARGET_DEVICES += arcadyan_we420223-99
|
||||
|
||||
define Device/asiarf_ap7621-001
|
||||
$(Device/dsa-migration)
|
||||
$(Device/uimage-lzma-loader)
|
||||
IMAGE_SIZE := 16000k
|
||||
DEVICE_VENDOR := AsiaRF
|
||||
DEVICE_MODEL := AP7621-001
|
||||
@@ -247,6 +248,7 @@ TARGET_DEVICES += asiarf_ap7621-001
|
||||
|
||||
define Device/asiarf_ap7621-nv1
|
||||
$(Device/dsa-migration)
|
||||
$(Device/uimage-lzma-loader)
|
||||
IMAGE_SIZE := 16000k
|
||||
DEVICE_VENDOR := AsiaRF
|
||||
DEVICE_MODEL := AP7621-NV1
|
||||
@@ -2177,6 +2179,9 @@ define Device/tplink_mr600-v2-eu
|
||||
TPLINK_FLASHLAYOUT := 16Mltq
|
||||
DEVICE_PACKAGES := kmod-mt7603 kmod-mt7615e kmod-mt7663-firmware-ap \
|
||||
kmod-usb-net-qmi-wwan uqmi kmod-usb3 -uboot-envtools
|
||||
IMAGE/factory.bin := tplink-v2-image -e -a 0x10000
|
||||
IMAGE/sysupgrade.bin := tplink-v2-image -s -e -a 0x10000 | check-size | \
|
||||
append-metadata
|
||||
KERNEL := $(KERNEL_DTB) | uImage lzma
|
||||
KERNEL_INITRAMFS := $$(KERNEL) | tplink-v2-header
|
||||
TPLINK_BOARD_ID := MR600-V2-EU
|
||||
|
||||
16
target/linux/ramips/mt7621/base-files/etc/rc.button/lights_toggle
Executable file
16
target/linux/ramips/mt7621/base-files/etc/rc.button/lights_toggle
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
[[ "${ACTION}" = "released" ]] || exit 0
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
case "$(board_name)" in
|
||||
tplink,ec330-g5u-v1)
|
||||
led_light="/sys/class/gpio/led-light/value"
|
||||
echo "$((!$(cat $led_light)))" > "$led_light"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
@@ -42,7 +42,7 @@ CONFIG_AGP_INTEL=y
|
||||
# CONFIG_AGP_SIS is not set
|
||||
# CONFIG_AGP_VIA is not set
|
||||
CONFIG_AMD_IOMMU=y
|
||||
# CONFIG_AMD_IOMMU_V2 is not set
|
||||
CONFIG_AMD_IOMMU_V2=y
|
||||
# CONFIG_AMD_PMC is not set
|
||||
# CONFIG_AMD_PTDMA is not set
|
||||
# CONFIG_AMD_SFH_HID is not set
|
||||
|
||||
@@ -119,6 +119,13 @@ menu "Advanced configuration options (for developers)"
|
||||
help
|
||||
Compiler cache; see https://ccache.samba.org/
|
||||
|
||||
config CCACHE_DIR
|
||||
string "Set ccache directory" if CCACHE
|
||||
default ""
|
||||
help
|
||||
Store ccache in this directory.
|
||||
If not set, uses './.ccache'
|
||||
|
||||
config BUILD_LOG
|
||||
bool "Enable log files during build process"
|
||||
help
|
||||
|
||||
Reference in New Issue
Block a user