Re: [OpenWrt-Devel] [PATCH v2 4/5] ltq-vdsl-app: enable G.993.5 XTSE bit by default

2015-12-31 Thread John Crispin


On 30/12/2015 21:59, Mathias Kresin wrote:
> According to ITU-T G.997.1 Amendment 2 (04/2013) section 2.1, bit 3 of
> XTSE octet 8 either allow or denies the initialization of G.993.5.
> 
> Even if the current redistributable xDSL firmware doesn't include
> G.993.5 vectoring support, enable this bit by default to allow people to
> get their G.993.5 line working using a custom xDSL firmware.
> 


Is this the only change required to get vectoring working or do we need
to do anything else ?



> Signed-off-by: Mathias Kresin 
> ---
>  package/network/config/ltq-vdsl-app/files/dsl_control | 10 +++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/package/network/config/ltq-vdsl-app/files/dsl_control 
> b/package/network/config/ltq-vdsl-app/files/dsl_control
> index f6275a0..fe098d7 100644
> --- a/package/network/config/ltq-vdsl-app/files/dsl_control
> +++ b/package/network/config/ltq-vdsl-app/files/dsl_control
> @@ -13,18 +13,21 @@ EXTRA_HELP="  status  Get DSL status information
>  
>  #
>  # ITU-T G.997.1 (06/2012) - Section 7.3.1.1.1 (xTU transmission system 
> enabling (XTSE))
> +# ITU-T G.997.1 Amendment 2 (04/2013) - Section 2.1 - (Vectoring mode enable 
> (VECTORMODE_ENABLE))
>  #
>  # G.992.1 Annex A
>  # G.992.3 Annex A / L-US1 / L_US-2 / M
>  # G.992.5 Annex A / M
>  # G.993.2 Annex A/B/C
> -xtse_xdsl_a="04_00_04_00_4C_01_04_07"
> +# G.993.5 Annex A/B/C
> +xtse_xdsl_a="04_00_04_00_4C_01_04_0F"
>  
>  # G.992.1 Annex B
>  # G.992.3 Annex B
>  # G.992.5 Annex B
>  # G.993.2 Annex A/B/C
> -xtse_adsl_b="10_00_10_00_00_04_00_07"
> +# G.993.5 Annex A/B/C
> +xtse_xdsl_b="10_00_10_00_00_04_00_0F"
>  
>  # G.992.1 Annex B
>  # G.992.3 Annex B
> @@ -32,7 +35,8 @@ xtse_adsl_b="10_00_10_00_00_04_00_07"
>  # G.992.5 Annex B
>  # G.992.5 Annex J
>  # G.993.2 Annex A/B/C
> -xtse_adsl_j="10_00_10_40_00_04_01_07"
> +# G.993.5 Annex A/B/C
> +xtse_xdsl_j="10_00_10_40_00_04_01_0F"
>  
>  service_triggers() {
>   procd_add_reload_trigger network
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 1/4] lantiq: Add the xbar to vr9.dts

2015-12-31 Thread John Crispin


On 31/12/2015 01:10, Martin Blumenstingl wrote:
> linux 4.4 (since commit 08b3c894e56580b8ed3e601212a25bda974c3cc2
> "MIPS: lantiq: Disable xbar fpi burst mode") requires that the xbar is
> defined in the .dts of vrx200 (VR9) SoCs.
> ---
> I am not sure if the xbar size is really 0x1000 or if it's smaller/larger.
> Unfortunately there doesn't seem to be public information about it, but
> at least 0x1000 works.
> 

had a look in the datasheet just now and the range is 0x1F40-0x1F400FFF






>  target/linux/lantiq/dts/vr9.dtsi | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/target/linux/lantiq/dts/vr9.dtsi 
> b/target/linux/lantiq/dts/vr9.dtsi
> index 136483a..df63ce7 100644
> --- a/target/linux/lantiq/dts/vr9.dtsi
> +++ b/target/linux/lantiq/dts/vr9.dtsi
> @@ -75,6 +75,11 @@
>   interrupt-parent = <>;
>   interrupts = <115>;
>   };
> +
> + xbar0: xbar@40 {
> + compatible = "lantiq,xbar-xway";
> + reg = <0x40 0x1000>;
> + };
>   };
>  
>   fpi@1000 {
> @@ -184,7 +189,6 @@
>   0xE105400 0x400>;   /* pci bridge */
>   status = "disabled";
>   };
> -
>   };
>  
>   vdsl {
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] network/utils/dante: Fix wrong md5sum for download

2015-12-31 Thread {Nico}
Hey all,

Last update to v1.4.1 did not update MD5SUM. Fixed in r48017.

Cheers,
-- 
-{Nico}


On Thu, Dec 17, 2015 at 11:14 PM, Lars  wrote:
> hey,
>
> as with previous occasions of hashsum mismatches: why does it mismatch?
>
> cheers,
> lars
>
> On 17.12.2015 22:51, open...@daniel.thecshore.com wrote:
>> From: Daniel Dickinson 
>>
>> The md5sum in the Makefile doesn't match md5sum
>> of downloaded package which causes failure of builds
>> due to failure to get a successful download.
>> ---
>>  package/network/utils/dante/Makefile | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/package/network/utils/dante/Makefile 
>> b/package/network/utils/dante/Makefile
>> index b49ae72..ab05f8c 100644
>> --- a/package/network/utils/dante/Makefile
>> +++ b/package/network/utils/dante/Makefile
>> @@ -13,7 +13,7 @@ PKG_RELEASE:=1
>>
>>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>>  PKG_SOURCE_URL:=http://www.inet.no/dante/files/
>> -PKG_MD5SUM:=69b9d6234154d7d6a91fcbd98c68e62a
>> +PKG_MD5SUM:=68c2ce12119e12cea11a90c7a80efa8f
>>
>>  PKG_MAINTAINER:=Jo-Philipp Wich 
>>  PKG_LICENSE:=BSD-4-Clause
>>
>
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread John Crispin


On 31/12/2015 14:42, Hauke Mehrtens wrote:
> it. For me it looks like it was used to test the performance of the
> crypto engine and test the driver.

ralph added is and at the time i was important to lantiq for some reason
beyond my knowledge. maybe you can find out if that requirement still
exists. i agree that ideally we should drop it.

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] kernel: generic 4.1 & 4.4 perf: musl compatibility

2015-12-31 Thread Roman Yeryomin
On 29 December 2015 at 12:14, Kevin Darbyshire-Bryant
 wrote:
> Enable linux perf tools to compile under musl.
>
> Tested on MIPS Archer c7 v2 & ARM Linksys 1200ac.
>
> With thanks to Dave Taht  who
> did the heavy lifting.
>
> Signed-off-by: Kevin Darbyshire-Bryant 
> ---
>  package/devel/perf/Makefile|   2 +-
>  .../patches-4.1/280-perf-fixes-for-musl.patch  | 148 
> +
>  .../patches-4.4/280-perf-fixes-for-musl.patch  | 147 
>  3 files changed, 296 insertions(+), 1 deletion(-)
>  create mode 100644 
> target/linux/generic/patches-4.1/280-perf-fixes-for-musl.patch
>  create mode 100644 
> target/linux/generic/patches-4.4/280-perf-fixes-for-musl.patch
>
> diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
> index 5e3d63f..46ddb92 100644
> --- a/package/devel/perf/Makefile
> +++ b/package/devel/perf/Makefile
> @@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk
>  define Package/perf
>SECTION:=devel
>CATEGORY:=Development
> -  DEPENDS:= @USE_GLIBC +libelf1 +libdw +libpthread +librt +binutils
> +  DEPENDS:= @USE_MUSL +libelf1 +libdw +libpthread +librt +binutils
>TITLE:=Linux performance monitoring tool
>VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE)
>URL:=http://www.kernel.org
> diff --git a/target/linux/generic/patches-4.1/280-perf-fixes-for-musl.patch 
> b/target/linux/generic/patches-4.1/280-perf-fixes-for-musl.patch
> new file mode 100644
> index 000..0e8b6d8
> --- /dev/null
> +++ b/target/linux/generic/patches-4.1/280-perf-fixes-for-musl.patch
> @@ -0,0 +1,148 @@
> +kernel: 4.1 perf: musl compatibility
> +
> +Allow linux perf tool to compile under musl.
> +
> +Backport to 4.1 by Kevin D-B with thanks to Dave
> +Taht  for the heavy lifting.
> +
> +Signed-off-by: Kevin Darbyshire-Bryant 
> +
> +---
> + tools/lib/api/fs/debugfs.c |  4 
> + tools/lib/traceevent/event-parse.c |  4 
> + tools/perf/perf.c  | 17 -
> + tools/perf/util/cache.h|  2 +-
> + tools/perf/util/cloexec.c  |  4 
> + tools/perf/util/cloexec.h  |  4 
> + tools/perf/util/util.h |  4 
> + 7 files changed, 29 insertions(+), 10 deletions(-)
> +
> +diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib/api/fs/debugfs.c
> +index 8305b3e..5d1745c 100644
> +--- a/tools/lib/api/fs/debugfs.c
>  b/tools/lib/api/fs/debugfs.c
> +@@ -17,6 +17,10 @@
> + #define DEBUGFS_DEFAULT_PATH  "/sys/kernel/debug"
> + #endif
> +
> ++/* musl has a xpg compliant strerror_r by default */
> ++#define strerror_r(err, buf, buflen) \
> ++  (strerror_r(err, buf, buflen) ? NULL : buf)
> ++
> + char debugfs_mountpoint[PATH_MAX + 1] = DEBUGFS_DEFAULT_PATH;
> +
> + static const char * const debugfs_known_mountpoints[] = {
> +diff --git a/tools/lib/traceevent/event-parse.c 
> b/tools/lib/traceevent/event-parse.c
> +index ed5461f..f151369 100644
> +--- a/tools/lib/traceevent/event-parse.c
>  b/tools/lib/traceevent/event-parse.c
> +@@ -36,6 +36,10 @@
> + #include "event-parse.h"
> + #include "event-utils.h"
> +
> ++/* musl has a xpg compliant strerror_r by default */
> ++#define strerror_r(err, buf, buflen) \
> ++(strerror_r(err, buf, buflen) ? NULL : buf)
> ++
> + static const char *input_buf;
> + static unsigned long long input_buf_ptr;
> + static unsigned long long input_buf_siz;
> +diff --git a/tools/perf/perf.c b/tools/perf/perf.c
> +index b857fcb..3e67fa2 100644
> +--- a/tools/perf/perf.c
>  b/tools/perf/perf.c
> +@@ -505,6 +505,21 @@ void pthread__unblock_sigwinch(void)
> +   pthread_sigmask(SIG_UNBLOCK, , NULL);
> + }
> +
> ++unsigned cache_line_size(void);
> ++
> ++unsigned cache_line_size(void) {
> ++  FILE * p = 0;
> ++  unsigned int i = 0;
> ++  p = 
> fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r");
> ++  if (p) {
> ++  if(fscanf(p, "%d", ) != 1) {
> ++  perror("cannot determine cache line size");
> ++  }
> ++  fclose(p);
> ++  }
> ++  return i;
> ++}
> ++

Kevin, are you sure this works?
I don't have /sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size
on my Archer C7
I did a little bit more simple way adding a header from eglibc. If
anybody interested I can submit the patch for RFC.


Regards,
Roman
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread John Crispin


On 31/12/2015 14:44, Hauke Mehrtens wrote:
> 
> 
> On 12/31/2015 11:28 AM, John Crispin wrote:
>>
>>
>> On 31/12/2015 10:51, Mathias Kresin wrote:
>>> Am 31.12.2015 um 08:12 schrieb John Crispin:
 Hi

 On 31/12/2015 01:10, Martin Blumenstingl wrote:
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>   #include 
> +#endif

 please just drop the old code. there is no need to be compatible to old
 kernels.

 John

>>>
>>> I guess we should keep the compatibility with Kernel 4.1 as long as this
>>> kernel version is the default for this target and/or available for this
>>> target.
>>
>> i was planning to jump straight to 4.4
>>
>>  John
> 
> Linux 4.1 already has include/linux/scatterlist.h, I assume that this
> will also compile with linux 4.1 when you use #include 
> 
> Hauke
> 

anyone wanna try ? :) i am short on time the next 2-3 days and need to
fight the backlog before i can start on new tasks.

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/4] lantiq: Add support for linux 4.4

2015-12-31 Thread Hauke Mehrtens


On 12/31/2015 01:10 AM, Martin Blumenstingl wrote:
> The following patches were dropped because they are already applied
> upstream:
> - 0038-MIPS-lantiq-fpi-on-ar9.patch
> - 0039-MIPS-lantiq-initialize-usb-on-boot.patch
> - 0042-USB-DWC2-big-endian-support.patch
> - 0043-gpio-stp-xway-fix-phy-mask.patch
> - 0050-MIPS-lantiq-add-clk_round_rate.patch
> 
> All other patches were simply refreshed, except the following two:
> - 0001-MIPS-lantiq-add-pcie-driver.patch
>   Changes to arch/mips/lantiq/xway/sysctrl.c (these changes disabled
>   some PMU gates for the vrx200 / VR9 SoCs) were removed since the
>   upstream kernel disables unused PMU gates automatically (since
>   95135bfa7ead1becc2879230f72583dde2b71a0c
>   "MIPS: Lantiq: Deactivate most of the devices by default").
> - 0101-mtd-split.patch
>   __mtd_add_partition() is not required anymore since r47747 removed
>   it from the generic-patches. This was possible because the upstream
>   kernel does not check for duplicates anymore (since
>   3a434f66e6dab645d74a59c95651cdbe16497a50
>   "mtd: part: Remove partition overlap checks").
> ---
> linux 4.4 was briefly tested on an arx100 and vrx200 (special thanks to
> Mathias Kresin) based SoC. Both seem to boot fine and (V)DSL, wifi and
> ethernet seem to be working.
> 
>  target/linux/lantiq/config-4.4 |  168 +
>  .../0001-MIPS-lantiq-add-pcie-driver.patch | 5521 
> 
>  .../0002-MIPS-lantiq-dtb-image-hack.patch  |   31 +
>  .../0004-MIPS-lantiq-add-atm-hack.patch|  500 ++
>  .../0007-MIPS-lantiq-add-basic-tffs-driver.patch   |  111 +
>  .../0008-MIPS-lantiq-backport-old-timer-code.patch | 1028 
>  .../0012-pinctrl-lantiq-fix-up-pinmux.patch|   78 +
>  ...0013-MTD-lantiq-xway-fix-invalid-operator.patch |   24 +
>  ...xway-the-latched-command-should-be-persis.patch |   44 +
>  .../0015-MTD-lantiq-xway-remove-endless-loop.patch |   41 +
>  ...xway-add-missing-write_buf-and-read_buf-t.patch |   55 +
>  .../0017-MTD-xway-fix-nand-locking.patch   |   89 +
>  .../0018-MTD-nand-lots-of-xrx200-fixes.patch   |  125 +
>  ...MTD-lantiq-handle-NO_XIP-on-cfi0001-flash.patch |   25 +
>  ...MTD-m25p80-allow-loading-mtd-name-from-OF.patch |   44 +
>  ...023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch |  537 ++
>  ...024-NET-lantiq-adds-PHY11G-firmware-blobs.patch |  364 ++
>  .../0025-NET-MIPS-lantiq-adds-xrx200-net.patch | 3340 
>  .../patches-4.4/0026-NET-multi-phy-support.patch   |   53 +
>  .../0028-NET-lantiq-various-etop-fixes.patch   |  907 
>  .../0030-GPIO-add-named-gpio-exports.patch |  166 +
>  ...2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch | 1034 
>  .../0032-USB-fix-roothub-for-IFXHCD.patch  |   31 +
>  .../0033-SPI-MIPS-lantiq-adds-spi-xway.patch   | 1049 
>  ...ompile-when-reset-RESET_CONTROLLER-is-not.patch |   45 +
>  ...-lantiq-wifi-and-ethernet-eeprom-handling.patch |  630 +++
>  .../0036-owrt-generic-dtb-image-hack.patch |   32 +
>  .../0040-USB-DWC2-enable-usb-power-gpio.patch  |   35 +
>  .../patches-4.4/0041-USB-DWC2-add-ltq-params.patch |   46 +
>  .../linux/lantiq/patches-4.4/0101-mtd-split.patch  |  173 +
>  .../patches-4.4/0150-lantiq-pinctrl-xway.patch |   15 +
>  .../0151-lantiq-ifxmips_pcie-use-of.patch  |   51 +
>  .../0160-owrt-lantiq-multiple-flash.patch  |  217 +
>  ...D-cfi-cmdset-0001-disable-buffered-writes.patch |   11 +
>  34 files changed, 16620 insertions(+)
>  create mode 100644 target/linux/lantiq/config-4.4
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0001-MIPS-lantiq-add-pcie-driver.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0002-MIPS-lantiq-dtb-image-hack.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0004-MIPS-lantiq-add-atm-hack.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0007-MIPS-lantiq-add-basic-tffs-driver.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0008-MIPS-lantiq-backport-old-timer-code.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0012-pinctrl-lantiq-fix-up-pinmux.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0013-MTD-lantiq-xway-fix-invalid-operator.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0014-MTD-lantiq-xway-the-latched-command-should-be-persis.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0015-MTD-lantiq-xway-remove-endless-loop.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0016-MTD-lantiq-xway-add-missing-write_buf-and-read_buf-t.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0017-MTD-xway-fix-nand-locking.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0018-MTD-nand-lots-of-xrx200-fixes.patch
>  create mode 100644 
> target/linux/lantiq/patches-4.4/0020-MTD-lantiq-handle-NO_XIP-on-cfi0001-flash.patch
>  create mode 100644 
> 

Re: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread Mathias Kresin

Am 31.12.2015 um 08:12 schrieb John Crispin:

Hi

On 31/12/2015 01:10, Martin Blumenstingl wrote:

+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+#include 
+#else
  #include 
+#endif


please just drop the old code. there is no need to be compatible to old
kernels.

John



I guess we should keep the compatibility with Kernel 4.1 as long as this 
kernel version is the default for this target and/or available for this 
target.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread John Crispin


On 31/12/2015 10:51, Mathias Kresin wrote:
> Am 31.12.2015 um 08:12 schrieb John Crispin:
>> Hi
>>
>> On 31/12/2015 01:10, Martin Blumenstingl wrote:
>>> +
>>> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
>>> +#include 
>>> +#else
>>>   #include 
>>> +#endif
>>
>> please just drop the old code. there is no need to be compatible to old
>> kernels.
>>
>> John
>>
> 
> I guess we should keep the compatibility with Kernel 4.1 as long as this
> kernel version is the default for this target and/or available for this
> target.

i was planning to jump straight to 4.4

John

> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] base-files: fix generating network configuration

2015-12-31 Thread Roman Yeryomin
On 30 December 2015 at 14:32, Yousong Zhou  wrote:
> On 30 December 2015 at 20:12, Jo-Philipp Wich  wrote:
>> Hi Yousong.
>>
>> NAK - thats by design. If a network config is present then there is no
>> point in regenerating it.
>>
>> I'd prefer if the Malta target would simply drop its default config and
>> switch to board.d, this could be useful to e.g. dynamically handle
>> different amounts of eth* devices:
>>
>
> The default network config was provided by package/base-files, not
> malta target...

You can easily override it, no need to modify defaults.

Regards,
Roman
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread Hauke Mehrtens


On 12/31/2015 11:28 AM, John Crispin wrote:
> 
> 
> On 31/12/2015 10:51, Mathias Kresin wrote:
>> Am 31.12.2015 um 08:12 schrieb John Crispin:
>>> Hi
>>>
>>> On 31/12/2015 01:10, Martin Blumenstingl wrote:
 +
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
 +#include 
 +#else
   #include 
 +#endif
>>>
>>> please just drop the old code. there is no need to be compatible to old
>>> kernels.
>>>
>>> John
>>>
>>
>> I guess we should keep the compatibility with Kernel 4.1 as long as this
>> kernel version is the default for this target and/or available for this
>> target.
> 
> i was planning to jump straight to 4.4
> 
>   John

Linux 4.1 already has include/linux/scatterlist.h, I assume that this
will also compile with linux 4.1 when you use #include 

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 2/2] swconfig: add API for setting port link speed

2015-12-31 Thread Rafał Miłecki
On 29 December 2015 at 14:02, Rafał Miłecki  wrote:
> @@ -595,6 +614,33 @@ swconfig_parse_ports(struct sk_buff *msg, struct nlattr 
> *head,
>  }
>
>  static int
> +swconfig_parse_link(struct sk_buff *msg, struct nlattr *nla,
> +   struct switch_port_link *link)
> +{
> +   struct nlattr *tb[SWITCH_LINK_ATTR_MAX + 1];
> +
> +   if (nla_parse_nested(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy))
> +   return -EINVAL;
> +
> +   if (!tb[SWITCH_PORT_ID])
> +   return -EINVAL;

Invalid check, copy & paste mistake, drop it.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread Hauke Mehrtens


On 12/31/2015 01:10 AM, Martin Blumenstingl wrote:
> Upstream linux 4.2 commit 84be456f883c4685680fba8e5154b5f72e92957e
> "remove " moves scatterlist.h to linux/ instead of asm/.
> 
> Upstream linux 4.3 commit b0d955ba4688fcba8112884931aea1f1e6f50f03
> "crypto: aead - Remove old AEAD interfaces" removed aead_request_set_assoc.
> aead_request_set_ad should be used instead.
> ---
>  package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h|  6 ++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h |  6 ++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h|  7 +++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h|  6 ++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c   |  7 +++
>  package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c  |  7 +++
>  package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c| 10 ++
>  7 files changed, 49 insertions(+)
> 
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h
> index 1d84da3..f030d62 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h
> @@ -54,7 +54,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  #include "ifxmips_deu.h"
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h
> index 62ad96d..32e055c 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h
> @@ -53,7 +53,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  #include "ifxmips_deu.h"
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h
> index 5198a4a..c376266 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h
> @@ -31,11 +31,18 @@
>  #ifndef IFXMIPS_DEU_DMA_H
>  #define IFXMIPS_DEU_DMA_H
>  
> +#include 
>  #include 
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  #include 
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h
> index d2cfd11..f801c24 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h
> @@ -54,7 +54,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  #include "ifxmips_deu.h"
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c
> index a5f5f90..e546a92 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c
> @@ -40,6 +40,7 @@
>  
>  
>  /* Project header */
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -48,7 +49,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  
>  #if defined(CONFIG_DANUBE)
> diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c 
> b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c
> index a5a6c39..be16152 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c
> +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c
> @@ -40,6 +40,7 @@
>  
>  
>  /* Project header */
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -47,7 +48,13 @@
>  #include 
>  #include 
>  #include 
> +
> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
> +#include 
> +#else
>  #include 
> +#endif
> +
>  #include 
>  #include 
>  
> diff --git a/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c 
> b/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c
> index 054cac3..36848ee 100644
> --- a/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c
> +++ b/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c
> @@ -13,6 +13,8 @@
>   *
>   */
>  
> +#include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -475,7 +477,11 @@ static int test_aead(struct crypto_aead *tfm, int enc,
>   aead_request_set_crypt(req, sg, sg,
>  template[i].ilen, iv);
>  
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
>   aead_request_set_assoc(req, asg, template[i].alen);
> +#else
> + aead_request_set_ad(req, template[i].alen);
> +#endif

I think this change is wrong. Compare it to the 

Re: [OpenWrt-Devel] [PATCH v2 4/5] ltq-vdsl-app: enable G.993.5 XTSE bit by default

2015-12-31 Thread Mathias Kresin

Am 31.12.2015 um 10:01 schrieb John Crispin:



On 30/12/2015 21:59, Mathias Kresin wrote:

According to ITU-T G.997.1 Amendment 2 (04/2013) section 2.1, bit 3 of
XTSE octet 8 either allow or denies the initialization of G.993.5.

Even if the current redistributable xDSL firmware doesn't include
G.993.5 vectoring support, enable this bit by default to allow people to
get their G.993.5 line working using a custom xDSL firmware.




Is this the only change required to get vectoring working or do we need
to do anything else ?



It should be all. Since r47784, vectoring already works with the XTSE in 
auto mode[1], using a vectoring capable firmware.


I can't say whether this change is really required. My vectoring test 
user doesn't have access to his line till mid january.


According to the ITU spec the bit has to be set. But if I have a look at 
XTSE from the status output that was send to me the last time[2], I get 
the feeling that at least this particular provider doesn't use this bit.


Since the bit doesn't broke my none vectoring VDSL2 line, I decided to 
set the bit to be conform to the specification.


Mathias

[1] http://paste.debian.net/hidden/04381d10/
[2] https://patchwork.ozlabs.org/patch/552876/
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] kernel: generic 4.1 & 4.4 perf: musl compatibility

2015-12-31 Thread Kevin Darbyshire-Bryant


On 31/12/15 12:22, Roman Yeryomin wrote:
> On 29 December 2015 at 12:14, Kevin Darbyshire-Bryant
>  wrote:
>
> Kevin, are you sure this works?
> I don't have /sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size
> on my Archer C7
Hi Roman,

Perf ran and didn't barf when I tried...however I'm new to perf so maybe
I didn't look in the right place.  I also wonder if that sys file entry
is only enabled when kernel perf config is enabled too.

> I did a little bit more simple way adding a header from eglibc. If
> anybody interested I can submit the patch for RFC.
Personally, I'd say anything that helps performance investigations on
'under powered' SoC devices is a good thing, helpful & useful.

Kevin
>
>
> Regards,
> Roman




smime.p7s
Description: S/MIME Cryptographic Signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer

2015-12-31 Thread Hauke Mehrtens


On 12/31/2015 02:51 PM, John Crispin wrote:
> 
> 
> On 31/12/2015 14:44, Hauke Mehrtens wrote:
>>
>>
>> On 12/31/2015 11:28 AM, John Crispin wrote:
>>>
>>>
>>> On 31/12/2015 10:51, Mathias Kresin wrote:
 Am 31.12.2015 um 08:12 schrieb John Crispin:
> Hi
>
> On 31/12/2015 01:10, Martin Blumenstingl wrote:
>> +
>> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
>> +#include 
>> +#else
>>   #include 
>> +#endif
>
> please just drop the old code. there is no need to be compatible to old
> kernels.
>
> John
>

 I guess we should keep the compatibility with Kernel 4.1 as long as this
 kernel version is the default for this target and/or available for this
 target.
>>>
>>> i was planning to jump straight to 4.4
>>>
>>> John
>>
>> Linux 4.1 already has include/linux/scatterlist.h, I assume that this
>> will also compile with linux 4.1 when you use #include 
>>
>> Hauke
>>
> 
> anyone wanna try ? :) i am short on time the next 2-3 days and need to
> fight the backlog before i can start on new tasks.
> 
>   John

Kernel 4.1 still builds without the ifdef and only using the
linux/scatterlist.h include.

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] GPIO edge file

2015-12-31 Thread Boken Lin
Hi All,

Seems like the sysfs interface to control GPIO on the AR9331 doesn't exist. Can 
someone point me in the right direction to change the driver so that the kernel 
creates this file when the GPIO? I have been able to create an IRQ handler for 
GPIO value changes, but i'm not sure how to hook that into the kernel.

Any advice is greatly appreciated!
Boken.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 2/4] [CC] ramips: Fix comment in rt3052 ethernet switch driver.

2015-12-31 Thread Vittorio G (VittGam)
Line 461 is actually enabling all switch ports by setting the disable bits
to 0. This needs to be done because the bootloader sets all ports to disabled
by default (which is the case for at least one router based on RT5350).

So, this patch fixes the comment in line 460.

Signed-off-by: Vittorio Gambaletta 
---

--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
@@ -457,7 +457,7 @@ static void esw_hw_init(struct rt305x_esw *esw)
  (RT305X_ESW_PORTS_ALL << RT305X_ESW_PFC1_EN_VLAN_S),
  RT305X_ESW_REG_PFC1);
 
-   /* Enable Back Pressure, and Flow Control */
+   /* Enable all ports, Back Pressure and Flow Control */
esw_w32(esw,
  ((RT305X_ESW_PORTS_ALL << RT305X_ESW_POC0_EN_BP_S) |
   (RT305X_ESW_PORTS_ALL << RT305X_ESW_POC0_EN_FC_S)),
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 3/4] ramips: Get rt3050 ethernet ports to be disabled from the device tree.

2015-12-31 Thread Vittorio G (VittGam)
This patch allows configuring ports to be disabled in the device tree; this
saves power, since disabling ports here actually disables power to ethernet
PHYs.

Line 443 enables all ethernet ports, so line 486 is getting zero ports to be
disabled, except for port 5 in SoCs where this is not implemented as it will
be sticky disabled in register POC0. Because of this, the code will still read
the switch configuration and OR it to the device tree setting.

Signed-off-by: Vittorio Gambaletta 
---

--- /dev/null
+++ 
b/target/linux/ramips/patches-4.3/0516-net-mediatek-get-rt3050-ethernet-ports-to-be-disable.patch
@@ -0,0 +1,81 @@
+From: Vittorio Gambaletta 
+Date: Fri, 01 Jan 2016 00:00:02 +0100
+Subject: [PATCH 3/3] net: mediatek: Get rt3050 ethernet ports to be disabled 
from the device tree.
+
+This patch allows configuring ports to be disabled in the device tree; this
+saves power, since disabling ports here actually disables power to ethernet
+PHYs.
+
+Line 443 enables all ethernet ports, so line 486 is getting zero ports to be
+disabled, except for port 5 in SoCs where this is not implemented as it will
+be sticky disabled in register POC0. Because of this, the code will still read
+the switch configuration and OR it to the device tree setting.
+
+Signed-off-by: Vittorio Gambaletta 
+---
+
+--- a/drivers/net/ethernet/mediatek/esw_rt3050.c
 b/drivers/net/ethernet/mediatek/esw_rt3050.c
+@@ -10,6 +10,7 @@
+  *   Copyright (C) 2009-2015 John Crispin 
+  *   Copyright (C) 2009-2015 Felix Fietkau 
+  *   Copyright (C) 2013-2015 Michael Lee 
++ *   Copyright (C) 2016 Vittorio Gambaletta 
+  */
+ 
+ #include 
+@@ -218,6 +219,7 @@ struct rt305x_esw {
+   spinlock_t  reg_rw_lock;
+ 
+   unsigned char   port_map;
++  unsigned char   port_disable;
+   unsigned intreg_led_polarity;
+ 
+   struct switch_dev   swdev;
+@@ -482,8 +484,14 @@ static void esw_hw_init(struct rt305x_es
+   esw_w32(esw, 0x0005, RT305X_ESW_REG_P3LED);
+   esw_w32(esw, 0x0005, RT305X_ESW_REG_P4LED);
+ 
+-  /* Copy disabled port configuration from bootloader setup */
+-  port_disable = esw_get_port_disable(esw);
++  /* Copy disabled port configuration from device tree setup */
++  port_disable = esw->port_disable;
++
++  /* Disable nonexistent ports by reading the switch config
++   * after having enabled all possible ports above
++   */
++  port_disable |= esw_get_port_disable(esw);
++
+   for (i = 0; i < 6; i++)
+   esw->ports[i].disable = (port_disable & (1 << i)) != 0;
+ 
+@@ -1329,7 +1337,7 @@ static int esw_probe(struct platform_dev
+ {
+   struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+   struct device_node *np = pdev->dev.of_node;
+-  const __be32 *port_map, *reg_init;
++  const __be32 *port_map, *port_disable, *reg_init;
+   struct switch_dev *swdev;
+   struct rt305x_esw *esw;
+   struct resource *irq;
+@@ -1349,6 +1357,10 @@ static int esw_probe(struct platform_dev
+   if (port_map)
+   esw->port_map = be32_to_cpu(*port_map);
+ 
++  port_disable = of_get_property(np, "mediatek,portdisable", NULL);
++  if (port_disable)
++  esw->port_disable = be32_to_cpu(*port_disable);
++
+   reg_init = of_get_property(np, "mediatek,led_polarity", NULL);
+   if (reg_init)
+   esw->reg_led_polarity = be32_to_cpu(*reg_init);
+--- a/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
 b/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
+@@ -16,6 +16,7 @@ Required properties:
+ Optional properties:
+ - mediatek,portmap: can be used to choose if the default switch setup is
+   w or w
++- mediatek,portdisable: disable unused ethernet PHYs to save power
+ - mediatek,led_polarity: override the active high/low settings of the leds
+ 
+ Example:
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 4/4] [CC] ramips: Disable all ethernet ports except port 4 on HT-TM02.

2015-12-31 Thread Vittorio G (VittGam)
Port 4 is the only ethernet port on this router, so disable all other PHYs
in order to save power.

Signed-off-by: Vittorio Gambaletta 
---

--- a/target/linux/ramips/dts/HT-TM02.dts
+++ b/target/linux/ramips/dts/HT-TM02.dts
@@ -57,6 +57,7 @@
 
esw@1011 {
ralink,portmap = <0x10>;
+   ralink,portdisable = <0x2f>;
};
 
wmac@1018 {
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 3/4] [CC] ramips: Get rt3052 ethernet ports to be disabled from the device tree.

2015-12-31 Thread Vittorio G (VittGam)
This patch allows configuring ports to be disabled in the device tree; this
saves power, since disabling ports here actually disables power to ethernet
PHYs.

Line 461 enables all ethernet ports, so line 508 is getting zero ports to be
disabled, except for port 5 in SoCs where this is not implemented as it will
be sticky disabled in register POC0. Because of this, the code will still read
the switch configuration and OR it to the device tree setting.

Signed-off-by: Vittorio Gambaletta 
---

--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
@@ -233,6 +233,7 @@ struct rt305x_esw {
spinlock_t  reg_rw_lock;
 
unsigned char   port_map;
+   unsigned char   port_disable;
unsigned intreg_initval_fct2;
unsigned intreg_initval_fpa2;
unsigned intreg_led_polarity;
@@ -504,8 +505,14 @@ static void esw_hw_init(struct rt305x_esw *esw)
esw_w32(esw, 0x0005, RT305X_ESW_REG_P3LED);
esw_w32(esw, 0x0005, RT305X_ESW_REG_P4LED);
 
-   /* Copy disabled port configuration from bootloader setup */
-   port_disable = esw_get_port_disable(esw);
+   /* Copy disabled port configuration from device tree setup */
+   port_disable = esw->port_disable;
+
+   /* Disable nonexistent ports by reading the switch config
+* after having enabled all possible ports above
+*/
+   port_disable |= esw_get_port_disable(esw);
+
for (i = 0; i < 6; i++)
esw->ports[i].disable = (port_disable & (1 << i)) != 0;
 
@@ -1373,7 +1380,7 @@ static int esw_probe(struct platform_device *pdev)
 {
struct device_node *np = pdev->dev.of_node;
const struct rt305x_esw_platform_data *pdata;
-   const __be32 *port_map, *reg_init;
+   const __be32 *port_map, *port_disable, *reg_init;
struct rt305x_esw *esw;
struct switch_dev *swdev;
struct resource *res, *irq;
@@ -1419,6 +1426,10 @@ static int esw_probe(struct platform_device *pdev)
port_map = of_get_property(np, "ralink,portmap", NULL);
if (port_map)
esw->port_map = be32_to_cpu(*port_map);
+
+   port_disable = of_get_property(np, "ralink,portdisable", NULL);
+   if (port_disable)
+   esw->port_disable = be32_to_cpu(*port_disable);
 
reg_init = of_get_property(np, "ralink,fct2", NULL);
if (reg_init)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 2/4] ramips: Fix comment in rt3050 ethernet switch driver.

2015-12-31 Thread Vittorio G (VittGam)
Line 443 is actually enabling all switch ports by setting the disable bits
to 0. This needs to be done because the bootloader sets all ports to disabled
by default (which is the case for at least one router based on RT5350).

So, this patch fixes the comment in line 442.

Signed-off-by: Vittorio Gambaletta 
---

--- /dev/null
+++ 
b/target/linux/ramips/patches-4.3/0515-net-mediatek-fix-comment-in-rt3050-ethernet-switch-d.patch
@@ -0,0 +1,24 @@
+From: Vittorio Gambaletta 
+Date: Fri, 01 Jan 2016 00:00:01 +0100
+Subject: [PATCH 2/3] net: mediatek: Fix comment in rt3050 ethernet switch 
driver.
+
+Line 443 is actually enabling all switch ports by setting the disable bits
+to 0. This needs to be done because the bootloader sets all ports to disabled
+by default (which is the case for at least one router based on RT5350).
+
+So, this patch fixes the comment in line 442.
+
+Signed-off-by: Vittorio Gambaletta 
+---
+
+--- a/drivers/net/ethernet/mediatek/esw_rt3050.c
 b/drivers/net/ethernet/mediatek/esw_rt3050.c
+@@ -439,7 +439,7 @@ static void esw_hw_init(struct rt305x_es
+(RT305X_ESW_PORTS_ALL << RT305X_ESW_PFC1_EN_VLAN_S),
+   RT305X_ESW_REG_PFC1);
+ 
+-  /* Enable Back Pressure, and Flow Control */
++  /* Enable all ports, Back Pressure and Flow Control */
+   esw_w32(esw, ((RT305X_ESW_PORTS_ALL << RT305X_ESW_POC0_EN_BP_S) |
+ (RT305X_ESW_PORTS_ALL << RT305X_ESW_POC0_EN_FC_S)),
+   RT305X_ESW_REG_POC0);
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 1/4] [CC] ramips: Fix whitespace in the rt3052 switch driver.

2015-12-31 Thread Vittorio G (VittGam)
Signed-off-by: Vittorio Gambaletta 
---

--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c
@@ -1417,19 +1417,19 @@ static int esw_probe(struct platform_device *pdev)
}
 
port_map = of_get_property(np, "ralink,portmap", NULL);
-if (port_map)
+   if (port_map)
esw->port_map = be32_to_cpu(*port_map);
 
reg_init = of_get_property(np, "ralink,fct2", NULL);
-if (reg_init)
+   if (reg_init)
esw->reg_initval_fct2 = be32_to_cpu(*reg_init);
 
reg_init = of_get_property(np, "ralink,fpa2", NULL);
-if (reg_init)
+   if (reg_init)
esw->reg_initval_fpa2 = be32_to_cpu(*reg_init);
 
reg_init = of_get_property(np, "ralink,led_polarity", NULL);
-if (reg_init)
+   if (reg_init)
esw->reg_led_polarity = be32_to_cpu(*reg_init);
 
swdev = >swdev;
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 4/4] ramips: Disable all ethernet ports except port 4 on HT-TM02.

2015-12-31 Thread Vittorio G (VittGam)
Port 4 is the only ethernet port on this router, so disable all other PHYs
in order to save power.

Signed-off-by: Vittorio Gambaletta 
---

--- a/target/linux/ramips/dts/HT-TM02.dts
+++ b/target/linux/ramips/dts/HT-TM02.dts
@@ -63,6 +63,7 @@
 
esw@1011 {
mediatek,portmap = <0x10>;
+   mediatek,portdisable = <0x2f>;
};
 
wmac@1018 {
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v4 1/4] ramips: Fix documentation for the rt3050 switch driver.

2015-12-31 Thread Vittorio G (VittGam)
The prefix used in the driver is now "mediatek" instead of "ralink".

Signed-off-by: Vittorio Gambaletta 
---

--- /dev/null
+++ 
b/target/linux/ramips/patches-4.3/0514-Documentation-DT-net-mediatek-fix-documentation-for-.patch
@@ -0,0 +1,23 @@
+From: Vittorio Gambaletta 
+Date: Fri, 01 Jan 2016 00:00:00 +0100
+Subject: [PATCH 1/3] Documentation: DT: net: mediatek: Fix documentation for 
the rt3050 switch driver.
+
+The prefix used in the driver is now "mediatek" instead of "ralink".
+
+Signed-off-by: Vittorio Gambaletta 
+---
+
+--- a/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
 b/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt
+@@ -14,9 +14,9 @@ Required properties:
+ - reset-names: Should contain the reset names "esw"
+ 
+ Optional properties:
+-- ralink,portmap: can be used to choose if the default switch setup is
++- mediatek,portmap: can be used to choose if the default switch setup is
+   w or w
+-- ralink,led_polarity: override the active high/low settings of the leds
++- mediatek,led_polarity: override the active high/low settings of the leds
+ 
+ Example:
+ 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel