by absintos » Mon Sep 01, 2014 6:49 pm
if anyone has any other idea, let me know and i'll give it a try...
basically the problem is:
*************************
after booting to stock (and rebooting into linux):
*************************
# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Link detected: yes
# lsmod
Module Size Used by
nsa3xx_hwmon 389 0
mv_cesa 9362 0
ipv6 272990 57
autofs4 22305 2
raid1 26118 3
md_mod 102934 4 raid1
*************************
after shutdown -h:
*************************
# ethtool eth0
Settings for eth0:
Supported ports: [ TP AUI BNC MII FIBRE ]
Supported link modes: Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10Mb/s
Duplex: Half
Port: MII
PHYAD: 1
Transceiver: external
Auto-negotiation: on
Link detected: no
# lsmod
Module Size Used by
nsa3xx_hwmon 389 0
mv_cesa 9362 0
ipv6 272990 45
autofs4 22305 2
raid1 26118 3
md_mod 102934 4 raid1
hmm...stock shutdown also makes eth0 unusable:
stock rc.reboot does more or less nothing.
stock rc.shutdown on the other hand contains:
# pwr_resume
if [ ! -e /etc/zyxel/storage/pwron.status ]; then
pwr_resume disable
fi
i can only suspect this action to be the one causing the network malfunction. this means my problem is the same that the power_resume.sh is supposed to solve...
#./pwr_resume enable
Fail to enable power resume
# strace ./pwr_resume enable
execve("./pwr_resume", ["./pwr_resume", "enable"], [/* 14 vars */]) = 0
brk(0) = 0x12000
uname({sys="Linux", node="requendis.rou.local", ...}) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=80248, ...}) = 0
mmap2(NULL, 80248, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40031000
close(3) = 0
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\f\204\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1564833, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40063000
mmap2(NULL, 1283464, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x40118000
mprotect(0x40245000, 28672, PROT_NONE) = 0
mmap2(0x4024c000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12c000) = 0x4024c000
mmap2(0x4024f000, 9608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4024f000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4009d000
set_tls(0x4009d4c0, 0x4009dba8, 0x400f2000, 0x4009d4c0, 0x400f2000) = 0
mprotect(0x4024c000, 8192, PROT_READ) = 0
mprotect(0x10000, 4096, PROT_READ) = 0
mprotect(0x400f1000, 4096, PROT_READ) = 0
munmap(0x40031000, 80248) = 0
open("/dev/btncpy", O_RDWR) = -1 ENOENT (No such file or directory)
ioctl(-1, 0x6720, 0) = -1 EBADF (Bad file descriptor)
write(2, "Fail to enable power resume\n", 28Fail to enable power resume
) = 28
exit_group(0) = ?
+++ exited with 0 +++
a kernel patch for debian that i found:
+/* Power resume control */
+ gpio_request(49, "Power-clk");
+ gpio_direction_output(49, 1);
+ gpio_request(47, "Power-data");
+// Clear power resume
+// gpio_direction_output(47, 0);
+// Set power resume
+ gpio_direction_output(47, 1);
+ udelay(1000);
+// gpio_direction_output(49, 0);
+ gpio_set_value(49, 0);
+// release GPIO?
+//test
+ gpio_free(47);
+ gpio_free(49);
+ printk(KERN_INFO "NSA310: Power resume enabled\n");
only difference from script seems to be a delay (udelay(1000))...
still no luck though....warhead, any ideas why it doesn't seem to work in my case ?