Topic: Linksys AG241 v2 no LAN connection

Hello everybody!

I'm moving my first step into OpenWRT world and I've already a big problem big_smile

I'm using an old Linksys AG241 v2 and I've uploaded OpenWRT image (trunk, but with 12.09 I get the same "problem").

I'm using the serial console.
OpenWRT boots fine and I get the shell: it respond correctly to commands but if I plug the ethernet cable I'm unable to obtain the IP from dhcp; if i assign a static IP to the computer I'm still unable to ping the router.

Could you help me understand the problem?


Which logs or command output should I provide to better understanding?


Thank you so much!




p.s: sorry: English is not my mother language! tongue

Re: Linksys AG241 v2 no LAN connection

Boot log + "swconfig dev eth0 show"

Re: Linksys AG241 v2 no LAN connection

Zajec wrote:

Boot log + "swconfig dev eth0 show"

Sorry, could you explain me where to find the boot log?
I've looked under /var/log but I was not able to find it... sad


Meanwhile, this is the output of second command:

root@OpenWrt:/# swconfig dev eth0 show
Failed to connect to the switch. Use the "list" command to see which switches are available.

this is what i read from ifconfig:

root@OpenWrt:/# ifconfig 
br-lan    Link encap:Ethernet  HWaddr 00:18:F8:61:8E:44  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fdfc:34c1:7b37::1/60 Scope:Global
          inet6 addr: fe80::218:f8ff:fe61:8e44/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3422 (3.3 KiB)  TX bytes:912 (912.0 B)

eth0      Link encap:Ethernet  HWaddr 00:18:F8:61:8E:44  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:22 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3730 (3.6 KiB)  TX bytes:1366 (1.3 KiB)
          Interrupt:27 

eth0.1    Link encap:Ethernet  HWaddr 00:18:F8:61:8E:44  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:298 (298.0 B)

eth0.2    Link encap:Ethernet  HWaddr 00:18:F8:61:8E:44  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:298 (298.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:866 errors:0 dropped:0 overruns:0 frame:0
          TX packets:866 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:59184 (57.7 KiB)  TX bytes:59184 (57.7 KiB)

and dmesg | cpmac (I see this in some old bug report...maybe it's useful):

root@OpenWrt:/# dmesg | grep cpmac
[    7.300000] libphy: cpmac-mii: probed
[    7.380000] cpmac: device eth0 (regs: 08610000, irq: 27, phy: cpmac-1:1f, mac: 00:18:f8:61:8e:44)

These are the bug tickets I read and maybe are related to my problem...

https://dev.openwrt.org/ticket/3124
https://dev.openwrt.org/ticket/5927

Re: Linksys AG241 v2 no LAN connection

Here there is the full output of dmesg:

root@OpenWrt:/# dmesg 
[    0.000000] Linux version 3.10.26 (openwrt@OpenWRT) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2013.05 r39380) ) #1 Fri Jan 24 05:11:57 MS4
[    0.000000] ar7-gpio: registered 32 GPIOs
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00018448 (MIPS 4KEc)
[    0.000000] TI AR7 (TNETD7200), ID: 0x002b, Revision: 0x10
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 01000000 @ 14000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x14000000-0x14ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x14000000-0x14ffffff]
[    0.000000] On node 0 totalpages: 4096
[    0.000000] free_area_init_node: node 0, pgdat 943dcbe0, node_mem_map 94451000
[    0.000000]   Normal zone: 32 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 4096 pages, LIFO batch:0
[    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
[    0.000000] Primary data cache 8kB, 4-way, VIPT, no aliases, linesize 16 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
[    0.000000] Kernel command line:  console=ttyS0,38400n8 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 64 (order: -4, 256 bytes)
[    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Memory: 11764k/16384k available (2465k kernel code, 4620k reserved, 546k data, 184k init, 0k highmem)
[    0.000000] NR_IRQS:256
[    0.000000] Clocks: Async mode
[    0.000000] Clocks: Setting DSP clock
[    0.000000] Clocks: prediv: 1, postdiv: 1, mul: 5
[    0.000000] Clocks: base = 25000000, frequency = 125000000, prediv = 1, postdiv = 2, postdiv2 = 1, mul = 10
[    0.000000] Clocks: Setting CPU clock
[    0.000000] Adjusted requested frequency 211000000 to 211968000
[    0.000000] Clocks: prediv: 1, postdiv: 1, mul: 6
[    0.000000] Clocks: base = 35328000, frequency = 211968000, prediv = 1, postdiv = 1, postdiv2 = -1, mul = 6
[    0.000000] Clocks: Setting USB clock
[    0.000000] Adjusted requested frequency 48000000 to 48076920
[    0.000000] Clocks: prediv: 13, postdiv: 1, mul: 5
[    0.000000] Clocks: base = 125000000, frequency = 48000000, prediv = 13, postdiv = 1, postdiv2 = -1, mul = 5
[    0.090000] Calibrating delay loop... 211.35 BogoMIPS (lpj=1056768)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.100000] Mount-cache hash table entries: 512
[    0.120000] NET: Registered protocol family 16
[    0.180000] bio: create slab <bio-0> at 0
[    0.200000] Switching to clocksource MIPS
[    0.220000] NET: Registered protocol family 2
[    0.240000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.260000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.280000] TCP: Hash tables configured (established 512 bind 512)
[    0.300000] TCP: reno registered
[    0.310000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.330000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.350000] NET: Registered protocol family 1
[    0.400000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.420000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.450000] msgmni has been set to 22
[    0.460000] io scheduler noop registered
[    0.470000] io scheduler deadline registered (default)
[    0.490000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.510000] serial8250: ttyS0 at MMIO 0x8610e00 (irq = 15) is a TI-AR7
[    0.530000] console [ttyS0] enabled, bootconsole disabled
[    0.610000] physmap platform flash device: 02000000 at 10000000
[    0.620000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a7
[    0.660000] physmap-flash.0: Found an alias at 0x400000 for the chip at 0x0
[    0.660000] physmap-flash.0: Found an alias at 0x800000 for the chip at 0x0
[    0.660000] physmap-flash.0: Found an alias at 0xc00000 for the chip at 0x0
[    0.660000] physmap-flash.0: Found an alias at 0x1000000 for the chip at 0x0
[    0.660000] physmap-flash.0: Found an alias at 0x1400000 for the chip at 0x0
[    0.660000] physmap-flash.0: Found an alias at 0x1800000 for the chip at 0x0
[    0.660000] physmap-flash.0: Found an alias at 0x1c00000 for the chip at 0x0
[    0.660000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.670000]   Amd/Fujitsu Extended Query version 1.1.
[    0.690000] physmap-flash.0: Swapping erase regions for top-boot CFI table.
[    0.710000] number of CFI chips: 1
[    0.720000] 4 ar7part partitions found on MTD device physmap-flash.0
[    0.740000] Creating 4 MTD partitions on "physmap-flash.0":
[    0.760000] 0x000000000000-0x000000010000 : "loader"
[    0.780000] 0x000000010000-0x000000020000 : "config"
[    0.810000] 0x000000020000-0x000000400000 : "linux"
[    0.830000] 0x00000012bb13-0x000000400000 : "rootfs"
[    0.850000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.890000] mtd: device 3 (rootfs) set to be root filesystem
[    0.910000] mtd: partition "rootfs_data" created automatically, ofs=0x320000, len=0xe0000
[    0.940000] 0x000000320000-0x000000400000 : "rootfs_data"
[    0.970000] libphy: Fixed MDIO Bus: probed
[    7.230000] INTERNAL PHY!!!
[    7.300000] libphy: cpmac-mii: probed
[    7.380000] cpmac: device eth0 (regs: 08610000, irq: 27, phy: cpmac-1:1f, mac: 00:18:f8:61:8e:44)
[    7.420000] vlynq0: regs 0x08611800, irq 29, mem 0x04000000
[    8.140000] TCP: cubic registered
[    8.150000] NET: Registered protocol family 17
[    8.160000] Bridge firewalling registered
[    8.180000] can: controller area network core (rev 20120528 abi 9)
[    8.200000] NET: Registered protocol family 29
[    8.210000] 8021q: 802.1Q VLAN Support v1.8
[    8.240000] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    8.290000] Freeing prom memory: 1020k freed
[    8.310000] Freeing unused kernel memory: 184K (943f2000 - 94420000)
[   16.850000] jffs2: notice: (182) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 1.
[   19.020000] NET: Registered protocol family 10
[   19.050000] NET: Registered protocol family 8
[   19.070000] NET: Registered protocol family 20
[   19.100000] PPP generic driver version 2.4.2
[   19.160000] nf_conntrack version 0.5.0 (202 buckets, 808 max)
[   19.200000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   19.290000] acx_mac80211: Unknown symbol ieee80211_queue_stopped (err 0)
[   19.310000] acx_mac80211: Unknown symbol ieee80211_free_hw (err 0)
[   19.330000] acx_mac80211: Unknown symbol ieee80211_probereq_get (err 0)
[   19.350000] acx_mac80211: Unknown symbol ieee80211_alloc_hw (err 0)
[   19.370000] acx_mac80211: Unknown symbol ieee80211_register_hw (err 0)
[   19.390000] acx_mac80211: Unknown symbol ieee80211_restart_hw (err 0)
[   19.410000] acx_mac80211: Unknown symbol ieee80211_wake_queues (err 0)
[   19.430000] acx_mac80211: Unknown symbol ieee80211_tx_status (err 0)
[   19.450000] acx_mac80211: Unknown symbol ieee80211_stop_queues (err 0)
[   19.470000] acx_mac80211: Unknown symbol ieee80211_scan_completed (err 0)
[   19.490000] acx_mac80211: Unknown symbol ieee80211_unregister_hw (err 0)
[   19.510000] acx_mac80211: Unknown symbol ieee80211_beacon_get_tim (err 0)
[   19.540000] acx_mac80211: Unknown symbol ieee80211_queue_work (err 0)
[   19.560000] acx_mac80211: Unknown symbol backport_dependency_symbol (err 0)
[   19.580000] acx_mac80211: Unknown symbol mac80211_ieee80211_rx (err 0)
[   19.620000] acx_mac80211: Unknown symbol ieee80211_queue_stopped (err 0)
[   19.640000] acx_mac80211: Unknown symbol ieee80211_free_hw (err 0)
[   19.660000] acx_mac80211: Unknown symbol ieee80211_probereq_get (err 0)
[   19.680000] acx_mac80211: Unknown symbol ieee80211_alloc_hw (err 0)
[   19.700000] acx_mac80211: Unknown symbol ieee80211_register_hw (err 0)
[   19.720000] acx_mac80211: Unknown symbol ieee80211_restart_hw (err 0)
[   19.740000] acx_mac80211: Unknown symbol ieee80211_wake_queues (err 0)
[   19.760000] acx_mac80211: Unknown symbol ieee80211_tx_status (err 0)
[   19.780000] acx_mac80211: Unknown symbol ieee80211_stop_queues (err 0)
[   19.800000] acx_mac80211: Unknown symbol ieee80211_scan_completed (err 0)
[   19.820000] acx_mac80211: Unknown symbol ieee80211_unregister_hw (err 0)
[   19.840000] acx_mac80211: Unknown symbol ieee80211_beacon_get_tim (err 0)
[   19.860000] acx_mac80211: Unknown symbol ieee80211_queue_work (err 0)
[   19.880000] acx_mac80211: Unknown symbol backport_dependency_symbol (err 0)
[   19.910000] acx_mac80211: Unknown symbol mac80211_ieee80211_rx (err 0)
[   19.970000] registered device TI Avalanche SAR
[   19.990000] Ohio250(7200/7100A2) detected
[   20.010000] requesting firmware image "ar0700xx.bin"
[   20.560000] avsar firmware released
[   22.300000] tn7dsl_set_modulation : Setting mode to 0x1
[   22.320000] Creating new root folder avalanche in the proc for the driver stats 
[   22.340000] Texas Instruments ATM driver: version:[7.03.01.00]
[   22.380000] acx_mac80211: Unknown symbol ieee80211_queue_stopped (err 0)
[   22.400000] acx_mac80211: Unknown symbol ieee80211_free_hw (err 0)
[   22.420000] acx_mac80211: Unknown symbol ieee80211_probereq_get (err 0)
[   22.440000] acx_mac80211: Unknown symbol ieee80211_alloc_hw (err 0)
[   22.460000] acx_mac80211: Unknown symbol ieee80211_register_hw (err 0)
[   22.480000] acx_mac80211: Unknown symbol ieee80211_restart_hw (err 0)
[   22.500000] acx_mac80211: Unknown symbol ieee80211_wake_queues (err 0)
[   22.520000] acx_mac80211: Unknown symbol ieee80211_tx_status (err 0)
[   22.540000] acx_mac80211: Unknown symbol ieee80211_stop_queues (err 0)
[   22.590000] acx_mac80211: Unknown symbol ieee80211_scan_completed (err 0)
[   22.610000] acx_mac80211: Unknown symbol ieee80211_unregister_hw (err 0)
[   22.630000] acx_mac80211: Unknown symbol ieee80211_beacon_get_tim (err 0)
[   22.650000] acx_mac80211: Unknown symbol ieee80211_queue_work (err 0)
[   22.670000] acx_mac80211: Unknown symbol backport_dependency_symbol (err 0)
[   22.690000] acx_mac80211: Unknown symbol mac80211_ieee80211_rx (err 0)
[   22.740000] acx_mac80211: Unknown symbol ieee80211_queue_stopped (err 0)
[   22.760000] acx_mac80211: Unknown symbol ieee80211_free_hw (err 0)
[   22.780000] acx_mac80211: Unknown symbol ieee80211_probereq_get (err 0)
[   22.800000] acx_mac80211: Unknown symbol ieee80211_alloc_hw (err 0)
[   22.820000] acx_mac80211: Unknown symbol ieee80211_register_hw (err 0)
[   22.840000] acx_mac80211: Unknown symbol ieee80211_restart_hw (err 0)
[   22.860000] acx_mac80211: Unknown symbol ieee80211_wake_queues (err 0)
[   22.880000] acx_mac80211: Unknown symbol ieee80211_tx_status (err 0)
[   22.900000] acx_mac80211: Unknown symbol ieee80211_stop_queues (err 0)
[   22.920000] acx_mac80211: Unknown symbol ieee80211_scan_completed (err 0)
[   22.940000] acx_mac80211: Unknown symbol ieee80211_unregister_hw (err 0)
[   22.960000] acx_mac80211: Unknown symbol ieee80211_beacon_get_tim (err 0)
[   22.980000] acx_mac80211: Unknown symbol ieee80211_queue_work (err 0)
[   23.000000] acx_mac80211: Unknown symbol backport_dependency_symbol (err 0)
[   23.030000] acx_mac80211: Unknown symbol mac80211_ieee80211_rx (err 0)
[   23.060000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   23.150000] NET: Registered protocol family 24
[   23.230000] xt_time: kernel timezone is -0000
[   23.260000] acx_mac80211: Unknown symbol ieee80211_queue_stopped (err 0)
[   23.280000] acx_mac80211: Unknown symbol ieee80211_free_hw (err 0)
[   23.300000] acx_mac80211: Unknown symbol ieee80211_probereq_get (err 0)
[   23.320000] acx_mac80211: Unknown symbol ieee80211_alloc_hw (err 0)
[   23.340000] acx_mac80211: Unknown symbol ieee80211_register_hw (err 0)
[   23.360000] acx_mac80211: Unknown symbol ieee80211_restart_hw (err 0)
[   23.380000] acx_mac80211: Unknown symbol ieee80211_wake_queues (err 0)
[   23.400000] acx_mac80211: Unknown symbol ieee80211_tx_status (err 0)
[   23.420000] acx_mac80211: Unknown symbol ieee80211_stop_queues (err 0)
[   23.440000] acx_mac80211: Unknown symbol ieee80211_scan_completed (err 0)
[   23.460000] acx_mac80211: Unknown symbol ieee80211_unregister_hw (err 0)
[   23.480000] acx_mac80211: Unknown symbol ieee80211_beacon_get_tim (err 0)
[   23.510000] acx_mac80211: Unknown symbol ieee80211_queue_work (err 0)
[   23.530000] acx_mac80211: Unknown symbol backport_dependency_symbol (err 0)
[   23.550000] acx_mac80211: Unknown symbol mac80211_ieee80211_rx (err 0)
[   23.610000] acx_mac80211: Unknown symbol ieee80211_queue_stopped (err 0)
[   23.630000] acx_mac80211: Unknown symbol ieee80211_free_hw (err 0)
[   23.650000] acx_mac80211: Unknown symbol ieee80211_probereq_get (err 0)
[   23.680000] acx_mac80211: Unknown symbol ieee80211_alloc_hw (err 0)
[   23.700000] acx_mac80211: Unknown symbol ieee80211_register_hw (err 0)
[   23.720000] acx_mac80211: Unknown symbol ieee80211_restart_hw (err 0)
[   23.740000] acx_mac80211: Unknown symbol ieee80211_wake_queues (err 0)
[   23.760000] acx_mac80211: Unknown symbol ieee80211_tx_status (err 0)
[   23.780000] acx_mac80211: Unknown symbol ieee80211_stop_queues (err 0)
[   23.800000] acx_mac80211: Unknown symbol ieee80211_scan_completed (err 0)
[   23.820000] acx_mac80211: Unknown symbol ieee80211_unregister_hw (err 0)
[   23.840000] acx_mac80211: Unknown symbol ieee80211_beacon_get_tim (err 0)
[   23.860000] acx_mac80211: Unknown symbol ieee80211_queue_work (err 0)
[   23.880000] acx_mac80211: Unknown symbol backport_dependency_symbol (err 0)
[   23.900000] acx_mac80211: Unknown symbol mac80211_ieee80211_rx (err 0)
[   23.950000] acx_mac80211: Unknown symbol ieee80211_queue_stopped (err 0)
[   23.970000] acx_mac80211: Unknown symbol ieee80211_free_hw (err 0)
[   23.990000] acx_mac80211: Unknown symbol ieee80211_probereq_get (err 0)
[   24.010000] acx_mac80211: Unknown symbol ieee80211_alloc_hw (err 0)
[   24.030000] acx_mac80211: Unknown symbol ieee80211_register_hw (err 0)
[   24.050000] acx_mac80211: Unknown symbol ieee80211_restart_hw (err 0)
[   24.070000] acx_mac80211: Unknown symbol ieee80211_wake_queues (err 0)
[   24.090000] acx_mac80211: Unknown symbol ieee80211_tx_status (err 0)
[   24.110000] acx_mac80211: Unknown symbol ieee80211_stop_queues (err 0)
[   24.130000] acx_mac80211: Unknown symbol ieee80211_scan_completed (err 0)
[   24.150000] acx_mac80211: Unknown symbol ieee80211_unregister_hw (err 0)
[   24.170000] acx_mac80211: Unknown symbol ieee80211_beacon_get_tim (err 0)
[   24.200000] acx_mac80211: Unknown symbol ieee80211_queue_work (err 0)
[   24.220000] acx_mac80211: Unknown symbol backport_dependency_symbol (err 0)
[   24.240000] acx_mac80211: Unknown symbol mac80211_ieee80211_rx (err 0)
[   42.080000] device eth0 entered promiscuous mode
[   42.120000] br-lan: port 1(eth0) entered forwarding state
[   42.130000] br-lan: port 1(eth0) entered forwarding state
[   42.310000] device eth0.1 entered promiscuous mode
[   42.320000] br-lan: port 2(eth0.1) entered forwarding state
[   42.340000] br-lan: port 2(eth0.1) entered forwarding state
[   42.390000] device eth0.2 entered promiscuous mode
[   42.410000] br-lan: port 3(eth0.2) entered forwarding state
[   42.430000] br-lan: port 3(eth0.2) entered forwarding state
[   43.080000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   43.100000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   43.120000] br-lan: port 1(eth0) entered disabled state
[   43.150000] br-lan: port 2(eth0.1) entered disabled state
[   43.190000] br-lan: port 3(eth0.2) entered disabled state

Re: Linksys AG241 v2 no LAN connection

Ah, so this it AR7 device. Can't help with that.
Boot log is just what you see in the serial console during kernel boot process. It's usually the same what you got from "dmesg" command. So what you provided is probably sufficient for someone who knows AR7 target.

6 (edited by M3m3nt0 2014-01-27 18:45:21)

Re: Linksys AG241 v2 no LAN connection

Could THIS be a possible solution...?



EDIT: unfortunately, it's not sad

Re: Linksys AG241 v2 no LAN connection

If I try to "bring up" the eth0 this is the message I get:

root@OpenWrt:/# ifconfig eth0 down                                              
[  325.640000] br-lan: port 1(eth0) entered disabled state                      
root@OpenWrt:/# ifconfig eth0 up                                                
[  328.420000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready    

Googling the string I've found that is probably a full duplex related problem...

How can I force full duplex with OpenWRT to see if it works?

Re: Linksys AG241 v2 no LAN connection

I've captured the bootlog with 4th level of debugging:

bootlog (on pastebin)

hope this helps understand the problem with the LAN switch smile

Re: Linksys AG241 v2 no LAN connection

I've searched on internet for the same problem and a possibile solution...

I'm quite a noob, so it's very difficult for me, but I think the problem is the Infineon ADM6996LC switch.
Simply not supported, unrecognized or missing drivers...?

Could please someone help me understand where the problem lies?


Which "compile configuration" could I test?

Re: Linksys AG241 v2 no LAN connection

M3m3nt0 wrote:
[    0.970000] libphy: Fixed MDIO Bus: probed
[    7.230000] INTERNAL PHY!!!
[    7.300000] libphy: cpmac-mii: probed
[    7.380000] cpmac: device eth0 (regs: 08610000, irq: 27, phy: cpmac-1:1f, mac: 00:18:f8:61:8e:44)
[    7.420000] vlynq0: regs 0x08611800, irq 29, mem 0x04000000

Your ethernet is supported by "cpmac" driver. Your switch should be supported by "adm6996" driver.

As you can see in the above log, "cpmac" believes there is internal PHY, not the external switch PHY. I guess that's also a reason why we don't see "adm6996" being used.

There is also ugly 7 seconds delay that is probably caused by probing MDIO (trying all possible PHYs).

You could try contacting "cpmac" authors for help. I believe that current check for PHY type (internal/external/switch) doesn't work on your device.

Re: Linksys AG241 v2 no LAN connection

Zajec wrote:
M3m3nt0 wrote:
[    0.970000] libphy: Fixed MDIO Bus: probed
[    7.230000] INTERNAL PHY!!!
[    7.300000] libphy: cpmac-mii: probed
[    7.380000] cpmac: device eth0 (regs: 08610000, irq: 27, phy: cpmac-1:1f, mac: 00:18:f8:61:8e:44)
[    7.420000] vlynq0: regs 0x08611800, irq 29, mem 0x04000000

Your ethernet is supported by "cpmac" driver. Your switch should be supported by "adm6996" driver.

As you can see in the above log, "cpmac" believes there is internal PHY, not the external switch PHY. I guess that's also a reason why we don't see "adm6996" being used.

There is also ugly 7 seconds delay that is probably caused by probing MDIO (trying all possible PHYs).

Thank you Zajec for your help! very appreciated! smile

There is a way to manually "force" the driver to be used?or to "tell" cpmac that I'm using an external switch?

You could try contacting "cpmac" authors for help. I believe that current check for PHY type (internal/external/switch) doesn't work on your device.

How can I know who are the authors?

Re: Linksys AG241 v2 no LAN connection

These are the cpmac.c files I've found in my build_dir:

m3m3nt0@m3m3nt0-LINUX:~/openwrt/build_dir$ find -name cpmac.c
./toolchain-mipsel_mips32_gcc-4.6-linaro_uClibc-0.9.33.2/linux-3.10.28/drivers/net/ethernet/ti/cpmac.c
./target-mipsel_mips32_uClibc-0.9.33.2/linux-ar7_generic/linux-3.10.28/.pc/platform/950-cpmac_titan.patch/drivers/net/ethernet/ti/cpmac.c
./target-mipsel_mips32_uClibc-0.9.33.2/linux-ar7_generic/linux-3.10.28/.pc/platform/972-cpmac_fixup.patch/drivers/net/ethernet/ti/cpmac.c
./target-mipsel_mips32_uClibc-0.9.33.2/linux-ar7_generic/linux-3.10.28/drivers/net/ethernet/ti/cpmac.c
m3m3nt0@m3m3nt0-LINUX:~/openwrt/openwrt/openwrt/build_dir$ gedit ./toolchain-mipsel_mips32_gcc-4.6-linaro_uClibc-0.9.33.2/linux-3.10.28/drivers/net/ethernet/ti/cpmac.c

Which one could I edit (and how!!) to force it recognise my external switch and use right drivers?

Re: Linksys AG241 v2 no LAN connection

Put your hacks in toolchain-mipsel_mips32_gcc-4.6-linaro_uClibc-0.9.33.2/linux-3.10.28/drivers/net/ethernet/ti/cpmac.c
Find some variable realated to the external swtich detection, see where it is set to true/false and force it to be true.

Re: Linksys AG241 v2 no LAN connection

I've searched for a variable to set for external switch...but I'm not a "coder", so it's a bit difficult for me smile

this is the cpmac.c file: http://pastebin.com/5PEkFGfz

and this is the "section" I think I have to focus on:

int cpmac_init(void)
{
    u32 mask;
    int i, res;
    void __iomem *mii_reg;

    cpmac_mii = mdiobus_alloc();
    if (cpmac_mii == NULL)
        return -ENOMEM;

    cpmac_mii->name = "cpmac-mii";
    cpmac_mii->read = cpmac_mdio_read;
    cpmac_mii->write = cpmac_mdio_write;
    cpmac_mii->reset = cpmac_mdio_reset;
    cpmac_mii->irq = mii_irqs;

    cpmac_mii->priv = ioremap(ar7_is_titan() ? TITAN_REGS_MDIO : AR7_REGS_MDIO, 256);

    if (!cpmac_mii->priv) {
        printk(KERN_ERR "Can't ioremap mdio registers\n");
        res = -ENXIO;
        goto fail_alloc;
    }

#warning FIXME: unhardcode gpio&reset bits
    ar7_gpio_disable(26);
    ar7_gpio_disable(27);

    if (ar7_is_titan()) {
        ar7_device_reset(AR7_RESET_BIT_EPHY);
        ar7_device_reset(TITAN_RESET_BIT_EPHY1);
    } else {
        ar7_device_reset(AR7_RESET_BIT_EPHY);
        ar7_device_reset(AR7_RESET_BIT_CPMAC_LO);
        ar7_device_reset(AR7_RESET_BIT_CPMAC_HI);
    }

    cpmac_mii->reset(cpmac_mii);

    for (i = 0; i < 300; i++) {
        mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE);
        mask &= ar7_is_titan()? ~(0x80000000 | 0x40000000) : ~(0x80000000);
        if (mask)
            break;
        else
            msleep(10);
    }

    if (mask & (mask - 1)) {
        external_switch = 1;
        if (!ar7_has_high_cpmac()) {
            if (ar7_is_titan()) {
                ar7_device_disable(AR7_RESET_BIT_EPHY);
                ar7_device_disable(TITAN_RESET_BIT_EPHY1);
            } else
                ar7_device_disable(AR7_RESET_BIT_EPHY);

            //Titan remap might be different
            mii_reg = ioremap(AR7_REGS_MII, 4);
            if (mii_reg) {
                writel(readl(mii_reg) | 1, mii_reg);
                iounmap(mii_reg);
            }
        }
    }

    if (external_switch)
        printk(KERN_INFO "EXTERNAL SWITCH!!!\n");
    else if (mask)
        printk(KERN_INFO "EXTERNAL PHY!!!\n");
    else
        printk(KERN_INFO "INTERNAL PHY!!!\n");

    if (ar7_is_titan())
        cpmac_mii->phy_mask = ~(mask | 0x80000000 | 0x40000000);
    else
        cpmac_mii->phy_mask = ~(mask | 0x80000000);

    snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "cpmac-1");

    res = mdiobus_register(cpmac_mii);
    if (res)
        goto fail_mii;

    res = platform_driver_register(&cpmac_driver);
    if (res)
        goto fail_cpmac;

    return 0;

fail_cpmac:
    mdiobus_unregister(cpmac_mii);

fail_mii:
    iounmap(cpmac_mii->priv);

fail_alloc:
    mdiobus_free(cpmac_mii);

    return res;
}

If I understand correctly external_switch is set to 1 depending on the condition of mask and mask &; but I don't understand what they are... big_smile

Re: Linksys AG241 v2 no LAN connection

I've no idea either. But you can try to replace

        if (mask & (mask - 1)) {
                external_switch = 1;
                ...

with

        if (1) {
                external_switch = 1;
                ...

Re: Linksys AG241 v2 no LAN connection

OK. I will try! smile

then..what?
I have to "simply" compile the .bin image?

Re: Linksys AG241 v2 no LAN connection

Compile, install, watch boot log

Re: Linksys AG241 v2 no LAN connection

no luck sad

Re: Linksys AG241 v2 no LAN connection

With OpenWRT Kamikaze 8.09.2 the switch works fine...

Re: Linksys AG241 v2 no LAN connection

M3m3nt0 wrote:

With OpenWRT Kamikaze 8.09.2 the switch works fine...

Provide us at least a boot log.

Re: Linksys AG241 v2 no LAN connection

sorry... smile

here is dmesg output:

Linux version 2.6.26.8 (agb@arrakis) (gcc version 4.1.2) #1 Wed Dec 2 15:14:35 UTC 2009
console [early0] enabled
CPU revision is: 00018448 (MIPS 4KEc)
Clocks: Async mode
Clocks: Setting DSP clock
Clocks: prediv: 1, postdiv: 1, mul: 5
Clocks: base = 25000000, frequency = 125000000, prediv = 1, postdiv = 2, postdiv2 = 1, mul = 10
Clocks: Setting CPU clock
Adjusted requested frequency 211000000 to 211968000
Clocks: prediv: 1, postdiv: 1, mul: 6
Clocks: base = 35328000, frequency = 211968000, prediv = 1, postdiv = 1, postdiv2 = -1, mul = 6
Clocks: Setting USB clock
Adjusted requested frequency 48000000 to 48076920
Clocks: prediv: 13, postdiv: 1, mul: 5
Clocks: base = 125000000, frequency = 48000000, prediv = 13, postdiv = 1, postdiv2 = -1, mul = 5
TI AR7 (TNETD7200), ID: 0x002b, Revision: 0x10
Determined physical RAM map:
 memory: 01000000 @ 14000000 (usable)
Entering add_active_range(0, 81920, 86016) 0 entries of 256 used
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal      81920 ->    86016
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0:    81920 ->    86016
On node 0 totalpages: 4096
  Normal zone: 32 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 4064 pages, LIFO batch:0
  Movable zone: 0 pages used for memmap
Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
Kernel command line: init=/etc/preinit rootfstype=squashfs,jffs2, console=ttyS0,38400n8
Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
Primary data cache 8kB, 4-way, VIPT, no aliases, linesize 16 bytes
PID hash table entries: 64 (order: 6, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 12560k/16384k available (2001k kernel code, 3824k reserved, 417k data, 124k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 211.35 BogoMIPS (lpj=1056768)
Mount-cache hash table entries: 512
net_namespace: 644 bytes
NET: Registered protocol family 16
Switched to high resolution mode on CPU 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 24
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x8610e00 (irq = 15) is a TI-AR7
console handover: boot [early0] -> real [ttyS0]
Fixed MDIO Bus: probed
cpmac-mii: probed
cpmac: device eth0 (regs: 08610000, irq: 27, phy: , mac: 00:18:f8:61:8e:44)
physmap platform flash device: 00800000 at 10000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
physmap-flash.0: Found an alias at 0x400000 for the chip at 0x0
 Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: Swapping erase regions for broken CFI table.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
RedBoot partition parsing not available
4 ar7part partitions found on MTD device physmap-flash.0
Creating 4 MTD partitions on "physmap-flash.0":
0x00000000-0x00010000 : "loader"
0x00010000-0x00020000 : "config"
0x00020000-0x00400000 : "linux"
0x000f0000-0x00400000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=290000, len=170000 
0x00290000-0x00400000 : "rootfs_data"
ar7_wdt: disabling watchdog timer
ar7_wdt: timer margin 59 seconds (prescale 65535, change 57180, freq 62500000)
Registered led device: status
vlynq0: regs 0x08611800, irq 29, mem 0x04000000
TCP vegas registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 124k freed
Please be patient, while OpenWrt loads ...
Algorithmics/MIPS FPU Emulator v1.5
mini_fo: using base directory: /
mini_fo: using storage directory: /tmp/root
br-lan: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
PHY: 0:1f - Link is Down
NET: Registered protocol family 8
NET: Registered protocol family 20
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
acx: this driver is still EXPERIMENTAL
acx: reading README file and/or Craig's HOWTO is recommended, visit http://acx100.sf.net in case of further questions/discussion
acx: compiled to use 32bit I/O access. I/O timing issues might occur, such as non-working firmware upload. Report them
acx: running on a little-endian CPU
acx: PCI/VLYNQ module v0.3.37 initialized, waiting for cards to probe...
Not using the 00000009 VLYNQ device's driver for VLYNQ device: 00000000
Not using the 00000029 VLYNQ device's driver for VLYNQ device: 00000000
registered device TI Avalanche SAR
Ohio250(7200/7100A2) detected
requesting firmware image "ar0700xx.bin"
firmware: requesting ar0700xx.bin
avsar firmware released
tn7dsl_set_modulation : Setting mode to 0x1
Creating new root folder avalanche in the proc for the driver stats 
Texas Instruments ATM driver: version:[7.03.01.00]
jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
mini_fo: using base directory: /
mini_fo: using storage directory: /jffs
ar7_wdt: enabling watchdog timer

If only I knew how to modify cpmac.c file to get the switch working...

Re: Linksys AG241 v2 no LAN connection

Hello M3m3nt0,

could you test if the problem still exists in BarrierBreaker 14.07-rc2? Because I don't own a serial cable so I'm afraid to brick mine.

Cheers
Jusic

Re: Linksys AG241 v2 no LAN connection

Jusic wrote:

Hello M3m3nt0,

could you test if the problem still exists in BarrierBreaker 14.07-rc2? Because I don't own a serial cable so I'm afraid to brick mine.

Cheers
Jusic

Sadly it's still there sad

I've flashed this image, and at the link below you find the serial output:

http://pastebin.com/azn1us5S

Re: Linksys AG241 v2 no LAN connection

I also tried 14.07-rc3...
This version doesn't boot at all giving the same error I get on WAG354G.

Re: Linksys AG241 v2 no LAN connection

Hey M3m3nt0,

according to florian on the following bug reports:

https://dev.openwrt.org/ticket/7330#comment:22
https://dev.openwrt.org/ticket/5927#comment:8

It should be fixed with r42169, r42168, could you check this?

Cheers
Jusic