[OpenWrt-Devel] Lantiq xway Devicetree entry for NOR/NAND

2013-02-04 Thread JD McDonnell

I have a Lantiq Xway Danube Hub based on the 50712 SoC. It is unique in 
that it is the only board, afaik, with NOR (512k) and NAND (32MB) on the
 ebu. The NOR contains u-boot and configs, the NAND holds the image file.

Having spent several days attempting to adapt
 other 50702 devicetree files from Trunk, I need some assistance to move
 forward. The NAND is correctly picked up, but erase block checking 
fails completely. NOR probing just fails, on kernel 3.3.8 it is picked up by 
the JEDEC probe.

I would greatly appreciate your help/advise and will report my results.

TIA, Dermot.

Below my devicetree file and after that the bootlog.

Devicetree file:
/dts-v1/;

/include/ danube.dtsi

/ {
model = BTHH2B - BT Home Hub 2B;/* SoC: Lantiq Danube-S PSB 50712 
@ 333MHz
 V1.3/1.5 */

chosen {
bootargs = console=ttyLTQ0,115200 init=/etc/preinit;
};

memory@0 {/* RAM: Samsung K4H511638F 64MB */
reg = 0x0 0x400;
};

fpi@1000 {
#address-cells = 1;
#size-cells = 1;
localbus@0 {
#address-cells = 2;
#size-cells = 1;
ranges = 0 0 0x0 0x3ff /* addrsel0 */
   
 1 0 0x400 0x410; /* addsel1 */
compatible = lantiq,localbus, simple-bus;

nor-boot@0 {/* NOR Flash: Spansion S29AL004D 512KB 
*/
compatible = lantiq,nor;/* AMD AM29LV400BB compatible 
on 3.3.8 */
lantiq,cs = 0;
bank-width = 2;
reg = 0 0x0 0x8;
   
 #address-cells = 1;
#size-cells = 1;

partition@0 {
label = uboot;
reg = 0x0 0x4; /* 256KB */
};

partition@4 {
label = uboot_env;
reg = 0x4 0x1; /* 64KB */
   
 };

partition@5 {
label = rg_conf_1;
reg = 0x5 0x1;
};

partition@6 {
label = rg_conf_2;
reg = 0x6 0x1;
};

   
 partition@7 {
label = rg_conf_factory;
reg = 0x7 0x1;
};
};

nand-parts@0 {/* NAND Flash: Samsung 
K9F5608U0D-JIB0 32MB */
compatible = gen_nand, lantiq,nand-xway;
lantiq,cs = 1;
bank-width =
 2;
reg = 1 0x0 0x200 ;
#address-cells = 1;
#size-cells = 1;

partition@0 {
label = art; /* Atheros 9160 wifi b/g/n radio 
EEPROM */
reg = 0x0 0x4000;
};

partition@4000 {
   
 label = linux;
reg = 0x4000 0x200;
};
};
};

gpio: pinmux@E100B10 {
compatible = lantiq,pinctrl-xway;
pinctrl-names = default;
pinctrl-0 = state_default;

#gpio-cells = 2;
gpio-controller;
   
 reg = 0xE100B10 0xA0;

state_default: pinmux {
stp {
lantiq,groups = stp;
lantiq,function = stp;
};
exin {
lantiq,groups = exin1;
lantiq,function = exin;
   
 };
pci {
lantiq,groups = gnt1;
lantiq,function = pci;
};
conf_out {
lantiq,pins = io4, io5, io6; /* stp */
lantiq,open-drain;
lantiq,pull = 0;
   
 };
};
};

etop@E18 {
compatible = lantiq,etop-xway;
reg = 0xE18 0x4;
interrupt-parent = icu0;
interrupts = 73 78;
phy-mode = mii;/* DmcD 4feb13 changed rmii to mii */
mac-address = [ 00 11 22 33 44 55 ];
};

stp0: stp@E100BB0 {
   
 #gpio-cells = 2;
compatible = lantiq,gpio-stp-xway;
gpio-controller;
reg = 0xE100BB0 0x40;

lantiq,shadow = 0xfff;
lantiq,groups = 0x3;
};

pci@E105400 {
lantiq,bus-clock = ;
interrupt-map-mask = 0xf800 0x0 0x0 0x7;
interrupt-map =
 
0x7000 0 0 1 icu0 29 1 // slot 14, irq 29
;
gpios-reset = gpio 21 0;
req-mask = 0x1;/* GNT1 */
};

};
};


Bootlog:

=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2013.02.04 01:58:06 =~=~=~=~=~=~=~=~=~=~=~=

 
Porta-Danube # tftpboot 8100 x.image 

TFTP from server 192.168.1.10; our IP address is 192.168.1.11


[OpenWrt-Devel] Compiling Problem

2013-02-04 Thread Pietro Paolini
Hi all,

I catch a problem in compiling the toolchain, I am under a:

Linux pedr0debian 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686
GNU/Linux


And error is :


/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//math.texi:1369: warning: @strong{Note...} produces a spurious
cross-reference in Info; reword to avoid that.
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:2: `Language Features' has no Up field (perhaps
incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//contrib.texi:1: Prev reference to nonexistent node
`Maintenance' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//libc.texinfo:86: Node `Top' lacks menu item for
`Contributors' despite being its Up target.
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//install.texi:5: Next reference to nonexistent node
`Maintenance' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//install.texi:5: Prev reference to nonexistent node `Library
Summary' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//libc.texinfo:86: Node `Top' lacks menu item for
`Installation' despite being its Up target.
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//crypt.texi:2: `Cryptographic Functions' has no Up field
(perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//debug.texi:1: `Debugging Support' has no Up field (perhaps
incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//conf.texi:1: Next field of node `System Configuration' not
pointed to (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//crypt.texi:2: This node (Cryptographic Functions) has the bad
Prev.
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//conf.texi:1: Prev reference to nonexistent node `System
Management' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//libc.texinfo:86: Node `Top' lacks menu item for `System
Configuration' despite being its Up target.
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//math.texi:30: Next reference to nonexistent node `Arithmetic'
(perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//math.texi:30: Prev reference to nonexistent node `Syslog'
(perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//libc.texinfo:86: Node `Top' lacks menu item for `Mathematics'
despite being its Up target.
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//libc.texinfo:86: Next reference to nonexistent node
`Introduction' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:874: Cross reference to nonexistent node `I/O on
Streams' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:852: Cross reference to nonexistent node `Extended
Char Intro' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:631: Cross reference to nonexistent node `Copying
and Concatenation' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:630: Cross reference to nonexistent node
`Unconstrained Allocation' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:364: Cross reference to nonexistent node `Executing
a File' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:357: Cross reference to nonexistent node `Formatted
Output Functions' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:185: Cross reference to nonexistent node `Formatted
Output' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:132: Cross reference to nonexistent node `Error
Messages' (perhaps incorrect sectioning?).
/home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
-2.7/manual//lang.texi:129: Cross reference to nonexistent node `Exit
Status' 

Re: [OpenWrt-Devel] Lantiq xway Devicetree entry for NOR/NAND

2013-02-04 Thread John Crispin

On 04/02/13 13:23, JD McDonnell wrote:

   gpio: pinmux@E100B10 {
 compatible = lantiq,pinctrl-xway;
 pinctrl-names = default;
 pinctrl-0 = state_default;

 #gpio-cells = 2;
 gpio-controller;
 reg = 0xE100B10 0xA0;

 state_default: pinmux {
 stp {
 lantiq,groups = stp;
 lantiq,function = stp;
 };
 exin {
 lantiq,groups = exin1;
 lantiq,function = exin;
 };
 pci {
 lantiq,groups = gnt1;
 lantiq,function = pci;
 };
 conf_out {
 lantiq,pins = io4, io5, io6; /* stp */
 lantiq,open-drain;
 lantiq,pull = 0;
 };
 };


Hi,

the pinmux settings for the ebu are missing. unless the bootlaoder 
leaves them all setup properly this might be the problem.


can you come on irc and we go over it there would be much easier than 
using email (oder skype/jabber) if you prefer


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


Re: [OpenWrt-Devel] [PATCH] cyrus-sasl: add config/libtool.m4 to PKG_REMOVE_FILES list

2013-02-04 Thread Luka Perkov
On Sun, Feb 03, 2013 at 02:51:42PM -0800, Mark Baugher wrote:
 cyrus-sasl failed to compile in my environment. This patch closes ticket
 https://dev.openwrt.org/ticket/11700

Applied in r35483. Thank you.

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


Re: [OpenWrt-Devel] Compiling Problem

2013-02-04 Thread Saverio Proto
Hello,

you need to post what svn revision of OpenWRT you are compiling.

best regards

Saverio Proto


2013/2/4 Pietro Paolini p.paol...@genexis.nl:
 Hi all,

 I catch a problem in compiling the toolchain, I am under a:

 Linux pedr0debian 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686
 GNU/Linux


 And error is :


 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//math.texi:1369: warning: @strong{Note...} produces a spurious
 cross-reference in Info; reword to avoid that.
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//lang.texi:2: `Language Features' has no Up field (perhaps
 incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//contrib.texi:1: Prev reference to nonexistent node
 `Maintenance' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//libc.texinfo:86: Node `Top' lacks menu item for
 `Contributors' despite being its Up target.
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//install.texi:5: Next reference to nonexistent node
 `Maintenance' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//install.texi:5: Prev reference to nonexistent node `Library
 Summary' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//libc.texinfo:86: Node `Top' lacks menu item for
 `Installation' despite being its Up target.
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//crypt.texi:2: `Cryptographic Functions' has no Up field
 (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//debug.texi:1: `Debugging Support' has no Up field (perhaps
 incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//conf.texi:1: Next field of node `System Configuration' not
 pointed to (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//crypt.texi:2: This node (Cryptographic Functions) has the bad
 Prev.
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//conf.texi:1: Prev reference to nonexistent node `System
 Management' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//libc.texinfo:86: Node `Top' lacks menu item for `System
 Configuration' despite being its Up target.
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//math.texi:30: Next reference to nonexistent node `Arithmetic'
 (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//math.texi:30: Prev reference to nonexistent node `Syslog'
 (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//libc.texinfo:86: Node `Top' lacks menu item for `Mathematics'
 despite being its Up target.
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//libc.texinfo:86: Next reference to nonexistent node
 `Introduction' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//lang.texi:874: Cross reference to nonexistent node `I/O on
 Streams' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//lang.texi:852: Cross reference to nonexistent node `Extended
 Char Intro' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//lang.texi:631: Cross reference to nonexistent node `Copying
 and Concatenation' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//lang.texi:630: Cross reference to nonexistent node
 `Unconstrained Allocation' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//lang.texi:364: Cross reference to nonexistent node `Executing
 a File' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//lang.texi:357: Cross reference to nonexistent node `Formatted
 Output Functions' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//lang.texi:185: Cross reference to nonexistent node `Formatted
 Output' (perhaps incorrect sectioning?).
 /home/ppaolini/repo/drgos/build_dir/toolchain-arm_gcc-4.1.2_glibc-2.7/glibc
 -2.7/manual//lang.texi:132: Cross reference 

[OpenWrt-Devel] [PATCH] brcm47xx: Fix switch config on 4716/53115 devices

2013-02-04 Thread Jonathan McCrohan
Signed-off-by: Jonathan McCrohan jmccro...@gmail.com
---
 target/linux/brcm47xx/base-files/etc/init.d/netconfig |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig 
b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
index b4840c2..303ab56 100755
--- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig
+++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
@@ -166,7 +166,7 @@ start() {
}
 
# generic broadcom 4716 processor with 53115 switch
-   if (nvram[boardtype] == 0x04cf) {
+   if (tolower(nvram[boardtype]) == 0x04cf) {
c[vlan0ports] = 1 2 3 4 8*
c[vlan1ports] = 0 8
}
-- 
1.7.10.4

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


[OpenWrt-Devel] [PATCH] [netifd] add bridge priority option

2013-02-04 Thread Niels Boehm
[netifd] add bridge priority option

Using the bridge priority (lower numbers are higher in the
hierarchy), one can ensure that the router is chosen as root
bridge in a setup with spanning tree protocol.

For instance, one can set the priority of network lan to 32767,
causing the router to win over all directly and indirectly
connected nodes that have a default priority of 32768.

The reason for doing that is that otherwise it has a default
priority 32768 as well and any other connected node could win and
get root bridge. In a home setup, those nodes are often desktop
or laptop boxes and get switched off from time to time. As a
consequence, root bridges vanish or new root bridges get chosen
relatively often, resulting in frequent topology changes to the
STP network. While the new topology has not settled, packets can
get lost, causing noticeable interruptions of network traffic.

Setting the router's bridge on a lower numbered priority (and thus
higher in the selection hierarchy) solves the problem in the vast
majority of the cases by ensuring that the device that is most
likely powered on 24/7 gets chosen as root and prevents topology
changes.

Signed-off-by: Niels Boehm blubberdib...@gmail.com
---
 bridge.c   |7 +++
 system-linux.c |6 ++
 system.h   |2 ++
 3 files changed, 15 insertions(+)

diff --git a/bridge.c b/bridge.c
index 1d02f83..83c9d79 100644
--- a/bridge.c
+++ b/bridge.c
@@ -26,6 +26,7 @@ enum {
BRIDGE_ATTR_IFNAME,
BRIDGE_ATTR_STP,
BRIDGE_ATTR_FORWARD_DELAY,
+   BRIDGE_ATTR_PRIORITY,
BRIDGE_ATTR_IGMP_SNOOP,
BRIDGE_ATTR_AGEING_TIME,
BRIDGE_ATTR_HELLO_TIME,
@@ -37,6 +38,7 @@ static const struct blobmsg_policy 
bridge_attrs[__BRIDGE_ATTR_MAX] = {
[BRIDGE_ATTR_IFNAME] = { ifname, BLOBMSG_TYPE_ARRAY },
[BRIDGE_ATTR_STP] = { stp, BLOBMSG_TYPE_BOOL },
[BRIDGE_ATTR_FORWARD_DELAY] = { forward_delay, BLOBMSG_TYPE_INT32 },
+   [BRIDGE_ATTR_PRIORITY] = { priority, BLOBMSG_TYPE_INT32 },
[BRIDGE_ATTR_AGEING_TIME] = { ageing_time, BLOBMSG_TYPE_INT32 },
[BRIDGE_ATTR_HELLO_TIME] = { hello_time, BLOBMSG_TYPE_INT32 },
[BRIDGE_ATTR_MAX_AGE] = { max_age, BLOBMSG_TYPE_INT32 },
@@ -469,6 +471,11 @@ bridge_apply_settings(struct bridge_state *bst, struct 
blob_attr **tb)
if ((cur = tb[BRIDGE_ATTR_FORWARD_DELAY]))
cfg-forward_delay = blobmsg_get_u32(cur);

+   if ((cur = tb[BRIDGE_ATTR_PRIORITY])) {
+   cfg-priority = blobmsg_get_u32(cur);
+   cfg-flags |= BRIDGE_OPT_PRIORITY;
+   }
+
if ((cur = tb[BRIDGE_ATTR_IGMP_SNOOP]))
cfg-igmp_snoop = blobmsg_get_bool(cur);

diff --git a/system-linux.c b/system-linux.c
index 8345e5d..5dbe4ec 100644
--- a/system-linux.c
+++ b/system-linux.c
@@ -562,6 +562,12 @@ int system_bridge_addbr(struct device *bridge, struct 
bridge_config *cfg)

system_set_dev_sysctl(/sys/devices/virtual/net/%s/bridge/multicast_snooping,
bridge-ifname, cfg-igmp_snoop ? 1 : 0);

+   if (cfg-flags  BRIDGE_OPT_PRIORITY) {
+   args[0] = BRCTL_SET_BRIDGE_PRIORITY;
+   args[1] = cfg-priority;
+   system_bridge_if(bridge-ifname, NULL, SIOCDEVPRIVATE, args);
+   }
+
if (cfg-flags  BRIDGE_OPT_AGEING_TIME) {
args[0] = BRCTL_SET_AGEING_TIME;
args[1] = sec_to_jiffies(cfg-ageing_time);
diff --git a/system.h b/system.h
index acfaa37..8066d55 100644
--- a/system.h
+++ b/system.h
@@ -37,12 +37,14 @@ enum bridge_opt {
BRIDGE_OPT_AGEING_TIME = (1  0),
BRIDGE_OPT_HELLO_TIME  = (1  1),
BRIDGE_OPT_MAX_AGE = (1  2),
+   BRIDGE_OPT_PRIORITY= (1  3),
 };

 struct bridge_config {
enum bridge_opt flags;
bool stp;
bool igmp_snoop;
+   unsigned short priority;
int forward_delay;

int ageing_time;
-- 
1.7.10.4

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


Re: [OpenWrt-Devel] [PATCH] [netifd] add bridge priority option

2013-02-04 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

just a random thought...

I wonder if it would make sense to set a lower priority by default
(while still keeping this option to allow overriding again).

~ Jow
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlEQCGMACgkQdputYINPTPOUTACfR1Q1WDz42FRwd+ESRWKqWijB
0/IAoI4MRXtKC3ZyBzW8TleGrvO9G1v6
=GcM2
-END PGP SIGNATURE-
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [netifd] add bridge priority option

2013-02-04 Thread Niels Boehm
Hello,

On 02/04/2013 08:13 PM, Jo-Philipp Wich wrote:
 I wonder if it would make sense to set a lower priority by default (while 
 still keeping this option to allow overriding again).

I'm not sure, I haven't really thought about that.

I guess one has to consider several points when making the decision
to change the default.

AFAICT, the bridge priority is not as important when stp is
disabled (which it is by default) - although I haven't tested that
case, since I'm running my network with stp enabled only. On the
other hand, having a stable topology in an stp-enabled home network
by default - without knowing about the existence of the bridge
priority - is certainly a nice thing.

Also, in a WDS setup, a router might have the role of a satellite
node, and it might not be desirable to have it on a low bridge
priority by default. On the other hand, a WDS setup is far from
default in itself. And I have no experience regarding that, either.


Niels Böhm
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] brcm47xx: reinstate gpio IRQ assignment

2013-02-04 Thread Hauke Mehrtens
On 01/20/2013 12:08 AM, Nathan Hintz wrote:
 Recent changes to the brcm47xx gpio implementation result in an IRQ
 no longer being assigned to the gpio driver.  This breaks the ability
 to enter failsafe, and possibly other things.
 
 Only tested on a BCMA device (SSB not tested).
 
 Signed-off-by: Nathan Hintz nlhi...@hotmail.com
 
 Index: target/linux/brcm47xx/patches-3.6/400-arch-bcm47xx.patch
 ===
 --- target/linux/brcm47xx/patches-3.6/400-arch-bcm47xx.patch  (revision 35248)
 +++ target/linux/brcm47xx/patches-3.6/400-arch-bcm47xx.patch  (working copy)
 @@ -41,7 +41,7 @@
   obj-$(CONFIG_BCM47XX_SSB)   += wgt634u.o
  --- /dev/null
  +++ b/arch/mips/bcm47xx/gpio.c
 -@@ -0,0 +1,119 @@
 +@@ -0,0 +1,140 @@
  +/*
  + * This file is subject to the terms and conditions of the GNU General 
 Public
  + * License.  See the file COPYING in the main directory of this archive
 @@ -161,9 +161,38 @@
  +return -EINVAL;
  +}
  +EXPORT_SYMBOL(bcm47xx_gpio_polarity);
 ++
 ++int gpio_to_irq(unsigned gpio)
 ++{
 ++switch (bcm47xx_bus_type) {
 ++#ifdef CONFIG_BCM47XX_SSB
 ++case BCM47XX_BUS_TYPE_SSB:
 ++if (ssb_chipco_available(bcm47xx_bus.ssb.chipco))
 ++return ssb_mips_irq(bcm47xx_bus.ssb.chipco.dev) + 2;
 ++else if (ssb_extif_available(bcm47xx_bus.ssb.extif))
 ++return ssb_mips_irq(bcm47xx_bus.ssb.extif.dev) + 2;
 ++else
 ++return -EINVAL;
 ++#endif
 ++#ifdef CONFIG_BCM47XX_BCMA
 ++case BCM47XX_BUS_TYPE_BCMA:
 ++return bcma_core_irq(bcm47xx_bus.bcma.bus.drv_cc.core);
 ++#endif
 ++}
 ++return -EINVAL;
 ++}
 ++EXPORT_SYMBOL_GPL(gpio_to_irq);
  --- a/arch/mips/include/asm/mach-bcm47xx/gpio.h
  +++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h
 -@@ -14,4 +14,11 @@ static inline int irq_to_gpio(unsigned i
 +@@ -7,11 +7,18 @@
 + #define gpio_set_value __gpio_set_value
 + 
 + #define gpio_cansleep __gpio_cansleep
 +-#define gpio_to_irq __gpio_to_irq
 ++extern int gpio_to_irq(unsigned gpio); 
 + 
 + static inline int irq_to_gpio(unsigned int irq)
 + {
   return -EINVAL;
   }
   

This should be fixed with r35321.

Hauke

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


Re: [OpenWrt-Devel] [PATCH] Add Failsafe support for Linksys E3000V1 / WRT610NV2

2013-02-04 Thread Hauke Mehrtens
On 01/14/2013 04:12 AM, Nathan Hintz wrote:
 Adds specification of the correct cpu_port for Linksys E3000V1 and WRT610NV2
 in /lib/preinit/05_init_interfaces_brcm.  The list of devices will need to
 be expanded.  Is there a way to determine the correct cpu_port to use in a
 generic sense; for instance, if /proc/switch/eth0/port/8 exists, or if
 /sys/class/net/eth0/device/driver/module/drivers/bcma:bgmac exists?  Could
 a similar method be used in /etc/init.d/netconfig?
 
 Signed-off-by: Nathan Hintz nlhi...@hotmail.com
 
 Index: target/linux/brcm47xx/base-files/lib/preinit/05_init_interfaces_brcm
 ===
 --- target/linux/brcm47xx/base-files/lib/preinit/05_init_interfaces_brcm  
 (revision 35146)
 +++ target/linux/brcm47xx/base-files/lib/preinit/05_init_interfaces_brcm  
 (working copy)
 @@ -12,6 +12,7 @@
   # hardware specific overrides
   case $(cat /proc/diag/model) in
   Linksys WAP54G V1) ifname=eth1;;
 + Linksys E3000 V1|Linksys WRT610N V2) cpu_port=8u*;;
   ASUS WL-HDD) ifname=eth1;;
   ASUS WL-300g) ifname=eth1;;
   ASUS (unknown, BCM4702)) ifname=eth1;;
 

Thank you for your patch, till we do not have a better solution I
applied it in r35491.

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


Re: [OpenWrt-Devel] [PATCH] brcm47xx: Fix switch config on 4716/53115 devices

2013-02-04 Thread Hauke Mehrtens
On 02/04/2013 05:04 PM, Jonathan McCrohan wrote:
 Signed-off-by: Jonathan McCrohan jmccro...@gmail.com
 ---
  target/linux/brcm47xx/base-files/etc/init.d/netconfig |2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig 
 b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
 index b4840c2..303ab56 100755
 --- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig
 +++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
 @@ -166,7 +166,7 @@ start() {
   }
  
   # generic broadcom 4716 processor with 53115 switch
 - if (nvram[boardtype] == 0x04cf) {
 + if (tolower(nvram[boardtype]) == 0x04cf) {
   c[vlan0ports] = 1 2 3 4 8*
   c[vlan1ports] = 0 8
   }
 

Thank you for your patch is was applied in r35490.

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


[OpenWrt-Devel] [PATCH] [ar71xx] Routerboard 751 Mac Address Offset Fix

2013-02-04 Thread David Hutchison
We utilize many Routerboard 751's and discovered that our latest batch
of RB751's would not initialize the wireless radio. We have determined
Mikrotik has changed where the mac address was located inside
hardconfig. As such we utilize routerboot_find_tag to find the
location of the mac address. We should remove
RB751_MAC_ADDRESS_OFFSET as it is ambiguous by machine manufacturing
date. The newer batch of RB751's that we received had a
RB751_MAC_ADDRESS_OFFSET 0x10.

Signed-off-by: Davey Hutchison dhutchi...@bluemesh.net

--- target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
+++ target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
@@ -282,7 +282,6 @@

 #define RB751_HARDCONFIG   0x1f00b000
 #define RB751_HARDCONFIG_SIZE  0x1000
-#define RB751_MAC_ADDRESS_OFFSET 0xE80

 static void __init rb751_wlan_setup(void)
 {
@@ -290,6 +289,8 @@
struct ath9k_platform_data *wmac_data;
u16 tag_len;
u8 *tag;
+   u16 mac_len;
+   u8 *mac;
int err;

wmac_data = ap9x_pci_get_wmac_data(0);
@@ -313,8 +314,15 @@
pr_err(rb75x: unable to decode wlan eeprom data\n);
return;
}
+
+   err = routerboot_find_tag(hardconfig, RB751_HARDCONFIG_SIZE,
+ RB_ID_MAC_ADDRESS_PACK, mac, mac_len);
+   if (err) {
+   pr_err(rb75x: no mac address found\n);
+   return;
+   }

-   ap91_pci_init(NULL, hardconfig + RB751_MAC_ADDRESS_OFFSET);
+   ap91_pci_init(NULL, mac);
 }

 static void __init rb751_setup(void)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [ar71xx] Routerboard 751 Mac Address Offset Fix

2013-02-04 Thread Hanno Schupp
Could this be applied to AA as well, please?



On 5/02/2013, at 1:59 PM, David Hutchison dhutchi...@bluemesh.net wrote:

 We utilize many Routerboard 751's and discovered that our latest batch
 of RB751's would not initialize the wireless radio. We have determined
 Mikrotik has changed where the mac address was located inside
 hardconfig. As such we utilize routerboot_find_tag to find the
 location of the mac address. We should remove
 RB751_MAC_ADDRESS_OFFSET as it is ambiguous by machine manufacturing
 date. The newer batch of RB751's that we received had a
 RB751_MAC_ADDRESS_OFFSET 0x10.
 
 Signed-off-by: Davey Hutchison dhutchi...@bluemesh.net
 
 --- target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
 +++ target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
 @@ -282,7 +282,6 @@
 
 #define RB751_HARDCONFIG   0x1f00b000
 #define RB751_HARDCONFIG_SIZE  0x1000
 -#define RB751_MAC_ADDRESS_OFFSET 0xE80
 
 static void __init rb751_wlan_setup(void)
 {
 @@ -290,6 +289,8 @@
struct ath9k_platform_data *wmac_data;
u16 tag_len;
u8 *tag;
 +   u16 mac_len;
 +   u8 *mac;
int err;
 
wmac_data = ap9x_pci_get_wmac_data(0);
 @@ -313,8 +314,15 @@
pr_err(rb75x: unable to decode wlan eeprom data\n);
return;
}
 +
 +   err = routerboot_find_tag(hardconfig, RB751_HARDCONFIG_SIZE,
 + RB_ID_MAC_ADDRESS_PACK, mac, mac_len);
 +   if (err) {
 +   pr_err(rb75x: no mac address found\n);
 +   return;
 +   }
 
 -   ap91_pci_init(NULL, hardconfig + RB751_MAC_ADDRESS_OFFSET);
 +   ap91_pci_init(NULL, mac);
 }
 
 static void __init rb751_setup(void)
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Lantiq xway Devicetree entry for NOR/NAND

2013-02-04 Thread JD McDonnell

John,

Thanks for the reply. I shall try to find you on iirc this afternoon or 
evening. I did try various pinmux setting without success, I struggle with the 
mux groups and functions even with the devicetree documentation in the kernel 
source.

I greatly appreciate your interest and assistance.

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


Re: [OpenWrt-Devel] [PATCH] brcm47xx: Fix switch config on 4716/53115 devices

2013-02-04 Thread Nathan Hintz
On Mon, 2013-02-04 at 23:51 +0100, Hauke Mehrtens wrote:
 On 02/04/2013 05:04 PM, Jonathan McCrohan wrote:
  Signed-off-by: Jonathan McCrohan jmccro...@gmail.com
  ---
   target/linux/brcm47xx/base-files/etc/init.d/netconfig |2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
  
  diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig 
  b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
  index b4840c2..303ab56 100755
  --- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig
  +++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig
  @@ -166,7 +166,7 @@ start() {
  }
   
  # generic broadcom 4716 processor with 53115 switch
  -   if (nvram[boardtype] == 0x04cf) {
  +   if (tolower(nvram[boardtype]) == 0x04cf) {
  c[vlan0ports] = 1 2 3 4 8*
  c[vlan1ports] = 0 8
  }
  
 
 Thank you for your patch is was applied in r35490.
 
 Hauke
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel
 
Is a similar change required in diag.c (package/broadcom-diag), or is
this H/W not supported yet in broadcom-diag?  If so, can 
http://patchwork.openwrt.org/patch/3123/ be applied before additional
changes are made?

Nathan

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


[OpenWrt-Devel] [PATCH] Fix Board Name for Linksys E1000/E3000

2013-02-04 Thread Nathan Hintz
Signed-off-by: Nathan Hintz nlhi...@hotmail.com

Index: 
target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
===
--- 
target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
(revision 35492)
+++ 
target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
(working copy)
@@ -89,10 +89,10 @@
 +static const struct bcm47xx_board_type_list bcm47xx_board_list_boot_hw[] = {
 +  {{BCM47XX_BOARD_CISCO_M10V1, Cisco M10}, M10, 1.0}, /* like 
WRT160N v3.0 */
 +  {{BCM47XX_BOARD_CISCO_M20V1, Cisco M20}, M20, 1.0}, /* like 
WRT310N v2.0 */
-+  {{BCM47XX_BOARD_LINKSYS_E1000V1, Linksys E100}, E100, 1.0},  /* 
like WRT160N v3.0 */
++  {{BCM47XX_BOARD_LINKSYS_E1000V1, Linksys E1000}, E100, 1.0},  /* 
like WRT160N v3.0 */
 +  {{BCM47XX_BOARD_LINKSYS_E1000V2, Linksys E1000}, E1000, 2.0},
 +  {{BCM47XX_BOARD_LINKSYS_E2000V1, Linksys E2000}, Linksys E2000, 
1.0},
-+  {{BCM47XX_BOARD_LINKSYS_E3000V1, Linksys E300}, E300, 1.0}, /* 
like WRT610N v2.0 */
++  {{BCM47XX_BOARD_LINKSYS_E3000V1, Linksys E3000}, E300, 1.0}, /* 
like WRT610N v2.0 */
 +  {{BCM47XX_BOARD_LINKSYS_E3200V1, Linksys E3200}, E3200, 1.0},
 +  {{BCM47XX_BOARD_LINKSYS_E4200V1, Linksys E4200}, E4200, 1.0},
 +  {{BCM47XX_BOARD_LINKSYS_WRT150NV11, Linksys WRT150N}, WRT150N, 
1.1},

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


[OpenWrt-Devel] [PATCH] Fix crash of pppd when printing options

2013-02-04 Thread Nathan Hintz
PPPD crashes (SEGV) when the 'dump' or 'dryrun' options are specified and an 
option 
defined internally as o_special with an option flag of OPT_A2STRVAL is used.
The crash occurs because the option value is not saved when the parameter is 
processed,
but is then referenced when printed.  This was encountered using xl2tpd and the
l2tp_ppp kernel module; the option PPPD crashed on is pppol2tp 8.  The 
attached
patch corrects the parameter processing to save the option value.

Signed-off-by: Nathan Hintz nlhi...@hotmail.com

--- /dev/null
+++ 
package/network/services/ppp/patches/501-save_arg_for_o_special_OPT_A2STRVAL.patch
@@ -0,0 +1,20 @@
+--- a/pppd/options.c
 b/pppd/options.c
+@@ -809,7 +809,16 @@ process_option(opt, cmd, argv)
+   parser = (int (*) __P((char **))) opt-addr;
+   if (!(*parser)(argv))
+   return 0;
+-  if (opt-flags  OPT_A2LIST) {
++  if (opt-flags  OPT_A2STRVAL) {
++  if (opt-flags  OPT_STATIC) {
++  strlcpy((char *)(opt-addr2), *argv, opt-upper_limit);
++  } else {
++  sv = strdup(*argv);
++  if (sv == NULL)
++  novm(option argument);
++  *(char **)(opt-addr2) = sv;
++  }
++  } else if (opt-flags  OPT_A2LIST) {
+   struct option_value *ovp, *pp;
+ 
+   ovp = malloc(sizeof(*ovp) + strlen(*argv));

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


[OpenWrt-Devel] [PATCH] Modify PPPD parameter definitions to support printing

2013-02-04 Thread Nathan Hintz
Fix definition of ms-dns and ms-wins options so printing is supported.

Signed-off-by: Nathan Hintz nlhi...@hotmail.com

--- /dev/null
+++ package/network/services/ppp/patches/502-fix-ms-dns-and-ms-wins-print.patch
@@ -0,0 +1,17 @@
+--- a/pppd/ipcp.c
 b/pppd/ipcp.c
+@@ -175,10 +175,10 @@ static option_t ipcp_option_list[] = {
+ { noipdefault, o_bool, disable_defaultip,
+   Don't use name for default IP adrs, 1 },
+ 
+-{ ms-dns, 1, (void *)setdnsaddr,
+-  DNS address for the peer's use },
+-{ ms-wins, 1, (void *)setwinsaddr,
+-  Nameserver for SMB over TCP/IP for peer },
++{ ms-dns, o_special, (void *)setdnsaddr,
++  DNS address for the peer's use, OPT_A2LIST },
++{ ms-wins, o_special, (void *)setwinsaddr,
++  Nameserver for SMB over TCP/IP for peer, OPT_A2LIST },
+ 
+ { ipcp-restart, o_int, ipcp_fsm[0].timeouttime,
+   Set timeout for IPCP, OPT_PRIO },

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