**** BEGIN LOGGING AT Sat Oct 26 02:59:59 2013 Oct 26 05:50:57 build #0 of mvebu is complete: Failure [failed compile_4] Build details are at http://buildbot.openwrt.org:8010/builders/mvebu/builds/0 Oct 26 06:15:41 build #1 of imx6 is complete: Failure [failed compile_4] Build details are at http://buildbot.openwrt.org:8010/builders/imx6/builds/1 Oct 26 07:52:23 build #422 of orion is complete: Failure [failed compile_8] Build details are at http://buildbot.openwrt.org:8010/builders/orion/builds/422 Oct 26 12:26:25 blogic r38540 trunk/target/linux/ramips/patches-3.10/0122-pinmux.patch * ralink: pinctrl fix for non muxed pins Oct 26 12:26:41 blogic r38541 trunk/package/system/ubox/Makefile * ubox: update to latest git head Oct 26 13:59:48 hm. anybody an idea if it can be that interface error counters on ar9330 are broken/always 0? Oct 26 14:00:22 atleast ive never seen them show anything besides zero, even if the link dies due to errors Oct 26 14:03:49 nbd: i think i found out how the switch is being disabled by the bootloader on the WD My Net N750 Oct 26 14:04:11 roh: what kind of error counters? Oct 26 14:05:55 at least i can enable/disable ports on the switch by using the atheros "ethreg" tool on the stock firmware Oct 26 14:06:43 right, but that should not impact PHY detection Oct 26 14:10:58 but everything seems to be controlled by the ethreg tool. Oct 26 14:11:15 here's the setup of the switch (warning, get your sickbag ready. it's PHP(!)): http://paste.fedoraproject.org/49640/38279663/ Oct 26 14:11:46 especialls the else statement in the "setup_switch" function Oct 26 14:12:36 but actually we should be thankful that WD (or Alpha Networks) used PHP. That way we get to enjoy 16MB Flash Oct 26 14:29:02 nbd: interface packet error countes Oct 26 14:29:05 from the phy Oct 26 14:29:26 also i am missing that kind of information for the ports on the switch ;) Oct 26 14:30:26 where are you looking? sysfs? debugfs? wlan0 counters? Oct 26 14:30:39 nbd: i heavily use the tplink tp-wl741 and 740 as vlan switches here in stattbad Oct 26 14:31:01 and on one of the long lines (~40meter) i have massive dropouts as far as link flaps Oct 26 14:31:43 luka: ping Oct 26 14:32:09 i replaced everything already (switches, cable, sockets, even the patchpanel) but the error persists. i am not saying its openwrt's fault, but the cisco shows errors on the interfaces... openwrt doesnt tell me anything before the link goes down completely. Oct 26 14:32:43 nbd: i guessed only eth1 would show the errors due to the switch being on eth0, but it seems all ports show no phy errors Oct 26 14:33:46 nbd: i was looking at the plain simple interface counters. Oct 26 14:33:50 k Oct 26 14:35:27 i'll take a look Oct 26 14:38:07 yeah, there are registers that could be polled for the stats Oct 26 14:38:10 but there's no code for that yet Oct 26 14:43:51 i see ;) Oct 26 14:44:21 would be cool to be able to access that some sane way. in the end one wants to graph that for finding problems Oct 26 16:04:44 build #390 of rb532 is complete: Failure [failed shell_12] Build details are at http://buildbot.openwrt.org:8010/builders/rb532/builds/390 Oct 26 16:07:27 tripolar r38542 packages/utils/ grep grep/Makefile * [packages] add gnu grep Oct 26 16:07:37 build #390 of ppc44x is complete: Failure [failed shell_12] Build details are at http://buildbot.openwrt.org:8010/builders/ppc44x/builds/390 Oct 26 16:11:10 tripolar r38543 packages/utils/grep/Makefile * [packages] grep: simplify package remove Oct 26 16:56:41 nbd: seems i have even got it to crash Oct 26 17:00:25 nbd: http://pastebin.com/sbEfPNGh Oct 26 17:53:50 nbd: can that be something like in https://dev.openwrt.org/ticket/7563 ? Oct 26 18:10:30 nbd: switch is working! unfortunately not automatically :( Oct 26 18:10:57 so indeed i can confirm it is the bootloader that is somehow deactivating the switch. Oct 26 18:12:00 when the bootloader is interrupted it re-enables the switch. if you now just issue the "boot" command it brings up OpenWRT which in turn recoginzes the switch (using the TL-WDR4300 config) Oct 26 18:29:15 roh: probably not Oct 26 18:29:24 heffer: interesting Oct 26 18:29:38 heffer: maybe the boot loader somehow messes with the switch clock Oct 26 18:29:54 maybe there's a gpio or something Oct 26 18:30:17 i also noticed that GPIO4 is hi when the switch is working and lo when it is not. unfortunately just setting it hi in the mach file doesn't help Oct 26 18:30:43 i'm testing now if setting it lo will actually break the switch Oct 26 18:31:33 nope. has no effect. Oct 26 18:33:08 but i guess GPIOs are involved. Oct 26 18:33:29 somehow :D there are hints to it in the binaries as well as those strange PHP configs Oct 26 18:36:56 and i believe it is in the athrs_gmac.ko Oct 26 18:37:24 because a disassembly tells me it does GPIO stuff in ar934x_gmac_attach Oct 26 18:37:40 which the Fritz!Box for example doesn't: http://gpl.back2roots.org/source/fritzbox/7270_5.21/GPL-release_kernel/linux/drivers/net/ag7240/ag934x.c Oct 26 18:38:19 i feel like playing "Topfschlagen" and it's getting hotter :P Oct 26 18:40:07 ar934x_gmac_attach is calling ath_gpio_config_output which is defined here: http://gpl.back2roots.org/source/fritzbox/7270_5.05/GPL-release_kernel/linux/arch/mips/atheros/gpio.c Oct 26 18:54:50 build #423 of orion is complete: Failure [failed compile_8] Build details are at http://buildbot.openwrt.org:8010/builders/orion/builds/423 Oct 26 19:01:39 hmmm. actually gpio4 is switching all the time between hi and lo Oct 26 19:11:47 build #366 of sibyte is complete: Failure [failed shell_12] Build details are at http://buildbot.openwrt.org:8010/builders/sibyte/builds/366 Oct 26 19:52:41 heffer: have you checked other gpio pins for differences as well/ Oct 26 19:54:22 yes all of them Oct 26 20:00:21 sent my work so far to the mailinglist :) hoping for input from others :D Oct 26 20:01:16 heffer have you checked phyinf.php? Oct 26 20:02:14 yes Oct 26 20:02:42 hum, not much to say then.. Oct 26 20:02:44 i'm pretty sure the magic is in athrs_gmac.ko and it's ominous ar934x_gmac_attach Oct 26 20:03:07 but my MIPS asm skillz are lim -> 0 Oct 26 20:04:05 isn't there a separate switch chip? rtl8367? Oct 26 20:04:20 AR8327N Oct 26 20:04:54 heffer: i can read MIPS asm Oct 26 20:04:56 just checked the function Oct 26 20:05:27 the argument to ath_gpio_config_output is 18 Oct 26 20:06:19 your paste here, line 133, has a comment about rtl8367, don't know why: http://paste.fedoraproject.org/49640/38279663/ Oct 26 20:06:24 okay i try setting it in the mach file Oct 26 20:06:34 *sigh* .. fixed the broken line for now... the 'hotfix' is a 10mbit hub in the line with the errors Oct 26 20:06:45 Devastator: you gotta ask Alpha Networks/WD why that is :D Oct 26 20:07:07 probably cut & paste without review :P Oct 26 20:08:17 * roh feels so dirty. but slow network is better than 1-10% packetloss Oct 26 20:09:46 heffer: i'm reading the asm some more Oct 26 20:10:06 there's actually a loop there from which ath_gpio_config_output is called Oct 26 20:11:05 roughly equivalent to 'for (i = 18; i <= 23; i++) ath_gpio_config_output(i);' Oct 26 20:11:42 i have gpios from 0 - 22 here Oct 26 20:11:56 so i could set all of those then Oct 26 20:12:46 but 19 is the WPS button :D Oct 26 20:13:02 weird Oct 26 20:13:46 it indeed is. i tested it just now Oct 26 20:14:58 according to the original boot log GPIO18 is "WLAN external lna 1" Oct 26 20:15:44 setting GPIO 18 = no dice :( Oct 26 20:16:18 try setting 18-23 Oct 26 20:16:38 actually, maybe it's 18-22 Oct 26 20:16:46 yes, 18-22 Oct 26 20:16:56 so < 23 instead of <= Oct 26 20:17:47 i'll try that Oct 26 20:21:18 unfortunately, no :( Oct 26 20:23:41 maybe its hex Oct 26 20:23:50 so 18h -> 12d Oct 26 20:24:18 eh.. other way around Oct 26 20:25:45 i hope WD sends me this u-boot source :D Oct 26 20:26:57 it's 18 decimal Oct 26 20:27:00 0x12 hex Oct 26 20:27:25 in the binary Oct 26 20:28:59 I'll flash the stock firmware again to see at which point exactly the switch turns back on again Oct 26 20:29:06 how long usually takes for them to send a source? Oct 26 20:29:19 probably forever :) Oct 26 20:29:36 the will most certainly need to get it from Alpha Networks first Oct 26 20:30:06 i guess WD ist just the proxy for whatever AN throws at them as being "the GPL Source" Oct 26 20:30:58 do you have a u-boot binary? Oct 26 20:31:20 maybe i can load it in IDA and find the codepath via string search Oct 26 20:32:12 i have a dump of mtd0 Oct 26 20:33:06 ok Oct 26 20:34:05 http://heffer.fedorapeople.org/openwrt/mtd0-wd-n750 Oct 26 20:34:47 this is the output from uboot: http://fpaste.org/49667/38281967/ Oct 26 20:34:52 maybe it helps a bit Oct 26 21:19:20 nbd: did anything turn up from that raw binary? Oct 26 21:19:48 i have to figure out how to get the load address right first Oct 26 21:19:58 haven't figured out the copy-to-ram part in this binary yet Oct 26 21:20:01 will do this some other time Oct 26 21:20:27 i need the load address to be proper so that cross-references between code and data are properly resolved Oct 26 21:22:58 okay. thank you very much for looking into this :) Oct 26 21:23:12 i guess i'm off for now then. thanks again Oct 26 21:35:31 build #376 of avr32 is complete: Failure [failed compile_5] Build details are at http://buildbot.openwrt.org:8010/builders/avr32/builds/376 Oct 26 21:52:54 build #403 of uml is complete: Failure [failed compile_5] Build details are at http://buildbot.openwrt.org:8010/builders/uml/builds/403 Oct 26 22:43:15 build #354 of kirkwood is complete: Failure [failed compile_5] Build details are at http://buildbot.openwrt.org:8010/builders/kirkwood/builds/354 Oct 26 22:58:13 build #316 of iop32x is complete: Failure [failed shell_12] Build details are at http://buildbot.openwrt.org:8010/builders/iop32x/builds/316 Oct 27 01:13:39 luka: ping **** ENDING LOGGING AT Sun Oct 27 02:59:58 2013