[OpenWrt-Devel] [PATCH] ramips: Increase GB-PC2 SPI speed to 50MHz
The flash chip on the board (Spansion S25FL256SAIF00) is rated to support at least 50MHz according to the datasheet. >From testing this, that seems correct. time dd if=/dev/mtdblock3 of=/dev/null bs=64k from 41.78s to 16.61s Signed-off-by: Rosen Penev --- target/linux/ramips/dts/GB-PC2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/GB-PC2.dts b/target/linux/ramips/dts/GB-PC2.dts index 788d4e6c08..f951083b8f 100644 --- a/target/linux/ramips/dts/GB-PC2.dts +++ b/target/linux/ramips/dts/GB-PC2.dts @@ -81,7 +81,7 @@ m25p80@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <1000>; + spi-max-frequency = <5000>; partitions { compatible = "fixed-partitions"; -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ramips: Increase GB-PC1 SPI frequency to 50MHz
The specific flash chip used (W25Q256FVEM) accepts 50MHz for read requests and higher for others. Based on upstream commit: 97738374a310b9116f9c33832737e517226d3722 time dd if=/dev/mtdblock3 of=/dev/null bs=64k from 42.96s to 17.26. Signed-off-by: Rosen Penev --- target/linux/ramips/dts/GB-PC1.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/GB-PC1.dts b/target/linux/ramips/dts/GB-PC1.dts index 40f81762b1..029b02a97b 100644 --- a/target/linux/ramips/dts/GB-PC1.dts +++ b/target/linux/ramips/dts/GB-PC1.dts @@ -71,7 +71,7 @@ m25p80@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <1000>; + spi-max-frequency = <5000>; partitions { compatible = "fixed-partitions"; -- 2.17.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [RFC] lantiq: SMP interrupts and ethernet driver backport from vanilla v5
30/01/2019 11:38, Petr Cvek: Hello, I discovered the lantiq xrx200 lacks support for interrupts on secondary VPE, and I've managed to add this functionality to the kernel, the second icu controller lives on base address 0x1f880300 and works in the same way as first. Tested with 4.14.93 kernel, untested patches in the attachment or on openwrt forum: https://forum.openwrt.org/t/xrx200-irq-balancing-between-vpes/29732/11 My second submission is a backported xrx200 ethernet driver from vanilla kernel v5 patched with switch and phy functions. Using kernel napi polling seems to highly increase the throughput of the network. Trying to initially increase the throughput of the network I've found there is an inefficiently setting of DMA burst size. My patch sets this value to a higher value. These two patches were tested with 4.14.93 kernel too, there is forum thread: https://forum.openwrt.org/t/how-can-we-make-the-lantiq-xrx200-devices-faster/9724/30 RFC for any parallel development info (next version of ethernet driver will be based on vanilla kernel version?), ideas, testing ... best regards, Petr Cvek Hey Petr, first of all, the patches don't apply as they are: is: ./a/arch/mips/lantiq/irq.c expected: a/arch/mips/lantiq/irq.c For an official submission, a commit message is a must have. But even for testing it would be nice to have a commit message explaining what a patch is proposed to do. Otherwise it is kind of hard to provide any comments. Furthermore, it would be very helpful if the source of the changes is mentioned. At least parts of the code seem to be from intel/lantiq UGW 7.x. The backport of the vanilla eth driver breaks Ethernet completely on my board. I dropped it during my testing. Since we're all busy, providing some numbers about the seen improvement would might raise more interest. Ideally, you provide the numbers per patch, to see if a specific patch really changes something. I gave the patches a quick try in conjunction with the irqbalance package (to not move driver irqs from one core/vpe to another by hand). I saw an improvement in throughput on my BT HomeHub 5a while doing iperf from 5Ghz wireless to a lan client. The bandwidth was UP: 195 Mbits/s, DOWN: 137 Mbit/s with the patches applied, while it was UP: 152 Mbit/s, DOWN: 95,5 MBit/s without. It's more than the all time max of 180MBit, I measured a long time ago in a test setup I can't remember. But I only consider wireless benchmarks in a shielded/isolated environment as reliable anyway. It's good to know, but benchmarking the ethernet (nat/routing) should be more reliable. As we speak of benchmarking the ethernet, it would be interesting to see if enabling flow offloading improves the situation even further. Of course, the 5GHz wireless bandwidth is still less than the 385 Mbits/s I benchmarked with the BT firmware in the tests setup I can't remember. Nevertheless, it's promising. Mathias ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] mac80211: fix removing rt2x00 module
When EEPROM is loaded from mtd, removing the rt2x00 module triggers a kernel oops. The reason for the oops is that release_firmware() is always called from rt2x00lib_free_eeprom_file(). release_firmware() frees the memory allocated by request_firmware(), which is called when EEPROM is loaded from file. However, when loaded from mtd, no memory is allocated for the EEPROM (and the firwmware subsystem is not used either). The best indication I could think of for if EEPROM is loaded from file or mtd, is to check for the "ralink,mtd-eeprom" property. At least on the devices I have access to and where this property is set, EEPROM is only available from mtd. Signed-off-by: Kristian Evensen --- ...om-on-SoC-from-a-mtd-device-defines-.patch | 34 --- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch b/package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch index a98b49c541..0362dd10f5 100644 --- a/package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch +++ b/package/kernel/mac80211/patches/rt2x00/604-rt2x00-load-eeprom-on-SoC-from-a-mtd-device-defines-.patch @@ -1,4 +1,4 @@ -From 339fe73f340161a624cc08e738d2244814852c3e Mon Sep 17 00:00:00 2001 +From b5e9327001bf4a859d2645442640c5f8ab77be07 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sun, 17 Mar 2013 00:55:04 +0100 Subject: [PATCH] rt2x00: load eeprom on SoC from a mtd device defines inside @@ -6,10 +6,12 @@ Subject: [PATCH] rt2x00: load eeprom on SoC from a mtd device defines inside Signed-off-by: John Crispin --- - drivers/net/wireless/ralink/rt2x00/Kconfig| 1 + - drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c | 65 +++ - 2 files changed, 66 insertions(+) + drivers/net/wireless/ralink/rt2x00/Kconfig| 1 + + .../net/wireless/ralink/rt2x00/rt2x00eeprom.c | 75 +++ + 2 files changed, 76 insertions(+) +diff --git a/drivers/net/wireless/ralink/rt2x00/Kconfig b/drivers/net/wireless/ralink/rt2x00/Kconfig +index 39fdaaf..2e836d8 100644 --- a/drivers/net/wireless/ralink/rt2x00/Kconfig +++ b/drivers/net/wireless/ralink/rt2x00/Kconfig @@ -219,6 +219,7 @@ config RT2800SOC @@ -20,6 +22,8 @@ Signed-off-by: John Crispin ---help--- This adds support for Ralink WiSoC devices. Supported chips: RT2880, RT3050, RT3052, RT3350, RT3352. +diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c +index 1a30f9c..404a1f7 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c @@ -26,11 +26,73 @@ @@ -96,7 +100,7 @@ Signed-off-by: John Crispin static const char * rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev) { -@@ -58,6 +120,9 @@ static int rt2x00lib_request_eeprom_file +@@ -58,6 +120,9 @@ static int rt2x00lib_request_eeprom_file(struct rt2x00_dev *rt2x00dev) const char *ee_name; int retval; @@ -106,3 +110,23 @@ Signed-off-by: John Crispin ee_name = rt2x00lib_get_eeprom_file_name(rt2x00dev); if (!ee_name && test_bit(REQUIRE_EEPROM_FILE, >cap_flags)) { rt2x00_err(rt2x00dev, "Required EEPROM name is missing."); +@@ -111,6 +176,16 @@ int rt2x00lib_load_eeprom_file(struct rt2x00_dev *rt2x00dev) + + void rt2x00lib_free_eeprom_file(struct rt2x00_dev *rt2x00dev) + { ++#ifdef CONFIG_OF ++ struct device_node *np = rt2x00dev->dev->of_node; ++ int size; ++ ++ if (np && of_get_property(np, "ralink,mtd-eeprom", )) { ++ rt2x00dev->eeprom_file = NULL; ++ return; ++ } ++#endif ++ + release_firmware(rt2x00dev->eeprom_file); + rt2x00dev->eeprom_file = NULL; + } +-- +2.19.1 + -- 2.19.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 1/2] omap: fix build without ext4 rootfs
On Thu, 31 Jan 2019 11:12:24 +0100 Andre Heider wrote: > Same fix as 7b76219e, just for omap. > > Signed-off-by: Andre Heider merged both patches. Thanks! - lynxis pgp5nt0SPYX5Q.pgp Description: OpenPGP digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] system-linux: handle hotplug event socket ENOBUFS errors
Hotplug events are no longer handled after socket RX queue is overrun. The issue has been fixed by: - setting SO_RCVBUF initially to 65535 - doubling SO_RCVBUF value each time RX queue gets overrun Signed-off-by: Alin Nastac --- system-linux.c | 53 +++-- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/system-linux.c b/system-linux.c index ea16ed5..82e9928 100644 --- a/system-linux.c +++ b/system-linux.c @@ -182,6 +182,21 @@ create_event_socket(struct event_socket *ev, int protocol, } static bool +create_hotplug_event_socket(struct event_socket *ev, int protocol, + void (*cb)(struct uloop_fd *u, unsigned int events)) +{ + if (!create_raw_event_socket(ev, protocol, 1, cb, ULOOP_ERROR_CB)) + return false; + + /* Increase rx buffer size to 65K on event sockets */ + ev->bufsize = 65535; + if (nl_socket_set_buffer_size(ev->sock, ev->bufsize, 0)) + return false; + + return true; +} + +static bool system_rtn_aton(const char *src, unsigned int *dst) { char *e; @@ -249,8 +264,8 @@ int system_init(void) if (!create_event_socket(_event, NETLINK_ROUTE, cb_rtnl_event)) return -1; - if (!create_raw_event_socket(_event, NETLINK_KOBJECT_UEVENT, 1, - handle_hotplug_event, 0)) + if (!create_hotplug_event_socket(_event, NETLINK_KOBJECT_UEVENT, +handle_hotplug_event)) return -1; /* Receive network link events form kernel */ @@ -660,13 +675,39 @@ handle_hotplug_event(struct uloop_fd *u, unsigned int events) struct sockaddr_nl nla; unsigned char *buf = NULL; int size; + int err; + socklen_t errlen = sizeof(err); + + if (!u->error) { + while ((size = nl_recv(ev->sock, , , NULL)) > 0) { + if (nla.nl_pid == 0) + handle_hotplug_msg((char *) buf, size); + + free(buf); + } + return; + } - while ((size = nl_recv(ev->sock, , , NULL)) > 0) { - if (nla.nl_pid == 0) - handle_hotplug_msg((char *) buf, size); + if (getsockopt(u->fd, SOL_SOCKET, SO_ERROR, (void *), )) + goto abort; - free(buf); + switch(err) { + case ENOBUFS: + /* Increase rx buffer size on netlink socket */ + ev->bufsize *= 2; + if (nl_socket_set_buffer_size(ev->sock, ev->bufsize, 0)) + goto abort; + break; + + default: + goto abort; } + u->error = false; + return; + +abort: + uloop_fd_delete(>uloop); + return; } static int system_rtnl_call(struct nl_msg *msg) -- 2.7.4 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/2] uboot-omap: add 'rootwait' to the kernel cmdline
Some SD cards take a while to get detected, fix booting of those. Signed-off-by: Andre Heider --- package/boot/uboot-omap/files/uEnv-default.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/boot/uboot-omap/files/uEnv-default.txt b/package/boot/uboot-omap/files/uEnv-default.txt index 3584e4379b..8dc80e7b09 100644 --- a/package/boot/uboot-omap/files/uEnv-default.txt +++ b/package/boot/uboot-omap/files/uEnv-default.txt @@ -5,4 +5,4 @@ fdtdir=/dtbs uenvcmd=run loadfdt; run loadimage; run uenvbootargs ; bootz ${loadaddr} - ${fdtaddr} loadfdt=load mmc ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile} devtype=mmc -uenvbootargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 +uenvbootargs=setenv bootargs console=${console} root=/dev/mmcblk0p2 rootwait -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/2] omap: fix build without ext4 rootfs
Same fix as 7b76219e, just for omap. Signed-off-by: Andre Heider --- config/Config-images.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/Config-images.in b/config/Config-images.in index a0c7b7a94d..bdd24ef617 100644 --- a/config/Config-images.in +++ b/config/Config-images.in @@ -275,7 +275,7 @@ menu "Target Images" config TARGET_ROOTFS_PARTSIZE int "Root filesystem partition size (in MB)" - depends on GRUB_IMAGES || USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_mvebu || TARGET_rb532 || TARGET_sunxi || TARGET_uml + depends on GRUB_IMAGES || USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_mvebu || TARGET_omap || TARGET_rb532 || TARGET_sunxi || TARGET_uml default 256 help Select the root filesystem partition size. -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel