Re: [LEDE-DEV] ieee80211 phy0: rt2x00queue_write_tx_frame: Error - Dropping frame due to full tx queue...?
Hi, On Mon, May 14, 2018 at 9:03 AM, Jamie Stuartwrote: > Hi Everyone, > Just wondering if anyone had made any progress into integrating this in trunk > OpenWRT. > It’s out of my skillset unfortunately! I don't know if the patch mentioned in the original email is in Daniel's tree or not, but I have been running several mt7620-devices (so rt2800) with the additional rt2x00 patches since they were pushed (mid-March). Since then, I have not had any issues with wifi on my devices. Also, my sure-fire way of crashing (or at least triggering errors) the driver was to run a wifi-scan tool provided by Apple. I am no longer able to trigger any errors when using this tool. BR, Kristian ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] kernel: bump 4.14 to 4.14.40
Hi Stijn, This commit introduces regression due to upstream commit: "USB: serial: option: reimplement interface masking" CC [M] drivers/usb/serial/option.o drivers/usb/serial/option.c:1923:35: error: 'cinterion_rmnet2_blacklist' undeclared here (not in a function) .driver_info = (kernel_ulong_t)_rmnet2_blacklist }, ^~ scripts/Makefile.build:334: recipe for target 'drivers/usb/serial/option.o' failed make[8]: *** [drivers/usb/serial/option.o] Error 1 scripts/Makefile.build:587: recipe for target 'drivers/usb/serial' failed make[7]: *** [drivers/usb/serial] Error 2 scripts/Makefile.build:587: recipe for target 'drivers/usb' failed make[6]: *** [drivers/usb] Error 2 Makefile:1040: recipe for target 'drivers' failed make[5]: *** [drivers] Error 2 make[5]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-imx6/linux-4.14.40' Makefile:25: recipe for target '/mnt/ramdisk/koen/firmware/builds/generic_imx6/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-imx6/linux-4.14.40/.modules' failed make[4]: *** [/mnt/ramdisk/koen/firmware/builds/generic_imx6/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-imx6/linux-4.14.40/.modules] Error 2 make[4]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6/target/linux/imx6' Makefile:13: recipe for target 'compile' failed make[3]: *** [compile] Error 2 make[3]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6/target/linux' Command exited with non-zero status 2 time: target/linux/compile#2.73#0.56#17.43 target/Makefile:23: recipe for target 'target/linux/compile' failed make[2]: *** [target/linux/compile] Error 2 make[2]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6' target/Makefile:18: recipe for target '/mnt/ramdisk/koen/firmware/builds/generic_imx6/staging_dir/target-arm_cortex-a9+neon_musl_eabi/stamp/.target_compile' failed make[1]: *** [/mnt/ramdisk/koen/firmware/builds/generic_imx6/staging_dir/target-arm_cortex-a9+neon_musl_eabi/stamp/.target_compile] Error 2 make[1]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6' /mnt/ramdisk/koen/firmware/builds/generic_imx6/include/toplevel.mk:216: recipe for target 'world' failed make: *** [world] Error 2 I've already notified the author to fix it. It's easy to fix by using this patch: -- a/drivers/usb/serial/option.c ++ b/drivers/usb/serial/option.c @@ -1920,7 +1920,7 @@ static const struct usb_device_id option { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff), /* D-Link DWM-158 */ - .driver_info = (kernel_ulong_t)_rmnet2_blacklist }, + .driver_info = RSVD(4) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d0e, 0xff) }, /* D-Link DWM-157 C1 */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */ .driver_info = RSVD(4) }, Koen ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] kernel: bump 4.14 to 4.14.40
On 2018-05-14 15:14, Koen Vandeputte wrote: Hi Stijn, This commit introduces regression due to upstream commit: "USB: serial: option: reimplement interface masking" CC [M] drivers/usb/serial/option.o drivers/usb/serial/option.c:1923:35: error: 'cinterion_rmnet2_blacklist' undeclared here (not in a function) .driver_info = (kernel_ulong_t)_rmnet2_blacklist }, ^~ scripts/Makefile.build:334: recipe for target 'drivers/usb/serial/option.o' failed make[8]: *** [drivers/usb/serial/option.o] Error 1 scripts/Makefile.build:587: recipe for target 'drivers/usb/serial' failed make[7]: *** [drivers/usb/serial] Error 2 scripts/Makefile.build:587: recipe for target 'drivers/usb' failed make[6]: *** [drivers/usb] Error 2 Makefile:1040: recipe for target 'drivers' failed make[5]: *** [drivers] Error 2 make[5]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-imx6/linux-4.14.40' Makefile:25: recipe for target '/mnt/ramdisk/koen/firmware/builds/generic_imx6/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-imx6/linux-4.14.40/.modules' failed make[4]: *** [/mnt/ramdisk/koen/firmware/builds/generic_imx6/build_dir/target-arm_cortex-a9+neon_musl_eabi/linux-imx6/linux-4.14.40/.modules] Error 2 make[4]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6/target/linux/imx6' Makefile:13: recipe for target 'compile' failed make[3]: *** [compile] Error 2 make[3]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6/target/linux' Command exited with non-zero status 2 time: target/linux/compile#2.73#0.56#17.43 target/Makefile:23: recipe for target 'target/linux/compile' failed make[2]: *** [target/linux/compile] Error 2 make[2]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6' target/Makefile:18: recipe for target '/mnt/ramdisk/koen/firmware/builds/generic_imx6/staging_dir/target-arm_cortex-a9+neon_musl_eabi/stamp/.target_compile' failed make[1]: *** [/mnt/ramdisk/koen/firmware/builds/generic_imx6/staging_dir/target-arm_cortex-a9+neon_musl_eabi/stamp/.target_compile] Error 2 make[1]: Leaving directory '/mnt/ramdisk/koen/firmware/builds/generic_imx6' /mnt/ramdisk/koen/firmware/builds/generic_imx6/include/toplevel.mk:216: recipe for target 'world' failed make: *** [world] Error 2 I've already notified the author to fix it. It's easy to fix by using this patch: -- a/drivers/usb/serial/option.c ++ b/drivers/usb/serial/option.c @@ -1920,7 +1920,7 @@ static const struct usb_device_id option { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff), /* D-Link DWM-158 */ - .driver_info = (kernel_ulong_t)_rmnet2_blacklist }, + .driver_info = RSVD(4) | RSVD(5) }, { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d0e, 0xff) }, /* D-Link DWM-157 C1 */ { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */ .driver_info = RSVD(4) }, Koen Small update. It's caused by a custom patch in OpenWrt itself [1]. It needs to be reworked. Koen [1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=78666c7ba0735b91de50ed9fd98e47d9686a84a2 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Add support for Flexible I/O Tester
On 13/05/18 20:58, Dragan Stancevic wrote: A lot of SoC boards come with integrated SATA it would be nice to be able to use fio to test performance of those boards. ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev Hi Dragan, please propose this as a PR on the packages feed on github John ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [OpenWrt-Devel] Wifi-related kernel-oops on mt7621 after 4.14 update
Hello, On Wed, Apr 18, 2018 at 11:34 AM, Kristian Evensenwrote: > I will keep an eye on this router, just in case, but it seems the > problem is gone. Thanks for fixing it so fast! The router (WG3526) has been running fine for a while now, but after changing configuration from client to access point (for both interfaces) and updating I started seeing kernel oopses + reboot loops again. The error messages is as follows: [ 30.665207] CPU 1 Unable to handle kernel paging request at virtual address ea09a0dd, epc == 8f3a060c, ra == 8ed06fac [ 30.676034] Oops[#1]: [ 30.678341] CPU: 1 PID: 27 Comm: kworker/u8:1 Not tainted 4.14.37 #0 [ 30.684852] Workqueue: phy0 ieee80211_ibss_leave [mac80211] [ 30.690409] task: 8fce8000 task.stack: 8fce4000 [ 30.694922] $ 0 : 0001 7ac0ae80 0020 [ 30.700149] $ 4 : 8ec4cbc0 8ee83c20 ea099ae0 8f79f400 [ 30.705373] $ 8 : 80452db0 0007 00096a93 [ 30.710593] $12 : 0264 000390fa 77f5d3c0 [ 30.715812] $16 : 8ec4d560 8f581000 8ee83480 8ec4cbc0 [ 30.721033] $20 : 8056 fffe [ 30.726252] $24 : 0fa3 80058514 [ 30.731475] $28 : 8fce4000 8fce5ce8 8057 8ed06fac [ 30.736697] Hi: 000a [ 30.739562] Lo: 6669 [ 30.742470] epc : 8f3a060c 0x8f3a060c [ 30.746401] ra: 8ed06fac sta_set_sinfo+0xcc/0xbb0 [mac80211] [ 30.752380] Status: 11007c03 KERNEL EXL IE [ 30.756561] Cause : 4088 (ExcCode 02) [ 30.760550] BadVA : ea09a0dd [ 30.763418] PrId : 0001992f (MIPS 1004Kc) [ 30.767492] Modules linked in: rt2800pci rt2800mmio rt2800lib qcserial ppp_async option usb_wwan rt2x00pci rt2x00mmio rt2x00lib rndis_host qmi_wwan ppp_generic nf_nat_pptp nf_conntrack_pptp nf_conntrack_ipv6p [ 30.838554] nf_nat_snmp_basic nf_nat_sip nf_nat_redirect nf_nat_proto_gre nf_nat_masquerade_ipv4 nf_nat_irc nf_conntrack_ipv4 nf_nat_ipv4 nf_nat_h323 nf_nat_ftp nf_nat_amanda nf_nat nf_log_ipv4 nf_flow_table [ 30.909546] ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_sd [ 30.979947] ehci_platform sd_mod scsi_mod ehci_hcd gpio_button_hotplug usbcore nls_base usb_common mii [ 30.989345] Process kworker/u8:1 (pid: 27, threadinfo=8fce4000, task=8fce8000, tls=) [ 30.997742] Stack : 0200 8fce5d78 8fce5d78 80081240 8f79f400 8f581000 [ 31.006092] 8ee83480 8ec4cbc0 8f581130 8056 fffe 8057 8ed06fac [ 31.014443] 8f581000 8fc06000 8ee834ac 8f581000 8ec4cbc0 8f581000 8f79f400 [ 31.022793] 8ee83480 8ee834ac 8ec4cbc0 8056 8ed07a10 8f148a80 8007be74 [ 31.031143] 8fce5d70 8fce5d70 8f581000 8fc06000 8ed07ac0 [ 31.039491] ... [ 31.041940] Call Trace: [ 31.044386] [<8f3a060c>] 0x8f3a060c [ 31.047866] Code: 000630c0 02063021 94f40002 <90d205fd> 00e0b025 1682 3253 2414001f 96d50004 [ 31.057611] [ 31.059362] ---[ end trace 7868a781b307fb50 ]--- [ 31.068983] Kernel panic - not syncing: Fatal exception [ 31.076144] Rebooting in 3 seconds.. I will try to compile an image with KALLMSYS and see if I can reproduce the issue. My firmware is based on latest nightly. BR, Kristian ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] patchwork pre 2018
Hi, I'd like to close everything in patchwork from 2017 and ask people to resubmit in case they still think its applicable. a few patches are still delegated. please remove your delegation if you do not plan to handle the patches in the coming days. I'll close everything on the weekend that is not delegated. John ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] Add support for Flexible I/O Tester
On 05/14/2018 08:52 AM, John Crispin wrote: > Hi Dragan, > > please propose this as a PR on the packages feed on github Hi John, thanks for the clarification, I looked at the github openwrt repo and it said that it's just a mirror of [https://git.openwrt.org/openwrt/openwrt.git] but admittedly I didn't look at the github packages repo. That's what got me confused (new here)... I wasn't aware but Daniel apparently submitted a PR on github in January: [https://github.com/openwrt/packages/pull/5396] Daniel and I synced up, I'll take package ownership but it's his PR that should be pulled in. Any ideas when this will make it in? Thanks in advance! -- Home Based Linux SW-Engr Jobs @ http://codeminutia.com ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] patchwork pre 2018
On Mon, May 14, 2018 at 8:10 AM, John Crispinwrote: > Hi, > > I'd like to close everything in patchwork from 2017 and ask people to > resubmit in case they still think its applicable. a few patches are still > delegated. please remove your delegation if you do not plan to handle the > patches in the coming days. I'll close everything on the weekend that is not > delegated. I have three %m patches that are still on there. Not sure if they're wanted or not. > > John > > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH 2/5] ramips: pci: sync with staging driver
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--- .../ramips/files-4.14/arch/mips/pci/pci-mt7621.c | 318 ++--- 1 file changed, 150 insertions(+), 168 deletions(-) diff --git a/target/linux/ramips/files-4.14/arch/mips/pci/pci-mt7621.c b/target/linux/ramips/files-4.14/arch/mips/pci/pci-mt7621.c index a98752b..edd9501 100644 --- a/target/linux/ramips/files-4.14/arch/mips/pci/pci-mt7621.c +++ b/target/linux/ramips/files-4.14/arch/mips/pci/pci-mt7621.c @@ -52,108 +52,103 @@ #include #include #include -#include #include #include -extern void pcie_phy_init(void); -extern void chk_phy_pll(void); - /* * These functions and structures provide the BIOS scan and mapping of the PCI * devices. */ -#define RALINK_PCIE0_CLK_EN (1<<24) -#define RALINK_PCIE1_CLK_EN (1<<25) -#define RALINK_PCIE2_CLK_EN (1<<26) - -#define RALINK_PCI_CONFIG_ADDR 0x20 -#define RALINK_PCI_CONFIG_DATA_VIRTUAL_REG 0x24 -#define RALINK_PCI_MEMBASE *(volatile u32 *)(RALINK_PCI_BASE + 0x0028) -#define RALINK_PCI_IOBASE *(volatile u32 *)(RALINK_PCI_BASE + 0x002C) -#define RALINK_PCIE0_RST(1<<24) -#define RALINK_PCIE1_RST(1<<25) -#define RALINK_PCIE2_RST(1<<26) -#define RALINK_SYSCTL_BASE 0xBE00 - -#define RALINK_PCI_PCICFG_ADDR *(volatile u32 *)(RALINK_PCI_BASE + 0x) -#define RALINK_PCI_PCIMSK_ADDR *(volatile u32 *)(RALINK_PCI_BASE + 0x000C) -#define RALINK_PCI_BASE 0xBE14 - -#define RALINK_PCIEPHY_P0P1_CTL_OFFSET (RALINK_PCI_BASE + 0x9000) -#define RT6855_PCIE0_OFFSET 0x2000 -#define RT6855_PCIE1_OFFSET 0x3000 -#define RT6855_PCIE2_OFFSET 0x4000 - -#define RALINK_PCI0_BAR0SETUP_ADDR *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE0_OFFSET + 0x0010) -#define RALINK_PCI0_IMBASEBAR0_ADDR *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE0_OFFSET + 0x0018) -#define RALINK_PCI0_ID *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE0_OFFSET + 0x0030) -#define RALINK_PCI0_CLASS *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE0_OFFSET + 0x0034) -#define RALINK_PCI0_SUBID *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE0_OFFSET + 0x0038) -#define RALINK_PCI0_STATUS *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE0_OFFSET + 0x0050) -#define RALINK_PCI0_DERR*(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE0_OFFSET + 0x0060) -#define RALINK_PCI0_ECRC*(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE0_OFFSET + 0x0064) - -#define RALINK_PCI1_BAR0SETUP_ADDR *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE1_OFFSET + 0x0010) -#define RALINK_PCI1_IMBASEBAR0_ADDR *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE1_OFFSET + 0x0018) -#define RALINK_PCI1_ID *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE1_OFFSET + 0x0030) -#define RALINK_PCI1_CLASS *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE1_OFFSET + 0x0034) -#define RALINK_PCI1_SUBID *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE1_OFFSET + 0x0038) -#define RALINK_PCI1_STATUS *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE1_OFFSET + 0x0050) -#define RALINK_PCI1_DERR*(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE1_OFFSET + 0x0060) -#define RALINK_PCI1_ECRC*(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE1_OFFSET + 0x0064) - -#define RALINK_PCI2_BAR0SETUP_ADDR *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE2_OFFSET + 0x0010) -#define RALINK_PCI2_IMBASEBAR0_ADDR *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE2_OFFSET + 0x0018) -#define RALINK_PCI2_ID *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE2_OFFSET + 0x0030) -#define RALINK_PCI2_CLASS *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE2_OFFSET + 0x0034) -#define RALINK_PCI2_SUBID *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE2_OFFSET + 0x0038) -#define RALINK_PCI2_STATUS *(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE2_OFFSET + 0x0050) -#define RALINK_PCI2_DERR*(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE2_OFFSET + 0x0060) -#define RALINK_PCI2_ECRC*(volatile u32 *)(RALINK_PCI_BASE + RT6855_PCIE2_OFFSET + 0x0064) - -#define RALINK_PCIEPHY_P0P1_CTL_OFFSET (RALINK_PCI_BASE + 0x9000) -#define RALINK_PCIEPHY_P2_CTL_OFFSET(RALINK_PCI_BASE + 0xA000) - - -#define MV_WRITE(ofs, data) \ -*(volatile u32 *)(RALINK_PCI_BASE+(ofs)) = cpu_to_le32(data) -#define MV_READ(ofs, data) \ - *(data) = le32_to_cpu(*(volatile u32 *)(RALINK_PCI_BASE+(ofs))) -#define MV_READ_DATA(ofs)
[LEDE-DEV] [PATCH 5/5] staging: mt7621-eth: fix return value check in mt7621_gsw_probe()
From: Wei YongjunIn 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 Signed-off-by: Greg Kroah-Hartman --- .../ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c | 4 ++-- .../ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c | 4 ++-- .../ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c index 6cad585..816c588 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/esw_rt3050.c @@ -1358,8 +1358,8 @@ static int esw_probe(struct platform_device *pdev) esw->dev = >dev; esw->irq = irq_of_parse_and_map(np, 0); esw->base = devm_ioremap_resource(>dev, res); - if (!esw->base) - return -EADDRNOTAVAIL; + if (IS_ERR(esw->base)) + return PTR_ERR(esw->base); port_map = of_get_property(np, "mediatek,portmap", NULL); if (port_map) diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c index 4093f09..a4602c4 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c @@ -215,8 +215,8 @@ static int mt7620_gsw_probe(struct platform_device *pdev) return -ENOMEM; gsw->base = devm_ioremap_resource(>dev, res); - if (!gsw->base) - return -EADDRNOTAVAIL; + if (IS_ERR(gsw->base)) + return PTR_ERR(gsw->base); gsw->dev = >dev; diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c index 9d5fe6e..89be239 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7621.c @@ -245,8 +245,8 @@ static int mt7621_gsw_probe(struct platform_device *pdev) return -ENOMEM; gsw->base = devm_ioremap_resource(>dev, res); - if (!gsw->base) - return -EADDRNOTAVAIL; + if (IS_ERR(gsw->base)) + return PTR_ERR(gsw->base); gsw->dev = >dev; gsw->irq = platform_get_irq(pdev, 0); -- 2.7.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH 4/5] staging: mt7621-eth: fix return value check in mtk_connect_phy_node()
From: Wei YongjunIn 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 Signed-off-by: Greg Kroah-Hartman --- target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c index b2a3158..bdfdf7a 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mdio.c @@ -82,10 +82,10 @@ int fe_connect_phy_node(struct fe_priv *priv, struct device_node *phy_node) phydev = of_phy_connect(priv->netdev, phy_node, fe_phy_link_adjust, 0, phy_mode); - if (IS_ERR(phydev)) { + if (!phydev) { dev_err(priv->dev, "could not connect to PHY\n"); priv->phy->phy_node[port] = NULL; - return PTR_ERR(phydev); + return -ENODEV; } phydev->supported &= PHY_GBIT_FEATURES; -- 2.7.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH 3/5] staging: mt7621-eth: fix return value check in mtk_probe()
From: Wei YongjunIn 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 Signed-off-by: Greg Kroah-Hartman --- .../linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c index d0d88b9..c806e28 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -1513,7 +1513,7 @@ static int fe_probe(struct platform_device *pdev) soc->reg_table = fe_reg_table; fe_base = devm_ioremap_resource(>dev, res); - if (!fe_base) { + if (IS_ERR(fe_base)) { err = -EADDRNOTAVAIL; goto err_out; } -- 2.7.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] SPI on Omega2p
Dear list, I'm playing with an omega2p hardware with OpenWRT 17.01.4 on it. I installed the kmod-spi-dev package to control the SPI interface of the device. I get this on the console, when the module is loaded: [9.114921] spidev spi32766.1: buggy DT: spidev listed directly in DT [9.121469] [ cut here ] [9.126234] WARNING: CPU: 0 PID: 460 at drivers/spi/spidev.c:720 0x8767e33c [spidev@8767e000+0x1470]() [9.135683] Modules linked in: spidev(+) slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables crc_ccitt mt76x2e mt7603e mt76 mac80211 cfg80211 compat ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables mmc_block sdhci_pltfm sdhci mtk_sd mmc_core leds_gpio ohci_platform ohci_hcd ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common [9.183173] CPU: 0 PID: 460 Comm: kmodloader Not tainted 4.4.92 #0 [9.189435] Stack : 8032187c 0001 8037 ... [9.225581] Call Trace:[<80014514>] 0x80014514 [9.230111] [<80014514>] 0x80014514 [9.233660] [<8002510c>] 0x8002510c [9.237204] [<8767e33c>] 0x8767e33c [spidev@8767e000+0x1470] [9.242958] [<8768>] 0x8768 [slhc@8768+0x10a0] [9.248524] [<800251c4>] 0x800251c4 [9.252072] [<801ec00c>] 0x801ec00c [9.255619] [<8768>] 0x8768 [slhc@8768+0x10a0] [9.261182] [<8767e33c>] 0x8767e33c [spidev@8767e000+0x1470] [9.266939] [<801bccf0>] 0x801bccf0 [9.270481] [<801d6a3c>] 0x801d6a3c [9.274034] [<801b9820>] 0x801b9820 [9.277572] [<80089c1c>] 0x80089c1c [9.281108] [<801d693c>] 0x801d693c [9.284666] [<801b9a04>] 0x801b9a04 [9.288204] [<801b7c30>] 0x801b7c30 [9.291742] [<801b9988>] 0x801b9988 [9.295291] [<801b7cec>] 0x801b7cec [9.298830] [<802fa694>] 0x802fa694 [9.302379] [<8768>] 0x8768 [slhc@8768+0x10a0] [9.307940] [<801b7ac0>] 0x801b7ac0 [9.311482] [<801b8f20>] 0x801b8f20 [9.315031] [<800ac754>] 0x800ac754 [9.318568] [<800acc5c>] 0x800acc5c [9.322123] [<8768>] 0x8768 [slhc@8768+0x10a0] [9.327690] [<8768>] 0x8768 [slhc@8768+0x10a0] [9.333262] [<801ba11c>] 0x801ba11c [9.336805] [<8752b000>] 0x8752b000 [spidev@8767e000+0x1470] [9.342563] [<8768>] 0x8768 [slhc@8768+0x10a0] [9.348130] [<8768>] 0x8768 [slhc@8768+0x10a0] [9.353715] [<8768>] 0x8768 [slhc@8768+0x10a0] [9.359281] [<8752b098>] 0x8752b098 [spidev@8767e000+0x1470] [9.365032] [<800362c4>] 0x800362c4 [9.368568] [<800455b4>] 0x800455b4 [9.372118] [<8752b000>] 0x8752b000 [spidev@8767e000+0x1470] [9.377859] [<8000d85c>] 0x8000d85c [9.381396] [<800455b4>] 0x800455b4 [9.384944] [<8003633c>] 0x8003633c [9.388486] [<8003425c>] 0x8003425c [9.392034] [<80033d4c>] 0x80033d4c [9.395582] [<80066db4>] 0x80066db4 [9.399118] [<8009d708>] 0x8009d708 [9.402672] [<80068264>] 0x80068264 [9.406211] [<80066458>] 0x80066458 [9.409753] [<8009dbfc>] 0x8009dbfc [9.413307] [<80068478>] 0x80068478 [9.416846] [<80068514>] 0x80068514 [9.420387] [<8000686c>] 0x8000686c [9.423941] [9.425452] ---[ end trace d5aa11207dfb805d ]--- uname -a Linux LEDE 4.4.92 #0 Mon Oct 16 22:57:05 2017 mips GNU/Linux Cheers, Levente -- Levente Kovacs Senior Electronic Engineer W: http://levente.logonex.eu ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] Enable DCO check on Github OpenWrt organisation
On 09-05-18 03:03, Etienne Champetier wrote: > Hi All, > > 2018-01-18 13:59 GMT-08:00 Etienne Champetier: >> Hi All, >> >> Could someone enable this https://github.com/integration/dco on the >> whole OpenWrt github org? (or at least on the packages repo) > Friendly ping > (I'm only a "member" not an "owner" (admin) ) > > I had enabled this back in January but disabled it immediately afterwards because of this limitation: 23|10:02:24< stintel> if the first SoB != author it fails, instead of looking for next SoB line 23|10:02:26< stintel> disabling it again Stijn ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH] fstools: add middle layer (original root overlay) to overlayfs when pivot the /overlay to the USB disk.
On 11/05/18 11:18, Andrzej Lossowsk wrote: Currently after pivot to the USB disk (extroot), configuration and data from original root overlay are gone. Still accessible, but all previous configuration steps must be repeated (or data from original root overlay must be copied to new USB disk overlay). The idea is to "merge" original root overlay with overlay from the USB disk. Using overlayfs multiple lower layers it can be done. All data from original root overlay will be accessible (as readonly layer) after pivot to the USB disk. Original root overlay (for exmaple /dev/mtdblock3) will be mounted to /overlay/internal (as readonly) Upper directory from original root overlay (/dev/mtdblock3/upper) will be the top (readonly layer), then "/" will be the bottom layer (readonly layer), an extroot still will be upper (writable layer). Hi, some code style comments inline. john Signed-off-by: Andrzej Lossowski--- libfstools/extroot.c| 65 - libfstools/libfstools.h | 3 +++ libfstools/mount.c | 27 +--- 3 files changed, 90 insertions(+), 5 deletions(-) diff --git a/libfstools/extroot.c b/libfstools/extroot.c index 418df94..bbb0a3a 100644 --- a/libfstools/extroot.c +++ b/libfstools/extroot.c @@ -22,6 +22,7 @@ #include #include "libfstools.h" +#include "volume.h" char const *extroot_prefix = NULL; @@ -104,7 +105,7 @@ int mount_extroot(void) if (mount_move("/tmp/extroot", "", "/overlay")) { ULOG_ERR("moving extroot failed - continue normal boot\n"); umount("/tmp/extroot/overlay"); - } else if (fopivot("/overlay", "/rom")) { + } else if (fopivot_multi("/overlay", "/rom")) { ULOG_ERR("switching to extroot failed - continue normal boot\n"); umount("/overlay"); } else { @@ -119,3 +120,65 @@ int mount_extroot(void) } return -1; } + +int fopivot_multi(char *rw_root, char *ro_root) +{ + if (mount_internal_overlay()) { + ULOG_ERR("mounting /tmp/overlay failed\n"); + } else if (mkdir("/overlay/internal", 0755)) { + ULOG_ERR("failed to mkdir /overlay/internal: %m\n"); + } else if (mount_move("/tmp/overlay", "/overlay/internal", "")) { + umount("/tmp/overlay"); + } else if (mfopivot(rw_root, ro_root, "/overlay/internal/upper")) { + umount("/overlay/internal"); + } else { + return 0; + } dont build a if then else chain. call a function check the return value and exit if there is a fail. worste case use a goto if you want a single return point. + return -1; +} + +int mount_internal_overlay() move this above fopivot_multi, make it static and drop the prototype inside the header2 +{ + struct volume *v = volume_find("rootfs_data"); + + if (!v) + return -1; + + volume_init(v); + char *mp; dont define variables in the middle of a function please + mp = find_mount_point(v->blk, 0); + if (mp) { + ULOG_ERR("rootfs_data:%s is already mounted as %s\n", v->blk, mp); + return -1; + } + + char *fstype; same here + switch (volume_identify(v)) { + case FS_EXT4: + fstype = "ext4"; + break; + case FS_F2FS: + fstype = "f2fs"; + break; + case FS_UBIFS: + fstype = "ubifs"; + break; + case FS_JFFS2: + default: + fstype = "jffs2"; + break; + } + + if (mkdir("/tmp/overlay", 0755)) { + ULOG_ERR("failed to mkdir /tmp/overlay: %m\n"); + return -1; + } + + if (mount(v->blk, "/tmp/overlay", fstype, MS_NOATIME | MS_RDONLY, NULL)) { + ULOG_ERR("failed to mount -t %s %s /tmp/overlay: %m\n", fstype, v->blk); + return -1; + } + + return 0; +} + diff --git a/libfstools/libfstools.h b/libfstools/libfstools.h index f27307a..8c740a4 100644 --- a/libfstools/libfstools.h +++ b/libfstools/libfstools.h @@ -46,6 +46,9 @@ extern int mount_overlay(struct volume *v); extern int mount_move(const char *oldroot, const char *newroot, const char *dir); extern int pivot(char *new, char *old); extern int fopivot(char *rw_root, char *ro_root); +extern int mfopivot(char *rw_root, char *ro_lowerlevel0, char *ro_lowerlevel1); +extern int fopivot_multi(char *rw_root, char *ro_root); +extern int mount_internal_overlay(); extern int ramoverlay(void); extern int find_overlay_mount(char