mirror of
https://github.com/FUjr/gl-infra-builder.git
synced 2025-12-16 17:15:08 +00:00
patches-siflower-18.x: update silfower SDK to 3276b2b
This commit is contained in:
parent
26e286f325
commit
7f1c3b2b00
@ -2,7 +2,7 @@ repo: https://github.com/Siflower/1806_SDK.git
|
||||
branch: release
|
||||
git_clone_dir: openwrt-18.06/siflower
|
||||
openwrt_root_dir: openwrt-18.06/siflower/openwrt-18.06
|
||||
revision: e78c95bd11d8c5e7b48ba25b6c5a62f764151260
|
||||
revision: 3279b2bb4b4d9cb6a5f1755103d724d6bd5ba8f9
|
||||
|
||||
patch_folders:
|
||||
- patches-siflower-18.x/
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
From 9dc70d59b5a7bb00209ce498b3fa6845830cc227 Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Fri, 5 Nov 2021 15:08:24 +0800
|
||||
Subject: [PATCH] fix: delete siflower guest and lease wifi-iface
|
||||
|
||||
---
|
||||
.../kernel/mac80211/files/lib/wifi/mac80211.sh | 33 ----------------------
|
||||
1 file changed, 33 deletions(-)
|
||||
|
||||
diff --git a/openwrt-18.06/package/kernel/mac80211/files/lib/wifi/mac80211.sh b/openwrt-18.06/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
index dda166d..1aa2804 100755
|
||||
--- a/openwrt-18.06/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
+++ b/openwrt-18.06/package/kernel/mac80211/files/lib/wifi/mac80211.sh
|
||||
@@ -164,42 +164,9 @@ detect_mac80211() {
|
||||
set wireless.default_radio${devidx}.wps_pushbutton=1
|
||||
set wireless.default_radio${devidx}.wps_label=0
|
||||
|
||||
- set wireless.guest_radio${devidx}=wifi-iface
|
||||
- set wireless.guest_radio${devidx}.device=radio${devidx}
|
||||
- set wireless.guest_radio${devidx}.network=guest
|
||||
- set wireless.guest_radio${devidx}.mode=ap
|
||||
- set wireless.guest_radio${devidx}.ssid=${ssid}-guest
|
||||
- set wireless.guest_radio${devidx}.encryption=none
|
||||
- set wireless.guest_radio${devidx}.hidden=0
|
||||
- set wireless.guest_radio${devidx}.ifname=wlan${devidx}-guest
|
||||
- set wireless.guest_radio${devidx}.isolate=1
|
||||
- set wireless.guest_radio${devidx}.group=1
|
||||
- set wireless.guest_radio${devidx}.netisolate=0
|
||||
- set wireless.guest_radio${devidx}.disable_input=0
|
||||
- set wireless.guest_radio${devidx}.disabled=1
|
||||
EOF
|
||||
uci -q commit wireless
|
||||
|
||||
- if [ "$devidx" == "0" ]; then
|
||||
- uci -q batch <<-EOF
|
||||
- set wireless.lease_radio${devidx}=wifi-iface
|
||||
- set wireless.lease_radio${devidx}.device=radio${devidx}
|
||||
- set wireless.lease_radio${devidx}.network=lease
|
||||
- set wireless.lease_radio${devidx}.mode=ap
|
||||
- set wireless.lease_radio${devidx}.ssid=${ssid_lease}
|
||||
- set wireless.lease_radio${devidx}.encryption=none
|
||||
- set wireless.lease_radio${devidx}.hidden=0
|
||||
- set wireless.lease_radio${devidx}.ifname=wlan${devidx}-lease
|
||||
- set wireless.lease_radio${devidx}.isolate=1
|
||||
- set wireless.lease_radio${devidx}.group=1
|
||||
- set wireless.lease_radio${devidx}.netisolate=0
|
||||
- set wireless.lease_radio${devidx}.disable_input=0
|
||||
- set wireless.lease_radio${devidx}.maxassoc=64
|
||||
- set wireless.lease_radio${devidx}.disabled=1
|
||||
- EOF
|
||||
- uci -q commit wireless
|
||||
- fi
|
||||
-
|
||||
devidx=$(($devidx + 1))
|
||||
done
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -1,28 +1,15 @@
|
||||
From 5bbb177ca9946a485b12001a81a2ed75d6a96c1f Mon Sep 17 00:00:00 2001
|
||||
From 62897b60de364737a39ac402302e9aa0c256aeaf Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Mon, 19 Jul 2021 15:27:56 +0800
|
||||
Subject: [PATCH] feat: spi-nand support gigadevice
|
||||
Date: Fri, 5 Nov 2021 09:49:17 +0800
|
||||
Subject: [PATCH] feat: spi nand support gigadevice
|
||||
|
||||
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
|
||||
---
|
||||
.../linux-4.14.90/drivers/mtd/nand/spi/Makefile | 2 +-
|
||||
.../linux-4.14.90/drivers/mtd/nand/spi/esmt.c | 4 +-
|
||||
.../drivers/mtd/nand/spi/gigadevice.c | 371 +++++++++++++++++++++
|
||||
.../drivers/mtd/nand/spi/spi_nand_core.c | 1 +
|
||||
.../linux-4.14.90/include/linux/mtd/spinand.h | 19 ++
|
||||
5 files changed, 395 insertions(+), 2 deletions(-)
|
||||
.../drivers/mtd/nand/spi/gigadevice.c | 381 +++++++++++++++++++++
|
||||
.../linux-4.14.90/include/linux/mtd/spinand.h | 18 +
|
||||
3 files changed, 402 insertions(+), 1 deletion(-)
|
||||
create mode 100644 linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/gigadevice.c
|
||||
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/Makefile b/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/Makefile
|
||||
index e87b281..900234e 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/Makefile
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/Makefile
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
obj-$(CONFIG_MTD_NAND_SPI) += spinand.o
|
||||
|
||||
-spinand-objs := bbt.o nand_core.o spi_nand_core.o macronix.o micron.o winbond.o icmax.o esmt.o toshiba.o
|
||||
+spinand-objs := bbt.o nand_core.o spi_nand_core.o macronix.o micron.o winbond.o icmax.o esmt.o toshiba.o gigadevice.o
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/esmt.c b/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/esmt.c
|
||||
index e8bf521..9bdd89a 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/esmt.c
|
||||
@ -41,10 +28,10 @@ index e8bf521..9bdd89a 100644
|
||||
}
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/gigadevice.c b/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/gigadevice.c
|
||||
new file mode 100644
|
||||
index 0000000..2006b75
|
||||
index 0000000..79b26f5
|
||||
--- /dev/null
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/gigadevice.c
|
||||
@@ -0,0 +1,371 @@
|
||||
@@ -0,0 +1,381 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0
|
||||
+/*
|
||||
+ * Author:
|
||||
@ -384,6 +371,15 @@ index 0000000..2006b75
|
||||
+ SPINAND_HAS_QE_BIT,
|
||||
+ SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout,
|
||||
+ gd5fxgq5xexxg_ecc_get_status)),
|
||||
+ SPINAND_INFO("GD5F2GQ5UExxG", 0x52,
|
||||
+ NAND_MEMORG(1, 2048, 128, 64, 2048, 1, 1, 1),
|
||||
+ NAND_ECCREQ(4, 512),
|
||||
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
|
||||
+ &write_cache_variants,
|
||||
+ &update_cache_variants),
|
||||
+ SPINAND_HAS_QE_BIT,
|
||||
+ SPINAND_ECCINFO(&gd5fxgqx_variant2_ooblayout,
|
||||
+ gd5fxgq5xexxg_ecc_get_status)),
|
||||
+};
|
||||
+
|
||||
+static int gigadevice_spinand_detect(struct spinand_device *spinand)
|
||||
@ -416,21 +412,9 @@ index 0000000..2006b75
|
||||
+ .name = "GigaDevice",
|
||||
+ .ops = &gigadevice_spinand_manuf_ops,
|
||||
+};
|
||||
\ No newline at end of file
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/spi_nand_core.c b/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/spi_nand_core.c
|
||||
index 83b8136..7086b71 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/spi_nand_core.c
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/drivers/mtd/nand/spi/spi_nand_core.c
|
||||
@@ -803,6 +803,7 @@ static const struct spinand_manufacturer *spinand_manufacturers[] = {
|
||||
µn_spinand_manufacturer,
|
||||
&winbond_spinand_manufacturer,
|
||||
&toshiba_spinand_manufacturer,
|
||||
+ &gigadevice_spinand_manufacturer,
|
||||
};
|
||||
|
||||
static int spinand_manufacturer_detect(struct spinand_device *spinand)
|
||||
+
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/include/linux/mtd/spinand.h b/linux-4.14.90-dev/linux-4.14.90/include/linux/mtd/spinand.h
|
||||
index d5f7b29..b7ef388 100644
|
||||
index 67438cf..5e15c12 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/include/linux/mtd/spinand.h
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/include/linux/mtd/spinand.h
|
||||
@@ -68,18 +68,36 @@
|
||||
@ -470,14 +454,6 @@ index d5f7b29..b7ef388 100644
|
||||
#define SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(addr, ndummy, buf, len) \
|
||||
SPI_MEM_OP(SPI_MEM_OP_CMD(0xbb, 1), \
|
||||
SPI_MEM_OP_ADDR(2, addr, 2), \
|
||||
@@ -200,6 +218,7 @@ extern const struct spinand_manufacturer macronix_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer micron_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer winbond_spinand_manufacturer;
|
||||
extern const struct spinand_manufacturer toshiba_spinand_manufacturer;
|
||||
+extern const struct spinand_manufacturer gigadevice_spinand_manufacturer;
|
||||
|
||||
/**
|
||||
* struct spinand_op_variants - SPI NAND operation variants
|
||||
--
|
||||
2.7.4
|
||||
|
||||
|
||||
@ -1,15 +1,14 @@
|
||||
From 02928fad2108bd70b0862dcedd75fb8ac70d0006 Mon Sep 17 00:00:00 2001
|
||||
From 64afb600eb89accb36b1e706d20315fea393c23e Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Mon, 23 Aug 2021 17:24:13 +0800
|
||||
Date: Fri, 5 Nov 2021 10:18:10 +0800
|
||||
Subject: [PATCH] fix: iphone tethering driver
|
||||
|
||||
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
|
||||
---
|
||||
.../linux-4.14.90/drivers/net/usb/ipheth.c | 38 +++++++++++++++-------
|
||||
1 file changed, 27 insertions(+), 11 deletions(-)
|
||||
.../linux-4.14.90/drivers/net/usb/ipheth.c | 55 +++++++++++++++++-----
|
||||
1 file changed, 44 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/net/usb/ipheth.c b/linux-4.14.90-dev/linux-4.14.90/drivers/net/usb/ipheth.c
|
||||
index aabbcfb..8e2eb20 100644
|
||||
index aabbcfb..bf0d9ff 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/drivers/net/usb/ipheth.c
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/drivers/net/usb/ipheth.c
|
||||
@@ -70,7 +70,7 @@
|
||||
@ -21,15 +20,16 @@ index aabbcfb..8e2eb20 100644
|
||||
#define IPHETH_IP_ALIGN 2 /* padding at front of URB */
|
||||
#define IPHETH_TX_TIMEOUT (5 * HZ)
|
||||
|
||||
@@ -148,6 +148,7 @@ struct ipheth_device {
|
||||
@@ -148,6 +148,8 @@ struct ipheth_device {
|
||||
u8 bulk_in;
|
||||
u8 bulk_out;
|
||||
struct delayed_work carrier_work;
|
||||
+ bool confirmed_pairing;
|
||||
+ int tx_in_use;
|
||||
};
|
||||
|
||||
static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags);
|
||||
@@ -259,7 +260,7 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
|
||||
@@ -259,7 +261,7 @@ static void ipheth_rcvbulk_callback(struct urb *urb)
|
||||
|
||||
dev->net->stats.rx_packets++;
|
||||
dev->net->stats.rx_bytes += len;
|
||||
@ -38,11 +38,13 @@ index aabbcfb..8e2eb20 100644
|
||||
netif_rx(skb);
|
||||
ipheth_rx_submit(dev, GFP_ATOMIC);
|
||||
}
|
||||
@@ -280,14 +281,24 @@ static void ipheth_sndbulk_callback(struct urb *urb)
|
||||
@@ -280,14 +282,26 @@ static void ipheth_sndbulk_callback(struct urb *urb)
|
||||
dev_err(&dev->intf->dev, "%s: urb status: %d\n",
|
||||
__func__, status);
|
||||
|
||||
- netif_wake_queue(dev->net);
|
||||
+ dev->tx_in_use = false;
|
||||
+
|
||||
+ if (status == 0)
|
||||
+ netif_wake_queue(dev->net);
|
||||
+ else
|
||||
@ -65,7 +67,7 @@ index aabbcfb..8e2eb20 100644
|
||||
retval = usb_control_msg(udev,
|
||||
usb_rcvctrlpipe(udev, IPHETH_CTRL_ENDP),
|
||||
IPHETH_CMD_CARRIER_CHECK, /* request */
|
||||
@@ -302,11 +313,14 @@ static int ipheth_carrier_set(struct ipheth_device *dev)
|
||||
@@ -302,11 +316,14 @@ static int ipheth_carrier_set(struct ipheth_device *dev)
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -73,7 +75,7 @@ index aabbcfb..8e2eb20 100644
|
||||
+ if (dev->ctrl_buf[0] == IPHETH_CARRIER_ON) {
|
||||
netif_carrier_on(dev->net);
|
||||
- else
|
||||
+ if (dev->tx_urb->status != -EINPROGRESS)
|
||||
+ if (dev->tx_urb->status != -EINPROGRESS && dev->tx_in_use == false)
|
||||
+ netif_wake_queue(dev->net);
|
||||
+ } else {
|
||||
netif_carrier_off(dev->net);
|
||||
@ -83,7 +85,16 @@ index aabbcfb..8e2eb20 100644
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -386,7 +400,6 @@ static int ipheth_open(struct net_device *net)
|
||||
@@ -375,6 +392,8 @@ static int ipheth_open(struct net_device *net)
|
||||
struct usb_device *udev = dev->udev;
|
||||
int retval = 0;
|
||||
|
||||
+ dev->tx_in_use = false;
|
||||
+
|
||||
usb_set_interface(udev, IPHETH_INTFNUM, IPHETH_ALT_INTFNUM);
|
||||
|
||||
retval = ipheth_carrier_set(dev);
|
||||
@@ -386,7 +405,6 @@ static int ipheth_open(struct net_device *net)
|
||||
return retval;
|
||||
|
||||
schedule_delayed_work(&dev->carrier_work, IPHETH_CARRIER_CHECK_TIMEOUT);
|
||||
@ -91,7 +102,22 @@ index aabbcfb..8e2eb20 100644
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -424,17 +437,18 @@ static int ipheth_tx(struct sk_buff *skb, struct net_device *net)
|
||||
@@ -413,6 +431,14 @@ static int ipheth_tx(struct sk_buff *skb, struct net_device *net)
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
+ if (dev->tx_in_use) {
|
||||
+ dev->net->stats.tx_dropped++;
|
||||
+ dev_kfree_skb_any(skb);
|
||||
+ return NETDEV_TX_OK;
|
||||
+ }
|
||||
+
|
||||
+ dev->tx_in_use = true;
|
||||
+
|
||||
memcpy(dev->tx_buf, skb->data, skb->len);
|
||||
if (skb->len < IPHETH_BUF_SIZE)
|
||||
memset(dev->tx_buf + skb->len, 0, IPHETH_BUF_SIZE - skb->len);
|
||||
@@ -424,17 +450,22 @@ static int ipheth_tx(struct sk_buff *skb, struct net_device *net)
|
||||
dev);
|
||||
dev->tx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
|
||||
@ -103,6 +129,10 @@ index aabbcfb..8e2eb20 100644
|
||||
dev->net->stats.tx_errors++;
|
||||
dev_kfree_skb_any(skb);
|
||||
+ netif_wake_queue(net);
|
||||
+ if (atomic_read(&dev->tx_urb->use_count) != 0) {
|
||||
+ atomic_dec(&dev->tx_urb->use_count);
|
||||
+ }
|
||||
+ dev->tx_in_use = false;
|
||||
} else {
|
||||
dev->net->stats.tx_packets++;
|
||||
dev->net->stats.tx_bytes += skb->len;
|
||||
@ -111,7 +141,7 @@ index aabbcfb..8e2eb20 100644
|
||||
}
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
@@ -489,7 +503,7 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||
@@ -489,7 +520,7 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||
dev->udev = udev;
|
||||
dev->net = netdev;
|
||||
dev->intf = intf;
|
||||
@ -120,7 +150,7 @@ index aabbcfb..8e2eb20 100644
|
||||
/* Set up endpoints */
|
||||
hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
|
||||
if (hintf == NULL) {
|
||||
@@ -540,7 +554,9 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||
@@ -540,7 +571,9 @@ static int ipheth_probe(struct usb_interface *intf,
|
||||
retval = -EIO;
|
||||
goto err_register_netdev;
|
||||
}
|
||||
|
||||
@ -1,18 +1,28 @@
|
||||
From 8ebeb76b906bcf0702d1a75b31a0152bcf6b731b Mon Sep 17 00:00:00 2001
|
||||
From 362fe4ea55bcbabca707a103c1a2ecb3a559dccf Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Mon, 23 Aug 2021 17:26:41 +0800
|
||||
Subject: [PATCH] fix: disable hwnat on vpn or tethering
|
||||
|
||||
Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
|
||||
---
|
||||
.../linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
.../linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c b/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c
|
||||
index 5bf315e..f2d36f4 100644
|
||||
index e2a7fce..eab348e 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/net/netfilter/xt_FLOWOFFLOAD.c
|
||||
@@ -523,6 +523,11 @@ flowoffload_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
@@ -203,6 +203,9 @@ xt_flowoffload_skip(struct sk_buff *skb, int family)
|
||||
return true;
|
||||
}
|
||||
|
||||
+ if (family == NFPROTO_IPV6)
|
||||
+ return true;
|
||||
+
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -528,6 +531,11 @@ flowoffload_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
if (xt_flowoffload_skip(skb, xt_family(par)))
|
||||
return XT_CONTINUE;
|
||||
|
||||
@ -24,7 +34,7 @@ index 5bf315e..f2d36f4 100644
|
||||
|
||||
ct = nf_ct_get(skb, &ctinfo);
|
||||
if (ct == NULL)
|
||||
@@ -593,6 +598,12 @@ flowoffload_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
@@ -599,6 +607,12 @@ flowoffload_tg(struct sk_buff *skb, const struct xt_action_param *par)
|
||||
if (flow_offload_add(&nf_flowtable, flow) < 0)
|
||||
goto err_flow_add;
|
||||
|
||||
|
||||
166
patches-siflower-18.x/0306-fix-delete-usb-statistics-debug.patch
Normal file
166
patches-siflower-18.x/0306-fix-delete-usb-statistics-debug.patch
Normal file
@ -0,0 +1,166 @@
|
||||
From 8e6dcc12e7ad1af0d267bf9bba826eb501b25d7d Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Fri, 5 Nov 2021 10:43:57 +0800
|
||||
Subject: [PATCH] fix: delete usb statistics debug
|
||||
|
||||
---
|
||||
.../linux-4.14.90/drivers/usb/dwc2/debug.h | 11 ----
|
||||
.../linux-4.14.90/drivers/usb/dwc2/debugfs.c | 65 ----------------------
|
||||
.../linux-4.14.90/drivers/usb/dwc2/hcd.c | 9 ---
|
||||
3 files changed, 85 deletions(-)
|
||||
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/debug.h b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/debug.h
|
||||
index 962fe48..8222783 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/debug.h
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/debug.h
|
||||
@@ -16,23 +16,12 @@
|
||||
|
||||
#include "core.h"
|
||||
|
||||
-struct dwc2_data_statistic {
|
||||
- spinlock_t lock;
|
||||
- u64 total_data;
|
||||
-};
|
||||
-
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
int dwc2_debugfs_init(struct dwc2_hsotg *hsotg);
|
||||
void dwc2_debugfs_exit(struct dwc2_hsotg *hsotg);
|
||||
-extern void dwc2_statistic_add(u32);
|
||||
-extern void dwc2_statistic_decrease(u32);
|
||||
-extern void dwc2_statistic_clear(void);
|
||||
#else
|
||||
static inline int dwc2_debugfs_init(struct dwc2_hsotg *hsotg)
|
||||
{ return 0; }
|
||||
static inline void dwc2_debugfs_exit(struct dwc2_hsotg *hsotg)
|
||||
{ }
|
||||
-static void dwc2_statistic_add(u32) {}
|
||||
-static void dwc2_statistic_decrease(u32) {}
|
||||
-static void dwc2_statistic_clear(void) {}
|
||||
#endif
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/debugfs.c b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/debugfs.c
|
||||
index aef58f9..794b959 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/debugfs.c
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/debugfs.c
|
||||
@@ -389,45 +389,6 @@ static void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg)
|
||||
static inline void dwc2_hsotg_create_debug(struct dwc2_hsotg *hsotg) {}
|
||||
#endif
|
||||
|
||||
-static int statistic_show(struct seq_file *seq, void *v)
|
||||
-{
|
||||
- struct dwc2_data_statistic *statistic = seq->private;
|
||||
- unsigned long flags;
|
||||
-
|
||||
- spin_lock_irqsave(&statistic->lock, flags);
|
||||
- seq_printf(seq, "%lld\n", statistic->total_data);
|
||||
- spin_unlock_irqrestore(&statistic->lock, flags);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int statistic_open(struct inode *inode, struct file *file)
|
||||
-{
|
||||
- return single_open(file, statistic_show, inode->i_private);
|
||||
-}
|
||||
-
|
||||
-static const struct file_operations statistic_fops = {
|
||||
- .owner = THIS_MODULE,
|
||||
- .open = statistic_open,
|
||||
- .read = seq_read,
|
||||
- .llseek = seq_lseek,
|
||||
- .release = single_release,
|
||||
-};
|
||||
-
|
||||
-static void dwc2_hsotg_create_statistic(struct dwc2_hsotg *hsotg, struct dwc2_data_statistic *statistic)
|
||||
-{
|
||||
- struct dentry *root;
|
||||
- struct dentry *file;
|
||||
-
|
||||
- spin_lock_init(&statistic->lock);
|
||||
- dwc2_statistic_clear();
|
||||
-
|
||||
- root = hsotg->debug_root;
|
||||
- file = debugfs_create_file("statistic", S_IRUGO, root, statistic, &statistic_fops);
|
||||
- if (IS_ERR(file))
|
||||
- dev_err(hsotg->dev, "%s: failed to create statistic\n", __func__);
|
||||
-}
|
||||
-
|
||||
/* dwc2_hsotg_delete_debug is removed as cleanup in done in dwc2_debugfs_exit */
|
||||
|
||||
#define dump_register(nm) \
|
||||
@@ -764,29 +725,6 @@ static const struct debugfs_reg32 dwc2_regs[] = {
|
||||
dump_register(HCDMAB(15)),
|
||||
};
|
||||
|
||||
-static struct dwc2_data_statistic transfer_statistic;
|
||||
-
|
||||
-void dwc2_statistic_add(u32 length)
|
||||
-{
|
||||
- spin_lock(&transfer_statistic.lock);
|
||||
- transfer_statistic.total_data += (u64)length;
|
||||
- spin_unlock(&transfer_statistic.lock);
|
||||
-}
|
||||
-
|
||||
-void dwc2_statistic_decrease(u32 length)
|
||||
-{
|
||||
- spin_lock(&transfer_statistic.lock);
|
||||
- transfer_statistic.total_data -= (u64)length;
|
||||
- spin_unlock(&transfer_statistic.lock);
|
||||
-}
|
||||
-
|
||||
-void dwc2_statistic_clear()
|
||||
-{
|
||||
- spin_lock(&transfer_statistic.lock);
|
||||
- transfer_statistic.total_data = 0;
|
||||
- spin_unlock(&transfer_statistic.lock);
|
||||
-}
|
||||
-
|
||||
#define print_param(_seq, _ptr, _param) \
|
||||
seq_printf((_seq), "%-30s: %d\n", #_param, (_ptr)->_param)
|
||||
|
||||
@@ -957,9 +895,6 @@ int dwc2_debugfs_init(struct dwc2_hsotg *hsotg)
|
||||
/* Add gadget debugfs nodes */
|
||||
dwc2_hsotg_create_debug(hsotg);
|
||||
|
||||
- /* Add transfer length node */
|
||||
- dwc2_hsotg_create_statistic(hsotg, &transfer_statistic);
|
||||
-
|
||||
hsotg->regset = devm_kzalloc(hsotg->dev, sizeof(*hsotg->regset),
|
||||
GFP_KERNEL);
|
||||
if (!hsotg->regset) {
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd.c b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd.c
|
||||
index 0683614..3c4658b 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd.c
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/drivers/usb/dwc2/hcd.c
|
||||
@@ -54,7 +54,6 @@
|
||||
|
||||
#include "core.h"
|
||||
#include "hcd.h"
|
||||
-#include "debug.h"
|
||||
|
||||
static void dwc2_port_resume(struct dwc2_hsotg *hsotg);
|
||||
|
||||
@@ -4819,10 +4818,6 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
|
||||
dwc2_urb->interval = urb->interval;
|
||||
dwc2_urb->status = -EINPROGRESS;
|
||||
|
||||
- #ifdef CONFIG_DEBUG_FS
|
||||
- dwc2_statistic_add(urb->transfer_buffer_length);
|
||||
- #endif
|
||||
-
|
||||
for (i = 0; i < urb->number_of_packets; ++i)
|
||||
dwc2_hcd_urb_set_iso_desc_params(dwc2_urb, i,
|
||||
urb->iso_frame_desc[i].offset,
|
||||
@@ -4920,10 +4915,6 @@ static int _dwc2_hcd_urb_dequeue(struct usb_hcd *hcd, struct urb *urb,
|
||||
|
||||
rc = dwc2_hcd_urb_dequeue(hsotg, urb->hcpriv);
|
||||
|
||||
- #ifdef CONFIG_DEBUG_FS
|
||||
- dwc2_statistic_decrease(urb->transfer_buffer_length);
|
||||
- #endif
|
||||
-
|
||||
usb_hcd_unlink_urb_from_ep(hcd, urb);
|
||||
|
||||
kfree(urb->hcpriv);
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -1,270 +0,0 @@
|
||||
From 48e82d6c2d90fa6838e5d9e0d078488935335749 Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Thu, 14 Oct 2021 14:59:32 +0800
|
||||
Subject: [PATCH] fix: icmp_send stack overflow
|
||||
|
||||
---
|
||||
linux-4.14.90-dev/linux-4.14.90/net/ipv4/icmp.c | 168 +++++++++++++++---------
|
||||
1 file changed, 103 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/net/ipv4/icmp.c b/linux-4.14.90-dev/linux-4.14.90/net/ipv4/icmp.c
|
||||
index 3c1570d..8217950 100644
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/net/ipv4/icmp.c
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/net/ipv4/icmp.c
|
||||
@@ -575,31 +575,37 @@ relookup_failed:
|
||||
|
||||
void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
|
||||
{
|
||||
- struct iphdr *iph;
|
||||
- int room;
|
||||
- struct icmp_bxm icmp_param;
|
||||
- struct rtable *rt = skb_rtable(skb_in);
|
||||
- struct ipcm_cookie ipc;
|
||||
- struct flowi4 fl4;
|
||||
- __be32 saddr;
|
||||
- u8 tos;
|
||||
- u32 mark;
|
||||
- struct net *net;
|
||||
- struct sock *sk;
|
||||
-
|
||||
- if (!rt)
|
||||
+ struct iphdr *iph[2] = {0, 0xa5a5a5a5};
|
||||
+ int room[2] = {0, 0xa5a5a5a5};
|
||||
+ struct icmp_bxm icmp_param[2];
|
||||
+ struct rtable *rt[2] = {0, 0xa5a5a5a5};
|
||||
+ struct ipcm_cookie ipc[2];
|
||||
+ struct flowi4 fl4[2];
|
||||
+ __be32 saddr[2] = {0, 0xa5a5a5a5};
|
||||
+ u8 tos[2] = {0, 0xa5a5a5a5};
|
||||
+ u32 mark[2] = {0, 0xa5a5a5a5};
|
||||
+ struct net *net[2] = {0, 0xa5a5a5a5};
|
||||
+ struct sock *sk[2] = {0, 0xa5a5a5a5};
|
||||
+ u32 reddata = 0xa5a5a5a5;
|
||||
+ u8 redflag;
|
||||
+ memset(&icmp_param[1], 0xa5, sizeof(struct icmp_bxm));
|
||||
+ memset(&ipc[1], 0xa5, sizeof(struct ipcm_cookie));
|
||||
+ memset(&fl4[1], 0xa5, sizeof(struct flowi4));
|
||||
+
|
||||
+ rt[0]= skb_rtable(skb_in);
|
||||
+ if (!rt[0])
|
||||
goto out;
|
||||
- net = dev_net(rt->dst.dev);
|
||||
+ net[0] = dev_net(rt[0]->dst.dev);
|
||||
|
||||
/*
|
||||
* Find the original header. It is expected to be valid, of course.
|
||||
* Check this, icmp_send is called from the most obscure devices
|
||||
* sometimes.
|
||||
*/
|
||||
- iph = ip_hdr(skb_in);
|
||||
+ iph[0] = ip_hdr(skb_in);
|
||||
|
||||
- if ((u8 *)iph < skb_in->head ||
|
||||
- (skb_network_header(skb_in) + sizeof(*iph)) >
|
||||
+ if ((u8 *)iph[0] < skb_in->head ||
|
||||
+ (skb_network_header(skb_in) + sizeof(*iph[0])) >
|
||||
skb_tail_pointer(skb_in))
|
||||
goto out;
|
||||
|
||||
@@ -612,14 +618,14 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
|
||||
/*
|
||||
* Now check at the protocol level
|
||||
*/
|
||||
- if (rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))
|
||||
+ if (rt[0]->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Only reply to fragment 0. We byte re-order the constant
|
||||
* mask for efficiency.
|
||||
*/
|
||||
- if (iph->frag_off & htons(IP_OFFSET))
|
||||
+ if (iph[0]->frag_off & htons(IP_OFFSET))
|
||||
goto out;
|
||||
|
||||
/*
|
||||
@@ -630,12 +636,12 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
|
||||
* We are an error, check if we are replying to an
|
||||
* ICMP error
|
||||
*/
|
||||
- if (iph->protocol == IPPROTO_ICMP) {
|
||||
+ if (iph[0]->protocol == IPPROTO_ICMP) {
|
||||
u8 _inner_type, *itp;
|
||||
|
||||
itp = skb_header_pointer(skb_in,
|
||||
skb_network_header(skb_in) +
|
||||
- (iph->ihl << 2) +
|
||||
+ (iph[0]->ihl << 2) +
|
||||
offsetof(struct icmphdr,
|
||||
type) -
|
||||
skb_in->data,
|
||||
@@ -662,39 +668,39 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
|
||||
* loopback, then peer ratelimit still work (in icmpv4_xrlim_allow)
|
||||
*/
|
||||
if (!(skb_in->dev && (skb_in->dev->flags&IFF_LOOPBACK)) &&
|
||||
- !icmpv4_global_allow(net, type, code))
|
||||
+ !icmpv4_global_allow(net[0], type, code))
|
||||
goto out_bh_enable;
|
||||
|
||||
- sk = icmp_xmit_lock(net);
|
||||
- if (!sk)
|
||||
+ sk[0] = icmp_xmit_lock(net[0]);
|
||||
+ if (!sk[0])
|
||||
goto out_bh_enable;
|
||||
|
||||
/*
|
||||
* Construct source address and options.
|
||||
*/
|
||||
|
||||
- saddr = iph->daddr;
|
||||
- if (!(rt->rt_flags & RTCF_LOCAL)) {
|
||||
+ saddr[0] = iph[0]->daddr;
|
||||
+ if (!(rt[0]->rt_flags & RTCF_LOCAL)) {
|
||||
struct net_device *dev = NULL;
|
||||
|
||||
rcu_read_lock();
|
||||
- if (rt_is_input_route(rt) &&
|
||||
- net->ipv4.sysctl_icmp_errors_use_inbound_ifaddr)
|
||||
- dev = dev_get_by_index_rcu(net, inet_iif(skb_in));
|
||||
+ if (rt_is_input_route(rt[0]) &&
|
||||
+ net[0]->ipv4.sysctl_icmp_errors_use_inbound_ifaddr)
|
||||
+ dev = dev_get_by_index_rcu(net[0], inet_iif(skb_in));
|
||||
|
||||
if (dev)
|
||||
- saddr = inet_select_addr(dev, 0, RT_SCOPE_LINK);
|
||||
+ saddr[0] = inet_select_addr(dev, 0, RT_SCOPE_LINK);
|
||||
else
|
||||
- saddr = 0;
|
||||
+ saddr[0] = 0;
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
- tos = icmp_pointers[type].error ? ((iph->tos & IPTOS_TOS_MASK) |
|
||||
+ tos[0] = icmp_pointers[type].error ? ((iph[0]->tos & IPTOS_TOS_MASK) |
|
||||
IPTOS_PREC_INTERNETCONTROL) :
|
||||
- iph->tos;
|
||||
- mark = IP4_REPLY_MARK(net, skb_in->mark);
|
||||
+ iph[0]->tos;
|
||||
+ mark[0] = IP4_REPLY_MARK(net[0], skb_in->mark);
|
||||
|
||||
- if (ip_options_echo(net, &icmp_param.replyopts.opt.opt, skb_in))
|
||||
+ if (ip_options_echo(net[0], &icmp_param[0].replyopts.opt.opt, skb_in))
|
||||
goto out_unlock;
|
||||
|
||||
|
||||
@@ -702,50 +708,82 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info)
|
||||
* Prepare data for ICMP header.
|
||||
*/
|
||||
|
||||
- icmp_param.data.icmph.type = type;
|
||||
- icmp_param.data.icmph.code = code;
|
||||
- icmp_param.data.icmph.un.gateway = info;
|
||||
- icmp_param.data.icmph.checksum = 0;
|
||||
- icmp_param.skb = skb_in;
|
||||
- icmp_param.offset = skb_network_offset(skb_in);
|
||||
- inet_sk(sk)->tos = tos;
|
||||
- sk->sk_mark = mark;
|
||||
- ipc.addr = iph->saddr;
|
||||
- ipc.opt = &icmp_param.replyopts.opt;
|
||||
- ipc.tx_flags = 0;
|
||||
- ipc.ttl = 0;
|
||||
- ipc.tos = -1;
|
||||
-
|
||||
- rt = icmp_route_lookup(net, &fl4, skb_in, iph, saddr, tos, mark,
|
||||
- type, code, &icmp_param);
|
||||
- if (IS_ERR(rt))
|
||||
+ icmp_param[0].data.icmph.type = type;
|
||||
+ icmp_param[0].data.icmph.code = code;
|
||||
+ icmp_param[0].data.icmph.un.gateway = info;
|
||||
+ icmp_param[0].data.icmph.checksum = 0;
|
||||
+ icmp_param[0].skb = skb_in;
|
||||
+ icmp_param[0].offset = skb_network_offset(skb_in);
|
||||
+ inet_sk(sk[0])->tos = tos[0];
|
||||
+ sk[0]->sk_mark = mark[0];
|
||||
+ ipc[0].addr = iph[0]->saddr;
|
||||
+ ipc[0].opt = &icmp_param[0].replyopts.opt;
|
||||
+ ipc[0].tx_flags = 0;
|
||||
+ ipc[0].ttl = 0;
|
||||
+ ipc[0].tos = -1;
|
||||
+
|
||||
+ rt[0] = icmp_route_lookup(net[0], &fl4[0], skb_in, iph[0], saddr[0], tos[0], mark[0],
|
||||
+ type, code, &icmp_param[0]);
|
||||
+ if (IS_ERR(rt[0]))
|
||||
goto out_unlock;
|
||||
|
||||
/* peer icmp_ratelimit */
|
||||
- if (!icmpv4_xrlim_allow(net, rt, &fl4, type, code))
|
||||
+ if (!icmpv4_xrlim_allow(net[0], rt[0], &fl4[0], type, code))
|
||||
goto ende;
|
||||
|
||||
/* RFC says return as much as we can without exceeding 576 bytes. */
|
||||
|
||||
- room = dst_mtu(&rt->dst);
|
||||
- if (room > 576)
|
||||
- room = 576;
|
||||
- room -= sizeof(struct iphdr) + icmp_param.replyopts.opt.opt.optlen;
|
||||
- room -= sizeof(struct icmphdr);
|
||||
+ room[0] = dst_mtu(&rt[0]->dst);
|
||||
+ if (room[0] > 576)
|
||||
+ room[0] = 576;
|
||||
+ room[0] -= sizeof(struct iphdr) + icmp_param[0].replyopts.opt.opt.optlen;
|
||||
+ room[0] -= sizeof(struct icmphdr);
|
||||
|
||||
- icmp_param.data_len = skb_in->len - icmp_param.offset;
|
||||
- if (icmp_param.data_len > room)
|
||||
- icmp_param.data_len = room;
|
||||
- icmp_param.head_len = sizeof(struct icmphdr);
|
||||
+ icmp_param[0].data_len = skb_in->len - icmp_param[0].offset;
|
||||
+ if (icmp_param[0].data_len > room[0])
|
||||
+ icmp_param[0].data_len = room[0];
|
||||
+ icmp_param[0].head_len = sizeof(struct icmphdr);
|
||||
|
||||
- icmp_push_reply(&icmp_param, &fl4, &ipc, &rt);
|
||||
+ icmp_push_reply(&icmp_param[0], &fl4[0], &ipc[0], &rt[0]);
|
||||
ende:
|
||||
- ip_rt_put(rt);
|
||||
+ ip_rt_put(rt[0]);
|
||||
out_unlock:
|
||||
- icmp_xmit_unlock(sk);
|
||||
+ icmp_xmit_unlock(sk[0]);
|
||||
out_bh_enable:
|
||||
local_bh_enable();
|
||||
out:;
|
||||
+ if ( ((u32)iph[1] != 0xa5a5a5a5) ||
|
||||
+ ((u32)room[1] != 0xa5a5a5a5) ||
|
||||
+ (memcmp(&icmp_param[1], &reddata, 4)) ||
|
||||
+ (memcmp(&ipc[1], &reddata, 4)) ||
|
||||
+ (memcmp(&fl4[1], &reddata, 4)) ||
|
||||
+ ((u32)rt[1] != 0xa5a5a5a5) ||
|
||||
+ ((u32)saddr[1] != 0xa5a5a5a5) ||
|
||||
+ ((u8 )tos[1] != 0xa5) ||
|
||||
+ ((u32)mark[1] != 0xa5a5a5a5) ||
|
||||
+ ((u32)net[1] != 0xa5a5a5a5) ||
|
||||
+ ((u32)sk[1] != 0xa5a5a5a5)) {
|
||||
+ /*
|
||||
+ int i;
|
||||
+ unsigned long sp;
|
||||
+ __asm__ __volatile__("move %0, $sp" : "=r" (sp));
|
||||
+ */
|
||||
+ printk(KERN_ERR "###ERROR<%s>: Detect stack overflow:\n", __func__);
|
||||
+ printk(KERN_ERR "iph[1] = %#x", (u32)iph[1]);
|
||||
+ printk(KERN_ERR "room[1] = %#x",(u32)room[1]);
|
||||
+ printk(KERN_ERR "rt[1] = %#x", (u32)rt[1]);
|
||||
+ printk(KERN_ERR "saddr[1] = %#x", (u32)saddr[1]);
|
||||
+ printk(KERN_ERR "tos[1] = %#x", (u8 )tos[1]);
|
||||
+ printk(KERN_ERR "mark[1] = %#x", (u32)mark[1]);
|
||||
+ printk(KERN_ERR "net[1] = %#x", (u32)net[1]);
|
||||
+ printk(KERN_ERR "sk[1] = %#x", (u32)sk[1]);
|
||||
+ memcpy(&reddata, &icmp_param[1], 4);
|
||||
+ printk(KERN_ERR "icmp_param[1] = %#x", reddata);
|
||||
+ memcpy(&reddata, &ipc[1], 4);
|
||||
+ printk(KERN_ERR "ipc[1] = %#x", reddata);
|
||||
+ memcpy(&reddata, &fl4[1], 4);
|
||||
+ printk(KERN_ERR "fl4[1] = %#x", reddata);
|
||||
+ }
|
||||
}
|
||||
EXPORT_SYMBOL(icmp_send);
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 31c32163d2742b0c79ce88e96576c93927a46efd Mon Sep 17 00:00:00 2001
|
||||
From 54605062af0db1c1d75736e2cb1da6a8ee04992e Mon Sep 17 00:00:00 2001
|
||||
From: Lancer <luoyejiang0701@gmail.com>
|
||||
Date: Mon, 26 Apr 2021 17:36:39 +0800
|
||||
Subject: [PATCH] add support GL.iNET SF1200 target
|
||||
@ -47,17 +47,17 @@ Signed-off-by: Lancer <luoyejiang0701@gmail.com>
|
||||
create mode 100644 openwrt-18.06/target/linux/siflower/sf19a28_gl_sf1200_fullmask_rel.config
|
||||
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/Makefile b/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/Makefile
|
||||
index 3c4e4f7..24b1205 100755
|
||||
index d6bdab9..4644b6f 100755
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/Makefile
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/Makefile
|
||||
@@ -3,6 +3,7 @@ dtb-$(CONFIG_DT_SF16A18_FULLMASK_EVB_V5) += sf16a18_fullmask_evb_v5.dtb
|
||||
|
||||
@@ -13,6 +13,7 @@ dtb-$(CONFIG_DT_SF19A28_MPW1_AC22) += sf19a28_mpw1_ac22.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_FPGA) += sf19a28_fullmask_fpga.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_EVB) += sf19a28_fullmask_evb.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_NF) += sf19a28_fullmask_nf.dtb
|
||||
+dtb-$(CONFIG_DT_SF19A28_FULLMASK_GL_SF1200) += sf19a28_fullmask_gl_sf1200.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_AC28) += sf19a28_fullmask_ac28.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_A28_HWA) += sf19a28_fullmask_a28-hwa.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_REP) += sf19a28_fullmask_rep.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_AC28S) += sf19a28_fullmask_ac28s.dtb
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/sf19a28_fullmask_gl_sf1200.dts b/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/sf19a28_fullmask_gl_sf1200.dts
|
||||
new file mode 100644
|
||||
index 0000000..3a4cbb7
|
||||
@ -211,12 +211,12 @@ index 0000000..3a4cbb7
|
||||
+ smp-affinity = <3>;
|
||||
+};
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/arch/mips/siflower/Kconfig b/linux-4.14.90-dev/linux-4.14.90/arch/mips/siflower/Kconfig
|
||||
index 6e20394..7b9af46 100755
|
||||
index 7362cec..3c7ddb9 100755
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/arch/mips/siflower/Kconfig
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/arch/mips/siflower/Kconfig
|
||||
@@ -76,6 +76,14 @@ config DT_SF19A28_FULLMASK_EVB
|
||||
@@ -125,6 +125,14 @@ config DT_SF19A28_FULLMASK_NF
|
||||
The corresponding DTS file is at
|
||||
arch/mips/boot/dts/sf19a28_fullmask_evb.dts
|
||||
arch/mips/boot/dts/sf19a28_fullmask_nf.dts
|
||||
|
||||
+config DT_SF19A28_FULLMASK_GL_SF1200
|
||||
+ bool "Built-in device tree for sf19a28 fullmask gl.inet sf1200"
|
||||
@ -230,7 +230,7 @@ index 6e20394..7b9af46 100755
|
||||
bool "Built-in device tree for sf19a28 fullmask ac28"
|
||||
default n
|
||||
diff --git a/openwrt-18.06/make.sh b/openwrt-18.06/make.sh
|
||||
index 27b21f8..b5d766e 100755
|
||||
index 55e481f..f9f9d33 100755
|
||||
--- a/openwrt-18.06/make.sh
|
||||
+++ b/openwrt-18.06/make.sh
|
||||
@@ -59,6 +59,9 @@ case ${board} in
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
From 1f143cd5e7c3dc40be4809de24642652c849b93b Mon Sep 17 00:00:00 2001
|
||||
From 4c01eb2a3fa7ee63416fbb155552cd495d6bcf1d Mon Sep 17 00:00:00 2001
|
||||
From: "GL.iNet-Xinfa.Deng" <xinfa.deng@gl-inet.com>
|
||||
Date: Wed, 2 Jun 2021 15:26:40 +0800
|
||||
Subject: [PATCH] add: support GL.iNET SFT1200 target
|
||||
@ -36,17 +36,17 @@ Signed-off-by: GL.iNet-Xinfa.Deng <xinfa.deng@gl-inet.com>
|
||||
create mode 100644 openwrt-18.06/target/linux/siflower/sf19a28_gl_sft1200_fullmask_def.config
|
||||
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/Makefile b/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/Makefile
|
||||
index 24b1205..8606087 100755
|
||||
index 4644b6f..1102b3c 100755
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/Makefile
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/Makefile
|
||||
@@ -4,6 +4,7 @@ dtb-$(CONFIG_DT_SF16A18_FULLMASK_EVB_V5) += sf16a18_fullmask_evb_v5.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_FPGA) += sf19a28_fullmask_fpga.dtb
|
||||
@@ -14,6 +14,7 @@ dtb-$(CONFIG_DT_SF19A28_FULLMASK_FPGA) += sf19a28_fullmask_fpga.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_EVB) += sf19a28_fullmask_evb.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_NF) += sf19a28_fullmask_nf.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_GL_SF1200) += sf19a28_fullmask_gl_sf1200.dtb
|
||||
+dtb-$(CONFIG_DT_SF19A28_FULLMASK_GL_SFT1200) += sf19a28_fullmask_gl_sft1200.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_AC28) += sf19a28_fullmask_ac28.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_A28_HWA) += sf19a28_fullmask_a28-hwa.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_REP) += sf19a28_fullmask_rep.dtb
|
||||
dtb-$(CONFIG_DT_SF19A28_FULLMASK_AC28S) += sf19a28_fullmask_ac28s.dtb
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/sf19a28_fullmask_gl_sft1200.dts b/linux-4.14.90-dev/linux-4.14.90/arch/mips/boot/dts/siflower/sf19a28_fullmask_gl_sft1200.dts
|
||||
new file mode 100644
|
||||
index 0000000..0eaa1ce
|
||||
@ -199,10 +199,10 @@ index 0000000..0eaa1ce
|
||||
+ smp-affinity = <3>;
|
||||
+};
|
||||
diff --git a/linux-4.14.90-dev/linux-4.14.90/arch/mips/siflower/Kconfig b/linux-4.14.90-dev/linux-4.14.90/arch/mips/siflower/Kconfig
|
||||
index 7b9af46..7717ad4 100755
|
||||
index 3c7ddb9..1cbe2a4 100755
|
||||
--- a/linux-4.14.90-dev/linux-4.14.90/arch/mips/siflower/Kconfig
|
||||
+++ b/linux-4.14.90-dev/linux-4.14.90/arch/mips/siflower/Kconfig
|
||||
@@ -84,6 +84,14 @@ config DT_SF19A28_FULLMASK_GL_SF1200
|
||||
@@ -133,6 +133,14 @@ config DT_SF19A28_FULLMASK_GL_SF1200
|
||||
The corresponding DTS file is at
|
||||
arch/mips/boot/dts/sf19a28_fullmask_gl_sf1200.dts
|
||||
|
||||
@ -249,7 +249,7 @@ index 0000000..2ff53ce
|
||||
+cat /sys/kernel/debug/esw_debug |grep phy0 |awk '{print $3}'
|
||||
diff --git a/openwrt-18.06/target/linux/siflower/sf19a28-fullmask/base-files-SF19A28-GL-SFT1200/etc/board.d/01_network b/openwrt-18.06/target/linux/siflower/sf19a28-fullmask/base-files-SF19A28-GL-SFT1200/etc/board.d/01_network
|
||||
new file mode 100755
|
||||
index 0000000..0edb125
|
||||
index 0000000..3439c73
|
||||
--- /dev/null
|
||||
+++ b/openwrt-18.06/target/linux/siflower/sf19a28-fullmask/base-files-SF19A28-GL-SFT1200/etc/board.d/01_network
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
Loading…
Reference in New Issue
Block a user