Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fonera2g, fon2202
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
flameman
n00b
n00b


Joined: 10 Apr 2011
Posts: 44

PostPosted: Sun Jul 08, 2012 7:14 pm    Post subject: fonera2g, fon2202 Reply with quote

hi
anyone toying with fonera2g aka fon2204 (1) ?
It seems there are issues in the kernel driver about phy which should handle the Port Switch Marvell 88E6060 RCJ1.

I have put a stage3 mips1-big-endian on an usb-key, here you can see an openWRT patched kernel 2.6.26 which has the issue

Quote:

Now booting linux kernel:
Base address 0x80030000 Entry 0x802d3970
Cmdline : root=/dev/uba2 init=/bin/bash
Linux version 2.6.26-rotary-wombat-fonera2 (root@kanojo) (gcc version 4.1.2 (Gentoo 4.1.2 p1.3)) #127 Sun Jul 8 20:02:34 CEST 2012
CPU revision is: 00019064 (MIPS 4KEc)
Determined physical RAM map:
memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0 -> 8192
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0 -> 8192
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
Kernel command line: root=/dev/uba2 init=/bin/bash
Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 16 bytes
PID hash table entries: 128 (order: 7, 512 bytes)
console [ttyS0] enabled
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 28784k/32768k available (2663k kernel code, 3984k reserved, 519k data, 140k init, 0k highmem)
SLUB: Genslabs=6, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Mount-cache hash table entries: 512
net_namespace: 192 bytes
NET: Registered protocol family 16
Radio config found at offset 0xf8(0x1f8)
AR531x PCI init...
done
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
PCI: fixing up device 0,3,0
PCI: Failed to allocate mem resource #1:4000000@84000000 for 0000:00:03.0
Sangoma WANPIPE Router v1.1 (c) 1995-2000 Sangoma Technologies Inc.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
ar531x: Registering GPIODEV device
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
msgmni has been set to 56
io scheduler noop registered
io scheduler deadline registered (default)
pci_hotplug: PCI Hot Plug PCI Core version: 0.5
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0xb1100003 (irq = 37) is a 16550A
loop: module loaded
nbd: registered device at major 43
usbcore: registered new interface driver ub
Ethernet Channel Bonding Driver: v3.2.5 (March 21, 2008)
bonding: Warning: either miimon or arp_interval and arp_ip_target module parameters must be specified, otherwise bonding will not detect link failur.
Fixed MDIO Bus: probed
m.y. eth0: Atheros AR231x: 00:18:84:d0:56:00, irq 4
ar2313_eth_mii: probed
eth0: Marvell 88E6060 PHY driver attached in trailer_mode
eth0: attached PHY driver [Marvell 88E6060] (mii_bus:phy_addr=0:1f)
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver rndis_host
Uniform Multi-Platform E-IDE driver
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Driver 'sd' needs updating - please use bus_type methods
Driver 'sr' needs updating - please use bus_type methods
usbmon: debugfs is not available
PCI: Enabling device 0000:00:00.1 (0000 -> 0002)
ehci_hcd 0000:00:00.1: EHCI Host Controller
ehci_hcd 0000:00:00.1: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:00.1: irq 5, io mem 0x80c21000
ehci_hcd 0000:00:00.1: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
eth0: Configuring MAC for full duplex
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.26-rotary-wombat-fonera2 ehci_hcd
usb usb1: SerialNumber: 0000:00:00.1
Initializing USB Mass Storage driver...
usb 1-1: new high speed USB device using ehci_hcd and address 2
usb 1-1: configuration #1 chosen from 1 choice
uba: uba1 uba2
usb 1-1: New USB device found, idVendor=0781, idProduct=5567
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: Cruzer Blade
usb 1-1: Manufacturer: SanDisk
usb 1-1: SerialNumber: 35503304FBA0FA0F
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
NET: Registered protocol family 26
IPv4 over IPv4 tunneling driver
TCP bic registered
TCP westwood registered
TCP htcp 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>
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 140k freed
Algorithmics/MIPS FPU Emulator v1.5
mips1-hosted-by-(none) / # sh my_mount.sh
EXT3-fs warning: mounting unchecked fs, running e2fsck is recommended
EXT3 FS on uba2, internal journal


mips1 / # mount -t proc none /proc/
mips1 / # mount -t sysfs none /sys
mips1 / # mount -o remount,rw /
mips1 / # mount -t devpts mpme /dev/pts
mips1 / # echo > /etc/mtab
mips1 / # ifconfig eth0 hw ether AA:18:84:DD:56:AA
mips1 / # ifconfig eth0 inet 192.168.1.9 netmask 255.255.255.0
mips1 / # ifconfig eth0 up
mips1 / # ifconfig
eth0 Link encap:Ethernet HWaddr AA:18:84:DD:56:AA
inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:269 (269.0 b) TX bytes:0 (0.0 b)
Interrupt:255 Base address:0x1000
mips1 / # ping 192.168.1.14
PING 192.168.1.14 (192.168.1.14) 56(84) bytes of data.

--- 192.168.1.14 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms



All other machines are able to ping 192.168.1.14, it seems there is something wrong in the arp level.
No idea.


Anybody toying with this miniRouter ?





(1) Hardware FON2202 aka fonerav2.0g
Quote:

Architecture: MIPS big endian
Vendor: Accton/FON
Bootloader: Redboot
System-On-Chip: Atheros AR2315A
CPU Speed: 180 Mhz
Flash-Chip: MX 5L6405MC-20G
Flash size: 8 MiB
RAM: 32 MiB
Wireless: Atheros AR2315A WiSoC 802.11b/g (integrated)
Ethernet: Marvell 88E6060 Fast Ethernet Switch, 2 Port
USB: NEC D72010 USB 2.0 Controller, 1 Port
Serial: 1 Port
JTAG: No


Last edited by flameman on Tue Jul 10, 2012 7:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
flameman
n00b
n00b


Joined: 10 Apr 2011
Posts: 44

PostPosted: Sun Jul 08, 2012 7:21 pm    Post subject: Reply with quote

About the issue of the Marvell 88E6060 switch driver


Quote:

Found, the fonera doesn't works when the ethernet
on the other end has a MAC address
where the 5th byte is compriseer by 01 and 05

eg.
xx:xx:xx:xx:xy:xx
where y is from 1 to 5 included.

I can confirm this behaviour on a Fonera 2201,
Openwrt trunk (rev 14400)
This seems to be driver related as arp responses work
if the arp request is initiated by the client PC,
but the fonera never hears the responses to
it's own arp requests from the client PC.
Attempting to ping a client PC,
then viewing the arp table on the fonera will show
an unresolved mac address of 00:00:00:00:00:00
Attempting to ping the fonera from the client PC
will resolve the correct mac address for the fonera
in the client's arp cache After changing the mac address
on the client to the exact same mac address
as the previous one, except editing byte 5 to be 06,
communication works correctly.

Same problem with two Fonera+ (2201) using dd-wrt v24-SP1.

The 88E6060 switch chip does vlan to port mapping
using either header or trailer mode,
where data is added to the beginning or end of
the packet respectively to indicate the src/dst port(s)
for the packet.

The mvswitch.c driver defaults to header mode,
but can be compiled for trailer mode.
Used in header mode this problem with the 5th byte
of the mac address is seen. Used in trailer mode it isn't.
Back to top
View user's profile Send private message
flameman
n00b
n00b


Joined: 10 Apr 2011
Posts: 44

PostPosted: Sun Jul 08, 2012 8:27 pm    Post subject: Reply with quote

Note that if i ping fonera from an other machine the "RX packets" field is increasing

Quote:

eth0 Link encap:Ethernet HWaddr AA:18:84:DD:56:AA
inet addr:192.168.1.9 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1370 (1.3 Kb) TX bytes:0 (0.0 b)
Interrupt:255 Base address:0x1000
Back to top
View user's profile Send private message
flameman
n00b
n00b


Joined: 10 Apr 2011
Posts: 44

PostPosted: Tue Jul 10, 2012 2:33 pm    Post subject: Reply with quote

Found a workaround, executing the following list of operation will put the eth0 into operating status: you will be able to ping other machines, and other machines will be able to ping your fonera, also ssh will work both the two directions.

Quote:

echo "---1---"
brctl addbr my

echo "----2---"
ifconfig my down

echo "---3---"
brctl stp my off

echo "---4---"
ifconfig my inet 192.168.1.9 netmask 255.255.255.0

echo "---5---"
ifconfig eth0 up

echo "---6---"
vconfig set_name_type DEV_PLUS_VID_NO_PAD

echo "---8---"
vconfig add eth0 0
brctl addif my eth0.0

echo "---9---"
ifconfig my up
ifconfig eth0 up
ifconfig eth0.0 up

route add default gw 192.168.1.1
brctl delif my eth0.0
brctl addif my eth0.0

echo -n "waiting .. "
sleep 5
echo "done"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum