[LEDE-DEV] [PATCH 3/4] staging: mt7621-spi: Remove redundant owner assignment

2018-05-16 Thread Rosen Penev
From: Christian Lütke-Stetzkamp 

Remove the owner assignment form the platform driver as
platform_driver_register() already initializes the owner.
Found using coccinelle.

Signed-off-by: Christian Lütke-Stetzkamp 
Signed-off-by: Greg Kroah-Hartman 
---
 .../ramips/patches-4.14/0043-spi-add-mt7621-support.patch  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/ramips/patches-4.14/0043-spi-add-mt7621-support.patch 
b/target/linux/ramips/patches-4.14/0043-spi-add-mt7621-support.patch
index f59e52a5b9..1d9e650812 100644
--- a/target/linux/ramips/patches-4.14/0043-spi-add-mt7621-support.patch
+++ b/target/linux/ramips/patches-4.14/0043-spi-add-mt7621-support.patch
@@ -44,7 +44,7 @@ Index: linux-4.14.37/drivers/spi/spi-mt7621.c
 ===
 --- /dev/null
 +++ linux-4.14.37/drivers/spi/spi-mt7621.c
-@@ -0,0 +1,494 @@
+@@ -0,0 +1,493 @@
 +/*
 + * spi-mt7621.c -- MediaTek MT7621 SPI controller driver
 + *
@@ -527,7 +527,6 @@ Index: linux-4.14.37/drivers/spi/spi-mt7621.c
 +static struct platform_driver mt7621_spi_driver = {
 +  .driver = {
 +  .name = DRIVER_NAME,
-+  .owner = THIS_MODULE,
 +  .of_match_table = mt7621_spi_match,
 +  },
 +  .probe = mt7621_spi_probe,
-- 
2.17.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 4/4] staging: mt7621-pinctrl: Remove redundant owner assignment

2018-05-16 Thread Rosen Penev
From: Christian Lütke-Stetzkamp 

Remove the owner assignment form the platform driver as
platform_driver_register() already initializes the owner.
Found using coccinelle.

Signed-off-by: Christian Lütke-Stetzkamp 
Signed-off-by: Greg Kroah-Hartman 
---
 .../patches-4.14/0025-pinctrl-ralink-add-pinctrl-driver.patch  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/target/linux/ramips/patches-4.14/0025-pinctrl-ralink-add-pinctrl-driver.patch 
b/target/linux/ramips/patches-4.14/0025-pinctrl-ralink-add-pinctrl-driver.patch
index 3e5dac5376..41b611d120 100644
--- 
a/target/linux/ramips/patches-4.14/0025-pinctrl-ralink-add-pinctrl-driver.patch
+++ 
b/target/linux/ramips/patches-4.14/0025-pinctrl-ralink-add-pinctrl-driver.patch
@@ -49,7 +49,7 @@ Signed-off-by: John Crispin 
  obj-$(CONFIG_PINCTRL_SIRF)+= sirf/
 --- /dev/null
 +++ b/drivers/pinctrl/pinctrl-rt2880.c
-@@ -0,0 +1,472 @@
+@@ -0,0 +1,471 @@
 +/*
 + *  linux/drivers/pinctrl/pinctrl-rt2880.c
 + *
@@ -511,7 +511,6 @@ Signed-off-by: John Crispin 
 +  .probe = rt2880_pinmux_probe,
 +  .driver = {
 +  .name = "rt2880-pinmux",
-+  .owner = THIS_MODULE,
 +  .of_match_table = rt2880_pinmux_match,
 +  },
 +};
-- 
2.17.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 2/4] staging: mt7621-gpio: mt7621: make symbol gc_map static

2018-05-16 Thread Rosen Penev
From: Wei Yongjun 

Fixes the following sparse warning:

drivers/staging/mt7621-gpio/gpio-mt7621.c:47:3: warning:
 symbol 'gc_map' was not declared. Should it be static?

Signed-off-by: Wei Yongjun 
Signed-off-by: Greg Kroah-Hartman 
---
 .../0028-GPIO-ralink-add-mt7621-gpio-controller.patch   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/target/linux/ramips/patches-4.14/0028-GPIO-ralink-add-mt7621-gpio-controller.patch
 
b/target/linux/ramips/patches-4.14/0028-GPIO-ralink-add-mt7621-gpio-controller.patch
index ea341dc33c..a6f19f50ea 100644
--- 
a/target/linux/ramips/patches-4.14/0028-GPIO-ralink-add-mt7621-gpio-controller.patch
+++ 
b/target/linux/ramips/patches-4.14/0028-GPIO-ralink-add-mt7621-gpio-controller.patch
@@ -90,7 +90,7 @@ Signed-off-by: John Crispin 
 +static struct irq_domain *mediatek_gpio_irq_domain;
 +static atomic_t irq_refcount = ATOMIC_INIT(0);
 +
-+struct mtk_gc {
++static struct mtk_gc {
 +  struct gpio_chip chip;
 +  spinlock_t lock;
 +  int bank;
-- 
2.17.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/4] staging: mt7621-gpio: remove redundant owner assignments of drivers

2018-05-16 Thread Rosen Penev
From: HariPrasath Elango 

Remove the reduntant owner initialization from this platform driver as
the platform_driver_register() takes care of it.

Signed-off-by: HariPrasath Elango 
Reviewed-by: NeilBrown 
Signed-off-by: Greg Kroah-Hartman 
---
 .../0028-GPIO-ralink-add-mt7621-gpio-controller.patch  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/target/linux/ramips/patches-4.14/0028-GPIO-ralink-add-mt7621-gpio-controller.patch
 
b/target/linux/ramips/patches-4.14/0028-GPIO-ralink-add-mt7621-gpio-controller.patch
index d657274efe..ea341dc33c 100644
--- 
a/target/linux/ramips/patches-4.14/0028-GPIO-ralink-add-mt7621-gpio-controller.patch
+++ 
b/target/linux/ramips/patches-4.14/0028-GPIO-ralink-add-mt7621-gpio-controller.patch
@@ -48,7 +48,7 @@ Signed-off-by: John Crispin 
 +obj-$(CONFIG_GPIO_MT7621) += gpio-mt7621.o
 --- /dev/null
 +++ b/drivers/gpio/gpio-mt7621.c
-@@ -0,0 +1,354 @@
+@@ -0,0 +1,353 @@
 +/*
 + * This program is free software; you can redistribute it and/or modify it
 + * under the terms of the GNU General Public License version 2 as published
@@ -391,7 +391,6 @@ Signed-off-by: John Crispin 
 +  .probe = mediatek_gpio_probe,
 +  .driver = {
 +  .name = "mt7621_gpio",
-+  .owner = THIS_MODULE,
 +  .of_match_table = mediatek_gpio_match,
 +  },
 +};
-- 
2.17.0


___
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

2018-05-14 Thread Rosen Penev
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 <ros...@gmail.com>
---
 .../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_

[LEDE-DEV] [PATCH 5/5] staging: mt7621-eth: fix return value check in mt7621_gsw_probe()

2018-05-14 Thread Rosen Penev
From: Wei Yongjun 

In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Fixes: f079b6406348 ("staging: mt7621-eth: add gigabit switch driver (GSW)")
Signed-off-by: Wei Yongjun 
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()

2018-05-14 Thread Rosen Penev
From: Wei Yongjun 

In case of error, the function of_phy_connect() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files")
Signed-off-by: Wei Yongjun 
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()

2018-05-14 Thread Rosen Penev
From: Wei Yongjun 

In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Fixes: e3cbf478f846 ("staging: mt7621-eth: add the drivers core files")
Signed-off-by: Wei Yongjun 
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


Re: [LEDE-DEV] patchwork pre 2018

2018-05-14 Thread Rosen Penev
On Mon, May 14, 2018 at 8:10 AM, John Crispin  wrote:
> 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 1/5] ramips: Move PCI driver to files directory

2018-05-12 Thread Rosen Penev
This will make it easier to port upstream code.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 .../ramips/files-4.14/arch/mips/pci/pci-mt7621.c   | 836 
 .../0004-MIPS-ralink-add-MT7621-pcie-driver.patch  | 843 +
 2 files changed, 837 insertions(+), 842 deletions(-)
 create mode 100644 target/linux/ramips/files-4.14/arch/mips/pci/pci-mt7621.c

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
new file mode 100644
index 000..5125412
--- /dev/null
+++ b/target/linux/ramips/files-4.14/arch/mips/pci/pci-mt7621.c
@@ -0,0 +1,836 @@
+/**
+ *
+ *  BRIEF MODULE DESCRIPTION
+ * PCI init for Ralink RT2880 solution
+ *
+ *  Copyright 2007 Ralink Inc. (bruce_ch...@ralinktech.com.tw)
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BELIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *
+ **
+ * May 2007 Bruce Chang
+ * Initial Release
+ *
+ * May 2009 Bruce Chang
+ * support RT2880/RT3883 PCIe
+ *
+ * May 2011 Bruce Chang
+ * support RT6855/MT7620 PCIe
+ *
+ **
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#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 CONFIG_PCIE_PORT0
+#define CONFIG_PCIE_PORT1
+#define CONFIG_PCIE_PORT2
+#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_INT_PCIE0 pcie_irq[0]
+#define RALINK_INT_PCIE1 pcie_irq[1]
+#define RALINK_INT_PCIE2 pcie_irq[2]
+#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 + 0x0

[LEDE-DEV] [PATCH 4/5] staging: mt7621-pci: remove conditional compilation.

2018-05-12 Thread Rosen Penev
From: NeilBrown 

Code currently defines:

and then compiles code only if they are defined.
We might want to disable some of these via devicetree one
day, but for now just remove the #defines and the
conditions - all the code for different ports is
easy to identify.

Signed-off-by: NeilBrown 
Signed-off-by: Greg Kroah-Hartman 
---
 .../ramips/files-4.14/arch/mips/pci/pci-mt7621.c   | 66 +++---
 1 file changed, 8 insertions(+), 58 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 80f9cc2..2d4cc65 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
@@ -65,9 +65,6 @@ extern void chk_phy_pll(void);
  * devices.
  */
 
-#define CONFIG_PCIE_PORT0
-#define CONFIG_PCIE_PORT1
-#define CONFIG_PCIE_PORT2
 #define RALINK_PCIE0_CLK_EN (1<<24)
 #define RALINK_PCIE1_CLK_EN (1<<25)
 #define RALINK_PCIE2_CLK_EN (1<<26)
@@ -144,7 +141,7 @@ extern void chk_phy_pll(void);
 #define RALINK_PCI_IO_MAP_BASE 0x1e16
 
 #define RALINK_SYSTEM_CONTROL_BASE 0xbe00
-#define GPIO_PERST
+
 #define ASSERT_SYSRST_PCIE(val)do {\
if (*(unsigned int 
*)(0xbe0c) == 0x00030101)\
RALINK_RSTCTRL |= val;  
\
@@ -397,21 +394,15 @@ set_pcie_phy(u32 *addr, int start_b, int bits, int val)
 void
 bypass_pipe_rst(void)
 {
-#if defined (CONFIG_PCIE_PORT0)
/* PCIe Port 0 */
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P0P1_CTL_OFFSET + 0x02c), 12, 1, 
0x01); // rg_pe1_pipe_rst_b
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P0P1_CTL_OFFSET + 0x02c),  4, 1, 
0x01); // rg_pe1_pipe_cmd_frc[4]
-#endif
-#if defined (CONFIG_PCIE_PORT1)
/* PCIe Port 1 */
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P0P1_CTL_OFFSET + 0x12c), 12, 1, 
0x01); // rg_pe1_pipe_rst_b
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P0P1_CTL_OFFSET + 0x12c),  4, 1, 
0x01); // rg_pe1_pipe_cmd_frc[4]
-#endif
-#if defined (CONFIG_PCIE_PORT2)
/* PCIe Port 2 */
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P2_CTL_OFFSET + 0x02c), 12, 1, 
0x01);   // rg_pe1_pipe_rst_b
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P2_CTL_OFFSET + 0x02c),  4, 1, 
0x01);   // rg_pe1_pipe_cmd_frc[4]
-#endif
 }
 
 void
@@ -420,7 +411,6 @@ set_phy_for_ssc(void)
unsigned long reg = (*(volatile u32 *)(RALINK_SYSCTL_BASE + 0x10));
 
reg = (reg >> 6) & 0x7;
-#if defined (CONFIG_PCIE_PORT0) || defined (CONFIG_PCIE_PORT1)
/* Set PCIe Port0 & Port1 PHY to disable SSC */
/* Debug Xtal Type */
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P0P1_CTL_OFFSET + 0x400),  8, 1, 
0x01); // rg_pe1_frc_h_xtal_type
@@ -461,8 +451,7 @@ set_phy_for_ssc(void)
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P0P1_CTL_OFFSET + 0x100),  5, 1, 
0x01); // rg_pe1_phy_en   //Port 1 enable
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P0P1_CTL_OFFSET + 0x000),  4, 1, 
0x00); // rg_pe1_frc_phy_en   //Force Port 0 disable control
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P0P1_CTL_OFFSET + 0x100),  4, 1, 
0x00); // rg_pe1_frc_phy_en   //Force Port 1 disable control
-#endif
-#if defined (CONFIG_PCIE_PORT2)
+
/* Set PCIe Port2 PHY to disable SSC */
/* Debug Xtal Type */
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P2_CTL_OFFSET + 0x400),  8, 1, 
0x01);   // rg_pe1_frc_h_xtal_type
@@ -495,7 +484,6 @@ set_phy_for_ssc(void)
/* Enable PHY and disable force mode */
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P2_CTL_OFFSET + 0x000),  5, 1, 
0x01);   // rg_pe1_phy_en   //Port 0 enable
set_pcie_phy((u32 *)(RALINK_PCIEPHY_P2_CTL_OFFSET + 0x000),  4, 1, 
0x00);   // rg_pe1_frc_phy_en   //Force Port 0 disable control
-#endif
 }
 
 void setup_cm_memory_region(struct resource *mem_resource)
@@ -528,18 +516,13 @@ static int mt7621_pci_probe(struct platform_device *pdev)
ioport_resource.start= 0;
ioport_resource.end = ~0;
 
-#if defined (CONFIG_PCIE_PORT0)
val = RALINK_PCIE0_RST;
-#endif
-#if defined (CONFIG_PCIE_PORT1)
val |= RALINK_PCIE1_RST;
-#endif
-#if defined (CONFIG_PCIE_PORT2)
val |= RALINK_PCIE2_RST;
-#endif
+
ASSERT_SYSRST_PCIE(RALINK_PCIE0_RST | RALINK_PCIE1_RST | 
RALINK_PCIE2_RST);
printk("pull PCIe RST: RALINK_RSTCTRL = %x\n", RALINK_RSTCTRL);
-#if defined GPIO_PERST /* add GPIO control instead of PERST_N */ /*chhung*/
+
*(unsigned int *)(0xbe60) &= ~(0x3<<10 | 0x3<<3);
*(unsigned int *)(0xbe60) |= 0x1<<10 | 0x1<<3;
mdelay(100);
@@ -548,18 +531,11 @@ static int mt7621_pci_probe(struct platform_device *pdev)
*(unsigned int *)(0xbe000620) 

[LEDE-DEV] [PATCH 5/5] staging: mt7621-pci: remove unnecessary resource details.

2018-05-12 Thread Rosen Penev
From: NeilBrown 

These resources are extracted from devicetree, so they aren't
needed here.

Signed-off-by: NeilBrown 
Signed-off-by: Greg Kroah-Hartman 
---
 .../linux/ramips/files-4.14/arch/mips/pci/pci-mt7621.c  | 17 ++---
 1 file changed, 2 insertions(+), 15 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 2d4cc65..a98752b 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
@@ -307,26 +307,13 @@ struct pci_ops mt7621_pci_ops= {
.write  = pci_config_write,
 };
 
-static struct resource mt7621_res_pci_mem1 = {
-   .name   = "PCI MEM1",
-   .start  = RALINK_PCI_MM_MAP_BASE,
-   .end= (u32)((RALINK_PCI_MM_MAP_BASE + (unsigned char 
*)0x0fff)),
-   .flags  = IORESOURCE_MEM,
-};
-static struct resource mt7621_res_pci_io1 = {
-   .name   = "PCI I/O1",
-   .start  = RALINK_PCI_IO_MAP_BASE,
-   .end= (u32)((RALINK_PCI_IO_MAP_BASE + (unsigned char 
*)0x0)),
-   .flags  = IORESOURCE_IO,
-};
+static struct resource mt7621_res_pci_mem1;
+static struct resource mt7621_res_pci_io1;
 
 static struct pci_controller mt7621_controller = {
.pci_ops= _pci_ops,
.mem_resource   = _res_pci_mem1,
.io_resource= _res_pci_io1,
-   .mem_offset = 0xUL,
-   .io_offset  = 0xUL,
-   .io_map_base= 0xa000,
 };
 
 static void
-- 
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-pci: improve interrupt mapping

2018-05-12 Thread Rosen Penev
From: NeilBrown 

As the Interrupts for the PCI adapters are listed in
devicetree we shouldn't need to have them explicit in the code.

The simplest way to do this is to use of_irq_parse_and_map_pci()
and specify an interrupt-map which identifies the different
PCI hosts by bus/slot numbers.
This has the advantage that the hwirq number are mapped to virq
numbers for us, so the ugly hack can go.

Signed-off-by: NeilBrown 
Signed-off-by: Greg Kroah-Hartman 
---
 target/linux/ramips/dts/mt7621.dtsi|  9 +--
 .../ramips/files-4.14/arch/mips/pci/pci-mt7621.c   | 74 +++---
 2 files changed, 14 insertions(+), 69 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621.dtsi 
b/target/linux/ramips/dts/mt7621.dtsi
index daca857..87399a1 100644
--- a/target/linux/ramips/dts/mt7621.dtsi
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -440,10 +440,11 @@
0x0100 0 0x 0x1e16 0 0x0001 /* io 
space */
>;
 
-   interrupt-parent = <>;
-   interrupts = ;
+   #interrupt-cells = <1>;
+   interrupt-map-mask = <0xF 0 0 1>;
+   interrupt-map = <0x1 0 0 1  GIC_SHARED 4 
IRQ_TYPE_LEVEL_HIGH>,
+   <0x2 0 0 1  GIC_SHARED 24 
IRQ_TYPE_LEVEL_HIGH>,
+   <0x3 0 0 1  GIC_SHARED 25 
IRQ_TYPE_LEVEL_HIGH>;
 
status = "disabled";
 
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 4209e23..80f9cc2 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
@@ -74,9 +74,6 @@ extern void chk_phy_pll(void);
 
 #define RALINK_PCI_CONFIG_ADDR 0x20
 #define RALINK_PCI_CONFIG_DATA_VIRTUAL_REG 0x24
-#define RALINK_INT_PCIE0 pcie_irq[0]
-#define RALINK_INT_PCIE1 pcie_irq[1]
-#define RALINK_INT_PCIE2 pcie_irq[2]
 #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)
@@ -367,68 +364,12 @@ pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 
pin)
 {
u16 cmd;
u32 val;
-   int irq = 0;
-
-   if ((dev->bus->number == 0) && (slot == 0)) {
-   write_config(0, 0, 0, PCI_BASE_ADDRESS_0, MEMORY_BASE);
-   read_config(0, 0, 0, PCI_BASE_ADDRESS_0, (unsigned long *));
-   printk("BAR0 at slot 0 = %x\n", val);
-   printk("bus=0x%x, slot = 0x%x\n",dev->bus->number, slot);
-   } else if((dev->bus->number == 0) && (slot == 0x1)) {
-   write_config(0, 1, 0, PCI_BASE_ADDRESS_0, MEMORY_BASE);
-   read_config(0, 1, 0, PCI_BASE_ADDRESS_0, (unsigned long *));
-   printk("BAR0 at slot 1 = %x\n", val);
-   printk("bus=0x%x, slot = 0x%x\n",dev->bus->number, slot);
-   } else if((dev->bus->number == 0) && (slot == 0x2)) {
-   write_config(0, 2, 0, PCI_BASE_ADDRESS_0, MEMORY_BASE);
-   read_config(0, 2, 0, PCI_BASE_ADDRESS_0, (unsigned long *));
-   printk("BAR0 at slot 2 = %x\n", val);
-   printk("bus=0x%x, slot = 0x%x\n",dev->bus->number, slot);
-   } else if ((dev->bus->number == 1) && (slot == 0x0)) {
-   switch (pcie_link_status) {
-   case 2:
-   case 6:
-   irq = RALINK_INT_PCIE1;
-   break;
-   case 4:
-   irq = RALINK_INT_PCIE2;
-   break;
-   default:
-   irq = RALINK_INT_PCIE0;
-   }
-   printk("bus=0x%x, slot = 0x%x, irq=0x%x\n",dev->bus->number, 
slot, dev->irq);
-   } else if ((dev->bus->number == 2) && (slot == 0x0)) {
-   switch (pcie_link_status) {
-   case 5:
-   case 6:
-   irq = RALINK_INT_PCIE2;
-   break;
-   default:
-   irq = RALINK_INT_PCIE1;
-   }
-   printk("bus=0x%x, slot = 0x%x, irq=0x%x\n",dev->bus->number, 
slot, dev->irq);
-   } else if ((dev->bus->number == 2) && (slot == 0x1)) {
-   switch (pcie_link_status) {
-   case 5:
-   case 6:
-   irq = RALINK_INT_PCIE2;
-   break;
-   default:
-   irq = RALINK_INT_PCIE1;
-   }
-   printk("bus=0x%x, slot = 0x%x, irq=0x%x\n",dev->bus->number, 
slot, dev->irq);
-   } else if ((dev->bus->number ==3) && (slot == 0x0)) {
-   irq = RALINK_INT_PCIE2;
-   printk("bus=0x%x, slot = 0x%x, 

[LEDE-DEV] [PATCH 2/5] staging: mt7621-pci: Remove redundant owner assignment

2018-05-12 Thread Rosen Penev
From: Christian Lütke-Stetzkamp 

Remove the owner assignment form the platform driver as
platform_driver_register() already initializes the owner.
Found using coccinelle.

Signed-off-by: Christian Lütke-Stetzkamp 
Signed-off-by: Greg Kroah-Hartman 
---
 target/linux/ramips/files-4.14/arch/mips/pci/pci-mt7621.c | 1 -
 1 file changed, 1 deletion(-)

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 5125412..4209e23 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
@@ -823,7 +823,6 @@ static struct platform_driver mt7621_pci_driver = {
.probe = mt7621_pci_probe,
.driver = {
.name = "mt7621-pci",
-   .owner = THIS_MODULE,
.of_match_table = of_match_ptr(mt7621_pci_ids),
},
 };
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] MMAP memory out of sync on AR71xx Rambutan (8devices) board.

2018-05-08 Thread Rosen Penev
On Tue, May 8, 2018 at 1:11 PM, Rosen Penev <ros...@gmail.com> wrote:
> On Tue, May 8, 2018 at 1:08 PM, Kevin Darbyshire-Bryant via Lede-dev
> <lede-dev@lists.infradead.org> wrote:
>> The sender domain has a DMARC Reject/Quarantine policy which disallows
>> sending mailing list messages using the original "From" header.
>>
>> To mitigate this problem, the original message has been wrapped
>> automatically by the mailing list software.
>>
>> -- Forwarded message --
>> From: Kevin Darbyshire-Bryant <ke...@darbyshire-bryant.me.uk>
>> To: Daniel Danzberger <dan...@dd-wrt.com>
>> Cc: Rosen Penev <ros...@gmail.com>, "lede-dev@lists.infradead.org" 
>> <lede-dev@lists.infradead.org>
>> Bcc:
>> Date: Tue, 8 May 2018 20:07:56 +
>> Subject: Re: [LEDE-DEV] MMAP memory out of sync on AR71xx Rambutan 
>> (8devices) board.
>>
>>
>>> On 8 May 2018, at 11:16, Daniel Danzberger <dan...@dd-wrt.com> wrote:
>>>
>>>>>
>> 
>>>>> Did you encounter this issue with kernel 4.9? For me, 4.4 caused no
>>>>> data corruption on my external hard drive.
>>>> I can't tell right now. I was trying to use an older version with kernel 
>>>> 4.4,
>>>> but it fails to build.
>>> I just tested with 4.4 and the problem is present there as well.
Then 3.18. Something tells me the issue is present there as well. I
remember the btrfs driver crashing within 10 seconds after mounting a
hard drive on that kernel.
>>>>>
>>
>> So out of curiosity I built this for my Archer C7 v2 ar71xx device.  I also 
>> modified the code to not give up on ‘OK’, so it always iterated 10 times.  I 
>> then ran this repeatedly using ‘watch’.  Observations:
>>
>> 1) Failure only occurred on 1st check, it never appeared/re-appeared on 
>> subsequent passes.
>> 2) Failure offsets are always at 32 byte intervals.  That corresponds nicely 
>> with cache-line size.
> Yeah the L1
cache is not being flushed. This plagued ramips for a while. That
particular issue was that the L1 cache on the first CPU was being
flushed but not the second (L1 cache is per core).

I tested this on mt7621 and found no errors.

MIPS, the gift that keeps on giving...

Now that I think about it, one of the work arounds for mt7621 was to
limit the number of CPUs to 1 with the nr-cpus=1 kernel command line
flag. This should be valid no matter what though. The issue is
probably different. Yeah I also have the ramips issue backported to
kernel 4.9 (generic kernel patch) in my tree and I still see this
issue.

Hmm I have an mr3020. Trunk has ath79 with support for it(from what I
see). Will report on 4.14.
>>
>> Grabbing at straws to some extent.
>>
>>
>> Cheers,
>>
>> Kevin D-B
>>
>> 012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A
>>
>>
>> ___
>> 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


Re: [LEDE-DEV] MMAP memory out of sync on AR71xx Rambutan (8devices) board.

2018-05-08 Thread Rosen Penev
On Tue, May 8, 2018 at 1:08 PM, Kevin Darbyshire-Bryant via Lede-dev
<lede-dev@lists.infradead.org> wrote:
> The sender domain has a DMARC Reject/Quarantine policy which disallows
> sending mailing list messages using the original "From" header.
>
> To mitigate this problem, the original message has been wrapped
> automatically by the mailing list software.
>
> -- Forwarded message --
> From: Kevin Darbyshire-Bryant <ke...@darbyshire-bryant.me.uk>
> To: Daniel Danzberger <dan...@dd-wrt.com>
> Cc: Rosen Penev <ros...@gmail.com>, "lede-dev@lists.infradead.org" 
> <lede-dev@lists.infradead.org>
> Bcc:
> Date: Tue, 8 May 2018 20:07:56 +
> Subject: Re: [LEDE-DEV] MMAP memory out of sync on AR71xx Rambutan (8devices) 
> board.
>
>
>> On 8 May 2018, at 11:16, Daniel Danzberger <dan...@dd-wrt.com> wrote:
>>
>>>>
> 
>>>> Did you encounter this issue with kernel 4.9? For me, 4.4 caused no
>>>> data corruption on my external hard drive.
>>> I can't tell right now. I was trying to use an older version with kernel 
>>> 4.4,
>>> but it fails to build.
>> I just tested with 4.4 and the problem is present there as well.
>>>>
>
> So out of curiosity I built this for my Archer C7 v2 ar71xx device.  I also 
> modified the code to not give up on ‘OK’, so it always iterated 10 times.  I 
> then ran this repeatedly using ‘watch’.  Observations:
>
> 1) Failure only occurred on 1st check, it never appeared/re-appeared on 
> subsequent passes.
> 2) Failure offsets are always at 32 byte intervals.  That corresponds nicely 
> with cache-line size.
Yeah the L1
>
> Grabbing at straws to some extent.
>
>
> Cheers,
>
> Kevin D-B
>
> 012C ACB2 28C6 C53E 9775  9123 B3A2 389B 9DE2 334A
>
>
> ___
> 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


Re: [LEDE-DEV] MMAP memory out of sync on AR71xx Rambutan (8devices) board.

2018-05-06 Thread Rosen Penev
On Sun, May 6, 2018 at 3:52 AM, Daniel Danzberger  wrote:
> MMAP'ed memory that has been allocated via 'get_zeroed_page(GFP_KERNEL)' or
> 'vmalloc()' doesn't always contain the same data when accessed from userspace.
>
> This means all userspace programs using mmap to access kernel memory aren't
> always working properly on the Rambutan board. I am currently testing if other
> ar71xx devices are affected as well.
>
> I first noticed this when using ALSA's mmap api to capture audio.
>
> Here is the feed for a kmod + userpace util to reproduce the issue:
> g...@github.com:dddaniel/mmaptest.git
>
> The kernel module simply allocates a page and initializes it with 0xff.
> The userspace application then mmap's and reads this page 10 times with a 
> 500ms
> delay an checks if all data is 0xff.
>
> ---
> root@OpenWrt:/# mmaptest-user
> mmap addr: 0x77a04000
> [  760.464968] mmap page 7573000 at va 87573000
> check memory ...FAIL (at byte 0)
> check memory ...FAIL (at byte 96)
> check memory ...FAIL (at byte 96)
> check memory ...FAIL (at byte 96)
> check memory ...FAIL (at byte 128)
> ---
>
> I have no idea whats causing it. Does anybody have a hint on how to fix this ?
>
Try reverting 
https://github.com/torvalds/linux/commit/c00ab4896ed5f7d89af6f90b809e2c0197c6d170
> --
> Regards
>
> Daniel Danzberger
> embeDD GmbH, Alter Postplatz 2, CH-6370 Stans
>
> ___
> 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] libusb: Add SourceForge mirror.

2018-05-01 Thread Rosen Penev
SourceForge is still getting updated so might as well have it here.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/libs/libusb/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/libs/libusb/Makefile b/package/libs/libusb/Makefile
index 362d742..5400821 100644
--- a/package/libs/libusb/Makefile
+++ b/package/libs/libusb/Makefile
@@ -12,7 +12,9 @@ PKG_VERSION:=1.0.22
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=https://github.com/libusb/libusb/releases/download/v$(PKG_VERSION)
+PKG_SOURCE_URL:=\
+  https://github.com/libusb/libusb/releases/download/v$(PKG_VERSION) \
+  @SF/$(PKG_NAME)
 PKG_HASH:=75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157
 
 PKG_INSTALL:=1
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH V5] uboot-envtools: Change download to git.

2018-05-01 Thread Rosen Penev
Currently, the build system uses an openwrt mirror which does not currently
work and FTP can be unreliable under several circumstances (Ubuntu 16.04
WSL being an example). This change implicitly allows using all the mirrors
to download.

Changing this to git also allows using .tar.xz archives which are smaller.

Size difference:

12304292 u-boot-2018.03.tar.bz2
10060652 u-boot-2018.03.tar.xz

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
v2: Change git URL from GitHub to official mirror.
v3: Change URL to HTTPS now that Wolfgang Denke added support.
v4: Rebased against current master. Old sizes:
10416503 u-boot-2015.10.tar.bz2
8351456 u-boot-2015.10.tar.xz
v5: Actually rebased against master and formated to 75 chars per line.
 package/boot/uboot-envtools/Makefile | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index 8de6455..2f8dd0a 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -12,12 +12,13 @@ PKG_DISTNAME:=u-boot
 PKG_VERSION:=2018.03
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=\
-   http://mirror2.openwrt.org/sources \
-   ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://git.denx.de/u-boot.git
+PKG_SOURCE_VERSION:=f95ab1fb6e37f0601f397091bb011edf7a98b890
+PKG_MIRROR_HASH:=b50d8b6fe0d90b92c8c147457b1b4c2ed1cdb03191085cfc57fdad77c0bfffab
 
 PKG_BUILD_DEPENDS:=fstools
 
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH V3] sysctl: Protect hard/symlinks by default.

2018-05-01 Thread Rosen Penev
There is no usecase for not protecting symlinks that I know of in OpenWrt.
Not even on desktop systems where you have multiple users with a shell.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
v2: Move to 10-default.conf file.
v3: Edit patch description to be 75 characters per line.
 package/base-files/files/etc/sysctl.d/10-default.conf | 4 
 1 file changed, 4 insertions(+)

diff --git a/package/base-files/files/etc/sysctl.d/10-default.conf 
b/package/base-files/files/etc/sysctl.d/10-default.conf
index 98867b7..bfe26ca 100644
--- a/package/base-files/files/etc/sysctl.d/10-default.conf
+++ b/package/base-files/files/etc/sysctl.d/10-default.conf
@@ -5,6 +5,10 @@ kernel.panic=3
 kernel.core_pattern=/tmp/%e.%t.%p.%s.core
 fs.suid_dumpable=2
 
+#enable hard/symlink protection
+fs.protected_hardlinks=1
+fs.protected_symlinks=1
+
 net.ipv4.conf.default.arp_ignore=1
 net.ipv4.conf.all.arp_ignore=1
 net.ipv4.ip_forward=1
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] sysctl: Protect hard/symlinks by default.

2018-04-30 Thread Rosen Penev
There is no usecase for not protecting symlinks that I know of in OpenWrt. Not 
even on desktop systems where you have multiple users with a shell.

Signed-off-by: Rosen Penev <ros...@gmail.com>

v2: Move to 10-default.conf file.
---
 package/base-files/files/etc/sysctl.d/10-default.conf | 4 
 1 file changed, 4 insertions(+)

diff --git a/package/base-files/files/etc/sysctl.d/10-default.conf 
b/package/base-files/files/etc/sysctl.d/10-default.conf
index 98867b7..bfe26ca 100644
--- a/package/base-files/files/etc/sysctl.d/10-default.conf
+++ b/package/base-files/files/etc/sysctl.d/10-default.conf
@@ -5,6 +5,10 @@ kernel.panic=3
 kernel.core_pattern=/tmp/%e.%t.%p.%s.core
 fs.suid_dumpable=2
 
+#enable hard/symlink protection
+fs.protected_hardlinks=1
+fs.protected_symlinks=1
+
 net.ipv4.conf.default.arp_ignore=1
 net.ipv4.conf.all.arp_ignore=1
 net.ipv4.ip_forward=1
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] uboot-envtools: Change download to git.

2018-04-30 Thread Rosen Penev
Currently, the build system uses an openwrt mirror which does not currently 
workand FTP can be unreliable under several circumstances (Ubuntu 16.04 WSL 
being an example). This change implicitly allows using all the mirrors to 
download.

Changing this to git also allows using .tar.xz archives which are smaller.

Size difference:

10416503 u-boot-2015.10.tar.bz2
8351456 u-boot-2015.10.tar.xz

Signed-off-by: Rosen Penev <ros...@gmail.com>

v2: Change git URL from GitHub to official mirror.
v3: Change URL to HTTPS now that Wolfgang Denke added support.
v4: Rebased against current master. New sizes:
12304292 u-boot-2018.03.tar.bz2
10060652 u-boot-2018.03.tar.xz
---
 package/boot/uboot-envtools/Makefile | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index 4f7cf57..2f8dd0a 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -12,10 +12,13 @@ PKG_DISTNAME:=u-boot
 PKG_VERSION:=2018.03
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://ftp.denx.de/pub/u-boot
-PKG_HASH:=7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://git.denx.de/u-boot.git
+PKG_SOURCE_VERSION:=f95ab1fb6e37f0601f397091bb011edf7a98b890
+PKG_MIRROR_HASH:=b50d8b6fe0d90b92c8c147457b1b4c2ed1cdb03191085cfc57fdad77c0bfffab
 
 PKG_BUILD_DEPENDS:=fstools
 
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] mvebu: Switch Turris Omnia to use ath10k-ct driver and firmware.

2018-04-30 Thread Rosen Penev
On Sun, Apr 29, 2018 at 11:44 PM, John Crispin <j...@phrozen.org> wrote:
>
>
> On 31/03/18 00:19, Rosen Penev wrote:
>>
>> My testing has shown both ath10k and firmware to be unstable. Here is a
>> summary of results done over two weeks:
>>
>> ath10k + QCA firmware = driver crash, WiFi dies completely.
>> ath10k + CT firmware = driver crash. WiFi dies completely.
>> ath10k-ct + QCA firmware = firmware crash. WiFi does not die*.
>> ath10k-ct + CT firmware = I have not gotten either to crash.
>>
>> WiFi does not die completely with scenario 3 as mac80211 is able to
>> restart the hardware. From my testing, it dies twice a day. I have no idea
>> what triggers it. My best guess is an Apple iPhone.
>>
>> I also tried QCA firmware 37. No difference.
>
>
> Hi,
>
> there will always be combos of FW/drv version that will/not work. this can
> change over time back and fwd between stock and -ct code bases. -ct has been
> opt-in since it was merged. It would be uch better to figure out which FW
> works and why the driver dies. Otherwise we'll start flipping back and fwd
> between stock/-ct versions with each update on each wmac silicon / arch
> combo constantly.
So the initial report was premature. I've since tried with more
firmwares only to find that they all crash. Even -ct.

The basic problem is that in the case of the firmware crashing, -ct
restarts the firmware whereas ath10k dies with it.

I've concluded that it's my phone running Android Oreo that causes all
the firmware crashing.
>
> John
>
>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>>   target/linux/mvebu/image/cortex-a9.mk | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/target/linux/mvebu/image/cortex-a9.mk
>> b/target/linux/mvebu/image/cortex-a9.mk
>> index d9defe880d..a6529220ea 100644
>> --- a/target/linux/mvebu/image/cortex-a9.mk
>> +++ b/target/linux/mvebu/image/cortex-a9.mk
>> @@ -152,7 +152,7 @@ define Device/turris-omnia
>> DEVICE_TITLE := Turris Omnia
>> DEVICE_PACKAGES :=  \
>>   mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
>> -wpad-mini kmod-ath9k kmod-ath10k ath10k-firmware-qca988x
>> +wpad-mini kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct
>> IMAGES := $$(IMAGE_PREFIX)-sysupgrade.img.gz
>> omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz
>> IMAGE/$$(IMAGE_PREFIX)-sysupgrade.img.gz := boot-img | sdcard-img |
>> gzip | append-metadata
>> IMAGE/omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz :=
>> omnia-medkit-initramfs | gzip
>
>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] u-boot: Switch to HTTP for downloads

2018-04-27 Thread Rosen Penev
On Thu, Apr 26, 2018 at 9:35 PM, John Crispin <j...@phrozen.org> wrote:
>
>
> On 19/04/18 22:36, Rosen Penev wrote:
>>
>> The first mirror is dead and the second is FTP, which can be unreliable at
>> times.
>>
>> Tested on Ubuntu 16.04 WSL.
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>>   package/boot/uboot-envtools/Makefile | 4 +---
>>   package/boot/uboot-xburst/Makefile   | 4 +---
>>   2 files changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/package/boot/uboot-envtools/Makefile
>> b/package/boot/uboot-envtools/Makefile
>> index c8eafbe..5f3584d 100644
>> --- a/package/boot/uboot-envtools/Makefile
>> +++ b/package/boot/uboot-envtools/Makefile
>> @@ -14,9 +14,7 @@ PKG_RELEASE:=1
>> PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
>>   PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
>> -PKG_SOURCE_URL:=\
>> -   http://mirror2.openwrt.org/sources \
>
>
> dont drop mirror2 please just switch it to https
what's the point of that? It gets attempted anyways.
> John
>
>
>> -   ftp://ftp.denx.de/pub/u-boot
>> +PKG_SOURCE_URL:=http://ftp.denx.de/pub/u-boot
>>
>> PKG_HASH:=7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd
>> PKG_BUILD_DEPENDS:=fstools
>> diff --git a/package/boot/uboot-xburst/Makefile
>> b/package/boot/uboot-xburst/Makefile
>> index 413289a..20138e0 100644
>> --- a/package/boot/uboot-xburst/Makefile
>> +++ b/package/boot/uboot-xburst/Makefile
>> @@ -14,9 +14,7 @@ PKG_RELEASE:=1
>>
>> PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
>>   PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
>> -PKG_SOURCE_URL:= \
>> -   http://mirror2.openwrt.org/sources \
>> -   ftp://ftp.denx.de/pub/u-boot
>> +PKG_SOURCE_URL:=http://ftp.denx.de/pub/u-boot
>>
>> PKG_HASH:=6d094cafa7ecea8b671fbdcd21130b6a4f5744fc47dd263e101ed5d3629dffd4
>>   PKG_TARGETS:=bin
>>
>
>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] libusb: Update to 1.0.22

2018-04-27 Thread Rosen Penev
Switched download from SourceForge to GitHub. It seems the author migrated to 
that.

Also fixed the website URL as the SourceForge link is dead.

Compile tested on ar71xx and mvebu. Small size decrease on ar71xx: 30444 vs. 
30099 bytes.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/libs/libusb/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/libs/libusb/Makefile b/package/libs/libusb/Makefile
index 2d1d9c2..362d742 100644
--- a/package/libs/libusb/Makefile
+++ b/package/libs/libusb/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libusb
-PKG_VERSION:=1.0.21
+PKG_VERSION:=1.0.22
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b
+PKG_SOURCE_URL:=https://github.com/libusb/libusb/releases/download/v$(PKG_VERSION)
+PKG_HASH:=75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=0
@@ -28,7 +28,7 @@ define Package/libusb-1.0
   CATEGORY:=Libraries
   TITLE:=A library for accessing Linux USB devices
   DEPENDS:=+libpthread +librt
-  URL:=http://libusb.wiki.sourceforge.net/
+  URL:=http://libusb.info/
 endef
 
 define Package/libusb-1.0/description
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] libusb: Update to 1.0.22

2018-04-27 Thread Rosen Penev
Switched download from SourceForge to GitHub. It seems the author migrated to 
that.

Also fixed the website URL as the SourceForge link is dead.

Replaced the $(fPIC) macro with PKG_ASLR_PIE. They're both functionally 
identital.

Compile tested on ar71xx and mvebu. Small size decrease on ar71xx: 30444 vs. 
30099 bytes.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/libs/libusb/Makefile | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/libs/libusb/Makefile b/package/libs/libusb/Makefile
index 2d1d9c2..362d742 100644
--- a/package/libs/libusb/Makefile
+++ b/package/libs/libusb/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libusb
-PKG_VERSION:=1.0.21
+PKG_VERSION:=1.0.22
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b
+PKG_SOURCE_URL:=https://github.com/libusb/libusb/releases/download/v$(PKG_VERSION)
+PKG_HASH:=75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=0
@@ -28,7 +28,7 @@ define Package/libusb-1.0
   CATEGORY:=Libraries
   TITLE:=A library for accessing Linux USB devices
   DEPENDS:=+libpthread +librt
-  URL:=http://libusb.wiki.sourceforge.net/
+  URL:=http://libusb.info/
 endef
 
 define Package/libusb-1.0/description
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] kernel: Fix data corruption on some mips devices.

2018-04-26 Thread Rosen Penev
This is mainly a bug fix for multi-core MIPS systems where L1 caches besides 
the primary do not get flushed.

The most obvious problem is data corruption on SATA and USB devices where read 
requests are typically larger than the cacheline size.

This may also fix ar71xx systems that suffer from similar data corruption but I 
have not tested if it does.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 ...ata-corruption-related-to-cache-coherence.patch | 92 ++
 1 file changed, 92 insertions(+)
 create mode 100755 
target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch

diff --git 
a/target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch
 
b/target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch
new file mode 100755
index 000..3cfbd2c
--- /dev/null
+++ 
b/target/linux/generic/pending-4.14/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch
@@ -0,0 +1,92 @@
+From patchwork Thu Apr 26 23:28:34 2018
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: [v2] MIPS: c-r4k: fix data corruption related to cache coherence.
+X-Patchwork-Submitter: NeilBrown <n...@brown.name>
+X-Patchwork-Id: 19259
+Message-Id: <87vacdlf8d@notabene.neil.brown.name>
+To: James Hogan <jho...@kernel.org>
+Cc: Ralf Baechle <r...@linux-mips.org>,
+ Paul Burton <paul.bur...@mips.com>, linux-m...@linux-mips.org,
+ linux-ker...@vger.kernel.org
+Date: Fri, 27 Apr 2018 09:28:34 +1000
+From: NeilBrown <n...@brown.name>
+List-Id: linux-mips 
+
+When DMA will be performed to a MIPS32 1004K CPS, the
+L1-cache for the range needs to be flushed and invalidated
+first.
+The code currently takes one of two approaches.
+1/ If the range is less than the size of the dcache, then
+   HIT type requests flush/invalidate cache lines for the
+   particular addresses.  HIT-type requests a globalised
+   by the CPS so this is safe on SMP.
+
+2/ If the range is larger than the size of dcache, then
+   INDEX type requests flush/invalidate the whole cache.
+   INDEX type requests affect the local cache only. CPS
+   does not propagate them in any way.  So this invalidation
+   is not safe on SMP CPS systems.
+
+Data corruption due to '2' can quite easily be demonstrated by
+repeatedly "echo 3 > /proc/sys/vm/drop_caches" and then sha1sum
+a file that is several times the size of available memory.
+Dropping caches means that large contiguous extents (large than
+dcache) are more likely.
+
+This was not a problem before Linux-4.8 because option 2 was
+never used if CONFIG_MIPS_CPS was defined.  The commit
+which removed that apparently didn't appreciate the full
+consequence of the change.
+
+We could, in theory, globalize the INDEX based flush by sending an IPI
+to other cores.  These cache invalidation routines can be called with
+interrupts disabled and synchronous IPI require interrupts to be
+enabled.  Asynchronous IPI may not trigger writeback soon enough.
+So we cannot use IPI in practice.
+
+We can already test is IPI would be needed for an INDEX operation
+with r4k_op_needs_ipi(R4K_INDEX).  If this is True then we mustn't try
+the INDEX approach as we cannot use IPI.  If this is False (e.g. when
+there is only one core and hence one L1 cache) then it is safe to
+use the INDEX approach without IPI.
+
+This patch avoids options 2 if r4k_op_needs_ipi(R4K_INDEX), and so
+eliminates the corruption.
+
+Fixes: c00ab4896ed5 ("MIPS: Remove cpu_has_safe_index_cacheops")
+Cc: sta...@vger.kernel.org # v4.8+
+Signed-off-by: NeilBrown <n...@brown.name>
+---
+ arch/mips/mm/c-r4k.c | 9 ++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
+index 6f534b209971..e12dfa48b478 100644
+--- a/arch/mips/mm/c-r4k.c
 b/arch/mips/mm/c-r4k.c
+@@ -851,9 +851,12 @@ static void r4k_dma_cache_wback_inv(unsigned long addr, 
unsigned long size)
+   /*
+* Either no secondary cache or the available caches don't have the
+* subset property so we have to flush the primary caches
+-   * explicitly
++   * explicitly.
++   * If we would need IPI to perform an INDEX-type operation, then
++   * we have to use the HIT-type alternative as IPI cannot be used
++   * here due to interrupts possibly being disabled.
+*/
+-  if (size >= dcache_size) {
++  if (!r4k_op_needs_ipi(R4K_INDEX) && size >= dcache_size) {
+   r4k_blast_dcache();
+   } else {
+   R4600_HIT_CACHEOP_WAR_IMPL;
+@@ -890,7 +893,7 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned 
long size)
+   return;
+   }
+ 
+-  if (size >= dcache_size) {
++  if (!r4k_op_needs_ipi(R4K_INDEX) && size >= dcache_size)

[LEDE-DEV] [PATCH 2/2] firmware-utils: mkdapimg2: Fix a few issues discovered by clang

2018-04-22 Thread Rosen Penev
I used clang -Weverything and fixed most of the warnings displayed.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 tools/firmware-utils/src/mkdapimg2.c | 20 +---
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/tools/firmware-utils/src/mkdapimg2.c 
b/tools/firmware-utils/src/mkdapimg2.c
index 59c9f00..89febbc 100644
--- a/tools/firmware-utils/src/mkdapimg2.c
+++ b/tools/firmware-utils/src/mkdapimg2.c
@@ -58,7 +58,7 @@
 #define MAX_FW_VER_LEN 16
 #define MAX_REG_LEN8
 
-struct img_hdr_struct {
+static struct img_hdr_struct {
uint32_t hdr_len;
uint32_t checksum;
uint32_t total_size;
@@ -68,17 +68,17 @@ struct img_hdr_struct {
char fw_reg[MAX_REG_LEN];
 } imghdr ;
 
-char *progname;
+static char *progname;
 
-void
+static void
 perrexit(int code, char *msg)
 {
fprintf(stderr, "%s: %s: %s\n", progname, msg, strerror(errno));
exit(code);
 }
 
-void
-usage()
+static void
+usage(void)
 {
fprintf(stderr, "usage: %s -s signature [-v version] [-r region] [-k 
uImage part size] -i  -o \n", progname);
exit(1);
@@ -92,7 +92,7 @@ main(int ac, char *av[])
char region[MAX_REG_LEN];
int kernel = 0;
 
-   FILE *ifile, *ofile;
+   FILE *ifile = NULL, *ofile = NULL;
int c;
 
uint32_t cksum;
@@ -138,7 +138,7 @@ main(int ac, char *av[])
strncpy(region, optarg, MAX_REG_LEN);
break;
case 'k':
-   kernel = strtoul(optarg, , 0);
+   kernel = strtol(optarg, , 0);
if(ptr[0] == 'k'){
kernel *= 1000;
}
@@ -156,10 +156,8 @@ main(int ac, char *av[])
}
}
 
-   if (signature[0] == 0 || ifile == NULL || ofile == NULL) {
+   if (signature[0] == 0 || ifile == NULL || ofile == NULL)
usage();
-   exit(1);
-   }
 
for (bcnt = 0, cksum = 0 ; (c = fgetc(ifile)) != EOF ; bcnt++)
cksum += c & 0xff;
@@ -178,7 +176,7 @@ main(int ac, char *av[])
strncpy(imghdr.fw_ver, version, MAX_FW_VER_LEN);
strncpy(imghdr.fw_reg, region, MAX_REG_LEN);
 
-   if (fwrite(, sizeof(imghdr), 1, ofile) < 0)
+   if (fwrite(, sizeof(imghdr), 1, ofile) != 1)
perrexit(2, "fwrite header on output");
 
while ((c = fgetc(ifile)) != EOF) {
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/2] firmware-utils: mkdapimg2: Fix potential buffer overflow

2018-04-22 Thread Rosen Penev
If GCC is built with stack smashing protection enabled (SSP), it errors when 
compiling lzma-loader.

Switching to strncpy seems to be an easy way to fix this. It's probably better 
to use snprintf or strlcpy but the latter is not available for glibc systems.

Output of crash below:

*** buffer overflow detected ***: 
/home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg2 terminated
=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f6318ea77e5]
/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f6318f4915c]
/lib/x86_64-linux-gnu/libc.so.6(+0x117160)[0x7f6318f47160]
/home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg2[0x400ab7]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f6318e50830]
/home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg2[0x400e69]
=== Memory map: 
0040-00402000 r-xp  00:00 223275 
/home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg200601000-00602000 
r--p 1000 00:00 223275 
/home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg200602000-00603000 
rw-p 2000 00:00 223275 
/home/mangix/devstuff/openwrt/staging_dir/host/bin/mkdapimg2018c2000-018e3000 
rw-p  00:00 0  [heap]
7f6318c1-7f6318c26000 r-xp  00:00 122040 
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f6318c26000-7f6318e25000 ---p 00016000 00:00 122040 
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f6318e25000-7f6318e26000 rw-p 00015000 00:00 122040 
/lib/x86_64-linux-gnu/libgcc_s.so.1
7f6318e3-7f6318ff r-xp  00:00 123971 
/lib/x86_64-linux-gnu/libc-2.23.so
7f6318ff-7f6318ff9000 ---p 001c 00:00 123971 
/lib/x86_64-linux-gnu/libc-2.23.so
7f6318ff9000-7f63191f ---p 001c9000 00:00 123971 
/lib/x86_64-linux-gnu/libc-2.23.so
7f63191f-7f63191f4000 r--p 001c 00:00 123971 
/lib/x86_64-linux-gnu/libc-2.23.so
7f63191f4000-7f63191f6000 rw-p 001c4000 00:00 123971 
/lib/x86_64-linux-gnu/libc-2.23.so
7f63191f6000-7f63191fa000 rw-p  00:00 0
7f631920-7f6319226000 r-xp  00:00 123969 
/lib/x86_64-linux-gnu/ld-2.23.so
7f6319425000-7f6319426000 r--p 00025000 00:00 123969 
/lib/x86_64-linux-gnu/ld-2.23.so
7f6319426000-7f6319427000 rw-p 00026000 00:00 123969 
/lib/x86_64-linux-gnu/ld-2.23.so
7f6319427000-7f6319428000 rw-p  00:00 0
7f631946-7f6319461000 rw-p  00:00 0
7f631947-7f6319471000 rw-p  00:00 0
7f631948-7f6319481000 rw-p  00:00 0
7f631949-7f6319491000 rw-p  00:00 0
7fffca52e000-7fffcad2e000 rw-p  00:00 0  [stack]
7fffcb121000-7fffcb122000 r-xp  00:00 0  [vdso]
make -r world: build failed. Please re-run make with -j1 V=s to see what's 
going on

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 tools/firmware-utils/src/mkdapimg2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/firmware-utils/src/mkdapimg2.c 
b/tools/firmware-utils/src/mkdapimg2.c
index aef003c..59c9f00 100644
--- a/tools/firmware-utils/src/mkdapimg2.c
+++ b/tools/firmware-utils/src/mkdapimg2.c
@@ -119,7 +119,7 @@ main(int ac, char *av[])
progname, MAX_SIGN_LEN);
exit(1);
}
-   strcpy(signature, optarg);
+   strncpy(signature, optarg, MAX_SIGN_LEN);
break;
case 'v':
if (strlen(optarg) > MAX_FW_VER_LEN + 1) {
@@ -127,7 +127,7 @@ main(int ac, char *av[])
progname, MAX_FW_VER_LEN);
exit(1);
}
-   strcpy(version, optarg);
+   strncpy(version, optarg, MAX_FW_VER_LEN);
break;
case 'r':
if (strlen(optarg) > MAX_REG_LEN + 1) {
@@ -135,7 +135,7 @@ main(int ac, char *av[])
progname, MAX_REG_LEN);
exit(1);
}
-   strcpy(region, optarg);
+   strncpy(region, optarg, MAX_REG_LEN);
break;
case 'k':
kernel = strtoul(optarg, , 0);
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] u-boot: Switch to HTTP for downloads

2018-04-19 Thread Rosen Penev
The first mirror is dead and the second is FTP, which can be unreliable at 
times.

Tested on Ubuntu 16.04 WSL.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/boot/uboot-envtools/Makefile | 4 +---
 package/boot/uboot-xburst/Makefile   | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index c8eafbe..5f3584d 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -14,9 +14,7 @@ PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=\
-   http://mirror2.openwrt.org/sources \
-   ftp://ftp.denx.de/pub/u-boot
+PKG_SOURCE_URL:=http://ftp.denx.de/pub/u-boot
 PKG_HASH:=7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd
 
 PKG_BUILD_DEPENDS:=fstools
diff --git a/package/boot/uboot-xburst/Makefile 
b/package/boot/uboot-xburst/Makefile
index 413289a..20138e0 100644
--- a/package/boot/uboot-xburst/Makefile
+++ b/package/boot/uboot-xburst/Makefile
@@ -14,9 +14,7 @@ PKG_RELEASE:=1
 
 
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:= \
-   http://mirror2.openwrt.org/sources \
-   ftp://ftp.denx.de/pub/u-boot
+PKG_SOURCE_URL:=http://ftp.denx.de/pub/u-boot
 PKG_HASH:=6d094cafa7ecea8b671fbdcd21130b6a4f5744fc47dd263e101ed5d3629dffd4
 PKG_TARGETS:=bin
 
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Build error since ncurses bump

2018-04-04 Thread Rosen Penev
On Wed, Apr 4, 2018 at 4:57 AM, Koen Vandeputte
<koen.vandepu...@ncentric.com> wrote:
>
>
> On 2018-04-04 13:21, Rosen Penev wrote:
>>
>> On Wed, Apr 4, 2018 at 4:17 AM, Jo-Philipp Wich <j...@mein.io> wrote:
>>>
>>> Hi Koen,
>>>
>>> please try reverting
>>>
>>> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=4fb684a7558ea5c11580378be062f73da07f8479
>>> and see if it fixes the issue.
>
> Reverting this one indeed fixes the issue.
> Thanks again for the very accurate suggestion!
>
>
>>> The change was likely not tested on systems with a gcc 5 host compiler.
>>
>> Not at all.
>
> I can interpret this in 2 ways, which is the correct one?
>
> - "You are right, It was indeed not tested"
> - "That's not true! it was tested".
>
>
> In case it's option 1:
>
> Isn't it a bit dangerous to alter specific gcc version stuff without
> actually _testing_ it on the mentioned compiler? ;-)
> I'm running Ubuntu 16.04 LTS, like very probably a lot of people do. (which
> comes with gcc 5.4.0 by default)
Hmm? I believe jow is talking about the toolchain. It was switched to
default to GCC7 recently.

I use Arch Linux
>
>
> Thanks,
>
> Koen

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Build error since ncurses bump

2018-04-04 Thread Rosen Penev
On Wed, Apr 4, 2018 at 4:17 AM, Jo-Philipp Wich  wrote:
> Hi Koen,
>
> please try reverting
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=4fb684a7558ea5c11580378be062f73da07f8479
> and see if it fixes the issue.
>
> The change was likely not tested on systems with a gcc 5 host compiler.
Not at all.
> ~ Jo
>
> ___
> 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] libusb: Update to 1.0.22

2018-04-01 Thread Rosen Penev
Switched download from SourceForge to GitHub. It seems the author migrated to 
that.

Also fixed the website URL as the SourceForge link is dead.

Replaced the $(fPIC) macro with PKG_ASLR_PIE. They're both functionally 
identital.

Compile tested on ar71xx and mvebu. Small size decrease on ar71xx: 30444 vs. 
30099 bytes.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/libs/libusb/Makefile | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/libs/libusb/Makefile b/package/libs/libusb/Makefile
index 2d1d9c2b50..e9fe3fcec3 100644
--- a/package/libs/libusb/Makefile
+++ b/package/libs/libusb/Makefile
@@ -8,15 +8,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libusb
-PKG_VERSION:=1.0.21
+PKG_VERSION:=1.0.22
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=@SF/$(PKG_NAME)
-PKG_HASH:=7dce9cce9a81194b7065ee912bcd55eeffebab694ea403ffb91b67db66b1824b
+PKG_SOURCE_URL:=https://github.com/libusb/libusb/releases/download/v$(PKG_VERSION)
+PKG_HASH:=75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=0
+PKG_ASLR_PIE:=1
 PKG_LICENSE:=LGPL-2.1
 
 PKG_MAINTAINER := Felix Fietkau <n...@nbd.name>
@@ -28,7 +29,7 @@ define Package/libusb-1.0
   CATEGORY:=Libraries
   TITLE:=A library for accessing Linux USB devices
   DEPENDS:=+libpthread +librt
-  URL:=http://libusb.wiki.sourceforge.net/
+  URL:=http://libusb.info/
 endef
 
 define Package/libusb-1.0/description
@@ -36,7 +37,6 @@ define Package/libusb-1.0/description
   many different operating systems.
 endef
 
-TARGET_CFLAGS += $(FPIC)
 CONFIGURE_ARGS += \
--disable-udev \
--disable-log
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] ncurses: Remove obsolete compile fixes

2018-04-01 Thread Rosen Penev
It seems both issues (GCC5 and Musl) were fixed at some point. Thus, they can 
be dropped.

Did not bump version as there is no change in functionality or size.

Compile-tested on ar71xx and mvebu, both with musl.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 .../ncurses/patches/102-ncurses-5.9-gcc-5.patch| 44 --
 .../ncurses/patches/200-fix_missing_include.patch  | 14 ---
 2 files changed, 58 deletions(-)
 delete mode 100644 package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch
 delete mode 100644 package/libs/ncurses/patches/200-fix_missing_include.patch

diff --git a/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch 
b/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch
deleted file mode 100644
index b84fcb965c..00
--- a/package/libs/ncurses/patches/102-ncurses-5.9-gcc-5.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-https://bugs.gentoo.org/545114
-
-extracted from the upstream change (which had many unrelated commits in one)
-
-From 97bb4678dc03e753290b39bbff30ba2825df9517 Mon Sep 17 00:00:00 2001
-From: "Thomas E. Dickey" <dic...@invisible-island.net>
-Date: Sun, 7 Dec 2014 03:10:09 +
-Subject: [PATCH] ncurses 5.9 - patch 20141206
-
-+ modify MKlib_gen.sh to work around change in development version of
-  gcc introduced here:
- https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
- https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
-  (reports by Marcus Shawcroft, Maohui Lei).
-
 a/ncurses/base/MKlib_gen.sh
-+++ b/ncurses/base/MKlib_gen.sh
-@@ -505,11 +505,22 @@ sed -n -f $ED1 \
-   -e 's/gen_$//' \
-   -e 's/  / /g' >>$TMP
- 
-+cat >$ED1 <https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
-+# introduces spurious #line markers.  Work around that by ignoring the 
system's
-+# attempt to define "bool" and using our own symbol here.
-+sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2
-+cat $ED2 >$TMP
-+
- $preprocessor $TMP 2>/dev/null \
--| sed \
--  -e 's/  / /g' \
--  -e 's/^ //' \
--  -e 's/_Bool/NCURSES_BOOL/g' \
-+| sed -f $ED1 \
- | $AWK -f $AW2 \
- | sed -f $ED3 \
- | sed \
diff --git a/package/libs/ncurses/patches/200-fix_missing_include.patch 
b/package/libs/ncurses/patches/200-fix_missing_include.patch
deleted file mode 100644
index 4616c4fb70..00
--- a/package/libs/ncurses/patches/200-fix_missing_include.patch
+++ /dev/null
@@ -1,14 +0,0 @@
 a/ncurses/curses.priv.h
-+++ b/ncurses/curses.priv.h
-@@ -55,6 +55,11 @@ extern "C" {
- 
- #include 
- 
-+#if NEED_WCHAR_H
-+#include 
-+#include 
-+#endif
-+
- #if USE_RCS_IDS
- #define MODULE_ID(id) static const char Ident[] = id;
- #else
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/2] ustream-ssl: Enable ECDHE with OpenSSL.

2018-03-31 Thread Rosen Penev
When used with LuCI, SSLlabs complains that Forward Secrecy is not enabled and 
thus caps the score to a B.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 ustream-openssl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ustream-openssl.c b/ustream-openssl.c
index 83f6140..2faa855 100644
--- a/ustream-openssl.c
+++ b/ustream-openssl.c
@@ -49,6 +49,9 @@ __ustream_ssl_context_new(bool server)
return NULL;
 
SSL_CTX_set_verify(c, SSL_VERIFY_NONE, NULL);
+#ifndef OPENSSL_NO_ECDH
+   SSL_CTX_set_ecdh_auto(c, 1);
+#endif
SSL_CTX_set_quiet_shutdown(c, 1);
 
return (void *) c;
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 2/2] ustream-ssl: Remove RC4 from ciphersuite in server mode.

2018-03-31 Thread Rosen Penev
SSLlabs complains that RC4 is enabled as it is insecure, thereby capping the 
grade to B.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 ustream-openssl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ustream-openssl.c b/ustream-openssl.c
index 2faa855..eb03dab 100644
--- a/ustream-openssl.c
+++ b/ustream-openssl.c
@@ -52,6 +52,8 @@ __ustream_ssl_context_new(bool server)
 #ifndef OPENSSL_NO_ECDH
SSL_CTX_set_ecdh_auto(c, 1);
 #endif
+   if (server)
+   SSL_CTX_set_cipher_list(c, "DEFAULT:!RC4:@STRENGTH");
SSL_CTX_set_quiet_shutdown(c, 1);
 
return (void *) c;
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 2/3] sysctl: Restrict kernel pointer access from normal users.

2018-03-31 Thread Rosen Penev
On Sat, Mar 31, 2018 at 5:18 PM, Felix Fietkau <n...@nbd.name> wrote:
> On 2018-03-30 15:18, Rosen Penev wrote:
>> The only downside to this is that it breaks perf with non-root users. I 
>> don't think this is an issue in OpenWrt.
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>>  package/base-files/files/etc/sysctl.conf | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/package/base-files/files/etc/sysctl.conf 
>> b/package/base-files/files/etc/sysctl.conf
>> index ddc7a9bf69..61a43057a1 100644
>> --- a/package/base-files/files/etc/sysctl.conf
>> +++ b/package/base-files/files/etc/sysctl.conf
>> @@ -2,6 +2,9 @@ kernel.panic=3
>>  kernel.core_pattern=/tmp/%e.%t.%p.%s.core
>>  fs.suid_dumpable=2
>>
>> +#disable kernel pointer access from normal users
>> +kernel.kptr_restrict=1
> NACK. This will probably make some back traces in case of crashes less
> useful and thus hurt debugging.
> Also, it's completely pointless, since we don't have KALSR and thus the
> kernel memory addresses are mostly stable and predictable anyway.
>
Will drop.
> - Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] libjson-c: Update to 0.13

2018-03-30 Thread Rosen Penev
From: Daniel Engberg <daniel.engberg.li...@pyret.net>

Update (lib)json-c to 0.13

Signed-off-by: Daniel Engberg <daniel.engberg.li...@pyret.net>
Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/libs/libjson-c/Makefile   |  4 +--
 package/libs/libjson-c/patches/000-libm.patch | 50 ---
 2 files changed, 2 insertions(+), 52 deletions(-)
 delete mode 100644 package/libs/libjson-c/patches/000-libm.patch

diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile
index eeb7870f07..72b41e9fb8 100644
--- a/package/libs/libjson-c/Makefile
+++ b/package/libs/libjson-c/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=json-c
-PKG_VERSION:=0.12.1
+PKG_VERSION:=0.13
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
 PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/
-PKG_HASH:=5a617da9aade997938197ef0f8aabd7f97b670c216dc173977e1d56eef9e1291
+PKG_HASH:=8572760646e9d23ee68f967ca62fa134a97b931665fd9af562192b7788c95a06
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
 
diff --git a/package/libs/libjson-c/patches/000-libm.patch 
b/package/libs/libjson-c/patches/000-libm.patch
deleted file mode 100644
index 45adb0597f..00
--- a/package/libs/libjson-c/patches/000-libm.patch
+++ /dev/null
@@ -1,50 +0,0 @@
 a/configure.ac
-+++ b/configure.ac
-@@ -43,12 +43,6 @@
- AC_FUNC_MALLOC
- AC_FUNC_REALLOC
- AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open 
vsyslog strncasecmp setlocale)
--AC_CHECK_DECLS([INFINITY], [], [], [[#include ]])
--AC_CHECK_DECLS([nan], [], [], [[#include ]])
--AC_CHECK_DECLS([isnan], [], [], [[#include ]])
--AC_CHECK_DECLS([isinf], [], [], [[#include ]])
--AC_CHECK_DECLS([_isnan], [], [], [[#include ]])
--AC_CHECK_DECLS([_finite], [], [], [[#include ]])
- 
- #check if .section.gnu.warning accepts long strings (for __warn_references)
- AC_LANG_PUSH([C])
 a/math_compat.h
-+++ b/math_compat.h
-@@ -1,28 +1,9 @@
- #ifndef __math_compat_h
- #define __math_compat_h
- 
--/* Define isnan and isinf on Windows/MSVC */
--
--#ifndef HAVE_DECL_ISNAN
--# ifdef HAVE_DECL__ISNAN
--#include 
--#define isnan(x) _isnan(x)
--# endif
--#endif
--
--#ifndef HAVE_DECL_ISINF
--# ifdef HAVE_DECL__FINITE
--#include 
--#define isinf(x) (!_finite(x))
--# endif
--#endif
--
--#ifndef HAVE_DECL_NAN
--#error This platform does not have nan()
--#endif
--
--#ifndef HAVE_DECL_INFINITY
--#error This platform does not have INFINITY
--#endif
-+#undef isnan
-+#define isnan(x) __builtin_isnan(x)
-+#undef isinf
-+#define isinf(x) __builtin_isinf(x)
- 
- #endif
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] package/utils/f2fs-tools: Update to 1.10.0

2018-03-30 Thread Rosen Penev
From: Daniel Engberg <daniel.engberg.li...@pyret.net>

Update f2fs-tools to 1.10.0

Signed-off-by: Daniel Engberg <daniel.engberg.li...@pyret.net>
Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/utils/f2fs-tools/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/utils/f2fs-tools/Makefile 
b/package/utils/f2fs-tools/Makefile
index 3e8bf63f08..391eb61b89 100644
--- a/package/utils/f2fs-tools/Makefile
+++ b/package/utils/f2fs-tools/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=f2fs-tools
-PKG_VERSION:=1.9.0
+PKG_VERSION:=1.10.0
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPLv2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
-PKG_HASH:=77217562ae7011a6d81b7b3c43c42623db1796a57596408d6c8037def70d6cc7
+PKG_HASH:=e841b086dbe02e3553b2c2ecb8c11a7990cfa9ca835c3d7aea6d600c6a543316
 
 PKG_FIXUP:=autoreconf
 PKG_BUILD_PARALLEL:=1
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] mvebu: Switch Turris Omnia to use ath10k-ct driver and firmware.

2018-03-30 Thread Rosen Penev
My testing has shown both ath10k and firmware to be unstable. Here is a summary 
of results done over two weeks:

ath10k + QCA firmware = driver crash, WiFi dies completely.
ath10k + CT firmware = driver crash. WiFi dies completely.
ath10k-ct + QCA firmware = firmware crash. WiFi does not die*.
ath10k-ct + CT firmware = I have not gotten either to crash.

WiFi does not die completely with scenario 3 as mac80211 is able to restart the 
hardware. From my testing, it dies twice a day. I have no idea what triggers 
it. My best guess is an Apple iPhone.

I also tried QCA firmware 37. No difference.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 target/linux/mvebu/image/cortex-a9.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mvebu/image/cortex-a9.mk 
b/target/linux/mvebu/image/cortex-a9.mk
index d9defe880d..a6529220ea 100644
--- a/target/linux/mvebu/image/cortex-a9.mk
+++ b/target/linux/mvebu/image/cortex-a9.mk
@@ -152,7 +152,7 @@ define Device/turris-omnia
   DEVICE_TITLE := Turris Omnia
   DEVICE_PACKAGES :=  \
 mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
-wpad-mini kmod-ath9k kmod-ath10k ath10k-firmware-qca988x
+wpad-mini kmod-ath9k kmod-ath10k-ct ath10k-firmware-qca988x-ct
   IMAGES := $$(IMAGE_PREFIX)-sysupgrade.img.gz 
omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz
   IMAGE/$$(IMAGE_PREFIX)-sysupgrade.img.gz := boot-img | sdcard-img | gzip | 
append-metadata
   IMAGE/omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz := 
omnia-medkit-initramfs | gzip
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 2/3] sysctl: Restrict kernel pointer access from normal users.

2018-03-30 Thread Rosen Penev
The only downside to this is that it breaks perf with non-root users. I don't 
think this is an issue in OpenWrt.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/base-files/files/etc/sysctl.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/base-files/files/etc/sysctl.conf 
b/package/base-files/files/etc/sysctl.conf
index ddc7a9bf69..61a43057a1 100644
--- a/package/base-files/files/etc/sysctl.conf
+++ b/package/base-files/files/etc/sysctl.conf
@@ -2,6 +2,9 @@ kernel.panic=3
 kernel.core_pattern=/tmp/%e.%t.%p.%s.core
 fs.suid_dumpable=2
 
+#disable kernel pointer access from normal users
+kernel.kptr_restrict=1
+
 net.ipv4.conf.default.arp_ignore=1
 net.ipv4.conf.all.arp_ignore=1
 net.ipv4.ip_forward=1
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 3/3] sysctl: Protect hard/symlinks by default.

2018-03-30 Thread Rosen Penev
There is no usecase for not protecting symlinks that I know of in OpenWrt. Not 
even on desktop systems where you have multiple users with a shell.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/base-files/files/etc/sysctl.conf | 4 
 1 file changed, 4 insertions(+)

diff --git a/package/base-files/files/etc/sysctl.conf 
b/package/base-files/files/etc/sysctl.conf
index 61a43057a1..790fc02654 100644
--- a/package/base-files/files/etc/sysctl.conf
+++ b/package/base-files/files/etc/sysctl.conf
@@ -5,6 +5,10 @@ fs.suid_dumpable=2
 #disable kernel pointer access from normal users
 kernel.kptr_restrict=1
 
+#enable hard/symlink protection
+fs.protected_hardlinks=1
+fs.protected_symlinks=1
+
 net.ipv4.conf.default.arp_ignore=1
 net.ipv4.conf.all.arp_ignore=1
 net.ipv4.ip_forward=1
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/3] kernel: Restrict dmesg output to root.

2018-03-30 Thread Rosen Penev
In typical OpenWrt setups, there are no other users that have a shell spawned 
for them by default.

This can be overriden by the kernel.dmesg_output syssctl.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 target/linux/generic/config-3.18 | 2 +-
 target/linux/generic/config-4.14 | 2 +-
 target/linux/generic/config-4.4  | 2 +-
 target/linux/generic/config-4.9  | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18
index 04245531f6..0f66960fdc 100644
--- a/target/linux/generic/config-3.18
+++ b/target/linux/generic/config-3.18
@@ -3284,7 +3284,7 @@ CONFIG_SCSI_PROC_FS=y
 # CONFIG_SECCOMP is not set
 # CONFIG_SECURITY is not set
 # CONFIG_SECURITYFS is not set
-# CONFIG_SECURITY_DMESG_RESTRICT is not set
+CONFIG_SECURITY_DMESG_RESTRICT=y
 # CONFIG_SEEQ8005 is not set
 CONFIG_SELECT_MEMORY_MODEL=y
 # CONFIG_SENSORS_ABITUGURU is not set
diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index a27198335d..8a1e494429 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -3999,7 +3999,7 @@ CONFIG_SCSI_PROC_FS=y
 CONFIG_SECTION_MISMATCH_WARN_ONLY=y
 # CONFIG_SECURITY is not set
 # CONFIG_SECURITYFS is not set
-# CONFIG_SECURITY_DMESG_RESTRICT is not set
+CONFIG_SECURITY_DMESG_RESTRICT=y
 CONFIG_SELECT_MEMORY_MODEL=y
 # CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_ABITUGURU3 is not set
diff --git a/target/linux/generic/config-4.4 b/target/linux/generic/config-4.4
index 3285000eb4..d29f27d747 100644
--- a/target/linux/generic/config-4.4
+++ b/target/linux/generic/config-4.4
@@ -3423,7 +3423,7 @@ CONFIG_SCSI_PROC_FS=y
 CONFIG_SECTION_MISMATCH_WARN_ONLY=y
 # CONFIG_SECURITY is not set
 # CONFIG_SECURITYFS is not set
-# CONFIG_SECURITY_DMESG_RESTRICT is not set
+CONFIG_SECURITY_DMESG_RESTRICT=y
 CONFIG_SELECT_MEMORY_MODEL=y
 # CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_ABITUGURU3 is not set
diff --git a/target/linux/generic/config-4.9 b/target/linux/generic/config-4.9
index 3f050c205c..1cc607d4dd 100644
--- a/target/linux/generic/config-4.9
+++ b/target/linux/generic/config-4.9
@@ -3766,7 +3766,7 @@ CONFIG_SCSI_PROC_FS=y
 CONFIG_SECTION_MISMATCH_WARN_ONLY=y
 # CONFIG_SECURITY is not set
 # CONFIG_SECURITYFS is not set
-# CONFIG_SECURITY_DMESG_RESTRICT is not set
+CONFIG_SECURITY_DMESG_RESTRICT=y
 CONFIG_SELECT_MEMORY_MODEL=y
 # CONFIG_SENSORS_ABITUGURU is not set
 # CONFIG_SENSORS_ABITUGURU3 is not set
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 2/2] ustream-ssl: Disable RC4 for TLS connections.

2018-03-30 Thread Rosen Penev
When used with LuCI, SSLlabs complains that RC4 is insecure and thus caps the 
score to a B.

I believe RC4 is compile-time enabled for non-TLS related reasons.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 ustream-openssl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ustream-openssl.c b/ustream-openssl.c
index 0f51b9d..ae5517b 100644
--- a/ustream-openssl.c
+++ b/ustream-openssl.c
@@ -52,7 +52,7 @@ __ustream_ssl_context_new(bool server)
 #ifndef OPENSSL_NO_ECDH
SSL_CTX_set_ecdh_auto(c, 1);
 #endif
-   SSL_CTX_set_cipher_list(c, "ECDHE:ALL");
+   SSL_CTX_set_cipher_list(c, "ECDHE:!RC4:ALL");
SSL_CTX_set_quiet_shutdown(c, 1);
 
return (void *) c;
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/2] ustream-ssl: Enable ECDHE with OpenSSL and prefer it to the other suites.

2018-03-30 Thread Rosen Penev
When used with LuCI, SSLlabs complains that Forward Secrecy is not enabled and 
thus caps the score to a B.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 ustream-openssl.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/ustream-openssl.c b/ustream-openssl.c
index 83f6140..0f51b9d 100644
--- a/ustream-openssl.c
+++ b/ustream-openssl.c
@@ -49,6 +49,10 @@ __ustream_ssl_context_new(bool server)
return NULL;
 
SSL_CTX_set_verify(c, SSL_VERIFY_NONE, NULL);
+#ifndef OPENSSL_NO_ECDH
+   SSL_CTX_set_ecdh_auto(c, 1);
+#endif
+   SSL_CTX_set_cipher_list(c, "ECDHE:ALL");
SSL_CTX_set_quiet_shutdown(c, 1);
 
return (void *) c;
-- 
2.16.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] ath10k-ct: Update firmware to latest.

2018-03-30 Thread Rosen Penev
On Mon, Mar 26, 2018 at 3:28 PM,  <gree...@candelatech.com> wrote:
> From: Ben Greear <gree...@candelatech.com>
>
> Wave-1 firmware has a fix for 'addba' not finding the peer.  Thanks to Hauke
> for finding and reporting this.
>
> Wave-2 firmware has a fix for leaking a peer multicast key when a monitor 
> device
> is created.
>
> And I re-ordered the '4019' firmware images in the Makefile to match the order
> of the others.  No functional change for that reorder.
>
> Signed-off-by: Ben Greear <gree...@candelatech.com>
Tested-by: Rosen Penev <ros...@gmail.com>
> ---
>  package/firmware/ath10k-firmware/Makefile | 58 
> +++
>  1 file changed, 29 insertions(+), 29 deletions(-)
>
> diff --git a/package/firmware/ath10k-firmware/Makefile 
> b/package/firmware/ath10k-firmware/Makefile
> index 0099146..a8c3e7d 100644
> --- a/package/firmware/ath10k-firmware/Makefile
> +++ b/package/firmware/ath10k-firmware/Makefile
> @@ -64,92 +64,92 @@ define Download/ct-firmware-htt
>URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT)
>  endef
>
> -QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-20.bin.lede.001
> +QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-20.bin.lede.006
>  define Download/ath10k-firmware-qca988x-ct
>$(call Download/ct-firmware,QCA988X,)
> -  HASH:=77a57d4e0da5fa1efab64cb36e0363ce49d7b7638bcfd1e8c8e323673c4abef8
> +  HASH:=b28ff3eb10f15033be68bbedc91abcf40f7369cc44da4273e3c0df285c74a4f8
>  endef
>  $(eval $(call Download,ath10k-firmware-qca988x-ct))
>
> -QCA988X_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-20.bin.lede.001
> +QCA988X_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-20.bin.lede.006
>  define Download/ath10k-firmware-qca988x-ct-htt
>$(call Download/ct-firmware-htt,QCA988X,)
> -  HASH:=a1f90d9de19bb148f3e4c6570bf7572cf90c7c6870d0afcf8a87d67114eab701
> +  HASH:=08dd8d339079c9a704cf3f91787cc06a73168a9f57eeb777edaa9cd4194c246c
>  endef
>  $(eval $(call Download,ath10k-firmware-qca988x-ct-htt))
>
>
> -QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-20.bin.lede.001
> +QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-20.bin.lede.006
>  define Download/ath10k-firmware-qca9887-ct
>$(call Download/ct-firmware,QCA9887,ath10k-9887)
> -  HASH:=94081f86e7058083170fe25fa3735026a99fe535890b80ac81b28d0f5e0cc089
> +  HASH:=8d3fd2fb62479efa955e0d0487ca8971409e68b395f3a2df28569ec243bd937d
>  endef
>  $(eval $(call Download,ath10k-firmware-qca9887-ct))
>
> -QCA9887_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-20.bin.lede.001
> +QCA9887_FIRMWARE_FILE_CT_HTT:=firmware-2-ct-full-htt-mgt-community-20.bin.lede.006
>  define Download/ath10k-firmware-qca9887-ct-htt
>$(call Download/ct-firmware-htt,QCA9887,ath10k-9887)
> -  HASH:=f31e5f5f546ef7c104b9526d0a95faf4c291b21e7512a19f624c5a015dee80f1
> +  HASH:=f192b5a8ac4b90d828cace0a2279c02fda689fa936f5154f08df6658d0230e9b
>  endef
>  $(eval $(call Download,ath10k-firmware-qca9887-ct-htt))
>
>
> -QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-10.bin-lede.001
> +QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-10.bin-lede.006
>  define Download/ath10k-firmware-qca99x0-ct
>$(call Download/ct-firmware,QCA99X0,ath10k-10-4)
> -  HASH:=5d0765496982cb504a233395b91407b10b82a334adb928324489c67916f349f1
> +  HASH:=1aa21acab7974651af6c0a2698891fc8792edb5124824fac1587123d3b48df67
>  endef
>  $(eval $(call Download,ath10k-firmware-qca99x0-ct))
>
> -QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-10.bin-lede.001
> +QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-10.bin-lede.006
>  define Download/ath10k-firmware-qca99x0-ct-htt
>$(call Download/ct-firmware-htt,QCA99X0,ath10k-10-4)
> -  HASH:=520f0ecfeba034056a196793d2f0e628d4c89bd1080c6a811fdc3a4b35bfe8d6
> +  HASH:=e3d89c00f194975649b2f41ff5f5ffc34d60c393d15800df6ea56a8ac29a
>  endef
>  $(eval $(call Download,ath10k-firmware-qca99x0-ct-htt))
>
>
> -QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-10.bin-lede.001
> +QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-10.bin-lede.006
>  define Download/ath10k-firmware-qca9984-ct
>$(call Download/ct-firmware,QCA9984,ath10k-9984-10-4)
> -  HASH:=1bb526349182e23be79f73ca4e9761bc0f20b2672efdce9976f31804df750e96
> +  HASH:=f9700cafb4e2cebe8364eb6fe1754eb2c37b1b02a7408ded908ecc78954380a3
>  endef
>  $(eval $(call Download,ath10k-firmware-qca9984-ct))
>
> -QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-10.bin-lede.001
> +QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-10.bin-lede.006
>  define Download/ath10k-firmware-qca9984-ct-htt
>$(call Download/ct-firmware-htt,QCA9984

[LEDE-DEV] [PATCH] mvebu: Get rid of RTC hack for Turris Omnia.

2018-03-25 Thread Rosen Penev
As Solidrun's RTC patch got merged, this hack is no longer needed.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 target/linux/mvebu/base-files/lib/upgrade/sdcard.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh 
b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
index fbf121f33d..a05df834ba 100644
--- a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
+++ b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
@@ -28,7 +28,7 @@ platform_do_upgrade_sdcard() {
fw_setenv openwrt_bootargs 'earlyprintk console=ttyS0,115200 
root=/dev/mmcblk0p2 rootfstype=auto rootwait'
fw_setenv openwrt_mmcload 'setenv bootargs "$openwrt_bootargs 
cfg80211.freg=$regdomain"; fatload mmc 0 0x0100 zImage; fatload mmc 0 
0x0200 armada-385-turris-omnia.dtb'
fw_setenv factory_mmcload 'setenv bootargs "$bootargs 
cfg80211.freg=$regdomain"; btrload mmc 0 0x0100 boot/zImage @; btrload mmc 
0 0x0200 boot/dtb @'
-   fw_setenv mmcboot 'mw 0xf10184a0 0xfd4d4cfa; run 
openwrt_mmcload || run factory_mmcload; bootz 0x0100 - 0x0200'
+   fw_setenv mmcboot 'run openwrt_mmcload || run factory_mmcload; 
bootz 0x0100 - 0x0200'
;;
esac
 
-- 
2.16.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] kernel: Backport net struct reduction from 4.16.

2018-03-24 Thread Rosen Penev
On Fri, Mar 23, 2018 at 3:58 PM, Florian Fainelli  wrote:
> On 03/23/2018 02:53 PM, Mathias Kresin wrote:
>> As long as nobody proves that there is a real performance gain, I don't
>> see a reason to backport the datastruct debloat.
Well, it's supposed to make a difference in routing.
>
> Agreed, it will also make it a tad harder to merge stable kernels with
> these changes applied.
>
> Rosen, if you are willing to start working on improving cache footprint,
> then really start using tools like perf, pahole and whatnot to select
> what the lowest hanging fruit is...
Well, back porting other people's work is easier :).

Since the MIPS platforms are still on 4.9, this is probably pointless anyway.
> --
> Florian

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] kernel: Backport net struct reduction from 4.16.

2018-03-23 Thread Rosen Penev
This patch series shrinks the networking structs in order to reduce cache 
misses. This has performance benefits in routing.

Full details here: 
https://www.netdevconf.org/2.2/slides/miller-datastructurebloat-keynote.pdf

I'm keeping this for kernel 4.14 as it's easier to port.

I have tested this on mvebu for several days with no issues to report. mvebu is 
powerful enough for gigabit routing though.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 .../400-net-dst-rt_next-is-unused.patch|  28 ++
 ...-Move-dn_next-into-decnet-route-structure.patch | 161 +++
 ...t6_next-from-dst_entry-into-ipv6-route-st.patch | 304 
 ...-Create-and-use-new-helper-xfrm_dst_child.patch | 197 +
 ...e-and-use-new-helpers-for-dst-child-acces.patch | 142 ++
 ...rm-Move-child-route-linkage-into-xfrm_dst.patch | 216 ++
 ...6-ipv6-Move-dst-from-into-struct-rt6_info.patch | 211 ++
 ...7-xfrm-Move-dst-path-into-struct-xfrm_dst.patch | 310 +
 ...ge-dst_entry-layout-to-avoid-useless-padd.patch |  96 +++
 ...top-using-dst-next-in-bundle-construction.patch | 197 +
 .../backport-4.14/410-net-Remove-dst-next.patch|  44 +++
 ...jecting-with-source-address-failed-policy.patch |   4 +-
 12 files changed, 1907 insertions(+), 3 deletions(-)
 create mode 100644 
target/linux/generic/backport-4.14/400-net-dst-rt_next-is-unused.patch
 create mode 100644 
target/linux/generic/backport-4.14/401-decnet-Move-dn_next-into-decnet-route-structure.patch
 create mode 100644 
target/linux/generic/backport-4.14/402-ipv6-Move-rt6_next-from-dst_entry-into-ipv6-route-st.patch
 create mode 100644 
target/linux/generic/backport-4.14/403-net-Create-and-use-new-helper-xfrm_dst_child.patch
 create mode 100644 
target/linux/generic/backport-4.14/404-ipsec-Create-and-use-new-helpers-for-dst-child-acces.patch
 create mode 100644 
target/linux/generic/backport-4.14/405-xfrm-Move-child-route-linkage-into-xfrm_dst.patch
 create mode 100644 
target/linux/generic/backport-4.14/406-ipv6-Move-dst-from-into-struct-rt6_info.patch
 create mode 100644 
target/linux/generic/backport-4.14/407-xfrm-Move-dst-path-into-struct-xfrm_dst.patch
 create mode 100644 
target/linux/generic/backport-4.14/408-net-Rearrange-dst_entry-layout-to-avoid-useless-padd.patch
 create mode 100644 
target/linux/generic/backport-4.14/409-xfrm-Stop-using-dst-next-in-bundle-construction.patch
 create mode 100644 
target/linux/generic/backport-4.14/410-net-Remove-dst-next.patch

diff --git 
a/target/linux/generic/backport-4.14/400-net-dst-rt_next-is-unused.patch 
b/target/linux/generic/backport-4.14/400-net-dst-rt_next-is-unused.patch
new file mode 100644
index 00..7355d0af91
--- /dev/null
+++ b/target/linux/generic/backport-4.14/400-net-dst-rt_next-is-unused.patch
@@ -0,0 +1,28 @@
+From bf1b3d8dada83c08d7bb101665a30404bcc855c9 Mon Sep 17 00:00:00 2001
+From: David Miller <da...@davemloft.net>
+Date: Tue, 28 Nov 2017 15:39:59 -0500
+Subject: [PATCH 01/11] net: dst->rt_next is unused.
+
+Delete it.
+
+Signed-off-by: David S. Miller <da...@davemloft.net>
+Reviewed-by: Eric Dumazet <eduma...@google.com>
+---
+ include/net/dst.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/include/net/dst.h b/include/net/dst.h
+index 694c2e6ae618..fe67595b0846 100644
+--- a/include/net/dst.h
 b/include/net/dst.h
+@@ -101,7 +101,6 @@ struct dst_entry {
+   struct lwtunnel_state   *lwtstate;
+   union {
+   struct dst_entry*next;
+-  struct rtable __rcu *rt_next;
+   struct rt6_info *rt6_next;
+   struct dn_route __rcu   *dn_next;
+   };
+-- 
+2.16.2
+
diff --git 
a/target/linux/generic/backport-4.14/401-decnet-Move-dn_next-into-decnet-route-structure.patch
 
b/target/linux/generic/backport-4.14/401-decnet-Move-dn_next-into-decnet-route-structure.patch
new file mode 100644
index 00..58c30b43a1
--- /dev/null
+++ 
b/target/linux/generic/backport-4.14/401-decnet-Move-dn_next-into-decnet-route-structure.patch
@@ -0,0 +1,161 @@
+From afd979df91ffb73588a9aa73a1fe0afa4537067f Mon Sep 17 00:00:00 2001
+From: David Miller <da...@davemloft.net>
+Date: Tue, 28 Nov 2017 15:40:08 -0500
+Subject: [PATCH 02/11] decnet: Move dn_next into decnet route structure.
+
+Signed-off-by: David S. Miller <da...@davemloft.net>
+Reviewed-by: Eric Dumazet <eduma...@google.com>
+---
+ include/net/dn_route.h |  1 +
+ include/net/dst.h  |  1 -
+ net/decnet/dn_route.c  | 34 ++
+ 3 files changed, 19 insertions(+), 17 deletions(-)
+
+diff --git a/include/net/dn_route.h b/include/net/dn_route.h
+index 55df9939bca2..342d2503cba5 100644
+--- a/include/net/dn_route.h
 b/include/net/dn_route.h
+@@ -69,6 +69,7 @@ int dn_route_rcv(struct sk_buff *skb, struct net_device *dev,
+  */
+ struct dn_route {
+   struct dst_entry dst;
++  struct dn_route _

Re: [LEDE-DEV] [PATCH v2] Kernel: bump 4.14 to 4.14.29

2018-03-23 Thread Rosen Penev
On Thu, Mar 22, 2018 at 10:34 AM, Stijn Segers <f...@volatilesystems.org> wrote:
> Right patch version this time, sorry!
>
> * Patch 180-usb-xhci-add-support-for-performing-fake-doorbell.patch had to be 
> adjusted slightly because of upstream adapted code.
> * Refreshed patches.
>
> Compile-tested: ramips/mt7621, x86/64
> Run-tested: ramips/mt7621, x86/64
> Signed-off-by: Stijn Segers <f...@volatilesystems.org>
Tested-by: Rosen Penev <ros...@gmail.com>
> ---
>  include/kernel-version.mk  |  4 +-
>  ...d-firmware-loader-for-uPD720201-and-uPD72.patch |  6 +-
>  .../802-usb-xhci-force-msi-renesas-xhci.patch  |  4 +-
>  ...-add-support-for-performing-fake-doorbell.patch |  4 +-
>  .../hack-4.14/661-use_fq_codel_by_default.patch|  2 +-
>  .../hack-4.14/702-phy_add_aneg_done_function.patch |  2 +-
>  .../generic/hack-4.14/904-debloat_dma_buf.patch|  4 +-
>  ...180-net-phy-at803x-add-support-for-AT8032.patch |  8 +-
>  .../generic/pending-4.14/701-phy_extension.patch   |  2 +-
>  ...t-phy-at803x-allow-to-configure-via-pdata.patch |  8 +-
>  .../735-net-phy-at803x-fix-at8033-sgmii-mode.patch |  2 +-
>  ...e-standard-large-page-OOB-layout-when-usi.patch |  2 +-
>  ...se-usual-return-values-for-the-erase-hook.patch |  4 +-
>  ...ovide-several-helpers-to-do-common-NAND-o.patch | 88 
> +++---
>  .../patches-4.14/0052-net-phy-add-FC.patch |  2 +-
>  .../patches-4.14/0034-NET-multi-phy-support.patch  |  6 +-
>  .../0039-mtd-add-mt7621-nand-support.patch |  2 +-
>  .../0040-nand-hack-restore-write_page.patch|  4 +-
>  .../linux/ramips/patches-4.14/0040-nand-hack.patch |  8 +-
>  19 files changed, 81 insertions(+), 81 deletions(-)
>
> diff --git a/include/kernel-version.mk b/include/kernel-version.mk
> index b289e03c7c..9a02bcb9f6 100644
> --- a/include/kernel-version.mk
> +++ b/include/kernel-version.mk
> @@ -5,12 +5,12 @@ LINUX_RELEASE?=1
>  LINUX_VERSION-3.18 = .71
>  LINUX_VERSION-4.4 = .121
>  LINUX_VERSION-4.9 = .87
> -LINUX_VERSION-4.14 = .27
> +LINUX_VERSION-4.14 = .29
>
>  LINUX_KERNEL_HASH-3.18.71 = 
> 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
>  LINUX_KERNEL_HASH-4.4.121 = 
> 44a88268b5088dc326b30c9b9133ac35a9a200b636b7268d08f32abeae6ca729
>  LINUX_KERNEL_HASH-4.9.87 = 
> 7ac9f6af69dc5a7e38bf35cc3fa889e3a4b22504a85f57fdc87734a8abe4c917
> -LINUX_KERNEL_HASH-4.14.27 = 
> 0911a449c71a06c7232ece07dfcc041bd07efaf7e67799b9e2d0cf4bd9a028ea
> +LINUX_KERNEL_HASH-4.14.29 = 
> 18f67b70ce9922c7ef95791bfd91f46e52ee9eb3e310978bb6ef6d2e93c14619
>
>  remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1
>  sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst 
> -,_,$(subst /,_,$(1)))
> diff --git 
> a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
>  
> b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
> index 144a06970f..49304ef870 100644
> --- 
> a/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
> +++ 
> b/target/linux/apm821xx/patches-4.14/801-usb-xhci-add-firmware-loader-for-uPD720201-and-uPD72.patch
> @@ -44,7 +44,7 @@ Signed-off-by: Christian Lamparter <chunk...@googlemail.com>
>
>   #include "xhci.h"
>   #include "xhci-trace.h"
> -@@ -238,6 +240,458 @@ static void xhci_pme_acpi_rtd3_enable(st
> +@@ -241,6 +243,458 @@ static void xhci_pme_acpi_rtd3_enable(st
>   static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { }
>   #endif /* CONFIG_ACPI */
>
> @@ -503,7 +503,7 @@ Signed-off-by: Christian Lamparter 
> <chunk...@googlemail.com>
>   /* called during probe() after chip reset completes */
>   static int xhci_pci_setup(struct usb_hcd *hcd)
>   {
> -@@ -273,6 +727,22 @@ static int xhci_pci_probe(struct pci_dev
> +@@ -276,6 +730,22 @@ static int xhci_pci_probe(struct pci_dev
> struct hc_driver *driver;
> struct usb_hcd *hcd;
>
> @@ -526,7 +526,7 @@ Signed-off-by: Christian Lamparter 
> <chunk...@googlemail.com>
> driver = (struct hc_driver *)id->driver_data;
>
> /* For some HW implementation, a XHCI reset is just not enough... */
> -@@ -337,6 +807,16 @@ static void xhci_pci_remove(struct pci_d
> +@@ -340,6 +810,16 @@ static void xhci_pci_remove(struct pci_d
>   {
> struct xhci_hcd *xhci;
>
> diff --git 
> a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
>  
> b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
> index ec97f16e27..ae05d291f3 100644
> --- 
> a/targ

Re: [LEDE-DEV] [PATCH] ath10k-ct: fix module depends

2018-03-22 Thread Rosen Penev
There are 4 other patches on patchwork that have not been merged for
some reason. They conflict with this patch.

On Thu, Mar 22, 2018 at 3:30 PM, Hauke Mehrtens  wrote:
> PKG_EXTMOD_SUBDIRS should be set to the sub directory where the kernel
> module gets build in, for the ath10k-ct driver this changed in commit
> 3888e77c1c68 from ath10k to ath10k-4.13. Without this fix the depends
> line of the ath10*.ko modules is empty and the kernel module load system
> will not automatically load the depended modules like mac80211.
>
> Fixes: 3888e77c1c68 ("ath10k-ct driver: use dma_alloc_coherent, 4.13 based 
> driver")
> Fixes: 23a388fe41ec ("ath10k-ct: Force loading mac80211 and ath modules.")
> Signed-off-by: Hauke Mehrtens 
> ---
>  package/kernel/ath10k-ct/Makefile | 10 +-
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/package/kernel/ath10k-ct/Makefile 
> b/package/kernel/ath10k-ct/Makefile
> index 8f9a8dd70f..fb2b8fafba 100644
> --- a/package/kernel/ath10k-ct/Makefile
> +++ b/package/kernel/ath10k-ct/Makefile
> @@ -12,15 +12,15 @@ PKG_SOURCE_DATE:=2017-06-13
>  PKG_SOURCE_VERSION:=e1edd74d5f0c5291b0be72c81033e74e267929d4
>  
> PKG_MIRROR_HASH:=945dc7110017a80c33cac20d9d2a9beda0a6a98b50178319403568098534e60a
>
> -PKG_MAINTAINER:=Ben Greear 
> -PKG_BUILD_PARALLEL:=1
> -PKG_EXTMOD_SUBDIRS:=ath10k
> -
>  # Build the 4.13 ath10k-ct driver version.  Other options are "-4.9", or
>  # leave un-defined for 4.7 kernel.  Probably this should match as closely as
>  # possible to whatever mac80211 backports version is being used.
>  CT_KVER="-4.13"
>
> +PKG_MAINTAINER:=Ben Greear 
> +PKG_BUILD_PARALLEL:=1
> +PKG_EXTMOD_SUBDIRS:=ath10k$(CT_KVER)
> +
>  STAMP_CONFIGURED_DEPENDS := 
> $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h
>
>  include $(INCLUDE_DIR)/kernel.mk
> @@ -33,7 +33,7 @@ define KernelPackage/ath10k-ct
>FILES:=\
> $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_pci.ko \
> $(PKG_BUILD_DIR)/ath10k$(CT_KVER)/ath10k_core.ko
> -  AUTOLOAD:=$(call AutoProbe,mac80211 ath ath10k_pci)
> +  AUTOLOAD:=$(call AutoProbe,ath10k_pci)
>  endef
>
>  NOSTDINC_FLAGS = \
> --
> 2.11.0
>
>
> ___
> 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] libtool: Update to 2.4.6

2018-03-19 Thread Rosen Penev
Compile tested on mvebu.

Signed-off-by: Rosen Penev <ros...@gmail.com>
v2: Remove upstreamed patch
---
 package/libs/libtool/Makefile  |  6 +++---
 package/libs/libtool/patches/160-passthrough-ssp.patch | 11 ---
 2 files changed, 3 insertions(+), 14 deletions(-)
 delete mode 100644 package/libs/libtool/patches/160-passthrough-ssp.patch

diff --git a/package/libs/libtool/Makefile b/package/libs/libtool/Makefile
index 8cef09f78a..37b91dce7a 100644
--- a/package/libs/libtool/Makefile
+++ b/package/libs/libtool/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtool
-PKG_VERSION:=2.4
-PKG_RELEASE:=2
+PKG_VERSION:=2.4.6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/libtool
-PKG_HASH:=afcce660d3dc54c63a0a5ba3cf05272239dc3c54bbeba20f6bad250f9dc007ae
+PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f
 
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=COPYING
diff --git a/package/libs/libtool/patches/160-passthrough-ssp.patch 
b/package/libs/libtool/patches/160-passthrough-ssp.patch
deleted file mode 100644
index 6fcbe68000..00
--- a/package/libs/libtool/patches/160-passthrough-ssp.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 a/libltdl/config/ltmain.m4sh
-+++ b/libltdl/config/ltmain.m4sh
-@@ -5051,7 +5051,7 @@ func_mode_link ()
-   # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
-   -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-   
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
--  -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
-+  -O*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*)
- func_quote_for_eval "$arg"
-   arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
-- 
2.16.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] curl: Update to 7.59

2018-03-18 Thread Rosen Penev
Compile tested on ar71xx.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/network/utils/curl/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/utils/curl/Makefile 
b/package/network/utils/curl/Makefile
index 0cc6b03ad1..1011dcc786 100644
--- a/package/network/utils/curl/Makefile
+++ b/package/network/utils/curl/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=curl
-PKG_VERSION:=7.58.0
+PKG_VERSION:=7.59.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
@@ -16,7 +16,7 @@ PKG_SOURCE_URL:=https://dl.uxnr.de/mirror/curl/ \
http://curl.mirror.anstey.ca/ \
http://curl.askapache.com/download/ \
https://curl.haxx.se/download/
-PKG_HASH:=1cb081f97807c01e3ed747b6e1c9fee7a01cb10048f1cd0b5f56cfe0209de731
+PKG_HASH:=b5920ffd6a8c95585fb95070e0ced38322790cb335c39d0dab852d12e157b5a0
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
-- 
2.16.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] libtool: Update to 2.4.6

2018-03-18 Thread Rosen Penev
Compile tested on ar71xx.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/libs/libtool/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/libtool/Makefile b/package/libs/libtool/Makefile
index 8cef09f78a..37b91dce7a 100644
--- a/package/libs/libtool/Makefile
+++ b/package/libs/libtool/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libtool
-PKG_VERSION:=2.4
-PKG_RELEASE:=2
+PKG_VERSION:=2.4.6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/libtool
-PKG_HASH:=afcce660d3dc54c63a0a5ba3cf05272239dc3c54bbeba20f6bad250f9dc007ae
+PKG_HASH:=7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f
 
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=COPYING
-- 
2.16.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] ethtool: Update to 4.15.

2018-03-18 Thread Rosen Penev
Contains kernel 4.14 updates. Compile tested on mvebu.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/network/utils/ethtool/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/utils/ethtool/Makefile 
b/package/network/utils/ethtool/Makefile
index b36962601f..b378ce2af9 100644
--- a/package/network/utils/ethtool/Makefile
+++ b/package/network/utils/ethtool/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ethtool
-PKG_VERSION:=4.13
+PKG_VERSION:=4.15
 PKG_RELEASE:=1
 
 PKG_MAINTAINER:=Felix Fietkau <n...@nbd.name>
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
-PKG_HASH:=b7c1a380007d30eaf261a63b3cfc000f9d93f9eb7626dcd48b5d2a733af99cba
+PKG_HASH:=71f7fd32483ffdc7c6c4d882e230714eb101df0a46cbe396dbeb8ac78f1ef91a
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
-- 
2.16.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] ncurses: Update to 6.1.

2018-03-18 Thread Rosen Penev
Compile tested on ar71xx.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/libs/ncurses/Makefile  |  6 +--
 .../patches/100-ncurses-5.6-20080112-urxvt.patch   |  2 +-
 .../patches/101-ncurses-5.6-20080628-kbs.patch | 46 +++---
 .../ncurses/patches/102-ncurses-5.9-gcc-5.patch|  2 +-
 package/libs/ncurses/patches/500-cross.patch   | 11 --
 package/libs/ncurses/patches/900-terminfo.patch| 18 -
 6 files changed, 37 insertions(+), 48 deletions(-)
 delete mode 100644 package/libs/ncurses/patches/500-cross.patch

diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile
index 26fabeef77..95f05fa711 100644
--- a/package/libs/ncurses/Makefile
+++ b/package/libs/ncurses/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ncurses
-PKG_VERSION:=6.0
+PKG_VERSION:=6.1
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@GNU/ncurses
-PKG_HASH:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260
+PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
+PKG_HASH:=aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=README
diff --git a/package/libs/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch 
b/package/libs/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch
index 49537b94ee..ed7b2ee448 100644
--- a/package/libs/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch
+++ b/package/libs/ncurses/patches/100-ncurses-5.6-20080112-urxvt.patch
@@ -1,6 +1,6 @@
 --- a/misc/terminfo.src
 +++ b/misc/terminfo.src
-@@ -5214,6 +5214,172 @@ rxvt-cygwin-native|rxvt terminal emulato
+@@ -5875,6 +5875,172 @@ rxvt-cygwin-native|rxvt terminal emulato
  rxvt-16color|rxvt with 16 colors like aixterm,
ncv#32, use=ibm+16color, use=rxvt,
  
diff --git a/package/libs/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch 
b/package/libs/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch
index 394b6f9fde..cb7d5a1582 100644
--- a/package/libs/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch
+++ b/package/libs/ncurses/patches/101-ncurses-5.6-20080628-kbs.patch
@@ -1,52 +1,52 @@
 --- a/misc/terminfo.src
 +++ b/misc/terminfo.src
-@@ -3955,6 +3955,7 @@ xterm-xfree86|xterm terminal emulator (X
+@@ -4327,6 +4328,7 @@ xterm-xfree86|xterm terminal emulator (X
  # This version reflects the current xterm features.
  xterm-new|modern xterm terminal emulator,
npc,
 +  kbs=\177,
indn=\E[%p1%dS, kb2=\EOE, kcbt=\E[Z, kent=\EOM,
-   rin=\E[%p1%dT, use=xterm+pcfkeys, use=xterm+tmux,
-   use=xterm-basic,
-@@ -5048,6 +5049,7 @@ mlterm-256color|mlterm 3.0 with xterm 25
+   rin=\E[%p1%dT, use=ansi+rep, use=ecma+strikeout,
+   use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm+tmux,
+@@ -5703,6 +5704,7 @@ mlterm-256color|mlterm 3.0 with xterm 25
  rxvt-basic|rxvt terminal base (X Window System),
OTbs, am, bce, eo, mir, msgr, xenl, xon, XT,
cols#80, it#8, lines#24,
 +  kbs=\177,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
-   clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
-@@ -5058,7 +5060,7 @@ rxvt-basic|rxvt terminal base (X Window
-   enacs=\E(B\E)0, flash=\E[?5h\E[?5l, home=\E[H, ht=^I,
-   hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L,
-   ind=^J, is1=\E[?47l\E=\E[?1l,
+   clear=\E[H\E[2J, cnorm=\E[?25h, cr=\r,
+@@ -5713,7 +5713,7 @@ rxvt-basic|rxvt terminal base (X Window System),
+   enacs=\E(B\E)0, flash=\E[?5h$<100/>\E[?5l, home=\E[H,
+   ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
+   il1=\E[L, ind=\n, is1=\E[?47l\E=\E[?1l,
 -  is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=^H,
 +  is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l,
kcbt=\E[Z, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E>, rmso=\E[27m,
rmul=\E[24m,
-@@ -6118,6 +6120,7 @@ eterm-color|Emacs term.el terminal emula
+@@ -6883,6 +6885,7 @@ eterm-color|Emacs term.el terminal emula
  screen|VT 100/ANSI X3.64 virtual terminal,
OTbs, OTpt, am, km, mir, msgr, xenl, G0,
colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, U8#1,
 +  kbs=\177,
-   acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+   acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy
+yzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
-   clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
-@@ -6128,7 +6131,7 @@ screen|VT 100/ANSI X3.64 virtual termina
+@@ -6894,7 +6897,7 @@ screen|VT 100/ANSI X3.64 virtual termina
dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
-   enacs=\E(B\E)0, flash=\Eg, home=\E[H, ht=^I, hts=\EH,
-   ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=^J, is2=\E)0,
--  kbs=^H, kcbt=\E[Z, kcub1=\EOD, kc

Re: [LEDE-DEV] [PATCH 2/2] mvebu: Add Solidrun RTC init patch.

2018-03-17 Thread Rosen Penev
On Sat, Mar 17, 2018 at 6:24 AM, Hauke Mehrtens <ha...@hauke-m.de> wrote:
> On 03/16/2018 01:53 AM, Rosen Penev wrote:
>> Some boards like the Turris Omnia have an RTC chip that does not get 
>> initialized. Initializing the RTC at the driver level helps get rid of 
>> bootloader hacks that write special register values.
>
> Please line break your commit message.
>
> Will you send this patch upstream?
No. I have no experience with upstream at all.
>
> Is the RTC in the turris omnia battery backed and is a crystal connected
> to it? There are a lot of problems with the RTC in the Linksys devices.
Yes there is a crystal and a a battery. As of 62 hours, it is keeping
time correctly.
>
> Hauke
>
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>>  .../mvebu/patches-4.14/421-rtc-initialize.patch| 70 
>> ++
>>  1 file changed, 70 insertions(+)
>>  create mode 100644 target/linux/mvebu/patches-4.14/421-rtc-initialize.patch
>>
>> diff --git a/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch 
>> b/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch
>> new file mode 100644
>> index 00..b6b96c985c
>> --- /dev/null
>> +++ b/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch
>> @@ -0,0 +1,70 @@
>> +--- a/drivers/rtc/rtc-armada38x.c2017-12-11 18:32:22.329841869 +0200
>>  b/drivers/rtc/rtc-armada38x.c2017-12-11 19:01:40.677854645 +0200
>> +@@ -30,6 +30,9 @@
>> + #define RTC_IRQ_FREQ_1HZBIT(2)
>> + #define RTC_CCR 0x18
>> + #define RTC_CCR_MODEBIT(15)
>> ++#define RTC_CCR_NORMAL_PPB  0x2000
>> ++#define RTC_TEST_CONF   0x1c
>> ++#define RTC_TEST_CONF_MASK  0xff
>> +
>> + #define RTC_TIME0xC
>> + #define RTC_ALARM1  0x10
>> +@@ -91,6 +94,7 @@
>> + void (*clear_isr)(struct armada38x_rtc *rtc);
>> + void (*unmask_interrupt)(struct armada38x_rtc *rtc);
>> + u32 alarm;
>> ++void (*init_rtc)(struct armada38x_rtc *rtc);
>> + };
>> +
>> + /*
>> +@@ -202,6 +206,23 @@
>> + writel(val | SOC_RTC_ALARM1_MASK, rtc->regs_soc + SOC_RTC_INTERRUPT);
>> + }
>> +
>> ++static void armada38x_rtc_init(struct armada38x_rtc *rtc)
>> ++{
>> ++u32 reg;
>> ++
>> ++/* Test RTC test configuration register bits [7:0] */
>> ++reg = readl(rtc->regs + RTC_TEST_CONF);
>> ++/* If bits [7:0] are non-zero, assume RTC was uninitialized */
>> ++if (reg & RTC_TEST_CONF_MASK) {
>> ++rtc_delayed_write(0, rtc, RTC_TEST_CONF);
>> ++rtc_delayed_write(0, rtc, RTC_TIME);
>> ++rtc_delayed_write((RTC_STATUS_ALARM1 | RTC_STATUS_ALARM2),
>> ++rtc, RTC_STATUS);
>> ++rtc_delayed_write(RTC_CCR_NORMAL_PPB, rtc, RTC_CCR);
>> ++}
>> ++return;
>> ++}
>> ++
>> + static void armada8k_clear_isr(struct armada38x_rtc *rtc)
>> + {
>> + writel(RTC_8K_ALARM2, rtc->regs_soc + RTC_8K_ISR);
>> +@@ -464,6 +485,7 @@
>> + .clear_isr = armada38x_clear_isr,
>> + .unmask_interrupt = armada38x_unmask_interrupt,
>> + .alarm = ALARM1,
>> ++.init_rtc = armada38x_rtc_init,
>> + };
>> +
>> + static const struct armada38x_rtc_data armada8k_data = {
>> +@@ -558,6 +580,17 @@
>> + dev_err(>dev, "Failed to register RTC device: %d\n", 
>> ret);
>> + return ret;
>> + }
>> ++
>> ++/*
>> ++ * Try to detect if RTC is in uninitialized state.
>> ++ * It is not definitive to know if the RTC is in an uninialized state 
>> or not,
>> ++ * but the following call will read some bits in the RTC unit and 
>> guess if
>> ++ * if it's in that state, and accordingly set it to sane default 
>> values.
>> ++ */
>> ++if (rtc->data->init_rtc) {
>> ++rtc->data->init_rtc(rtc);
>> ++}
>> ++
>> + return 0;
>> + }
>> +
>>
>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/2] mvebu: Backport RTC trimming support.

2018-03-15 Thread Rosen Penev
This enables a higher precision mode for the RTC.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 .../patches-4.14/420-rtc-trimming-support.patch| 145 +
 1 file changed, 145 insertions(+)
 create mode 100644 
target/linux/mvebu/patches-4.14/420-rtc-trimming-support.patch

diff --git a/target/linux/mvebu/patches-4.14/420-rtc-trimming-support.patch 
b/target/linux/mvebu/patches-4.14/420-rtc-trimming-support.patch
new file mode 100644
index 00..43d9857336
--- /dev/null
+++ b/target/linux/mvebu/patches-4.14/420-rtc-trimming-support.patch
@@ -0,0 +1,145 @@
+commit f94ffbc2c2a4128c4412bb483d0807722dfb682b
+Author: Russell King <rmk+ker...@armlinux.org.uk>
+Date:   Fri Sep 29 11:23:31 2017 +0100
+
+rtc: armada38x: add support for trimming the RTC
+
+Add support for trimming the RTC using the offset mechanism.  This RTC
+supports two modes: low update mode and high update mode.  Low update
+mode has finer precision than high update mode, so we use the low mode
+where possible.
+
+Signed-off-by: Russell King <rmk+ker...@armlinux.org.uk>
+Signed-off-by: Alexandre Belloni <alexandre.bell...@free-electrons.com>
+
+diff --git a/drivers/rtc/rtc-armada38x.c b/drivers/rtc/rtc-armada38x.c
+index 21f355c..1e4978c 100644
+--- a/drivers/rtc/rtc-armada38x.c
 b/drivers/rtc/rtc-armada38x.c
+@@ -28,6 +28,8 @@
+ #define RTC_IRQ_AL_EN BIT(0)
+ #define RTC_IRQ_FREQ_EN   BIT(1)
+ #define RTC_IRQ_FREQ_1HZ  BIT(2)
++#define RTC_CCR   0x18
++#define RTC_CCR_MODE  BIT(15)
+ 
+ #define RTC_TIME  0xC
+ #define RTC_ALARM10x10
+@@ -343,18 +345,117 @@ static irqreturn_t armada38x_rtc_alarm_irq(int irq, 
void *data)
+   return IRQ_HANDLED;
+ }
+ 
++/*
++ * The information given in the Armada 388 functional spec is complex.
++ * They give two different formulas for calculating the offset value,
++ * but when considering "Offset" as an 8-bit signed integer, they both
++ * reduce down to (we shall rename "Offset" as "val" here):
++ *
++ *   val = (f_ideal / f_measured - 1) / resolution   where f_ideal = 32768
++ *
++ * Converting to time, f = 1/t:
++ *   val = (t_measured / t_ideal - 1) / resolution   where t_ideal = 1/32768
++ *
++ *   =>  t_measured / t_ideal = val * resolution + 1
++ *
++ * "offset" in the RTC interface is defined as:
++ *   t = t0 * (1 + offset * 1e-9)
++ * where t is the desired period, t0 is the measured period with a zero
++ * offset, which is t_measured above. With t0 = t_measured and t = t_ideal,
++ *   offset = (t_ideal / t_measured - 1) / 1e-9
++ *
++ *   => t_ideal / t_measured = offset * 1e-9 + 1
++ *
++ * so:
++ *
++ *   offset * 1e-9 + 1 = 1 / (val * resolution + 1)
++ *
++ * We want "resolution" to be an integer, so resolution = R * 1e-9, giving
++ *   offset = 1e18 / (val * R + 1e9) - 1e9
++ *   val = (1e18 / (offset + 1e9) - 1e9) / R
++ * with a common transformation:
++ *   f(x) = 1e18 / (x + 1e9) - 1e9
++ *   offset = f(val * R)
++ *   val = f(offset) / R
++ *
++ * Armada 38x supports two modes, fine mode (954ppb) and coarse mode 
(3815ppb).
++ */
++static long armada38x_ppb_convert(long ppb)
++{
++  long div = ppb + 10L;
++
++  return div_s64(100LL + div / 2, div) - 10L;
++}
++
++static int armada38x_rtc_read_offset(struct device *dev, long *offset)
++{
++  struct armada38x_rtc *rtc = dev_get_drvdata(dev);
++  unsigned long ccr, flags;
++  long ppb_cor;
++
++  spin_lock_irqsave(>lock, flags);
++  ccr = rtc->data->read_rtc_reg(rtc, RTC_CCR);
++  spin_unlock_irqrestore(>lock, flags);
++
++  ppb_cor = (ccr & RTC_CCR_MODE ? 3815 : 954) * (s8)ccr;
++  /* ppb_cor + 10L can never be zero */
++  *offset = armada38x_ppb_convert(ppb_cor);
++
++  return 0;
++}
++
++static int armada38x_rtc_set_offset(struct device *dev, long offset)
++{
++  struct armada38x_rtc *rtc = dev_get_drvdata(dev);
++  unsigned long ccr = 0;
++  long ppb_cor, off;
++
++  /*
++   * The maximum ppb_cor is -128 * 3815 .. 127 * 3815, but we
++   * need to clamp the input.  This equates to -484270 .. 488558.
++   * Not only is this to stop out of range "off" but also to
++   * avoid the division by zero in armada38x_ppb_convert().
++   */
++  offset = clamp(offset, -484270L, 488558L);
++
++  ppb_cor = armada38x_ppb_convert(offset);
++
++  /*
++   * Use low update mode where possible, which gives a better
++   * resolution of correction.
++   */
++  off = DIV_ROUND_CLOSEST(ppb_cor, 954);
++  if (off > 127 || off < -128) {
++  ccr = RTC_CCR_MODE;
++  off = DIV_ROUND_CLOSEST(ppb_cor, 3815);
++  }
++
++  /*
++   * Armada 388 requires a bit pattern in bits 14..8 depending on
++   * the sign bit:

[LEDE-DEV] [PATCH 2/2] mvebu: Add Solidrun RTC init patch.

2018-03-15 Thread Rosen Penev
Some boards like the Turris Omnia have an RTC chip that does not get 
initialized. Initializing the RTC at the driver level helps get rid of 
bootloader hacks that write special register values.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 .../mvebu/patches-4.14/421-rtc-initialize.patch| 70 ++
 1 file changed, 70 insertions(+)
 create mode 100644 target/linux/mvebu/patches-4.14/421-rtc-initialize.patch

diff --git a/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch 
b/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch
new file mode 100644
index 00..b6b96c985c
--- /dev/null
+++ b/target/linux/mvebu/patches-4.14/421-rtc-initialize.patch
@@ -0,0 +1,70 @@
+--- a/drivers/rtc/rtc-armada38x.c  2017-12-11 18:32:22.329841869 +0200
 b/drivers/rtc/rtc-armada38x.c  2017-12-11 19:01:40.677854645 +0200
+@@ -30,6 +30,9 @@
+ #define RTC_IRQ_FREQ_1HZ  BIT(2)
+ #define RTC_CCR   0x18
+ #define RTC_CCR_MODE  BIT(15)
++#define RTC_CCR_NORMAL_PPB0x2000
++#define RTC_TEST_CONF 0x1c
++#define RTC_TEST_CONF_MASK  0xff
+ 
+ #define RTC_TIME  0xC
+ #define RTC_ALARM10x10
+@@ -91,6 +94,7 @@
+   void (*clear_isr)(struct armada38x_rtc *rtc);
+   void (*unmask_interrupt)(struct armada38x_rtc *rtc);
+   u32 alarm;
++  void (*init_rtc)(struct armada38x_rtc *rtc);
+ };
+ 
+ /*
+@@ -202,6 +206,23 @@
+   writel(val | SOC_RTC_ALARM1_MASK, rtc->regs_soc + SOC_RTC_INTERRUPT);
+ }
+ 
++static void armada38x_rtc_init(struct armada38x_rtc *rtc)
++{
++  u32 reg;
++  
++  /* Test RTC test configuration register bits [7:0] */
++  reg = readl(rtc->regs + RTC_TEST_CONF);
++  /* If bits [7:0] are non-zero, assume RTC was uninitialized */
++  if (reg & RTC_TEST_CONF_MASK) {
++  rtc_delayed_write(0, rtc, RTC_TEST_CONF);
++  rtc_delayed_write(0, rtc, RTC_TIME);
++  rtc_delayed_write((RTC_STATUS_ALARM1 | RTC_STATUS_ALARM2),
++  rtc, RTC_STATUS);
++  rtc_delayed_write(RTC_CCR_NORMAL_PPB, rtc, RTC_CCR);
++  }
++  return;
++}
++
+ static void armada8k_clear_isr(struct armada38x_rtc *rtc)
+ {
+   writel(RTC_8K_ALARM2, rtc->regs_soc + RTC_8K_ISR);
+@@ -464,6 +485,7 @@
+   .clear_isr = armada38x_clear_isr,
+   .unmask_interrupt = armada38x_unmask_interrupt,
+   .alarm = ALARM1,
++  .init_rtc = armada38x_rtc_init,
+ };
+ 
+ static const struct armada38x_rtc_data armada8k_data = {
+@@ -558,6 +580,17 @@
+   dev_err(>dev, "Failed to register RTC device: %d\n", ret);
+   return ret;
+   }
++
++  /*
++   * Try to detect if RTC is in uninitialized state.
++   * It is not definitive to know if the RTC is in an uninialized state 
or not,
++   * but the following call will read some bits in the RTC unit and guess 
if
++   * if it's in that state, and accordingly set it to sane default values.
++   */
++  if (rtc->data->init_rtc) {
++  rtc->data->init_rtc(rtc);
++  }
++
+   return 0;
+ }
+ 
-- 
2.16.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] uboot-envtools: Change download to git.

2018-03-15 Thread Rosen Penev
Currently, the build system uses an openwrt mirror which does not currently 
workand FTP can be unreliable under several circumstances (Ubuntu 16.04 WSL 
being an example). This change implicitly allows using all the mirrors to 
download.

Changing this to git also allows using .tar.xz archives which are smaller.

Size difference:

10416503 u-boot-2015.10.tar.bz2
8351456 u-boot-2015.10.tar.xz

Signed-off-by: Rosen Penev <ros...@gmail.com>

v2: Change git URL from GitHub to official mirror.
v3: Change URL to HTTPS now that Wolfgang Denke added support.
---
 package/boot/uboot-envtools/Makefile | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index 442cf3fd83..9b1ed6967b 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -12,12 +12,13 @@ PKG_DISTNAME:=u-boot
 PKG_VERSION:=2015.10
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=\
-   http://mirror2.openwrt.org/sources \
-   ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://git.denx.de/u-boot.git
+PKG_SOURCE_VERSION:=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d
+PKG_MIRROR_HASH:=e207d996ebfff7335eed99789e3dcb9da071499f347fcdd86725b9d4dac5a5bb
 
 PKG_BUILD_DEPENDS:=fstools
 
-- 
2.16.2


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] Revert "firmware: ath10k-firmware: update QCA988x firmware to 10.2.4-1.0-00033"

2018-03-15 Thread Rosen Penev
On Sun, Mar 4, 2018 at 3:05 PM, Stefan Lippers-Hollmann <s@gmx.de> wrote:
> Hi
>
> On 2018-03-04, Hauke Mehrtens wrote:
>> On 03/04/2018 06:40 PM, Rosen Penev wrote:
> [...]
>> > On Sun, Mar 4, 2018 at 9:31 AM, Rosen Penev <ros...@gmail.com> wrote:
> [...]
>> I also saw problems with the 10.2.4-1.0-00033 FW on my BT HH5, the
>> ath10k wifi was just not available after some time.
>> I am now trying the FW 10.2.4-1.0-00037, see this commit:
>> https://github.com/kvalo/ath10k-firmware/commit/31695fbc77f81391f579747bb8e51c50a581c3cd
>
> 10.2.4-1.0-00037 has been fine for me on the BT Business Hub 5 Type A
> for the last couple of days, however my uptimes haven't been much higher
> than 3-4 days each (for unrelated reasons).
>
I tested again. It seems while 29 is more stable, I've gotten the
uptime to as low as 20 hours. It seems one of my devices is wrecking
the firmware.

I have since updated to ath10k-ct with its corresponding firmware and
currently have an uptime of 20 hours. Besides the incessant debug span
in dmesg, it seems to be working well.

Basically, this patch can be dropped .
> Regards
> Stefan Lippers-Hollmann

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] usbutils: Update to version 009.

2018-03-15 Thread Rosen Penev
4 patches were added to revert the libudev changes as the libudev wrapper in 
OpenWrt is not good enough.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/utils/usbutils/Makefile|   8 +-
 .../patches/010-remove-python-usbids.patch |  68 ++
 .../patches/020-revert-removal-of-usb.ids.patch| 897 +
 .../usbutils/patches/030-revert-port-to-hwdb.patch | 549 +
 .../patches/040-add-back-update-usbids.patch   |  77 ++
 5 files changed, 1596 insertions(+), 3 deletions(-)
 create mode 100644 
package/utils/usbutils/patches/010-remove-python-usbids.patch
 create mode 100644 
package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
 create mode 100644 package/utils/usbutils/patches/030-revert-port-to-hwdb.patch
 create mode 100644 
package/utils/usbutils/patches/040-add-back-update-usbids.patch

diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile
index 7f798954ae..3fbc4e0b50 100644
--- a/package/utils/usbutils/Makefile
+++ b/package/utils/usbutils/Makefile
@@ -8,15 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=usbutils
-PKG_VERSION:=007
-PKG_RELEASE:=7
+PKG_VERSION:=009
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
-PKG_HASH:=7593a01724bbc0fd9fe48e62bc721ceb61c76654f1d7b231b3c65f6dfbbaefa4
+PKG_HASH:=8bbff0e54cb5f65a52be4feb9162fc0b022a97eb841b44784f7a89a9ea567160
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
+PKG_FIXUP:=autoreconf
+
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
diff --git a/package/utils/usbutils/patches/010-remove-python-usbids.patch 
b/package/utils/usbutils/patches/010-remove-python-usbids.patch
new file mode 100644
index 00..19e3cc1dd3
--- /dev/null
+++ b/package/utils/usbutils/patches/010-remove-python-usbids.patch
@@ -0,0 +1,68 @@
+From a1c2fd7bbd5b2e26f8f752fd3386a953b3b1ec37 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <ros...@gmail.com>
+Date: Fri, 9 Mar 2018 10:31:09 -0800
+Subject: [PATCH] Revert "substitute usb.id location in lsusb Python script"
+
+This reverts commit 199756013624bfa497865eb498bf7331eb07ef56.
+---
+ Makefile.am | 7 +--
+ lsusb.py.in => lsusb.py | 4 ++--
+ 3 files changed, 3 insertions(+), 9 deletions(-)
+ rename lsusb.py.in => lsusb.py (99%)
+ mode change 100644 => 100755
+
+diff --git a/Makefile.am b/Makefile.am
+index b18ff69..67def60 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -39,13 +39,9 @@ EXTRA_DIST = \
+   lsusb.8.in \
+   usb-devices.1.in \
+   usb-devices \
+-  lsusb.py.in \
++  lsusb.py \
+   usbutils.pc.in
+ 
+-lsusb.py: $(srcdir)/lsusb.py.in
+-  sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
+-  chmod 755 $@
+-
+ lsusb.8: $(srcdir)/lsusb.8.in
+   sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
+ 
+@@ -59,7 +55,6 @@ usbutils.pc: $(srcdir)/usbutils.pc.in
+   sed 's|@usbids@|$(datadir)/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@
+ 
+ DISTCLEANFILES = \
+-  lsusb.py \
+   lsusb.8 \
+   usb-devices.1 \
+   usbutils.pc
+diff --git a/lsusb.py.in b/lsusb.py
+old mode 100644
+new mode 100755
+similarity index 99%
+rename from lsusb.py.in
+rename to lsusb.py
+index db2e1e0..aa410fc
+--- a/lsusb.py.in
 b/lsusb.py
+@@ -1,5 +1,5 @@
+ #!/usr/bin/env python
+-# lsusb-VERSION.py
++# lsusb.py
+ # Displays your USB devices in reasonable form.
+ # (c) Kurt Garloff <garl...@suse.de>, 2/2009, GPL v2 or v3.
+ # (c) Kurt Garloff <k...@garloff.de>, 9/2013, GPL v2 or v3.
+@@ -18,7 +18,7 @@ warnsort = False
+ showeps = False
+ 
+ prefix = "/sys/bus/usb/devices/"
+-usbids = "@usbids@"
++usbids = "/usr/share/usb.ids"
+ 
+ esc = chr(27)
+ norm = esc + "[0;0m"
+-- 
+2.16.2
+
diff --git a/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch 
b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
new file mode 100644
index 00..bdf9f9f7d4
--- /dev/null
+++ b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
@@ -0,0 +1,897 @@
+From 2bfca703b324e21aee2fabbe4f998aa663f03a15 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <ros...@gmail.com>
+Date: Fri, 9 Mar 2018 10:31:24 -0800
+Subject: [PATCH] Revert "drop dependency on usb.ids"
+
+This reverts commit 5d7ea40bc94cbf3069a25beba3146de13bcdcf02.
+
+commit 5d7ea40bc94cbf3069a25beba3146de13bcdcf02
+Author: Tom Gundersen <t...@jklm.no>
+Date:   Wed Sep 4 14:47:08 2013 +0200
+
+drop dependency on usb.ids
+
+Also remove usb.ids from the repository. [Note that these were probably
+never used by distributions regarless, as most distros ship the usb.ids
+directly from upstream.]
+
+Hardcode the usb-spec information that used to be in usb.ids,
+but which was not moved to hwdb.
+
+Increase the size of tha hash table from 16 to

Re: [LEDE-DEV] [PATCH] usbutils: Update to version 009.

2018-03-15 Thread Rosen Penev
On Wed, Mar 14, 2018 at 11:59 PM, Bjørn Mork  wrote:
> Great!
>
> Note that the OpenWrt usbreset utility has been included in this version
> of usbutils.  usbreset is currently packaged separately with its source.
> Maybe consider merging the two source packages and start building
> usbreset as part of the usbutils package?
I'll ask jow what he thinks about doing so. Contingent on this getting
merged though. No idea if nbd wants this or the monstrosity that is
udev.
>
>
>
> Bjørn
>
> ___
> 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


Re: [LEDE-DEV] [PATCH] usbutils: Update to version 009.

2018-03-15 Thread Rosen Penev
On Thu, Mar 15, 2018 at 2:26 AM, Karl Palsson <ka...@tweak.net.au> wrote:
>
> Rosen Penev <ros...@gmail.com> wrote:
>> 4 patches were added to revert the libudev changes as the
>> libudev wrapper in OpenWrt is not good enough.
>
> Personally, I'd like to see substantially better descriptions in
> the patches explaining their purpose. The simple "revert "
> and the filename doesn't say much, many of it seems unrelated,
> and _none_ of them talk about libudev!
>
To be fair, I just used git format-patch on individual commits. I can
add the original commit message if needed.

usbutils switched to using hwdb which uses udev instead of a usbids file.
> Cheers,
> Karl P
>
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>>  package/utils/usbutils/Makefile|   8 +-
>>  .../patches/010-remove-python-usbids.patch |  68 ++
>>  .../patches/020-revert-removal-of-usb.ids.patch| 879 
>> +
>>  .../usbutils/patches/030-revert-port-to-hwdb.patch | 529 +
>>  .../patches/040-add-back-update-usbids.patch   |  66 ++
>>  5 files changed, 1547 insertions(+), 3 deletions(-)
>>  create mode 100644 
>> package/utils/usbutils/patches/010-remove-python-usbids.patch
>>  create mode 100644 
>> package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
>>  create mode 100644 
>> package/utils/usbutils/patches/030-revert-port-to-hwdb.patch
>>  create mode 100644 
>> package/utils/usbutils/patches/040-add-back-update-usbids.patch
>>
>> diff --git a/package/utils/usbutils/Makefile
>> b/package/utils/usbutils/Makefile index 7f798954ae..3fbc4e0b50
>> 100644
>> --- a/package/utils/usbutils/Makefile
>> +++ b/package/utils/usbutils/Makefile
>> @@ -8,15 +8,17 @@
>>  include $(TOPDIR)/rules.mk
>>
>>  PKG_NAME:=usbutils
>> -PKG_VERSION:=007
>> -PKG_RELEASE:=7
>> +PKG_VERSION:=009
>> +PKG_RELEASE:=1
>>
>>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
>>  PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
>> -PKG_HASH:=7593a01724bbc0fd9fe48e62bc721ceb61c76654f1d7b231b3c65f6dfbbaefa4
>> +PKG_HASH:=8bbff0e54cb5f65a52be4feb9162fc0b022a97eb841b44784f7a89a9ea567160
>>  PKG_LICENSE:=GPL-2.0
>>  PKG_LICENSE_FILES:=COPYING
>>
>> +PKG_FIXUP:=autoreconf
>> +
>>  PKG_BUILD_PARALLEL:=1
>>  PKG_INSTALL:=1
>>
>> diff --git
>> a/package/utils/usbutils/patches/010-remove-python-usbids.patch
>> b/package/utils/usbutils/patches/010-remove-python-usbids.patch
>> new file mode 100644 index 00..19e3cc1dd3
>> --- /dev/null
>> +++ b/package/utils/usbutils/patches/010-remove-python-usbids.patch
>> @@ -0,0 +1,68 @@
>> +From a1c2fd7bbd5b2e26f8f752fd3386a953b3b1ec37 Mon Sep 17
>> 00:00:00 2001 +From: Rosen Penev <ros...@gmail.com> +Date: Fri,
>> 9 Mar 2018 10:31:09 -0800 +Subject: [PATCH] Revert "substitute
>> usb.id location in lsusb Python script"
>> +
>> +This reverts commit 199756013624bfa497865eb498bf7331eb07ef56.
>> +---
>> + Makefile.am | 7 +--
>> + lsusb.py.in => lsusb.py | 4 ++--
>> + 3 files changed, 3 insertions(+), 9 deletions(-)
>> + rename lsusb.py.in => lsusb.py (99%)
>> + mode change 100644 => 100755
>> +
>> +diff --git a/Makefile.am b/Makefile.am
>> +index b18ff69..67def60 100644
>> +--- a/Makefile.am
>>  b/Makefile.am
>> +@@ -39,13 +39,9 @@ EXTRA_DIST = \
>> + lsusb.8.in \
>> + usb-devices.1.in \
>> + usb-devices \
>> +-lsusb.py.in \
>> ++lsusb.py \
>> + usbutils.pc.in
>> +
>> +-lsusb.py: $(srcdir)/lsusb.py.in
>> +-sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
>> +-chmod 755 $@
>> +-
>> + lsusb.8: $(srcdir)/lsusb.8.in
>> + sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
>> +
>> +@@ -59,7 +55,6 @@ usbutils.pc: $(srcdir)/usbutils.pc.in
>> + sed 's|@usbids@|$(datadir)/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@
>> +
>> + DISTCLEANFILES = \
>> +-lsusb.py \
>> + lsusb.8 \
>> + usb-devices.1 \
>> + usbutils.pc
>> +diff --git a/lsusb.py.in b/lsusb.py
>> +old mode 100644
>> +new mode 100755
>> +similarity index 99%
>> +rename from lsusb.py.in
>> +rename to lsusb.py
>> +index db2e1e0..aa410fc
>> +--- a/lsusb.py.in
>>  b/lsusb.py
>> +@@ -1,5 +1,5 @@
>> + #!/usr/bin/env python
>> +-# lsusb-VERSION.py
>> ++# lsusb.py
>&g

[LEDE-DEV] [PATCH] usbutils: Update to version 009.

2018-03-14 Thread Rosen Penev
4 patches were added to revert the libudev changes as the libudev wrapper in 
OpenWrt is not good enough.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/utils/usbutils/Makefile|   8 +-
 .../patches/010-remove-python-usbids.patch |  68 ++
 .../patches/020-revert-removal-of-usb.ids.patch| 879 +
 .../usbutils/patches/030-revert-port-to-hwdb.patch | 529 +
 .../patches/040-add-back-update-usbids.patch   |  66 ++
 5 files changed, 1547 insertions(+), 3 deletions(-)
 create mode 100644 
package/utils/usbutils/patches/010-remove-python-usbids.patch
 create mode 100644 
package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
 create mode 100644 package/utils/usbutils/patches/030-revert-port-to-hwdb.patch
 create mode 100644 
package/utils/usbutils/patches/040-add-back-update-usbids.patch

diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile
index 7f798954ae..3fbc4e0b50 100644
--- a/package/utils/usbutils/Makefile
+++ b/package/utils/usbutils/Makefile
@@ -8,15 +8,17 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=usbutils
-PKG_VERSION:=007
-PKG_RELEASE:=7
+PKG_VERSION:=009
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils
-PKG_HASH:=7593a01724bbc0fd9fe48e62bc721ceb61c76654f1d7b231b3c65f6dfbbaefa4
+PKG_HASH:=8bbff0e54cb5f65a52be4feb9162fc0b022a97eb841b44784f7a89a9ea567160
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
 
+PKG_FIXUP:=autoreconf
+
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
diff --git a/package/utils/usbutils/patches/010-remove-python-usbids.patch 
b/package/utils/usbutils/patches/010-remove-python-usbids.patch
new file mode 100644
index 00..19e3cc1dd3
--- /dev/null
+++ b/package/utils/usbutils/patches/010-remove-python-usbids.patch
@@ -0,0 +1,68 @@
+From a1c2fd7bbd5b2e26f8f752fd3386a953b3b1ec37 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <ros...@gmail.com>
+Date: Fri, 9 Mar 2018 10:31:09 -0800
+Subject: [PATCH] Revert "substitute usb.id location in lsusb Python script"
+
+This reverts commit 199756013624bfa497865eb498bf7331eb07ef56.
+---
+ Makefile.am | 7 +--
+ lsusb.py.in => lsusb.py | 4 ++--
+ 3 files changed, 3 insertions(+), 9 deletions(-)
+ rename lsusb.py.in => lsusb.py (99%)
+ mode change 100644 => 100755
+
+diff --git a/Makefile.am b/Makefile.am
+index b18ff69..67def60 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -39,13 +39,9 @@ EXTRA_DIST = \
+   lsusb.8.in \
+   usb-devices.1.in \
+   usb-devices \
+-  lsusb.py.in \
++  lsusb.py \
+   usbutils.pc.in
+ 
+-lsusb.py: $(srcdir)/lsusb.py.in
+-  sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
+-  chmod 755 $@
+-
+ lsusb.8: $(srcdir)/lsusb.8.in
+   sed 's|VERSION|$(VERSION)|g;s|@usbids@|$(datadir)/usb.ids|g' $< >$@
+ 
+@@ -59,7 +55,6 @@ usbutils.pc: $(srcdir)/usbutils.pc.in
+   sed 's|@usbids@|$(datadir)/usb.ids|g;s|@VERSION[@]|$(VERSION)|g' $< >$@
+ 
+ DISTCLEANFILES = \
+-  lsusb.py \
+   lsusb.8 \
+   usb-devices.1 \
+   usbutils.pc
+diff --git a/lsusb.py.in b/lsusb.py
+old mode 100644
+new mode 100755
+similarity index 99%
+rename from lsusb.py.in
+rename to lsusb.py
+index db2e1e0..aa410fc
+--- a/lsusb.py.in
 b/lsusb.py
+@@ -1,5 +1,5 @@
+ #!/usr/bin/env python
+-# lsusb-VERSION.py
++# lsusb.py
+ # Displays your USB devices in reasonable form.
+ # (c) Kurt Garloff <garl...@suse.de>, 2/2009, GPL v2 or v3.
+ # (c) Kurt Garloff <k...@garloff.de>, 9/2013, GPL v2 or v3.
+@@ -18,7 +18,7 @@ warnsort = False
+ showeps = False
+ 
+ prefix = "/sys/bus/usb/devices/"
+-usbids = "@usbids@"
++usbids = "/usr/share/usb.ids"
+ 
+ esc = chr(27)
+ norm = esc + "[0;0m"
+-- 
+2.16.2
+
diff --git a/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch 
b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
new file mode 100644
index 00..ae38b06a77
--- /dev/null
+++ b/package/utils/usbutils/patches/020-revert-removal-of-usb.ids.patch
@@ -0,0 +1,879 @@
+From 2bfca703b324e21aee2fabbe4f998aa663f03a15 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <ros...@gmail.com>
+Date: Fri, 9 Mar 2018 10:31:24 -0800
+Subject: [PATCH] Revert "drop dependency on usb.ids"
+
+This reverts commit 5d7ea40bc94cbf3069a25beba3146de13bcdcf02.
+---
+ Makefile.am  |27 +-
+ configure.ac |12 +
+ lsusb.c  |13 +-
+ names.c  |   600 +-
+ names.h  | 2 +-
+ 5 files changed, 18559 insertions(+), 1775 deletions(-)
+ delete mode 100644 usb-spec.h
+ create mode 100644 usb.ids
+
+diff --git a/Makefile.am b/Makefile.am
+index 67def60..31afb20 100644
+--- a/Makefile.am
 b/Makefile.am
+@@ -20,7 +20,6 @@ lsusb_SOURCES = \
+   lsusb-t.c \
+   list.h \
+   names.c names.h \
+-  usb-spec.h \
+   usbmisc.c usbmisc.h
+ 
+ ls

Re: [LEDE-DEV] [PATCH] prereq-mk: Change wget dependency to curl one.

2018-03-10 Thread Rosen Penev
On Sat, Mar 10, 2018 at 3:31 AM, Bjørn Mork <bj...@mork.no> wrote:
> Rosen Penev <ros...@gmail.com> writes:
>
>> curl is more common than GNU wget is.
>
> No.
Yes.
>
>> For example, Cygwin, Arch Linux, and my android phone all come with
>> curl by default whereas wget is missing.
>
> wget has priority "important" in Debian, while curl is "optional".
>
> I don't think it makes much sense to tune the installation system for
> some weird distros no one actually use to build OpenWrt.
Arch Linux is what I use to build OpenWrt.

I've already made my case that curl is more common. The only issue
would be if this commit would impact Debian or Ubuntu since they seem
to be more common for building.
>
>
>
> Bjørn

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] prereq-mk: Change wget dependency to curl one.

2018-03-09 Thread Rosen Penev
curl is more common than GNU wget is. For example, Cygwin, Arch Linux, and my 
android phone all come with curl by default whereas wget is missing.

Also, scripts/download.pl attempts to use curl before falling back to wget.

This has been tested on a brand new install of Arch Linux.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 include/prereq-build.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/prereq-build.mk b/include/prereq-build.mk
index 6a423d2c7d..609c4dc88e 100644
--- a/include/prereq-build.mk
+++ b/include/prereq-build.mk
@@ -136,8 +136,8 @@ $(eval $(call SetupHostCommand,unzip,Please install 
'unzip', \
 $(eval $(call SetupHostCommand,bzip2,Please install 'bzip2', \
bzip2 --version http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Can ramips use mt7530 switch driver from mainline?

2018-03-04 Thread Rosen Penev
On Sun, Mar 4, 2018 at 5:57 AM, Hauke Mehrtens  wrote:
> On 02/28/2018 11:34 AM, Marek Behun wrote:
>> Hello,
>>
>> the mt7530 switch driver is now in mainline kernel as a DSA driver. The
>> LEDE ramips target ethernet driver though doesn't use it yet, and I've
>> been thinking what all would have to be done to port the ethernet
>> driver to use it, if it even is possible.
>>
>> For example, the mt7530 dsa driver device tree binding needs
>> regulator definitions (core-supply, io-supply). I haven't seen these
>> nowhere in the mt7621 device trees nor in the code. Any ideas?
>
> I think the biggest missing part is a good migration path. Currently the
> users have some configurations based on swconfig and this has to be
> ported to the DSA configuration model. If someone could create a script
> which does the migration of an existing swconfig configuration to a DSA
> based configuration that would be very helpful.
This is probably not popular, but since LEDE is getting renamed to
OpenWrt, can we break compatibility?
OpenWrt CC is already not sysupgrade compatible with OpenWrt or LEDE
because of the dnsmasq change and maybe others.
>
> Hauke
>
> ___
> 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


Re: [LEDE-DEV] [PATCH] Revert "firmware: ath10k-firmware: update QCA988x firmware to 10.2.4-1.0-00033"

2018-03-04 Thread Rosen Penev
On Sun, Mar 4, 2018 at 1:58 PM, Hauke Mehrtens <ha...@hauke-m.de> wrote:
> On 03/04/2018 06:40 PM, Rosen Penev wrote:
>> I would like this to be backported to 17.01 as well. The mentioned
>> Archer C7v2 runs 17.01. No impact between 17.01 and master.
>>
>> On Sun, Mar 4, 2018 at 9:31 AM, Rosen Penev <ros...@gmail.com> wrote:
>>> This reverts commit 8d755ef052dca29db3b8da74149d9c7d74a54842.
>>>
>>> The 33 firmware for QCA988x is not stable for me on both my Turris Omnia 
>>> and my Archer C7v2. With version 33, I cannot get uptime longer than 2 days 
>>> before the ath10k driver crashes. With version 29, I've gotten 49 days 
>>> uptime with 29 of those days having a properly working 5GHz interface.
>>>
>>> I have also tested version 37 but that one behaves similar to 33 with the 
>>> ath10k driver crashing.
>>>
>>> Other reports indicate similar findings: 
>>> https://forum.lede-project.org/t/archer-c7-v4-support/3924/152
>>>
>>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>>> ---
>>>  package/firmware/ath10k-firmware/Makefile | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/package/firmware/ath10k-firmware/Makefile 
>>> b/package/firmware/ath10k-firmware/Makefile
>>> index 5b582085a4..2fc3618995 100644
>>> --- a/package/firmware/ath10k-firmware/Makefile
>>> +++ b/package/firmware/ath10k-firmware/Makefile
>>> @@ -253,7 +253,7 @@ define Package/ath10k-firmware-qca988x/install
>>> $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
>>> $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
>>> $(INSTALL_DATA) \
>>> -   
>>> $(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00033 \
>>> +   
>>> $(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00029 \
>>> $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
>>>  endef
>
> I also saw problems with the 10.2.4-1.0-00033 FW on my BT HH5, the
> ath10k wifi was just not available after some time.
> I am now trying the FW 10.2.4-1.0-00037, see this commit:
> https://github.com/kvalo/ath10k-firmware/commit/31695fbc77f81391f579747bb8e51c50a581c3cd
>
I mentioned in the  commit message that I tried version 37 but it
gives me similar results to 33. Unfortunately, there seems to be no
quality control at Qualcomm...

Firmware 29 is somewhat recent and mostly stable.
> Hauke

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Spectre vulnerability & LEDE 17.01 release

2018-03-04 Thread Rosen Penev
On Sun, Mar 4, 2018 at 6:36 AM, Hauke Mehrtens  wrote:
> On 02/27/2018 11:37 AM, Rafał Miłecki wrote:
>> There has been some talk on upcoming 17.01 fix release and Meltdown/Spectre.
>>
>> Quick summary:
>> 1) Most of LEDE supported devices aren't affected
>> 2) For most LEDE use cases these vulnerabilities don't matter
>> 3) 17.01 uses 4.4.116 which includes Meltdown fixes
>> 4) Spectre mitigation requires newer GCC and CPU microcode update
>> 5) Zoltan did some progress on x86 microcode update support
>>
>> So right now in some specific cases (mostly when running an unverified
>> software) Spectre may be a problem.
>>
>> There are two problems solving it:
>>
>> 1) Microcode updates are not (fully) available yet
>> It's unclear how long it will take Intel to release updates microcodes.
>>
>> 2) GCC officially supports Spectre mitigation in 7.2 and 8.0
>> LEDE 17.01 uses GCC 5.4. It seems fixes are unofficially backported to the 
>> 5.5:
>> https://github.com/hjl-tools/gcc/commits/hjl/indirect/gcc-5-branch/master
>> So the only solution for LEDE is to switch from 5.4 to 5.5 and apply
>> backported fixes. I'm not sure how safe it's going to be (possible
>> regressions caused by 5.5 update).
>>
>> If I'm wrong about anything, please let me know.
>>
>> In this situation my suggestion it to release 17.01.5 now and take
>> care of Spectre in another release in few months from now. What do you
>> think? Any objections?
>
> I agree with you. We should do the LEDE 17.01.5 release now with the
> current state, there are already many other bugfixes in the the lede
> 17.01 branch some for security problems which probably can be abused
> much easier in most of the common OpenWrt uses cases that Spectre.
>
> I would also wait with the ARM Spectre fixes till this code hits the 4.4
> LTS kernel tree and then we can release it in lede 17.01.6 in some months.
>
> I am, not sure if we should update the GCC at all or if users that
> really want these fixes should go to OpenWrt 18.X.
The MIPS SATA data corruption issue affects kernels 4.9 and above.
17.01 uses 4.4 i believe.

I vote for leaving GCC at 5.5.
>
> mbedtls 2.7 fixed 2 security problems in their last release, but this
> version is ABI incompatible but API compatible with the previous
> version, should I backport the commits or should I increase the
> PKG_RELEASE number for all depended packages?
>
> This is my personal opinion on this topic.
>
> Hauke
>
> ___
> 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


Re: [LEDE-DEV] [PATCH] Revert "firmware: ath10k-firmware: update QCA988x firmware to 10.2.4-1.0-00033"

2018-03-04 Thread Rosen Penev
I would like this to be backported to 17.01 as well. The mentioned
Archer C7v2 runs 17.01. No impact between 17.01 and master.

On Sun, Mar 4, 2018 at 9:31 AM, Rosen Penev <ros...@gmail.com> wrote:
> This reverts commit 8d755ef052dca29db3b8da74149d9c7d74a54842.
>
> The 33 firmware for QCA988x is not stable for me on both my Turris Omnia and 
> my Archer C7v2. With version 33, I cannot get uptime longer than 2 days 
> before the ath10k driver crashes. With version 29, I've gotten 49 days uptime 
> with 29 of those days having a properly working 5GHz interface.
>
> I have also tested version 37 but that one behaves similar to 33 with the 
> ath10k driver crashing.
>
> Other reports indicate similar findings: 
> https://forum.lede-project.org/t/archer-c7-v4-support/3924/152
>
> Signed-off-by: Rosen Penev <ros...@gmail.com>
> ---
>  package/firmware/ath10k-firmware/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/firmware/ath10k-firmware/Makefile 
> b/package/firmware/ath10k-firmware/Makefile
> index 5b582085a4..2fc3618995 100644
> --- a/package/firmware/ath10k-firmware/Makefile
> +++ b/package/firmware/ath10k-firmware/Makefile
> @@ -253,7 +253,7 @@ define Package/ath10k-firmware-qca988x/install
> $(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
> $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
> $(INSTALL_DATA) \
> -   
> $(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00033 \
> +   
> $(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00029 \
> $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
>  endef
>
> --
> 2.14.3
>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] Revert "firmware: ath10k-firmware: update QCA988x firmware to 10.2.4-1.0-00033"

2018-03-04 Thread Rosen Penev
This reverts commit 8d755ef052dca29db3b8da74149d9c7d74a54842.

The 33 firmware for QCA988x is not stable for me on both my Turris Omnia and my 
Archer C7v2. With version 33, I cannot get uptime longer than 2 days before the 
ath10k driver crashes. With version 29, I've gotten 49 days uptime with 29 of 
those days having a properly working 5GHz interface.

I have also tested version 37 but that one behaves similar to 33 with the 
ath10k driver crashing.

Other reports indicate similar findings: 
https://forum.lede-project.org/t/archer-c7-v4-support/3924/152

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/firmware/ath10k-firmware/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/firmware/ath10k-firmware/Makefile 
b/package/firmware/ath10k-firmware/Makefile
index 5b582085a4..2fc3618995 100644
--- a/package/firmware/ath10k-firmware/Makefile
+++ b/package/firmware/ath10k-firmware/Makefile
@@ -253,7 +253,7 @@ define Package/ath10k-firmware-qca988x/install
$(PKG_BUILD_DIR)/QCA988X/hw2.0/board.bin \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/
$(INSTALL_DATA) \
-   
$(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00033 \
+   
$(PKG_BUILD_DIR)/QCA988X/hw2.0/10.2.4-1.0/firmware-5.bin_10.2.4-1.0-00029 \
$(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-5.bin
 endef
 
-- 
2.14.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] 18.03/4 -> GCC 5 or 7

2018-03-04 Thread Rosen Penev
On Sun, Mar 4, 2018 at 7:15 AM, Hauke Mehrtens  wrote:
> On 02/16/2018 01:46 PM, John Crispin wrote:
>> Hi,
>>
>> whats on the critical todo list for the upcoming release ? i still have
>> a few minor things that I'll be adding shortly, apart from that I am
>> currently not aware of any huge problems. the release will be a mix
>> between 4.9 and 4.14 afaik !?
>
> I think the kernel situation is ok now and not blocking a release, we
> will have a mixed kernel 4.9 and 4.14 release. All important targets are
> on one of these two kernel versions by now.
> The patches for the gemini target will probably get included soon.
> Some targets will probably be updated from 4.9 to 4.14, but this is not
> blocking.
>
>
> What do we want to do with GCC 5.5 versus 7.3?
> GCC 5.5 is getting old, we have multiple problems with it, the big
> blocker for GCC 7 was just fixed upstream and we backported that fix.
> see: http://git.openwrt.org/25aaff9100065dba881be71b9dcab1e9cc8a7b5f
> The x86 and x86_64 architectures are already on GCC 7.3, the ARC
> architecture uses their own GCC fork based on version 7.X all other
> architectures are on GCC 5.5.

Preliminary testing with GCC 7.3 reveals that it fixes the SATA data
corruption issue on MIPS (at least ramips and ar71xx, possibly
others). @dissent1 started seeing the issue after going back to 5.5 in
his builds.

Both GCC 5.5 and 7.3 fail with -O3, but that's beyond the scope of OpenWrt.
>
> We have the following problems with GCC 5.5:
>  * U-Boot depends on GCC 6 or higher since version 2018.01 on ARM and ARM64
>   * GCC 5 and older are producing too big binaries, e.g. the SPL on the
> Allwinner A64 (sunxi, ARM64) is getting too big starting with U-Boot
> 2017.09 and does not fit into the SRAM any more, GCC 7 solves this problem.
>  * busybox on the gemini target updated to kernel 4.14 does not work
> correctly.
>  * GCC 5.5 only has out of tree fixes for Spectre, GCC 7.3 already has
> the retpoline fixes against Spectre included
>
> As the x86 target use GCC 7.3 now, there are multiple pull requests
> fixing some build problems in some packages with GCC 7.
> I am not aware of any regressions in GCC 7 compared to GCC 5.
> Changing the default compiler from GCC 5 to GCC 7 is no big problem, the
> problems are the regressions we are not aware of by now, if we change
> the default compiler for all architectures to GCC 7 we should probably
> wait 4 weeks before doing an RC release to be sure most of the runtime
> problems with GCC 7 are found.
>
> If we do the switch to GCC 7 I think we should also change binutils from
> 2.28 to 2.28.1 or 2.29.1. I found this problem with binutils 2.28 which
> was already fixed in 2.28.1:
> https://git.openwrt.org/bcd17ce9a3308accc30d99f4dd43f2062bb3fabc
> The minor versions contains more bugfixes.
>
>
> There is also a pull request for busybox 2.28.1 at github, this will
> probably also introduce some more regressions, so I am not sure if we
> should take it before or after the release.
> https://github.com/openwrt/openwrt/pull/733
> I do not have a real opinion on this and I am probably the wrong person
> to judge this.
Likewise. I vote for getting it in.
>
>
> I do not know what the status of the software fast path patches are, but
> they are looking interesting.
>
>
> My proposal would be to update all targets to GCC 7.3 and also use
> binutils 2.29.1 and musl 1.1.19. This change would be done as soon as
> possible and then we branch of end of March or beginning of April for
> 18.X and do a RC1 one week after creating the branch.
>
> Hauke
>
> ___
> 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


Re: [LEDE-DEV] sunxi: bpi-r1 switch configuration missing in latest development trunk for 18.0x

2018-03-03 Thread Rosen Penev
On Sat, Mar 3, 2018 at 5:26 PM, TheWerthFam  wrote:
> 17.01.4 works great currently on this platform, just trying out the cutting
> edge and found the switch configuration not existent.
> swconfig list  returns no results.
>
> Normally swconfig returns
> Found: switch0 - eth0
> Found: switch1 - eth0
>
> The interfaces eth0.1 eth0.2 etc are created, but they don't pass any
> traffic.  LAN ports and the WAN port LEDs seem to work in their normal
> quirky way with devices connected but they don't pass any traffic.
>
> Any advice and direction of work that needs to be done would be appreciated.
>
Did you clear settings when upgrading? Please post /etc/config/network.

This sounds like the switch driver is missing.
> Cheers
> Derek
>
> ___
> 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


Re: [LEDE-DEV] [PATCH] kernel: bump 4.4 to 4.4.119

2018-03-02 Thread Rosen Penev
On Thu, Mar 1, 2018 at 11:31 PM, Stijn Segers <f...@volatilesystems.org> wrote:
> This bumps the 4.4. kernel in master to 4.4.119.
> Includes more Meltdown & Spectre mitigation.
>
> * Refresh patches.
> * Refresh x86/config for RETPOLINE.
> * Deleted 8049-PCI-layerscape-Add-fsl-ls2085a-pcie-compatible-ID.patch 
> (accepted upstream)
> * Deleted 8050-PCI-layerscape-Fix-MSG-TLP-drop-setting.patch (accepted 
> upstream)
> * Deleted 650-pppoe_header_pad.patch (does not apply anymore (code was 
> replaced)).
>
> Bumps from 4.4.112 to 4.4.115 were handled by Kevin Darbyshire-Bryant.
>
> Compile-tested on: ar71xx & oxnas.
>
Tested-by: Rosen Penev <ros...@gmail.com>
> Signed-off-by: Stijn Segers <f...@volatilesystems.org>
> ---
>  include/kernel-version.mk  |  4 +-
>  .../004-register_gpio_driver_earlier.patch |  5 +-
>  .../patches-4.4/910-unaligned_access_hacks.patch   | 14 ++--
>  ...d-set-initial-ECC-params-based-on-info-fr.patch |  2 +-
>  5-03-mtd-nand-spi-nor-assign-MTD-of_node.patch |  2 +-
>  ...4-mtd-nand-convert-to-nand_set_flash_node.patch |  4 +-
>  ...nd-drop-unnecessary-partition-parser-data.patch | 12 ++--
>  .../pending-4.4/001-mtdsplit_backport.patch|  2 +-
>  .../051-0005-ovl-proper-cleanup-of-workdir.patch   |  2 +-
>  .../pending-4.4/201-extra_optimization.patch   |  2 +-
>  .../pending-4.4/202-reduce_module_size.patch   |  2 +-
>  .../generic/pending-4.4/204-module_strip.patch | 19 ++---
>  .../generic/pending-4.4/208-disable-modorder.patch |  4 +-
>  .../generic/pending-4.4/221-module_exports.patch   |  2 +-
>  ...bi-auto-create-ubiblock-device-for-rootfs.patch |  4 +-
>  ...-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch |  4 +-
>  ...610-netfilter_match_bypass_default_checks.patch | 14 ++--
>  .../generic/pending-4.4/650-pppoe_header_pad.patch | 20 --
>  .../666-Add-support-for-MAP-E-FMRs-mesh-mode.patch | 40 +--
>  ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch | 10 +--
>  .../generic/pending-4.4/834-ledtrig-libata.patch   |  8 +--
>  .../pending-4.4/901-debloat_sock_diag.patch|  2 +-
>  .../generic/pending-4.4/902-debloat_proc.patch |  2 +-
>  .../generic/pending-4.4/995-mangle_bootargs.patch  |  2 +-
>  ...mtd-backport-v4.7-0day-patches-from-Boris.patch | 81 
> ++
>  ...0074-mtd-nand-import-nand_hw_control_init.patch |  6 +-
>  .../linux/oxnas/patches-4.4/800-oxnas-ehci.patch   |  2 +-
>  .../linux/oxnas/patches-4.4/999-libata-hacks.patch |  4 +-
>  28 files changed, 128 insertions(+), 147 deletions(-)
>  delete mode 100644 
> target/linux/generic/pending-4.4/650-pppoe_header_pad.patch
>
> diff --git a/include/kernel-version.mk b/include/kernel-version.mk
> index 293100ecf8..0f90e80cdd 100644
> --- a/include/kernel-version.mk
> +++ b/include/kernel-version.mk
> @@ -3,12 +3,12 @@
>  LINUX_RELEASE?=1
>
>  LINUX_VERSION-3.18 = .71
> -LINUX_VERSION-4.4 = .112
> +LINUX_VERSION-4.4 = .119
>  LINUX_VERSION-4.9 = .82
>  LINUX_VERSION-4.14 = .20
>
>  LINUX_KERNEL_HASH-3.18.71 = 
> 5abc9778ad44ce02ed6c8ab52ece8a21c6d20d21f6ed8a19287b4a38a50c1240
> -LINUX_KERNEL_HASH-4.4.112 = 
> 544b42cbeed022896115c76a18fc97b4507d5b41d7ac0ce1dce9afd6ffd11ecd
> +LINUX_KERNEL_HASH-4.4.119 = 
> 4f1f9b7b6b2ee93597239d89bb3b6b60c71ebd8c91d706fadd36f515c68443e6
>  LINUX_KERNEL_HASH-4.9.82 = 
> 4b710b2701daafeb8e4db4c06f0ed3e62a6d20d6213a4927769c89ae42a9b180
>  LINUX_KERNEL_HASH-4.14.20 = 
> 4ab7f42aa6af9c1e3b00cba6b1fa305a87407666aaa2fae555f7fbdaafb6d292
>
> diff --git 
> a/target/linux/ar71xx/patches-4.4/004-register_gpio_driver_earlier.patch 
> b/target/linux/ar71xx/patches-4.4/004-register_gpio_driver_earlier.patch
> index 0c07cb18c7..639e82c245 100644
> --- a/target/linux/ar71xx/patches-4.4/004-register_gpio_driver_earlier.patch
> +++ b/target/linux/ar71xx/patches-4.4/004-register_gpio_driver_earlier.patch
> @@ -3,7 +3,7 @@ from mach files succeed.
>
>  --- a/drivers/gpio/gpio-ath79.c
>  +++ b/drivers/gpio/gpio-ath79.c
> -@@ -202,4 +202,8 @@ static struct platform_driver ath79_gpio
> +@@ -202,7 +202,11 @@ static struct platform_driver ath79_gpio
> .probe = ath79_gpio_probe,
>   };
>
> @@ -13,3 +13,6 @@ from mach files succeed.
>  +  return platform_driver_register(_gpio_driver);
>  +}
>  +postcore_initcall(ath79_gpio_init);
> +
> + MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X GPIO API support");
> + MODULE_LICENSE("GPL v2");
> diff --git a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch 
> b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
> index a8d8c15c3b..72d964df63 100644
> --- a/target/linux/ar71x

Re: [LEDE-DEV] [PATCH] curl: Switch all TLS libraries to use ca-bundle.

2018-02-27 Thread Rosen Penev
On Tue, Feb 13, 2018 at 4:28 AM, John Crispin <j...@phrozen.org> wrote:
>
>
> On 25/01/18 04:29, Rosen Penev wrote:
>>
>> On Wed, Jan 24, 2018 at 1:56 PM, Hauke Mehrtens <ha...@hauke-m.de> wrote:
>>>
>>> On 01/24/2018 05:28 AM, Rosen Penev wrote:
>>>>
>>>> At least one application (transmission) depends on CURL_CA_BUNDLE being
>>>> set in order to operate properly (Could not connect to tracker errors).
>>>> As far as I can tell, there's no real drawback to doing this for all
>>>> TLS libraries supported by curl.
>>>
>>> Do all of these libraries support --with-ca-bundle ?
>>>
>> OpenSSL I know does. GnuTLS most likely does as it seems to be geared
>> towards desktop systems.
>
>
> Hi,
>
> "most likely" is not good enough. please compile/runtime test your patches
> for all possible combos before posting them.
>
GnuTLS was tested on mt7621 without any problems so that's all of
them. Tested using the curl binary on mt7621.

Any chance this can get merged?
> John
>
>>>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>>>> ---
>>>>   package/network/utils/curl/Makefile | 10 ++
>>>>   1 file changed, 6 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/package/network/utils/curl/Makefile
>>>> b/package/network/utils/curl/Makefile
>>>> index 17fcf70..930bd10 100644
>>>> --- a/package/network/utils/curl/Makefile
>>>> +++ b/package/network/utils/curl/Makefile
>>>> @@ -111,13 +111,15 @@ CONFIGURE_ARGS += \
>>>>--without-nss \
>>>>--without-libmetalink \
>>>>--without-librtmp \
>>>> + --without-ca-path \
>>>> + --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
>>>>\
>>>>$(call autoconf_bool,CONFIG_IPV6,ipv6) \
>>>>\
>>>> - $(if $(CONFIG_LIBCURL_WOLFSSL),--with-cyassl="$(STAGING_DIR)/usr"
>>>> --without-ca-path
>>>> --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-cyassl) \
>>>> - $(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr"
>>>> --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-gnutls) \
>>>> - $(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr"
>>>> --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-ssl) \
>>>> - $(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr"
>>>> --without-ca-path
>>>> --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-mbedtls) \
>>>> + $(if
>>>> $(CONFIG_LIBCURL_WOLFSSL),--with-cyassl="$(STAGING_DIR)/usr",--without-cyassl)
>>>> \
>>>> + $(if
>>>> $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr",--without-gnutls)
>>>> \
>>>> + $(if
>>>> $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr",--without-ssl) \
>>>> + $(if
>>>> $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr",--without-mbedtls)
>>>> \
>>>>\
>>>>$(if
>>>> $(CONFIG_LIBCURL_LIBIDN),--with-libidn="$(STAGING_DIR)/usr",--without-libidn)
>>>> \
>>>>$(if
>>>> $(CONFIG_LIBCURL_SSH2),--with-libssh2="$(STAGING_DIR)/usr",--without-libssh2)
>>>> \
>>>>
>> ___
>> 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] uboot-envtools: Change download to git.

2018-02-26 Thread Rosen Penev
Currently, the build system uses an openwrt mirror which does not currently 
workand FTP can be unreliable under several circumstances (Ubuntu 16.04 WSL 
being an example). This change implicitly allows using all the mirrors to 
download.

Changing this to git also allows using .tar.xz archives which are smaller.

Size difference:

10416503 u-boot-2015.10.tar.bz2
8351456 u-boot-2015.10.tar.xz

Signed-off-by: Rosen Penev <ros...@gmail.com>

v2: Change git URL from GitHub to official mirror.
---
 package/boot/uboot-envtools/Makefile | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index 57a2ec5393..ba6bae6cfe 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -12,12 +12,13 @@ PKG_DISTNAME:=u-boot
 PKG_VERSION:=2015.10
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=\
-   http://mirror2.openwrt.org/sources \
-   ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=git://git.denx.de/u-boot.git
+PKG_SOURCE_VERSION:=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d
+PKG_MIRROR_HASH:=e207d996ebfff7335eed99789e3dcb9da071499f347fcdd86725b9d4dac5a5bb
 
 PKG_BUILD_DEPENDS:=fstools
 
-- 
2.14.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] uboot-envtools: Change download to git.

2018-02-26 Thread Rosen Penev
I sent a few emails. Apparently Wolfgang Denke (I'm assuming owner of
denke.de) maintains the GitHub repo but it's not official. As such,
switching to the official one.

On Fri, Feb 23, 2018 at 10:28 AM, Rosen Penev <ros...@gmail.com> wrote:
> On Fri, Feb 23, 2018 at 8:09 AM, Rosen Penev <ros...@gmail.com> wrote:
>> On Fri, Feb 23, 2018 at 4:03 AM, Michael Heimpold <m...@heimpold.de> wrote:
>>> Hi,
>>>
>>> Am Donnerstag, 22. Februar 2018, 17:48:58 CET schrieb Rosen Penev:
>>>> Currently, the build system uses an openwrt mirror which does not 
>>>> currently workand FTP can be unreliable under several circumstances 
>>>> (Ubuntu 16.04 WSL being an example). This change implicitly allows using 
>>>> all the mirrors to download.
>>>>
>>>> Changing this to git also allows using .tar.xz archives which are smaller.
>>>>
>>>> Size difference:
>>>>
>>>> 10416503 u-boot-2015.10.tar.bz2
>>>> 8351456 u-boot-2015.10.tar.xz
>>>>
>>>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>>>> ---
>>>>  package/boot/uboot-envtools/Makefile | 13 +++--
>>>>  1 file changed, 7 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/package/boot/uboot-envtools/Makefile 
>>>> b/package/boot/uboot-envtools/Makefile
>>>> index 57a2ec5393..4d2cd342aa 100644
>>>> --- a/package/boot/uboot-envtools/Makefile
>>>> +++ b/package/boot/uboot-envtools/Makefile
>>>> @@ -12,12 +12,13 @@ PKG_DISTNAME:=u-boot
>>>>  PKG_VERSION:=2015.10
>>>>  PKG_RELEASE:=1
>>>>
>>>> -PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
>>>> -PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
>>>> -PKG_SOURCE_URL:=\
>>>> - http://mirror2.openwrt.org/sources \
>>>> - ftp://ftp.denx.de/pub/u-boot
>>>> -PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
>>>> +PKG_SOURCE_PROTO:=git
>>>> +PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
>>>> +PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
>>>> +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
>>>> +PKG_SOURCE_URL:=https://github.com/u-boot/u-boot
>>>
>>> I would like to NAK this. This URL seems be a repo of an arbitrary person, 
>>> I don't see
>>> how this is related to the original project as it is not listed anywhere on 
>>> the Denx wiki or so.
>>> I also found this (old) mail - don't know whether opinions changed 
>>> meanswhile:
>>> https://lists.denx.de/pipermail/u-boot/2009-March/049148.html
>>>
>> Hrm I thought this was official. I'll switch to the official uboot
>> repo in a few hours.
> I just did that. The hashes match. Wondering if I should go on with
> this as there are people that deal with firewall problems thereby
> preferring HTTPS to git.
>>
>>> Personally, I would prefer to fix the openwrt download mirror. Addtionally, 
>>> we could
>>> check, whether it's possible to use the "offical" Amazon drive
>>> (https://www.amazon.com/clouddrive/share/HtTEzbceyJDyHv7anDLboEjTe0OkFbYReMxRp3CF20n?ref_=cd_ph_share_link_copy)
>>> mentioned here: https://www.denx.de/wiki/U-Boot/SourceCode
>> Some people (Google being a major one) are uncomfortable with using
>> plain HTTP. The official website has a totally broken HTTPS setup. The
>> official git repo may be cloneable through SSH so there is that.
>>>
>>> Regards,
>>> mhei
>>>
>>>> +PKG_SOURCE_VERSION:=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d
>>>> +PKG_MIRROR_HASH:=e207d996ebfff7335eed99789e3dcb9da071499f347fcdd86725b9d4dac5a5bb
>>>>
>>>>  PKG_BUILD_DEPENDS:=fstools
>>>>
>>>>
>>>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] uboot-envtools: Change download to git.

2018-02-23 Thread Rosen Penev
On Fri, Feb 23, 2018 at 8:09 AM, Rosen Penev <ros...@gmail.com> wrote:
> On Fri, Feb 23, 2018 at 4:03 AM, Michael Heimpold <m...@heimpold.de> wrote:
>> Hi,
>>
>> Am Donnerstag, 22. Februar 2018, 17:48:58 CET schrieb Rosen Penev:
>>> Currently, the build system uses an openwrt mirror which does not currently 
>>> workand FTP can be unreliable under several circumstances (Ubuntu 16.04 WSL 
>>> being an example). This change implicitly allows using all the mirrors to 
>>> download.
>>>
>>> Changing this to git also allows using .tar.xz archives which are smaller.
>>>
>>> Size difference:
>>>
>>> 10416503 u-boot-2015.10.tar.bz2
>>> 8351456 u-boot-2015.10.tar.xz
>>>
>>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>>> ---
>>>  package/boot/uboot-envtools/Makefile | 13 +++--
>>>  1 file changed, 7 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/package/boot/uboot-envtools/Makefile 
>>> b/package/boot/uboot-envtools/Makefile
>>> index 57a2ec5393..4d2cd342aa 100644
>>> --- a/package/boot/uboot-envtools/Makefile
>>> +++ b/package/boot/uboot-envtools/Makefile
>>> @@ -12,12 +12,13 @@ PKG_DISTNAME:=u-boot
>>>  PKG_VERSION:=2015.10
>>>  PKG_RELEASE:=1
>>>
>>> -PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
>>> -PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
>>> -PKG_SOURCE_URL:=\
>>> - http://mirror2.openwrt.org/sources \
>>> - ftp://ftp.denx.de/pub/u-boot
>>> -PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
>>> +PKG_SOURCE_PROTO:=git
>>> +PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
>>> +PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
>>> +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
>>> +PKG_SOURCE_URL:=https://github.com/u-boot/u-boot
>>
>> I would like to NAK this. This URL seems be a repo of an arbitrary person, I 
>> don't see
>> how this is related to the original project as it is not listed anywhere on 
>> the Denx wiki or so.
>> I also found this (old) mail - don't know whether opinions changed 
>> meanswhile:
>> https://lists.denx.de/pipermail/u-boot/2009-March/049148.html
>>
> Hrm I thought this was official. I'll switch to the official uboot
> repo in a few hours.
I just did that. The hashes match. Wondering if I should go on with
this as there are people that deal with firewall problems thereby
preferring HTTPS to git.
>
>> Personally, I would prefer to fix the openwrt download mirror. Addtionally, 
>> we could
>> check, whether it's possible to use the "offical" Amazon drive
>> (https://www.amazon.com/clouddrive/share/HtTEzbceyJDyHv7anDLboEjTe0OkFbYReMxRp3CF20n?ref_=cd_ph_share_link_copy)
>> mentioned here: https://www.denx.de/wiki/U-Boot/SourceCode
> Some people (Google being a major one) are uncomfortable with using
> plain HTTP. The official website has a totally broken HTTPS setup. The
> official git repo may be cloneable through SSH so there is that.
>>
>> Regards,
>> mhei
>>
>>> +PKG_SOURCE_VERSION:=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d
>>> +PKG_MIRROR_HASH:=e207d996ebfff7335eed99789e3dcb9da071499f347fcdd86725b9d4dac5a5bb
>>>
>>>  PKG_BUILD_DEPENDS:=fstools
>>>
>>>
>>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] uboot-envtools: Change download to git.

2018-02-23 Thread Rosen Penev
On Fri, Feb 23, 2018 at 4:03 AM, Michael Heimpold <m...@heimpold.de> wrote:
> Hi,
>
> Am Donnerstag, 22. Februar 2018, 17:48:58 CET schrieb Rosen Penev:
>> Currently, the build system uses an openwrt mirror which does not currently 
>> workand FTP can be unreliable under several circumstances (Ubuntu 16.04 WSL 
>> being an example). This change implicitly allows using all the mirrors to 
>> download.
>>
>> Changing this to git also allows using .tar.xz archives which are smaller.
>>
>> Size difference:
>>
>> 10416503 u-boot-2015.10.tar.bz2
>> 8351456 u-boot-2015.10.tar.xz
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>>  package/boot/uboot-envtools/Makefile | 13 +++--
>>  1 file changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/package/boot/uboot-envtools/Makefile 
>> b/package/boot/uboot-envtools/Makefile
>> index 57a2ec5393..4d2cd342aa 100644
>> --- a/package/boot/uboot-envtools/Makefile
>> +++ b/package/boot/uboot-envtools/Makefile
>> @@ -12,12 +12,13 @@ PKG_DISTNAME:=u-boot
>>  PKG_VERSION:=2015.10
>>  PKG_RELEASE:=1
>>
>> -PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
>> -PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
>> -PKG_SOURCE_URL:=\
>> - http://mirror2.openwrt.org/sources \
>> - ftp://ftp.denx.de/pub/u-boot
>> -PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
>> +PKG_SOURCE_PROTO:=git
>> +PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
>> +PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
>> +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
>> +PKG_SOURCE_URL:=https://github.com/u-boot/u-boot
>
> I would like to NAK this. This URL seems be a repo of an arbitrary person, I 
> don't see
> how this is related to the original project as it is not listed anywhere on 
> the Denx wiki or so.
> I also found this (old) mail - don't know whether opinions changed meanswhile:
> https://lists.denx.de/pipermail/u-boot/2009-March/049148.html
>
Hrm I thought this was official. I'll switch to the official uboot
repo in a few hours.

> Personally, I would prefer to fix the openwrt download mirror. Addtionally, 
> we could
> check, whether it's possible to use the "offical" Amazon drive
> (https://www.amazon.com/clouddrive/share/HtTEzbceyJDyHv7anDLboEjTe0OkFbYReMxRp3CF20n?ref_=cd_ph_share_link_copy)
> mentioned here: https://www.denx.de/wiki/U-Boot/SourceCode
Some people (Google being a major one) are uncomfortable with using
plain HTTP. The official website has a totally broken HTTPS setup. The
official git repo may be cloneable through SSH so there is that.
>
> Regards,
> mhei
>
>> +PKG_SOURCE_VERSION:=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d
>> +PKG_MIRROR_HASH:=e207d996ebfff7335eed99789e3dcb9da071499f347fcdd86725b9d4dac5a5bb
>>
>>  PKG_BUILD_DEPENDS:=fstools
>>
>>
>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] uboot-envtools: Change download to git.

2018-02-23 Thread Rosen Penev
On Thu, Feb 22, 2018 at 11:37 PM, Alexandru Ardelean
<ardeleana...@gmail.com> wrote:
> On Fri, Feb 23, 2018 at 3:48 AM, Rosen Penev <ros...@gmail.com> wrote:
>> Currently, the build system uses an openwrt mirror which does not currently 
>> workand FTP can be unreliable under several circumstances (Ubuntu 16.04 WSL 
>> being an example). This change implicitly allows using all the mirrors to 
>> download.
>>
>> Changing this to git also allows using .tar.xz archives which are smaller.
>>
>> Size difference:
>>
>> 10416503 u-boot-2015.10.tar.bz2
>> 8351456 u-boot-2015.10.tar.xz
>
> The size difference is pointless here if you are about to do a git
> clone of a repository.
> The git history alone can add a transfer 2-10 times bigger than the
> tar.bz2 file [depending on the repo's git history].

That's true. The build system seems to not create shallow clones. Need
to verify but that's what it felt like (unless GitHub was being slow
while I was testing). Note that most users will not deal with git
since OpenWrt mirrors are tried first.
>
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>>  package/boot/uboot-envtools/Makefile | 13 +++--
>>  1 file changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/package/boot/uboot-envtools/Makefile 
>> b/package/boot/uboot-envtools/Makefile
>> index 57a2ec5393..4d2cd342aa 100644
>> --- a/package/boot/uboot-envtools/Makefile
>> +++ b/package/boot/uboot-envtools/Makefile
>> @@ -12,12 +12,13 @@ PKG_DISTNAME:=u-boot
>>  PKG_VERSION:=2015.10
>>  PKG_RELEASE:=1
>>
>> -PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
>> -PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
>> -PKG_SOURCE_URL:=\
>> -   http://mirror2.openwrt.org/sources \
>> -   ftp://ftp.denx.de/pub/u-boot
>
> What about switching the FTP site to http://ftp.denx.de/pub/u-boot/ ?
> [At least] I prefer HTTP over git, and if FTP is problematic, HTTP
> seems reliable for this.
> HTTPS seems to exist: https://ftp.denx.de/pub/u-boot/
> But it seems to point to some owncloud/nextcloud instance, so that is
> unusable atm.
Didn't know they had an HTTP mirror. It doesn't seem linked on the
website. Note that GitHub is using HTTPS and they also recently killed
TLS 1.0 and 1.1 support.

That Nextcloud instance is probably for internal use. Should poke them about it.
>
>> -PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
>> +PKG_SOURCE_PROTO:=git
>> +PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
>> +PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
>> +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
>> +PKG_SOURCE_URL:=https://github.com/u-boot/u-boot
>> +PKG_SOURCE_VERSION:=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d
>> +PKG_MIRROR_HASH:=e207d996ebfff7335eed99789e3dcb9da071499f347fcdd86725b9d4dac5a5bb
>>
>>  PKG_BUILD_DEPENDS:=fstools
>>
>> --
>> 2.14.3
>>
>>
>> ___
>> 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] uboot-envtools: Change download to git.

2018-02-22 Thread Rosen Penev
Currently, the build system uses an openwrt mirror which does not currently 
workand FTP can be unreliable under several circumstances (Ubuntu 16.04 WSL 
being an example). This change implicitly allows using all the mirrors to 
download.

Changing this to git also allows using .tar.xz archives which are smaller.

Size difference:

10416503 u-boot-2015.10.tar.bz2
8351456 u-boot-2015.10.tar.xz

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/boot/uboot-envtools/Makefile | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index 57a2ec5393..4d2cd342aa 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -12,12 +12,13 @@ PKG_DISTNAME:=u-boot
 PKG_VERSION:=2015.10
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=\
-   http://mirror2.openwrt.org/sources \
-   ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://github.com/u-boot/u-boot
+PKG_SOURCE_VERSION:=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d
+PKG_MIRROR_HASH:=e207d996ebfff7335eed99789e3dcb9da071499f347fcdd86725b9d4dac5a5bb
 
 PKG_BUILD_DEPENDS:=fstools
 
-- 
2.14.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 1/3] uboot-envtools: Remove openwrt mirror from PKG_SOURCE_URL.

2018-02-20 Thread Rosen Penev
On Tue, Feb 20, 2018 at 1:23 PM, Felix Fietkau <n...@nbd.name> wrote:
> On 2018-02-20 21:42, Rosen Penev wrote:
>> This mirror is already attempted in case the other fails. Doesn't matter 
>> though since it doesn't work anyway (404 error). Discovered through "make 
>> download V=s" Output:
>>
>> make[2]: Entering directory 
>> '/home/mangix/devstuff/openwrt/package/boot/uboot-envtools'
>> mkdir -p /home/mangix/devstuff/openwrt/dl
>> SHELL= flock /home/mangix/devstuff/openwrt/tmp/.u-boot-2015.10.tar.bz2.flock 
>> -c ' /home/mangix/devstuff/openwrt/scripts/download.pl 
>> "/home/mangix/devstuff/openwrt/dl" "u-boot-2015.10.tar.bz2" 
>> "bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955" "" 
>> "http://mirror2.openwrt.org/sources; "ftp://ftp.denx.de/pub/u-boot;'
>> + curl -f --connect-timeout 20 --retry 5 --location --insecure 
>> http://mirror2.openwrt.org/sources/u-boot-2015.10.tar.bz2
>>   % Total% Received % Xferd  Average Speed   TimeTime Time  
>> Current
>>  Dload  Upload   Total   SpentLeft  Speed
>>   0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- >> 0
>> curl: (22) The requested URL returned error: 404 Not Found
>> Download failed.
>> + curl -f --connect-timeout 20 --retry 5 --location --insecure 
>> ftp://ftp.denx.de/pub/u-boot/u-boot-2015.10.tar.bz2
>>   % Total% Received % Xferd  Average Speed   TimeTime Time  
>> Current
>>  Dload  Upload   Total   Spent    Left  Speed
>> 100  9.9M  100  9.9M0 0  2034k  0  0:00:05  0:00:05 --:--:-- 
>> 2317k
>> make[2]: Leaving directory 
>> '/home/mangix/devstuff/openwrt/package/boot/uboot-envtools'
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
> We should add http://sources.lede-project.org before the primary FTP
> site. FTP has a habit of failing in many environments (it's a rather
> nasty protocol).

It's a bit redundant, no?

U-Boot is also officially available on GitHub with 325 releases
currently. Might be a better idea to switch to that.
>
> - Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 2/3] download.pl: Change SourceForge address to HTTPS.

2018-02-20 Thread Rosen Penev
SourceForge has supported HTTPS for its downloads for a long time now.

I have not been able to see any failures resulting from this change.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 scripts/download.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/download.pl b/scripts/download.pl
index f5c3f71056..324cfdb3b3 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -191,7 +191,7 @@ foreach my $mirror (@ARGV) {
if ($mirror =~ /^\@SF\/(.+)$/) {
# give sourceforge a few more tries, because it redirects to 
different mirrors
for (1 .. 5) {
-   push @mirrors, "http://downloads.sourceforge.net/$1;;
+   push @mirrors, "https://downloads.sourceforge.net/$1;;
}
} elsif ($mirror =~ /^\@APACHE\/(.+)$/) {
push @mirrors, "https://mirror.netcologne.de/apache.org/$1;;
-- 
2.14.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/3] uboot-envtools: Remove openwrt mirror from PKG_SOURCE_URL.

2018-02-20 Thread Rosen Penev
This mirror is already attempted in case the other fails. Doesn't matter though 
since it doesn't work anyway (404 error). Discovered through "make download 
V=s" Output:

make[2]: Entering directory 
'/home/mangix/devstuff/openwrt/package/boot/uboot-envtools'
mkdir -p /home/mangix/devstuff/openwrt/dl
SHELL= flock /home/mangix/devstuff/openwrt/tmp/.u-boot-2015.10.tar.bz2.flock -c 
'   /home/mangix/devstuff/openwrt/scripts/download.pl 
"/home/mangix/devstuff/openwrt/dl" "u-boot-2015.10.tar.bz2" 
"bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955" "" 
"http://mirror2.openwrt.org/sources; "ftp://ftp.denx.de/pub/u-boot;'
+ curl -f --connect-timeout 20 --retry 5 --location --insecure 
http://mirror2.openwrt.org/sources/u-boot-2015.10.tar.bz2
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
  0 00 00 0  0  0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
Download failed.
+ curl -f --connect-timeout 20 --retry 5 --location --insecure 
ftp://ftp.denx.de/pub/u-boot/u-boot-2015.10.tar.bz2
  % Total% Received % Xferd  Average Speed   TimeTime Time  Current
 Dload  Upload   Total   SpentLeft  Speed
100  9.9M  100  9.9M0 0  2034k  0  0:00:05  0:00:05 --:--:-- 2317k
make[2]: Leaving directory 
'/home/mangix/devstuff/openwrt/package/boot/uboot-envtools'

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 package/boot/uboot-envtools/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/package/boot/uboot-envtools/Makefile 
b/package/boot/uboot-envtools/Makefile
index 57a2ec5393..54ba425b31 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -14,9 +14,7 @@ PKG_RELEASE:=1
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=\
-   http://mirror2.openwrt.org/sources \
-   ftp://ftp.denx.de/pub/u-boot
+PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
 PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
 
 PKG_BUILD_DEPENDS:=fstools
-- 
2.14.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 3/3] download.pl: Change OpenWrt mirrors to HTTPS.

2018-02-20 Thread Rosen Penev
These have supported HTTPS for quite a while. I have not seen any obvious 
breakage.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 scripts/download.pl | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/download.pl b/scripts/download.pl
index 324cfdb3b3..34fd6a6f0b 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -257,10 +257,10 @@ foreach my $mirror (@ARGV) {
}
 }
 
-#push @mirrors, 'http://mirror1.openwrt.org';
-push @mirrors, 'http://sources.lede-project.org';
-push @mirrors, 'http://mirror2.openwrt.org/sources';
-push @mirrors, 'http://downloads.openwrt.org/sources';
+#push @mirrors, 'https://mirror1.openwrt.org';
+push @mirrors, 'https://sources.lede-project.org';
+push @mirrors, 'https://mirror2.openwrt.org/sources';
+push @mirrors, 'https://downloads.openwrt.org/sources';
 
 while (!-f "$target/$filename") {
my $mirror = shift @mirrors;
-- 
2.14.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v1 1/1] openssh: disable passwords for openssh server

2018-02-17 Thread Rosen Penev
On Sat, Feb 17, 2018 at 1:54 PM, Stijn Tintel  wrote:
> On 09-02-18 01:28, Philip Prindeville wrote:
>> From: Philip Prindeville 
>>
>> Allowing password logins leaves you vulnerable to dictionary
>> attacks.  We disable password-based authentication, limiting
>> authentication to keys only which are more secure.
>>
>> Note: You'll need to pre-populate your image with some initial
>> keys. To do this:
>>
>> 1. Create the appropriate directory as "mkdir -p files/root/.ssh"
>>from your top-level directory;
>> 2. Copy your "~/.ssh/id_rsa.pub" (or as appropriate) into
>>"files/root/.ssh/authorized_keys" and indeed, you can collect
>>keys from several sources this way by concatenating them;
>> 3. Set the permissions on "authorized_keys" to 644 or 640.
>>
>>
> NAK. This is going to bite people. It takes much more time and effort to
> recover from a device you can no longer access due to this change, than
> to manually disable password authentication in OpenSSH.
On that note, how do you recover with OpenSSH? Currently, root
password access is disabled. My method is to install dropbear and use
that temporarily while i enable root password access.
>
>
> ___
> 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


Re: [LEDE-DEV] [PATCH] ag71xx: Add some unlikely calls + rearange some stuff in hard_start_xmit.

2018-02-16 Thread Rosen Penev
On Thu, Feb 15, 2018 at 3:29 AM, Felix Fietkau <n...@nbd.name> wrote:
> On 2018-02-14 16:20, Rosen Penev wrote:
>> On Tue, Feb 13, 2018 at 11:10 PM, Felix Fietkau <n...@nbd.name> wrote:
>>> On 2018-02-13 23:53, Rosen Penev wrote:
>>>> Based on Qualcomm driver. Improves iperf3 throughput by ~20mbps on 
>>>> transmit on Archer C7v4.
>>>>
>>>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>>>> ---
>>>>  .../drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c  | 14 
>>>> +++---
>>>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git 
>>>> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>>>>  
>>>> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>>>> index 95682b7641..d32f220178 100644
>>>> --- 
>>>> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>>>> +++ 
>>>> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>>>> @@ -797,11 +797,14 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct 
>>>> sk_buff *skb,
>>>>   if (ag71xx_has_ar8216(ag))
>>>>   ag71xx_add_ar8216_header(ag, skb);
>>>>
>>>> - if (skb->len <= 4) {
>>>> + dma_cache_sync (NULL, skb->data, skb->len, DMA_TO_DEVICE);
>>> The use of dma_cache_sync here makes no sense, since it's the wrong API.
>>> Also, effectively it results in the same kind of cache flush as the one
>>> that's done by the DMA mapping done later.
>>
>> From my reading of dma_cache_flush, I agree. However that's the part
>> of this patch that gives the biggest speedup. Before this patch, I
>> tested just adding that and it worked. I can back this up with
>> benchmarks later on.
> In my test I quite often encountered big differences in throughput from
> minor (and often very much unrelated) changes. I haven't found the real
> source of these differences yet, so it's hard to know which changes
> really help in the long run. My best guess is that some changes affect
> the alignment of critical functions and thus affect the icache footprint
> somehow.
>
> Until I see a reasonable explanation of how this change helps, I'm going
> to assume it's the same kind of random change fluctuation that I've seen
> so often and NACK this change.

So I just benchmarked this while not connected to anything. Basically,
WAN port assigned to LAN interface (it's the same CPU port - eth0) and
br-lan removed so that eth0.1 is assigned to LAN.

I noticed something bizarre. With the patch applied, I was getting
~150mbps on iperf3 consistently. With the patch not applied, I was
getting the same speed, EXCEPT the speed would sometimes bump up to
~250mbps.

Adding dma_cache_sync eliminated this boost. I have no explanation for
this. Maybe TX queue gets full? Sample result:

Server listening on 5201
---
Accepted connection from 192.168.1.1, port 40080
[  5] local 192.168.1.2 port 5201 connected to 192.168.1.1 port 40082
[ ID] Interval   Transfer Bitrate
[  5]   0.00-1.00   sec  17.0 MBytes   143 Mbits/sec
[  5]   1.00-2.00   sec  18.1 MBytes   152 Mbits/sec
[  5]   2.00-3.00   sec  17.5 MBytes   147 Mbits/sec
[  5]   3.00-4.00   sec  17.6 MBytes   148 Mbits/sec
[  5]   4.00-5.00   sec  17.8 MBytes   149 Mbits/sec
[  5]   5.00-6.00   sec  18.0 MBytes   151 Mbits/sec
[  5]   6.00-7.00   sec  25.5 MBytes   214 Mbits/sec
[  5]   7.00-8.00   sec  30.9 MBytes   259 Mbits/sec
[  5]   8.00-9.00   sec  30.4 MBytes   255 Mbits/sec
[  5]   9.00-10.00  sec  31.1 MBytes   261 Mbits/sec
[  5]  10.00-10.06  sec  1.77 MBytes   250 Mbits/sec

>
> - Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] 18.03/4

2018-02-16 Thread Rosen Penev
On Fri, Feb 16, 2018 at 4:46 AM, John Crispin  wrote:
> Hi,
>
> whats on the critical todo list for the upcoming release ? i still have a
> few minor things that I'll be adding shortly, apart from that I am currently
> not aware of any huge problems. the release will be a mix between 4.9 and
> 4.14 afaik !?
The MIPS SATA thing is fairly critical IMO. I've personally reverted
to 4.4 for all my MIPS devices because of it.

The ramips MMC driver needs a fix so that it does not use HIGHMEM.
Details here: 
https://github.com/neilbrown/linux/commit/dc97800015e66b29a4bb067b355cc2e2b6eb72cb
. Not critical.
>
> 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


Re: [LEDE-DEV] [PATCH] ag71xx: Add some unlikely calls + rearange some stuff in hard_start_xmit.

2018-02-14 Thread Rosen Penev
On Tue, Feb 13, 2018 at 10:52 PM, John Crispin <j...@phrozen.org> wrote:
>
>
> On 13/02/18 23:53, Rosen Penev wrote:
>>
>> Based on Qualcomm driver. Improves iperf3 throughput by ~20mbps on
>> transmit on Archer C7v4.
>
>
> this is missing the description of what the patch does.
Unfortunately I have no real idea as of yet.
>
> John
>
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>>   .../drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c  | 14
>> +++---
>>   1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git
>> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>> index 95682b7641..d32f220178 100644
>> ---
>> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>> +++
>> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>> @@ -797,11 +797,14 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct
>> sk_buff *skb,
>> if (ag71xx_has_ar8216(ag))
>> ag71xx_add_ar8216_header(ag, skb);
>>   - if (skb->len <= 4) {
>> +   dma_cache_sync (NULL, skb->data, skb->len, DMA_TO_DEVICE);
>> +
>> +   if (unlikely(skb->len <= 4)) {
>> DBG("%s: packet len is too small\n", ag->dev->name);
>> goto err_drop;
>> }
>>   + netdev_sent_queue(dev, skb->len);
>> dma_addr = dma_map_single(>dev, skb->data, skb->len,
>>   DMA_TO_DEVICE);
>>   @@ -817,27 +820,24 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct
>> sk_buff *skb,
>> ring->buf[i].len = skb->len;
>> ring->buf[i].skb = skb;
>>   - netdev_sent_queue(dev, skb->len);
>> -
>> skb_tx_timestamp(skb);
>> desc->ctrl &= ~DESC_EMPTY;
>> ring->curr += n;
>>   - /* flush descriptor */
>> -   wmb();
>> -
>> ring_min = 2;
>> if (ring->desc_split)
>> ring_min *= AG71XX_TX_RING_DS_PER_PKT;
>>   - if (ring->curr - ring->dirty >= ring_size - ring_min) {
>> +   if (unlikely(ring->curr - ring->dirty >= ring_size - ring_min)) {
>> DBG("%s: tx queue full\n", dev->name);
>> netif_stop_queue(dev);
>> }
>> DBG("%s: packet injected into TX queue\n", ag->dev->name);
>>   + /* flush descriptor */
>> +   wmb();
>> /* enable TX engine */
>> ag71xx_wr(ag, AG71XX_REG_TX_CTRL, TX_CTRL_TXE);
>>
>
>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] ag71xx: Add some unlikely calls + rearange some stuff in hard_start_xmit.

2018-02-14 Thread Rosen Penev
On Tue, Feb 13, 2018 at 11:10 PM, Felix Fietkau <n...@nbd.name> wrote:
> On 2018-02-13 23:53, Rosen Penev wrote:
>> Based on Qualcomm driver. Improves iperf3 throughput by ~20mbps on transmit 
>> on Archer C7v4.
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>>  .../drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c  | 14 
>> +++---
>>  1 file changed, 7 insertions(+), 7 deletions(-)
>>
>> diff --git 
>> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>>  
>> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>> index 95682b7641..d32f220178 100644
>> --- 
>> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>> +++ 
>> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
>> @@ -797,11 +797,14 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct 
>> sk_buff *skb,
>>   if (ag71xx_has_ar8216(ag))
>>   ag71xx_add_ar8216_header(ag, skb);
>>
>> - if (skb->len <= 4) {
>> + dma_cache_sync (NULL, skb->data, skb->len, DMA_TO_DEVICE);
> The use of dma_cache_sync here makes no sense, since it's the wrong API.
> Also, effectively it results in the same kind of cache flush as the one
> that's done by the DMA mapping done later.

>From my reading of dma_cache_flush, I agree. However that's the part
of this patch that gives the biggest speedup. Before this patch, I
tested just adding that and it worked. I can back this up with
benchmarks later on.
>
> - Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] Data corruption on kernel 4.9 with MIPS

2018-02-13 Thread Rosen Penev
Just thought I'd give a heads up given that the stable release is upon us.

I've tried making some noise about an issue affecting ramips with
kernel 4.9 where any device under /dev/sdX (maybe even /dev/mtdblock)
will start returning bad data after a while (how long seems dependent
on RAM size). Issue is here:
https://bugs.lede-project.org/index.php?do=details_id=1242=21=userid

It turns out, ar71xx is affected by this as well. I had an mvebu
router (Turris Omnia) running 4.9 with a USB hard drive connected that
I replaced with an Archer C7v4 after bricking the former. Hard drive
connected as well but this time, the drive got corrupt(mounts as
read-only) after several days uptime(I didn't check how long, less
than a week).

As for why this happens, current theory is some kind of DMA mapping
error in the kernel. The first suspect is this change:
https://github.com/lede-project/source/commit/668eb70157be59b17bb6da4a6de5d5e71a7c832b

But if memory serves me correctly, this was occurring before as well.

On the LEDE forums, people with XiaoMi MIR 3G routers were running
into this issue as well with several rolling back to 4.4 and reporting
good results. Link:
https://forum.lede-project.org/t/xiaomi-wifi-router-3g/5377/508

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] ag71xx: Add some unlikely calls + rearange some stuff in hard_start_xmit.

2018-02-13 Thread Rosen Penev
Based on Qualcomm driver. Improves iperf3 throughput by ~20mbps on transmit on 
Archer C7v4.

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 .../drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c  | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 95682b7641..d32f220178 100644
--- 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -797,11 +797,14 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct sk_buff 
*skb,
if (ag71xx_has_ar8216(ag))
ag71xx_add_ar8216_header(ag, skb);
 
-   if (skb->len <= 4) {
+   dma_cache_sync (NULL, skb->data, skb->len, DMA_TO_DEVICE);
+
+   if (unlikely(skb->len <= 4)) {
DBG("%s: packet len is too small\n", ag->dev->name);
goto err_drop;
}
 
+   netdev_sent_queue(dev, skb->len);
dma_addr = dma_map_single(>dev, skb->data, skb->len,
  DMA_TO_DEVICE);
 
@@ -817,27 +820,24 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct sk_buff 
*skb,
ring->buf[i].len = skb->len;
ring->buf[i].skb = skb;
 
-   netdev_sent_queue(dev, skb->len);
-
skb_tx_timestamp(skb);
 
desc->ctrl &= ~DESC_EMPTY;
ring->curr += n;
 
-   /* flush descriptor */
-   wmb();
-
ring_min = 2;
if (ring->desc_split)
ring_min *= AG71XX_TX_RING_DS_PER_PKT;
 
-   if (ring->curr - ring->dirty >= ring_size - ring_min) {
+   if (unlikely(ring->curr - ring->dirty >= ring_size - ring_min)) {
DBG("%s: tx queue full\n", dev->name);
netif_stop_queue(dev);
}
 
DBG("%s: packet injected into TX queue\n", ag->dev->name);
 
+   /* flush descriptor */
+   wmb();
/* enable TX engine */
ag71xx_wr(ag, AG71XX_REG_TX_CTRL, TX_CTRL_TXE);
 
-- 
2.14.3


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] curl: Switch all TLS libraries to use ca-bundle.

2018-02-13 Thread Rosen Penev
On Tue, Feb 13, 2018 at 4:28 AM, John Crispin <j...@phrozen.org> wrote:
>
>
> On 25/01/18 04:29, Rosen Penev wrote:
>>
>> On Wed, Jan 24, 2018 at 1:56 PM, Hauke Mehrtens <ha...@hauke-m.de> wrote:
>>>
>>> On 01/24/2018 05:28 AM, Rosen Penev wrote:
>>>>
>>>> At least one application (transmission) depends on CURL_CA_BUNDLE being
>>>> set in order to operate properly (Could not connect to tracker errors).
>>>> As far as I can tell, there's no real drawback to doing this for all
>>>> TLS libraries supported by curl.
>>>
>>> Do all of these libraries support --with-ca-bundle ?
>>>
>> OpenSSL I know does. GnuTLS most likely does as it seems to be geared
>> towards desktop systems.
>
>
> Hi,
>
> "most likely" is not good enough. please compile/runtime test your patches
> for all possible combos before posting them.
>
I've fixed the transmission issue by setting the env parameter to the
proper value. Meaning this patch doesn't help in this case. It
probably does in others.

A quick Google search shows that it does indeed work with GnuTLS.
Maybe it didn't with some previous version.
> John
>
>>>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>>>> ---
>>>>   package/network/utils/curl/Makefile | 10 ++
>>>>   1 file changed, 6 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/package/network/utils/curl/Makefile
>>>> b/package/network/utils/curl/Makefile
>>>> index 17fcf70..930bd10 100644
>>>> --- a/package/network/utils/curl/Makefile
>>>> +++ b/package/network/utils/curl/Makefile
>>>> @@ -111,13 +111,15 @@ CONFIGURE_ARGS += \
>>>>--without-nss \
>>>>--without-libmetalink \
>>>>--without-librtmp \
>>>> + --without-ca-path \
>>>> + --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
>>>>\
>>>>$(call autoconf_bool,CONFIG_IPV6,ipv6) \
>>>>\
>>>> - $(if $(CONFIG_LIBCURL_WOLFSSL),--with-cyassl="$(STAGING_DIR)/usr"
>>>> --without-ca-path
>>>> --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-cyassl) \
>>>> - $(if $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr"
>>>> --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-gnutls) \
>>>> - $(if $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr"
>>>> --without-ca-bundle --with-ca-path=/etc/ssl/certs,--without-ssl) \
>>>> - $(if $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr"
>>>> --without-ca-path
>>>> --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt,--without-mbedtls) \
>>>> + $(if
>>>> $(CONFIG_LIBCURL_WOLFSSL),--with-cyassl="$(STAGING_DIR)/usr",--without-cyassl)
>>>> \
>>>> + $(if
>>>> $(CONFIG_LIBCURL_GNUTLS),--with-gnutls="$(STAGING_DIR)/usr",--without-gnutls)
>>>> \
>>>> + $(if
>>>> $(CONFIG_LIBCURL_OPENSSL),--with-ssl="$(STAGING_DIR)/usr",--without-ssl) \
>>>> + $(if
>>>> $(CONFIG_LIBCURL_MBEDTLS),--with-mbedtls="$(STAGING_DIR)/usr",--without-mbedtls)
>>>> \
>>>>\
>>>>$(if
>>>> $(CONFIG_LIBCURL_LIBIDN),--with-libidn="$(STAGING_DIR)/usr",--without-libidn)
>>>> \
>>>>$(if
>>>> $(CONFIG_LIBCURL_SSH2),--with-libssh2="$(STAGING_DIR)/usr",--without-libssh2)
>>>> \
>>>>
>> ___
>> 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


Re: [LEDE-DEV] [PATCH] kernel: rename CONFIG_TRACE_ENUM_MAP_FILE to CONFIG_TRACE_EVAL_MAP_FILE

2018-02-09 Thread Rosen Penev
On Fri, Feb 9, 2018 at 3:44 PM, Hauke Mehrtens <ha...@hauke-m.de> wrote:
> This config option was renamed in upstream Linux commit 681bec0367
> ("tracing: Rename update the enum_map file")
>
> Reported-by: Rosen Penev <ros...@gmail.com>
> Signed-off-by: Hauke Mehrtens <ha...@hauke-m.de>
> ---
>  target/linux/generic/config-4.14 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/linux/generic/config-4.14 
> b/target/linux/generic/config-4.14
> index 39c37744c9..3b7985a9ed 100644
> --- a/target/linux/generic/config-4.14
> +++ b/target/linux/generic/config-4.14
> @@ -4943,7 +4943,7 @@ CONFIG_TMPFS_XATTR=y
>  # CONFIG_TRACER_SNAPSHOT is not set
>  # CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP is not set
>  # CONFIG_TRACE_BRANCH_PROFILING is not set
> -# CONFIG_TRACE_ENUM_MAP_FILE is not set
> +# CONFIG_TRACE_EVAL_MAP_FILE is not set
>  CONFIG_TRACE_IRQFLAGS_SUPPORT=y
>  # CONFIG_TRACE_SINK is not set
>  # CONFIG_TRACING_EVENTS_GPIO is not set
ACK

> --
> 2.11.0
>

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH v2 0/5] mvebu: add kernel 4.14 support

2018-02-09 Thread Rosen Penev
On Fri, Feb 9, 2018 at 2:57 PM, Rosen Penev <ros...@gmail.com> wrote:
> On Fri, Feb 9, 2018 at 1:52 PM, Hauke Mehrtens <ha...@hauke-m.de> wrote:
>> On 01/21/2018 06:53 PM, Hauke Mehrtens wrote:
>>> This add support for kernel 4.14 to the mvebu target. My main reason to
>>> add kernel 4.14 support is to make it easier to also add support for the
>>> Marvell Armada 3700LP ARM64 SoCs especially the ESPRESSObin board.
>>>
>>> I do not have any of the currently supported boards so I can not runtime
>>> test this myself, Lucian Cristian already tested an older version of
>>> these patches on one of his boards.
>>>
>>> My current working tree for this target can be found here:
>>> https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=shortlog;h=refs/heads/mvebu-4.14
>>> This tree also contains the code needed for the ESPRESSObin, but we
>>> still have some problems with the image creation, the bootloader boots
>>> by default the kernel + dtb from a ext4 file system on a SD card and
>>> also uses this partition as root file system.
>>> Tomasz Maciej Nowak is working on the image generation for the
>>> ESPRESSObin board.
>>>
>>> I am waiting for positive and negative feedback on these patches, if you
>>> run into a problem which you do not have with kernel 4.9 please report
>>> this.
>>>
>>> changes in:
>>> v2:
>>>  * refresh on current generic kernel 4.14 integration
>>>  * create ubifs fs format version 4 also with kernel 4.14, this should
>>>fix sysupgrade (downgrade) from kernel 4.14 to 4.9
>>>  * rename the wireless driver path when upgrading
>>>
>>>
>>> Hauke Mehrtens (5):
>>>   kernel: ubifs: create use file system format 4 by default
>>>   mvebu: move files to files-4.9 and files-4.4 folder
>>>   mvebu: copy config and patches from 4.9 to 4.14
>>>   mvebu: Make kernel 4.14 patches apply
>>>   mvebu: migrate uci config to new PCIe path
>>>
>>
>> I haven't heard of any problems, expected that one patch does not apply
>> any more with kernel 4.14.18, which is fixed now.
>>
>> I will merge this on Sunday if I do not get any negative feedback.
>>
>> You can find my tree here:
>> https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=shortlog;h=refs/heads/mvebu-4.14
> i just pulled your staging tree and decided to compile firmware for my
> Turris Omnia.
>
> CONFIG_TRACE_EVAL_MAP_FILE makes the kernel fail. It needs to be
> defined somewhere.
Sorry it makes the compile fail. I have not tested it running yet.
>
>>
>> Hauke
>>
>> ___
>> 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


Re: [LEDE-DEV] [PATCH v2 0/5] mvebu: add kernel 4.14 support

2018-02-09 Thread Rosen Penev
On Fri, Feb 9, 2018 at 1:52 PM, Hauke Mehrtens  wrote:
> On 01/21/2018 06:53 PM, Hauke Mehrtens wrote:
>> This add support for kernel 4.14 to the mvebu target. My main reason to
>> add kernel 4.14 support is to make it easier to also add support for the
>> Marvell Armada 3700LP ARM64 SoCs especially the ESPRESSObin board.
>>
>> I do not have any of the currently supported boards so I can not runtime
>> test this myself, Lucian Cristian already tested an older version of
>> these patches on one of his boards.
>>
>> My current working tree for this target can be found here:
>> https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=shortlog;h=refs/heads/mvebu-4.14
>> This tree also contains the code needed for the ESPRESSObin, but we
>> still have some problems with the image creation, the bootloader boots
>> by default the kernel + dtb from a ext4 file system on a SD card and
>> also uses this partition as root file system.
>> Tomasz Maciej Nowak is working on the image generation for the
>> ESPRESSObin board.
>>
>> I am waiting for positive and negative feedback on these patches, if you
>> run into a problem which you do not have with kernel 4.9 please report
>> this.
>>
>> changes in:
>> v2:
>>  * refresh on current generic kernel 4.14 integration
>>  * create ubifs fs format version 4 also with kernel 4.14, this should
>>fix sysupgrade (downgrade) from kernel 4.14 to 4.9
>>  * rename the wireless driver path when upgrading
>>
>>
>> Hauke Mehrtens (5):
>>   kernel: ubifs: create use file system format 4 by default
>>   mvebu: move files to files-4.9 and files-4.4 folder
>>   mvebu: copy config and patches from 4.9 to 4.14
>>   mvebu: Make kernel 4.14 patches apply
>>   mvebu: migrate uci config to new PCIe path
>>
>
> I haven't heard of any problems, expected that one patch does not apply
> any more with kernel 4.14.18, which is fixed now.
>
> I will merge this on Sunday if I do not get any negative feedback.
>
> You can find my tree here:
> https://git.openwrt.org/?p=openwrt/staging/hauke.git;a=shortlog;h=refs/heads/mvebu-4.14
i just pulled your staging tree and decided to compile firmware for my
Turris Omnia.

CONFIG_TRACE_EVAL_MAP_FILE makes the kernel fail. It needs to be
defined somewhere.

>
> Hauke
>
> ___
> 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 1/3] ag71xx: Move timestamp struct member outside of struct.

2018-02-07 Thread Rosen Penev
With this change, the timestamp variable is only used in 
ag71xx_check_dma_stuck. Small tx speedup.

Based on a Qualcomm commit. ag->timestamp = jiffies was not replaced with 
netif_trans_update(dev) because of this quote:

It should be noted that after this series several instances
of netif_trans_update() are useless (if they occur in
.ndo_start_xmit and driver doesn't set LLTX flag -- stack already
did an update).

From: http://lists.openwall.net/netdev/2016/05/03/87

Signed-off-by: Rosen Penev <ros...@gmail.com>
---
 .../linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h  | 2 --
 .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c   | 5 +++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
index cea172e..d7897a9 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
@@ -172,8 +172,6 @@ struct ag71xx {
struct napi_struct  napi;
u32 msg_enable;
 
-   unsigned long   timestamp;
-
/*
 * From this point onwards we're not looking at per-packet fields.
 */
diff --git 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 47b4c69..95682b7 100644
--- 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -816,7 +816,6 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct sk_buff 
*skb,
i = (ring->curr + n - 1) & ring_mask;
ring->buf[i].len = skb->len;
ring->buf[i].skb = skb;
-   ag->timestamp = jiffies;
 
netdev_sent_queue(dev, skb->len);
 
@@ -928,9 +927,11 @@ static void ag71xx_restart_work_func(struct work_struct 
*work)
 
 static bool ag71xx_check_dma_stuck(struct ag71xx *ag)
 {
+   unsigned long timestamp;
u32 rx_sm, tx_sm, rx_fd;
 
-   if (likely(time_before(jiffies, ag->timestamp + HZ/10)))
+   timestamp = netdev_get_tx_queue(ag->dev, 0)->trans_start;
+   if (likely(time_before(jiffies, timestamp + HZ/10)))
return false;
 
if (!netif_carrier_ok(ag->dev))
-- 
2.7.4


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 1/3] ag71xx: Remove timestamp struct member and use trans_start instead

2018-02-07 Thread Rosen Penev
On Wed, Feb 7, 2018 at 5:54 AM, Felix Fietkau <n...@nbd.name> wrote:
> On 2018-02-06 23:27, Rosen Penev wrote:
>> Small speedup for TX.
>>
>> Based on a Qualcomm commit. ag->timestamp = jiffies was not replaced with 
>> netif_trans_update(dev) because of this quote:
>>
>> It should be noted that after this series several instances
>> of netif_trans_update() are useless (if they occur in
>> .ndo_start_xmit and driver doesn't set LLTX flag -- stack already
>> did an update).
>>
>> From: http://lists.openwall.net/netdev/2016/05/03/87
>>
>> Signed-off-by: Rosen Penev <ros...@gmail.com>
>> ---
>> @@ -930,7 +929,7 @@ static bool ag71xx_check_dma_stuck(struct ag71xx *ag)
>>  {
>>   u32 rx_sm, tx_sm, rx_fd;
>>
>> - if (likely(time_before(jiffies, ag->timestamp + HZ/10)))
>> + if (likely(time_before(jiffies, dev_trans_start(ag->dev) + HZ/10)))
> dev_trans_start() does some extra checks that are unnecessary. You
> should use netdev_get_tx_queue(dev, 0)->trans_start instead.
>
Hrm in the patches that drop trans_start from the regular netdev
struct, some drivers were modified to do that and others to use
dev_trans_start. I guess this is why...

Because that specific line got too long, I moved the timestamp
variable into the check_dma_stuck function. I also updated the commit
message.
> - Felix

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 3/3] ag71xx: Switch to napi_alloc_frag.

2018-02-07 Thread Rosen Penev
On Wed, Feb 7, 2018 at 1:24 AM, Karl Palsson <ka...@tweak.net.au> wrote:
>
> Rosen Penev <ros...@gmail.com> wrote:
>> Seems to perform slightly better.
>
> Seems? Sounds like super awesome reason to change things.
I did measure a performance improvement but it's hard to gauge how
much it really is as since iperf results are variable now. I would say
5mbps max.

Also this change is similar to the ramips one.

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


  1   2   3   >