Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-12 Thread Yeoh Chun Yeow
Unfortunately, the driver that you provided not able to detect the switch
correctly ADM6996FC PHY detected.

I have observed the following:

eth0: Atheros AG71xx at 0xb900, irq 4*
eth0: PHY overlaps ADM6996, providing fixed PHY 14.*
eth0: connected to PHY at ag71xx-mdio:14 [uid=1027, driver=Infineon
ADM6996]
eth1: Atheros AG71xx at 0xba00, irq 5
*eth1: PHY overlaps ADM6996, providing fixed PHY 10.*
eth1: connected to PHY at ag71xx-mdio:10 [uid=1027, driver=Infineon
ADM6996]
eth0: link up (100Mbps/Full duplex)
eth0: link down
device eth1 entered promiscuous mode
eth0: link up (100Mbps/Full duplex)


dmesg
Description: Binary data
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-12 Thread Peter Lebbing
On 12/04/11 09:15, Yeoh Chun Yeow wrote:
 Unfortunately, the driver that you provided not able to detect the
 switch correctly ADM6996FC PHY detected.
 
 I have observed the following:
 eth0: PHY overlaps ADM6996, providing fixed PHY 14.
 eth1: PHY overlaps ADM6996, providing fixed PHY 10.

Okay, I could have seen that one coming. Fortunately, it's not that my detection
code does not work. It's that the driver wishes to be addressed as address 0,
and I forgot that your WAN_PHYMASK and LAN_PHYMASK are set differently.

I should also add 0x before the 14 and 10, I got confused with decimal for a
moment :). It's 16 and 20 decimal.

David already gave the vital piece of information: eth0 is connected to port 4
of the switch.

I'll send you a different driver soon, which hopefully completely fixes the 
problem.

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-12 Thread Peter Lebbing
Hi,

I hopefully have finished the two versions of the driver. One effectively only
supports the M model (though it detects and initialises the FC model), and the
second experimental one adds VLAN support for the FC model.

I don't have the time right now to do the official patch submission. But
attached is the diff against backfire for the experimental FC support. It also
includes a change to the Ubiquiti RouterStation board support code. Yeoh, please
try out the driver. I hope it will completely work for you.

It now even includes some documentation.

Please note that if you apply my patch to the RouterStation support code, but do
not include the ADM6996 driver, you will lose your LAN Ethernet connectivity.

The ADM6996 exports Generic PHY compatible, standard PHY register access on PHY
addresses 16 through 20 (for ports 0 through 4 of the ADM6996). The WAN Ethernet
is correctly wired to address 20.

The LAN is somewhat interestingly wired to address 16, port 0. This means the
MAC will work as if the PHY on the other side of its MII link is port 0, whereas
the MII link connects to the switching fabric of the ADM6996. When using the
ADM6996 switch driver, it will always report link up, 100Mbit/s FD for PHY
address 0, which is correct. Like I said earlier, it is as if the cable between
the Ethernet adapter and the switch is always present.

So I changed the PHY mask for the LAN Ethernet to use PHY address 0.

But if you do not include the ADM6996 driver, it will use the Generic PHY driver
for PHY address 0, and that leads to the special-purpose registers of the
ADM6996. This does not work.

I'd really like to know if chip detection now finally works!

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
Index: target/linux/generic-2.6/files/Documentation/networking/adm6996.txt
===
--- target/linux/generic-2.6/files/Documentation/networking/adm6996.txt	(revision 0)
+++ target/linux/generic-2.6/files/Documentation/networking/adm6996.txt	(revision 0)
@@ -0,0 +1,120 @@
+--- 
+
+ADM6996FC / ADM6996M switch chip driver
+
+
+1. General information
+
+  This driver supports the FC and M models only. The ADM6996F and L are
+  completely different chips.
+  
+1.1 VLAN IDs
+
+  It is possible to define 16 different VLANs. Every VLAN has an identifier, its
+  VLAN ID. It is easiest if you use at most VLAN IDs 0-15. In that case, the
+  swconfig based configuration is very straightforward. To define two VLANs with
+  IDs 4 and 5, you can invoke, for example:
+  
+  # swconfig dev ethX vlan 4 set ports '0 1t 2 5t' 
+  # swconfig dev ethX vlan 5 set ports '0t 1t 5t'
+  
+  The swconfig framework will automatically invoke 'port Y set pvid Z' for every
+  port that is an untagged member of VLAN Y, setting its Primary VLAN ID. In
+  this example, ports 0 and 2 would get pvid 4. The Primary VLAN ID of a port
+  is the VLAN ID associated with untagged packets coming in on that port.
+  
+  But if you wish to use VLAN IDs outside the range 0-15, this automatic
+  behaviour of the swconfig framework becomes a problem. The 16 VLANs that
+  swconfig can configure on the ADM6996 also have a vid setting. By default,
+  this is the same as the number of the VLAN entry, to make the simple behaviour
+  above possible. To still support a VLAN with a VLAN ID higher than 15
+  (presumably because you are in a network where such VLAN IDs are already in
+  use), you can change the vid setting of the VLAN to anything in the range
+  0-1023. But suppose you did the following:
+  
+  # swconfig dev ethX vlan 0 set vid 998 
+  # swconfig dev ethX vlan 0 set ports '0 2 5t'
+ 
+  Now the swconfig framework will issue 'port 0 set pvid 0' and 'port 2 set pvid
+  0'. But the pvid should be set to 998, so you are responsible for manually
+  fixing this!
+
+1.2 VLAN filtering
+
+  The switch is configured to apply source port filtering. This means that
+  packets are only accepted when the port the packets came in on is a member of
+  the VLAN the packet should go to.
+
+  Only membership of a VLAN is tested, it does not matter whether it is a tagged
+  or untagged membership.
+
+  For untagged packets, the destination VLAN is the Primary VLAN ID of the
+  incoming port. So if the PVID of a port is 0, but that port is not a member of
+  the VLAN with ID 0, this means that untagged packets on that port are dropped.
+  This can be used as a roundabout way of dropping untagged packets from a port,
+  a mode often referred to as Admit only tagged packets.
+
+1.3 Reset
+
+  The two supported chip models do not have a sofware-initiated reset. When the
+  driver is initialised, as well as when the 'reset' swconfig option is invoked,
+  the driver will set those registers it knows about and supports to the correct
+  

Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-12 Thread Yeoh Chun Yeow
Hi, Peter,

Thanks for you explanation. I have learned some insights on how the PHY/MAC
works and MII.

FYI, the patch works. I have tested with following /etc/config/network to
send out the tagged packet:

config 'switch'
option 'name' 'eth1'
option 'reset' '1'
option 'enable_vlan' '1'
option 'enable' '1'

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '1'
option 'vid' '1'
option 'ports' '0t 1t 5t'

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '2'
option 'vid' '2'
option 'ports' '0t 1t 5t'

grep dmesg on eth:
eth0: Atheros AG71xx at 0xb900, irq 4
eth0: connected to PHY at ag71xx-mdio:14 [uid=03026071, driver=Generic PHY]
eth1: Atheros AG71xx at 0xba00, irq 5
*eth1: ADM6996FC model PHY found.*
eth1: connected to PHY at ag71xx-mdio:00 [uid=10230007, driver=Infineon
ADM6996]
eth0: link up (100Mbps/Full duplex)
eth0: link down
eth0: link up (100Mbps/Full duplex)
eth1: link up (100Mbps/Full duplex)

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-11 Thread Yeoh Chun Yeow
Dear Jonas,

After patching the patch, the messages Trying 100/FULL, Trying 10/HALF,
Trying 10/HALF disappear during startup. However, even the board is up
without Ethernet cable connecting to the LAN port 1 or port 0, the message
eth1: link up (100Mbps/Full duplex) is already printed there.

The problem port 1 still need to be connected before port 0 can be used
still there.

Regards,
Chun Yeow


 After looking at the code several times, I have an Idea. Can you try
 the attached patch? It should apply to backfire (assuming you are
 using it), but is generated against trunk with the ADM6996 patch
 applied.

 Regards
 Jonas

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-11 Thread Peter Lebbing
On 11/04/11 11:08, Yeoh Chun Yeow wrote:
 However, even the board is up without Ethernet cable connecting to the LAN 
 port 1 or port 0, the message eth1: link up (100Mbps/Full duplex) is
 already printed there.

Yeah, it's still not completely clear to me how these ports are all connected.
If one of the Ethernet MACs is connected to the switch, and it would not make
sense if that was not the case, then that port will immediately go up.

You can compare this with the case where you have an external switch. The only
difference is that the switch is integrated in your RouterStation, and you can
actually talk to the switch to make it do interesting stuff.

If you would have an external switch, there would be a cable between your
Ethernet device eth1 and the switch. On the switch, there are two more ports,
which are the two sockets on your RouterStation. As soon as eth1 is started, it
will go up, because it is connected to the switch. It does not matter if you
plug any other cables into the switch. If there are no other cables plugged into
the switch, your eth1 is still connected to the switch and the link for eth1 is
up. It's just that any packets you send don't go anywhere because no other
devices are connected to the switch.

You can't even see if any other cables are plugged into the switch without
writing specific support code to check for this, just like you wouldn't see in
your log whether any other cables are plugged into the external switch.

It gets really confusing when the ports you call port 0 and port 1 aren't
numbered the same on the switch chip. Like I mentioned somewhere before, port 0
on my switch chip is connected to the port labeled LAN 4 on my router. Port 1
is LAN 3, 2 is LAN 2, 3 is LAN 1. The only thing you can reasonably expect
is that your CPU is connected on port 5.

So I wrote a kludge that indeed checks the link state of the attached ports.
Could you please use the attached driver and map which sockets on your board
connect to which switch ports? If you do

# swconfig dev eth1 get link_state

It will answer with a list of ports that are up. Please connect and disconnect
cables to the three Ethernet sockets on your board and note the effect on that
link_state list.

I suspect your WAN port might be connected to port 4 of the switch. This is a
bit of a special port on the switch chip.

The attached driver also checks the chip model. I really hope your log says
ADM6996FC PHY detected. Could you send me the whole log of your RouterStation?
It might give me some more clues on how stuff is connected.

HTH,

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
/*
 * ADM6996 switch driver
 *
 * swconfig interface based on ar8216.c
 *
 * Copyright (c) 2008 Felix Fietkau n...@openwrt.org
 * VLAN support Copyright (c) 2010, 2011 Peter Lebbing pe...@digitalbrains.com
 *
 * This program is free software; you can redistribute  it and/or modify it
 * under  the terms of the GNU General Public License v2 as published by the
 * Free Software Foundation
 */

#define DEBUG 1

#include linux/kernel.h
#include linux/string.h
#include linux/errno.h
#include linux/unistd.h
#include linux/slab.h
#include linux/interrupt.h
#include linux/init.h
#include linux/delay.h
#include linux/netdevice.h
#include linux/etherdevice.h
#include linux/skbuff.h
#include linux/spinlock.h
#include linux/mm.h
#include linux/module.h
#include linux/mii.h
#include linux/ethtool.h
#include linux/phy.h
#include linux/switch.h

#include asm/io.h
#include asm/irq.h
#include asm/uaccess.h
#include adm6996.h

MODULE_DESCRIPTION(Infineon ADM6996 Switch);
MODULE_AUTHOR(Felix Fietkau, Peter Lebbing pe...@digitalbrains.com);
MODULE_LICENSE(GPL);

struct adm6996_priv {
	struct switch_dev dev;
	struct phy_device *phydev;

	bool enable_vlan;
	bool vlan_enabled;	/* Current hardware state */

#ifdef DEBUG
	u16 addr;		/* Debugging: register address to operate on */
#endif

	u16 pvid[ADM_PHY_PORTS];	/* Primary VLAN ID */

	u16 vlan_id[ADM_NUM_VLANS];
	u8 vlan_table[ADM_NUM_VLANS];	/* bitmap, 1 = port is member */
	u8 vlan_tagged[ADM_NUM_VLANS];	/* bitmap, 1 = tagged member */

	struct mutex reg_mutex;

	/* use abstraction for regops, we want to add gpio support in the future */
	u16 (*read)(struct phy_device *phydev, enum admreg reg);
	void (*write)(struct phy_device *phydev, enum admreg reg, u16 val);
};

#define to_adm(_dev) container_of(_dev, struct adm6996_priv, dev)
#define phy_to_adm(_phy) ((struct adm6996_priv *) (_phy)-priv)

static inline u16
r16(struct phy_device *pdev, enum admreg reg)
{
	return phy_to_adm(pdev)-read(pdev, reg);
}

static inline void
w16(struct phy_device *pdev, enum admreg reg, u16 val)
{
	phy_to_adm(pdev)-write(pdev, reg, val);
}


static u16
adm6996_read_mii_reg(struct phy_device *phydev, enum admreg reg)
{
	return phydev-bus-read(phydev-bus, PHYADDR(reg));
}


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-11 Thread David Goodenough
On Monday 11 April 2011, Peter Lebbing wrote:
 On 11/04/11 11:08, Yeoh Chun Yeow wrote:
  However, even the board is up without Ethernet cable connecting to the
  LAN port 1 or port 0, the message eth1: link up (100Mbps/Full duplex)
  is already printed there.
 
 Yeah, it's still not completely clear to me how these ports are all
 connected. If one of the Ethernet MACs is connected to the switch, and it
 would not make sense if that was not the case, then that port will
 immediately go up.
 
 You can compare this with the case where you have an external switch. The
 only difference is that the switch is integrated in your RouterStation,
 and you can actually talk to the switch to make it do interesting stuff.
 
 If you would have an external switch, there would be a cable between your
 Ethernet device eth1 and the switch. On the switch, there are two more
 ports, which are the two sockets on your RouterStation. As soon as eth1 is
 started, it will go up, because it is connected to the switch. It does not
 matter if you plug any other cables into the switch. If there are no other
 cables plugged into the switch, your eth1 is still connected to the switch
 and the link for eth1 is up. It's just that any packets you send don't go
 anywhere because no other devices are connected to the switch.
 
 You can't even see if any other cables are plugged into the switch without
 writing specific support code to check for this, just like you wouldn't see
 in your log whether any other cables are plugged into the external switch.
 
 It gets really confusing when the ports you call port 0 and port 1 aren't
 numbered the same on the switch chip. Like I mentioned somewhere before,
 port 0 on my switch chip is connected to the port labeled LAN 4 on my
 router. Port 1 is LAN 3, 2 is LAN 2, 3 is LAN 1. The only thing you
 can reasonably expect is that your CPU is connected on port 5.
 
 So I wrote a kludge that indeed checks the link state of the attached
 ports. Could you please use the attached driver and map which sockets on
 your board connect to which switch ports? If you do
 
 # swconfig dev eth1 get link_state
 
 It will answer with a list of ports that are up. Please connect and
 disconnect cables to the three Ethernet sockets on your board and note the
 effect on that link_state list.
 
 I suspect your WAN port might be connected to port 4 of the switch. This is
 a bit of a special port on the switch chip.
This is correct.  It is connected to eth0 on the AR7130, and eth1 is connected
through the other switch port to the two LAN ports.

David
 
 The attached driver also checks the chip model. I really hope your log says
 ADM6996FC PHY detected. Could you send me the whole log of your
 RouterStation? It might give me some more clues on how stuff is connected.
 
 HTH,
 
 Peter.

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-10 Thread Peter Lebbing
On 08/04/11 03:20, Yeoh Chun Yeow wrote:
 You have any clue which datasheet for FC chip should be referred to. For
 me, it seems that it is not similar to F chip or not totally same with M
 chip. 

I'd love to have a datasheet for the FC chip, but I can't find it.

It would appear the M is an enhanced version of the FC chip. They are very
similar, but the M has some functionality the FC doesn't.

The F chip seems to be a different chip altogether.

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-08 Thread Jonas Gorski
On 6 April 2011 16:18, Yeoh Chun Yeow yeohchuny...@gmail.com wrote:
 Hi, Jonas,
 UBNT RS has two ports connected to eth1, port 0 and port 1. If you connect
 your Ethernet cable to port 0 without first connecting Ethernet cable to
 port 1, it won't work. You will see a lot of messages Trying 100/FULL,
 Trying 10/HALF, Trying 10/HALF. Once you connect port 1 with Ethernet
 cable, you will only see the message eth1: link up (100Mbps/Full duplex)
 and the port 0 will function properly.
 Do you know why?

After looking at the code several times, I have an Idea. Can you try
the attached patch? It should apply to backfire (assuming you are
using it), but is generated against trunk with the ADM6996 patch
applied.

Regards
Jonas


0001-Handle-WAN-port-for-UBNT-Routerstation.patch
Description: Binary data
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-08 Thread Yeoh Chun Yeow
Yes, I am using the backfire version and will report my finding once I do
it.

On Fri, Apr 8, 2011 at 11:00 PM, Jonas Gorski 
jonas.gorski+open...@gmail.com wrote:

 On 6 April 2011 16:18, Yeoh Chun Yeow yeohchuny...@gmail.com wrote:
  Hi, Jonas,
  UBNT RS has two ports connected to eth1, port 0 and port 1. If you
 connect
  your Ethernet cable to port 0 without first connecting Ethernet cable to
  port 1, it won't work. You will see a lot of messages Trying 100/FULL,
  Trying 10/HALF, Trying 10/HALF. Once you connect port 1 with Ethernet
  cable, you will only see the message eth1: link up (100Mbps/Full
 duplex)
  and the port 0 will function properly.
  Do you know why?

 After looking at the code several times, I have an Idea. Can you try
 the attached patch? It should apply to backfire (assuming you are
 using it), but is generated against trunk with the ADM6996 patch
 applied.

 Regards
 Jonas

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-07 Thread Peter Lebbing
On 06/04/11 16:18, Yeoh Chun Yeow wrote:
 UBNT RS has two ports connected to eth1, port 0 and port 1. If you
 connect your Ethernet cable to port 0 without first connecting Ethernet
 cable to port 1, it won't work. You will see a lot of messages Trying
 100/FULL, Trying 10/HALF, Trying 10/HALF. Once you connect port 1 with
 Ethernet cable, you will only see the message eth1: link up
 (100Mbps/Full duplex) and the port 0 will function properly. 
 
 Do you know why?

So the two ports 0 and 1 are attached to the switch chip ports with those 
numbers?

It seems to me this is some interesting interaction between the switch chip
driver and the drivers for your System-on-Chip containing the Ethernet MACs.

Those messages about 10/HALF etcetera are, AFAIK, related to querying the PHYs
connected to an Ethernet MAC for link state. But if the ADM6996 switch driver is
queried for link state, it will invariably return 100 Mbit/s full duplex and
link up (function adm6996_read_status). This was already the case before I
implemented VLAN functionality, by the way.

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-07 Thread Peter Lebbing
On 05/04/11 08:52, Yeoh Chun Yeow wrote:
 Untagged packet receive by port 1 is drop. But VLAN 1 and VLAN 2 tagged
 packet for port 0 is working perfertly.
 
 config 'switch_vlan'
 option 'device' 'eth1'
 option 'vlan' '1'
 option 'vid' '1'
 option 'ports' '0t 1 5t'
 
 config 'switch_vlan'
 option 'device' 'eth1'
 option 'vlan' '2'
 option 'vid' '2'
 option 'ports' '0t 1 5t'

It works for me; I just tried it.

But it is a curious setup. Did you do it just to test the functionality? Having
untagged membership of two VLANs is a nice corner case that might have some use,
but is definitely not normal. Since it does work on the M chip, I left it in for
those cases where it might be useful. But if it doesn't work on the FC chip, I
would just throw the possibility out in the driver once we can differentiate
between the two chips.

 Working for both VLAN tagged and untagged packet.
 
 config 'switch_vlan'
 option 'device' 'eth1'
 option 'vlan' '1'
 option 'vid' '1'
 option 'ports' '0t 5t'
 
 config 'switch_vlan'
 option 'device' 'eth1'
 option 'vlan' '2'
 option 'vid' '2'
 option 'ports' '1 5t'

Good to hear a more usual setup does work. I assume this is with the patch you
sent earlier? In that case the common case where a port has both untagged and
tagged memberships fails, right?

Watch out for the primary VLAN ID; pvid property of the port. swconfig dev
eth1 show is your friend. The PVID might not always be what you expect. Seeing
where untagged packets go is something that needs to be tested for the FC chip.
The M chip is configured such that untagged packets coming in on a port are only
accepted if the port is a member of its PVID, and sent out to other members of
that VLAN. If a port is not a member of the VLAN that is in its PVID, the
packets are dropped (i.e., source port filtering, both for tagged and untagged
packets). Note that it doesn't matter if a port is a tagged or untagged member
of a VLAN, just if it is a member at all.

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-07 Thread David Goodenough
On Thursday 07 April 2011, Peter Lebbing wrote:
 On 06/04/11 16:18, Yeoh Chun Yeow wrote:
  UBNT RS has two ports connected to eth1, port 0 and port 1. If you
  connect your Ethernet cable to port 0 without first connecting Ethernet
  cable to port 1, it won't work. You will see a lot of messages Trying
  100/FULL, Trying 10/HALF, Trying 10/HALF. Once you connect port 1 with
  Ethernet cable, you will only see the message eth1: link up
  (100Mbps/Full duplex) and the port 0 will function properly.
  
  Do you know why?
 
 So the two ports 0 and 1 are attached to the switch chip ports with those
 numbers?
 
 It seems to me this is some interesting interaction between the switch chip
 driver and the drivers for your System-on-Chip containing the Ethernet
 MACs.
 
 Those messages about 10/HALF etcetera are, AFAIK, related to querying the
 PHYs connected to an Ethernet MAC for link state. But if the ADM6996
 switch driver is queried for link state, it will invariably return 100
 Mbit/s full duplex and link up (function adm6996_read_status). This was
 already the case before I implemented VLAN functionality, by the way.
 
 Peter.
As I understand it on the Routerstation there are two ports on the AR7130
both of which are connected to the switch.  eth0 is connected to the port
on the switch which just connects to one external RJ54, the upstream WAN
port, and then eth1 is connected to the two LAN RJ45s.  For reference
there is rather simple overview at http://ubnt.com/wiki/RouterStation.

So the idea would be to make the two LAN RJ45s individually configurable,
as by default they operate quite well as a switch sharing a common config.
It would also be useful to be able to sense link up/down transitions.

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-07 Thread Yeoh Chun Yeow

 So the two ports 0 and 1 are attached to the switch chip ports with those
 numbers?

 UBNT RS has three port. From the Left is LAN port 1, LAN port 0 and WAN
port.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-07 Thread Yeoh Chun Yeow

 But it is a curious setup. Did you do it just to test the functionality?


Yes, mainly for testing purpose.



 Good to hear a more usual setup does work. I assume this is with the patch
 you
 sent earlier?

Yes, using the patch I posted before.


 In that case the common case where a port has both untagged and
 tagged memberships fails, right?

Yes, port untagged and tagged membership fails.



 Watch out for the primary VLAN ID; pvid property of the port. swconfig
 dev
 eth1 show is your friend. The PVID might not always be what you expect.
 Seeing
 where untagged packets go is something that needs to be tested for the FC
 chip.
 The M chip is configured such that untagged packets coming in on a port are
 only
 accepted if the port is a member of its PVID, and sent out to other members
 of
 that VLAN. If a port is not a member of the VLAN that is in its PVID, the
 packets are dropped (i.e., source port filtering, both for tagged and
 untagged
 packets). Note that it doesn't matter if a port is a tagged or untagged
 member
 of a VLAN, just if it is a member at all.

 Is this mechanism worked for M chip? Anyone can confirm whether FC chip has
such capabilities?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-07 Thread Peter Lebbing
 Watch out for the primary VLAN ID; pvid property of the port. swconfig 
 dev eth1 show is your friend. The PVID might not always be what you 
 expect. Seeing where untagged packets go is something that needs to be 
 tested for the FC chip. The M chip is configured such that untagged packets
 coming in on a port are only accepted if the port is a member of its PVID,
 and sent out to other members of that VLAN. If a port is not a member of
 the VLAN that is in its PVID, the packets are dropped (i.e., source port
 filtering, both for tagged and untagged packets). Note that it doesn't
 matter if a port is a tagged or untagged member of a VLAN, just if it is a
 member at all.
 
 Is this mechanism worked for M chip? Anyone can confirm whether FC chip has 
 such capabilities?

It works as I described on the M chip. It was suggested (by Jonas I believe)
that the FC might not have the possibility to use both untagged and tagged
membership on the same port. With regard to the filtering capabilities, no idea.

I plan to implement identification of M and FC chips and having the driver
behave differently for the chips.

I suggest I initially submit a driver for inclusion in OpenWRT that only works
for the M chip. I feel I have sufficiently tested that target that it ought to
work for people with an M chip. It is unfortunate that nobody else appears to
have it :).

And then, I could have the driver support the FC chip in a manner where a port
is either member of one or more tagged VLANs or member of exactly one untagged
VLAN, since that is a configuration that appears to work for you, with your
patch. You could then test that driver. I don't really feel comfortable
submitting a driver for inclusion in OpenWRT for a device I do not have myself,
but obviously you or someone else is free to submit that version. It's GPL after
all :).

Apparently there are a lot more people with FC chips. Having this functionality
I intend to implement is already a great start, I suppose. Perhaps the FC can be
coaxed to do more stuff as well.

If somebody has better ideas on how to handle this properly and to everybody's
satisfaction, feel free to offer a suggestion.

Peter.

PS: Not sure on how long it will take me to produce the two versions of the
driver. We'll just have to see when it's ready.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-07 Thread Yeoh Chun Yeow
Hi, Peter

You have any clue which datasheet for FC chip should be referred to. For me,
it seems that it is not similar to F chip or not totally same with M chip.

Regards,
Chun Yeow

On Thu, Apr 7, 2011 at 10:54 PM, Peter Lebbing pe...@digitalbrains.comwrote:


 It works as I described on the M chip. It was suggested (by Jonas I
 believe)
 that the FC might not have the possibility to use both untagged and tagged
 membership on the same port. With regard to the filtering capabilities, no
 idea.

 I plan to implement identification of M and FC chips and having the driver
 behave differently for the chips.

 I suggest I initially submit a driver for inclusion in OpenWRT that only
 works
 for the M chip. I feel I have sufficiently tested that target that it ought
 to
 work for people with an M chip. It is unfortunate that nobody else appears
 to
 have it :).

 And then, I could have the driver support the FC chip in a manner where a
 port
 is either member of one or more tagged VLANs or member of exactly one
 untagged
 VLAN, since that is a configuration that appears to work for you, with your
 patch. You could then test that driver. I don't really feel comfortable
 submitting a driver for inclusion in OpenWRT for a device I do not have
 myself,
 but obviously you or someone else is free to submit that version. It's GPL
 after
 all :).

 Apparently there are a lot more people with FC chips. Having this
 functionality
 I intend to implement is already a great start, I suppose. Perhaps the FC
 can be
 coaxed to do more stuff as well.

 If somebody has better ideas on how to handle this properly and to
 everybody's
 satisfaction, feel free to offer a suggestion.

 Peter.

 PS: Not sure on how long it will take me to produce the two versions of the
 driver. We'll just have to see when it's ready.

 --
 I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
 You can send me encrypted mail if you want some privacy.
 My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-06 Thread Jonas Gorski
On 5 April 2011 08:52, Yeoh Chun Yeow yeohchuny...@gmail.com wrote:
 Any reason why the first configuration failed?

 config 'switch_vlan'
     option 'ports' '0t 1 5t'

 config 'switch_vlan'
     option 'ports' '0t 1 5t'

Generally you can't have a port untagged for more than one VLAN, for
all others it has to be tagged (the switch has to assign incoming
untagged frames to a VLAN - with two untagged VLANs, there is no way
of knowing to which VLAN the untagged frame belongs).

Specifically the FC might not support mixing tagged and untagged
traffic on a port - the M has bits to disallow untagged traffic, but
they are undefined for the FC (the register name is the same).

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-06 Thread Yeoh Chun Yeow
Hi, Jonas,

UBNT RS has two ports connected to eth1, port 0 and port 1. If you connect
your Ethernet cable to port 0 without first connecting Ethernet cable to
port 1, it won't work. You will see a lot of messages Trying 100/FULL,
Trying 10/HALF, Trying 10/HALF. Once you connect port 1 with Ethernet
cable, you will only see the message eth1: link up (100Mbps/Full duplex)
and the port 0 will function properly.

Do you know why?

Regards,
Chun Yeow

On Wed, Apr 6, 2011 at 7:40 PM, Jonas Gorski jonas.gorski+open...@gmail.com
 wrote:

 On 5 April 2011 08:52, Yeoh Chun Yeow yeohchuny...@gmail.com wrote:
  Any reason why the first configuration failed?

  config 'switch_vlan'
  option 'ports' '0t 1 5t'
 
  config 'switch_vlan'
  option 'ports' '0t 1 5t'

 Generally you can't have a port untagged for more than one VLAN, for
 all others it has to be tagged (the switch has to assign incoming
 untagged frames to a VLAN - with two untagged VLANs, there is no way
 of knowing to which VLAN the untagged frame belongs).

 Specifically the FC might not support mixing tagged and untagged
 traffic on a port - the M has bits to disallow untagged traffic, but
 they are undefined for the FC (the register name is the same).

 Regards
 Jonas

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-05 Thread Yeoh Chun Yeow
Untagged packet receive by port 1 is drop. But VLAN 1 and VLAN 2 tagged
packet for port 0 is working perfertly.

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '1'
option 'vid' '1'
option 'ports' '0t 1 5t'

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '2'
option 'vid' '2'
option 'ports' '0t 1 5t'

Working for both VLAN tagged and untagged packet.

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '1'
option 'vid' '1'
option 'ports' '0t 5t'

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '2'
option 'vid' '2'
option 'ports' '1 5t'

Any reason why the first configuration failed?
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-04 Thread Yeoh Chun Yeow
Hi, Peter and David,

I add the following patch and VLAN tagging working fine for UBNT RS:

--- ./target/linux/generic-2.6/files/drivers/net/phy/adm6996.c  2011-03-29
16:24:22.869595814 +0800
+++ ./build_dir/linux-ar71xx/linux-2.6.32.27/drivers/net/phy/adm6996.c
2011-04-04 18:32:14.188937710 +0800
@@ -416,6 +418,15 @@ adm6996_apply_vlan_filters(struct adm699
w16(priv-phydev, ADM_VLAN_FILT_L(i), reg);
reg = ADM_VLAN_FILT_VALID | ADM_VLAN_FILT_VID(vid);
w16(priv-phydev, ADM_VLAN_FILT_H(i), reg);
+
+   for (i = 0; i  ADM_PHY_PORTS; i++) {
+   if(tagged  (1i)){
+   //printk(Tag: 0x%x, i: %d\n,
adm_portcfg[i], i);
+   reg = r16(priv-phydev, adm_portcfg[i]);
+   reg |= ADM_PORTCFG_OT;
+   w16(priv-phydev, adm_portcfg[i], reg);
+   }
+   }
}
 }

config 'switch'
option 'name' 'eth1'
option 'reset' '1'
option 'enable_vlan' '1'
option 'enable' '1'

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '1'
option 'vid' '1'
option 'ports' '0t 1t 5t'

config 'switch_vlan'
option 'vlan' '2'
option 'vid' '2'
option 'ports' '0t 1t 5t

TCP dump results:
# tcpdump -eni eth2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 96 bytes
19:56:57.744360 00:15:6d:c3:81:b1  ff:ff:ff:ff:ff:ff, ethertype 802.1Q
(0x8100), length 60: vlan 1, p 0, ethertype ARP, arp who-has 192.168.1.2
tell 192.168.1.1
19:56:58.744408 00:15:6d:c3:81:b1  ff:ff:ff:ff:ff:ff, ethertype 802.1Q
(0x8100), length 60: vlan 1, p 0, ethertype ARP, arp who-has 192.168.1.2
tell 192.168.1.1
19:56:59.744478 00:15:6d:c3:81:b1  ff:ff:ff:ff:ff:ff, ethertype 802.1Q
(0x8100), length 60: vlan 1, p 0, ethertype ARP, arp who-has 192.168.1.2
tell 192.168.1.1
19:57:01.984613 00:15:6d:c3:81:b1  ff:ff:ff:ff:ff:ff, ethertype 802.1Q
(0x8100), length 60: vlan 2, p 0, ethertype ARP, arp who-has 192.168.2.2
tell 192.168.2.1
19:57:02.984683 00:15:6d:c3:81:b1  ff:ff:ff:ff:ff:ff, ethertype 802.1Q
(0x8100), length 60: vlan 2, p 0, ethertype ARP, arp who-has 192.168.2.2
tell 192.168.2.1
19:57:03.984754 00:15:6d:c3:81:b1  ff:ff:ff:ff:ff:ff, ethertype 802.1Q
(0x8100), length 60: vlan 2, p 0, ethertype ARP, arp who-has 192.168.2.2
tell 192.168.2.1

The only problem nows is the port 1 is activated after port 0 is plugged
with cable. Any idea how to solve this?

One more thing if I try the following /etc/config/network

config 'switch'
option 'name' 'eth1'
option 'reset' '1'
option 'enable_vlan' '1'
option 'enable' '1'

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '1'
option 'vid' '1'
option 'ports' '0 1 5t'

config 'switch_vlan'
option 'vlan' '2'
option 'vid' '2'
option 'ports' '0t 1t 5t

The VLAN 2 is not working, any idea why?

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-04 Thread Peter Lebbing
On 04/04/11 12:59, Yeoh Chun Yeow wrote:
 Hi, Peter and David,

 I add the following patch and VLAN tagging working fine for UBNT RS:


Interesting find, thanks! Can the port still send *untagged* packets as well, if
you configure untagged membership? When I wrote the driver, I think I explicitly
chose not to set this bit, and it was unneeded for my M chip. Perhaps it means
ALWAYS send tagged packets, but I would need to check that, it's just a hunch.
I don't have the time right now.

 The only problem nows is the port 1 is activated after port 0 is plugged
 with cable. Any idea how to solve this?

Could you elaborate a bit? I don't quite understand what you mean with
'activated'. DO you see some message in a log or in the output of some command?


 One more thing if I try the following /etc/config/network

 config 'switch'
 option 'name' 'eth1'
 option 'reset' '1'
 option 'enable_vlan' '1'
 option 'enable' '1'

 config 'switch_vlan'
 option 'device' 'eth1'
 option 'vlan' '1'
 option 'vid' '1'
 option 'ports' '0 1 5t'

 config 'switch_vlan'
 option 'vlan' '2'
 option 'vid' '2'
 option 'ports' '0t 1t 5t

 The VLAN 2 is not working, any idea why?

You forgot

option device eth1

in the vlan 2 definition. I assume the missing quote on the end of the last line
is a copy-paste mistake.

By the way, you don't strictly need to supply vid. The default is that it is
the same as the 'vlan' entry. You could decide to include it for robustness
against manual tinkering, though.

Peter.

PS: Accidentally replied only to Yeoh. Yeoh, please throw that one away for
thread and reference continuity :).

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-04 Thread Yeoh Chun Yeow


 Interesting find, thanks! Can the port still send *untagged* packets as
 well, if
 you configure untagged membership? When I wrote the driver, I think I
 explicitly
 chose not to set this bit, and it was unneeded for my M chip. Perhaps it
 means
 ALWAYS send tagged packets, but I would need to check that, it's just a
 hunch.
 I don't have the time right now.


Yes, you are right? ALWAYS. It seems that if you set this bit, it cannot
send untagged packets for that particular port even though you configure
untagged membership. I try to tag and untag port 0 but for both IP, however,
in both situations, it sends tagged packets.



  The only problem nows is the port 1 is activated after port 0 is plugged
  with cable. Any idea how to solve this?

 Could you elaborate a bit? I don't quite understand what you mean with
 'activated'. DO you see some message in a log or in the output of some
 command?


UBNT RS has two ports connected to eth1, port 0 and port 1. If you connect
your Ethernet cable to port 0 without first connecting Ethernet cable to
port 1, it won't work. You will see a lot of messages Trying 100/FULL,
Trying 10/HALF, Trying 10/HALF. Once you connect port 1 with Ethernet
cable, you will only see the message eth1: link up (100Mbps/Full duplex)
and the port 0 will function properly.

P.S: int i should be changed to int j

--- ./target/linux/generic-2.6/files/drivers/net/phy/adm6996.c  2011-03-29
16:24:22.869595814 +0800
+++ ./build_dir/linux-ar71xx/linux-2.6.32.27/drivers/net/phy/adm6996.c
2011-04-04 18:32:14.188937710 +0800
@@ -416,6 +418,15 @@ adm6996_apply_vlan_filters(struct adm699
w16(priv-phydev, ADM_VLAN_FILT_L(i), reg);
reg = ADM_VLAN_FILT_VALID | ADM_VLAN_FILT_VID(vid);
w16(priv-phydev, ADM_VLAN_FILT_H(i), reg);
+
+   for (j = 0; j  ADM_PHY_PORTS; j++) {
+   if(tagged  (1j)){
+   reg = r16(priv-phydev, adm_portcfg[j]);
+   reg |= ADM_PORTCFG_OT;
+   w16(priv-phydev, adm_portcfg[j], reg);
+   }
+   }

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-01 Thread Peter Lebbing
On 01/04/11 03:27, Yeoh Chun Yeow wrote:
 Ok I found the script.
 
 read-all-adm output attach.

Thanks very much. It's not vital, but if you still have the setup ready, could
you remove the VLAN related config from your /etc/config/network and run the
script again? It would be helpful if the driver didn't configure VLANs before
running the register dumping script.

Other than that, I've had a quick look, and it doesn't make me happy. First and
foremost, the product ID for the FC and M chips is identical down to the last
bit! They reserve a whopping 32 bits for a Chip Identifier and still they both
read 0007:1023! So there doesn't seem to be a standard way to tell the chips 
apart.

And they do seem to differ, which makes sense. There is a lot in common. I could
really use the datasheet for the -FC variant, but all the so-called datasheets
for that chip I've found describe a completely different device.

I even get the impression that the values read from your chip aren't the
power-on-reset default values. Perhaps there's an EEPROM attached with settings
specific to your router.

I do see one possibility for hope. Maybe Infineon at some point stopped
producing the real FC variant described in those datasheets I found, and from
then on simply relabeled their M chip and sold that as the FC variant.
Discrepancies in default values could be explained by an EEPROM with
router-specific settings.

Thanks for your help,

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-01 Thread Peter Lebbing
On -10/01/37 20:59, Yeoh Chun Yeow wrote:
 It seems that ADM6996FC is different from ADM6996M. How to ensure the
 port get tagged? Is this by simply modifying Configuration register Bit 4?

It's a lot more involved on the M model. A whole bunch of bits need to be
changed before it works as one would expect. Okay, perhaps as I would expect.

 2. VLAN separation is alright but VLAN tagging is not working. I
 am using the following: 
 
 config 'switch'
 option 'name' 'eth1'
 option 'reset' '1'

This is a point for the documentation to be written: the ADM6996 appears to have
no possibility to reset. The reset swconfig option is a no-op.

 option 'enable_vlan' '1'
 option 'enable' '1'
 
 config 'switch_vlan'
 option 'device' 'eth1'
 option 'vlan' '1'
 option 'vid' '1'
 option 'ports' '0t 1t 5t'
 
 Tag and No Tag on the port, I am still able to PING a host
 without VLAN tagging. It means that the VLAN tagging is not working.

I just did a quick test, and it confirmed my suspicion. At least Windows 7
couldn't care less if incoming packets are VLAN tagged, it processes them
equally to untagged packets. I can ping fine from a switch port that only sends
tagged packets to the Windows box.

Not unexpected, my Linux box is more picky and drops VLAN tagged packets when
VLANs aren't configured.

So it depends on the OS you use to test. On a Linux box, you can get a lot more
info with, for example:

# tcpdump -eni eth0

The -e argument says to print the link-level header. Without it, tcpdump won't
give an indication that the incoming packet is VLAN tagged.

Furthermore, watch out that the numbering printed beneath the ports on your
router doesn't necessarily correspond to the numbering in the switch chip. On my
router, the port labeled LAN 1 is connected to switch port 3, for example.

HTH,

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-01 Thread Yeoh Chun Yeow
Just to confirm adm6996fc is similar to adm6996m or adm6996f.

On Fri, Apr 1, 2011 at 5:34 PM, David Goodenough 
david.goodeno...@linkchoose.co.uk wrote:

 On Friday 01 April 2011, Peter Lebbing wrote:
  On 01/04/11 03:27, Yeoh Chun Yeow wrote:
   Ok I found the script.
  
   read-all-adm output attach.
 
  Thanks very much. It's not vital, but if you still have the setup ready,
  could you remove the VLAN related config from your /etc/config/network
 and
  run the script again? It would be helpful if the driver didn't configure
  VLANs before running the register dumping script.
 
  Other than that, I've had a quick look, and it doesn't make me happy.
 First
  and foremost, the product ID for the FC and M chips is identical down to
  the last bit! They reserve a whopping 32 bits for a Chip Identifier and
  still they both read 0007:1023! So there doesn't seem to be a standard
 way
  to tell the chips apart.
 Well I suppose if all else fails it will have to be a module parameter, but
 that would definitely be second best.

 David
 
  And they do seem to differ, which makes sense. There is a lot in common.
 I
  could really use the datasheet for the -FC variant, but all the so-called
  datasheets for that chip I've found describe a completely different
  device.
 Its a shame that Ubiquiti, who after all ship Openwrt with their board, can
 not be prevailed upon to provide some information.

 Over time I have accumulated three adm6996 datasheets, one for the L
 variant,
 one for M and one for F (but not FC).  The M one is vast (7MB), but the F
 is small (700K) and the L 1.7M.  I can email them to you direct if you want
 as I suspect the list would not appreciate them being broadcast.  I have
 no idea where I got them from although none are marked confidential so they
 should be freely distributable.

 David
 
  I even get the impression that the values read from your chip aren't the
  power-on-reset default values. Perhaps there's an EEPROM attached with
  settings specific to your router.
 
  I do see one possibility for hope. Maybe Infineon at some point stopped
  producing the real FC variant described in those datasheets I found, and
  from then on simply relabeled their M chip and sold that as the FC
  variant. Discrepancies in default values could be explained by an EEPROM
  with router-specific settings.
 
  Thanks for your help,
 
  Peter.


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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-01 Thread David Goodenough
On Friday 01 April 2011, Yeoh Chun Yeow wrote:
 Just to confirm adm6996fc is similar to adm6996m or adm6996f.
I always thought the F and FC were more similar the the M, but
I have no evidence for that.

David
 
 On Fri, Apr 1, 2011 at 5:34 PM, David Goodenough 
 
 david.goodeno...@linkchoose.co.uk wrote:
  On Friday 01 April 2011, Peter Lebbing wrote:
   On 01/04/11 03:27, Yeoh Chun Yeow wrote:
Ok I found the script.

read-all-adm output attach.
   
   Thanks very much. It's not vital, but if you still have the setup
   ready, could you remove the VLAN related config from your
   /etc/config/network
  
  and
  
   run the script again? It would be helpful if the driver didn't
   configure VLANs before running the register dumping script.
   
   Other than that, I've had a quick look, and it doesn't make me happy.
  
  First
  
   and foremost, the product ID for the FC and M chips is identical down
   to the last bit! They reserve a whopping 32 bits for a Chip
   Identifier and still they both read 0007:1023! So there doesn't seem
   to be a standard
  
  way
  
   to tell the chips apart.
  
  Well I suppose if all else fails it will have to be a module parameter,
  but that would definitely be second best.
  
  David
  
   And they do seem to differ, which makes sense. There is a lot in
   common.
  
  I
  
   could really use the datasheet for the -FC variant, but all the
   so-called datasheets for that chip I've found describe a completely
   different device.
  
  Its a shame that Ubiquiti, who after all ship Openwrt with their board,
  can not be prevailed upon to provide some information.
  
  Over time I have accumulated three adm6996 datasheets, one for the L
  variant,
  one for M and one for F (but not FC).  The M one is vast (7MB), but the F
  is small (700K) and the L 1.7M.  I can email them to you direct if you
  want as I suspect the list would not appreciate them being broadcast.  I
  have no idea where I got them from although none are marked confidential
  so they should be freely distributable.
  
  David
  
   I even get the impression that the values read from your chip aren't
   the power-on-reset default values. Perhaps there's an EEPROM attached
   with settings specific to your router.
   
   I do see one possibility for hope. Maybe Infineon at some point stopped
   producing the real FC variant described in those datasheets I found,
   and from then on simply relabeled their M chip and sold that as the FC
   variant. Discrepancies in default values could be explained by an
   EEPROM with router-specific settings.
   
   Thanks for your help,
   
   Peter.

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-01 Thread Yeoh Chun Yeow
Don't think that VLAN tagging is working.

TCP dump results are shown below:

# tcpdump -eni eth2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 96 bytes
19:00:21.462159 00:15:6d:c3:81:b1  ff:ff:ff:ff:ff:ff, ethertype ARP
(0x0806), length 60: arp who-has 192.168.1.2 tell 192.168.1.1
19:00:21.462586 00:02:a5:4e:93:d9  00:15:6d:c3:81:b1, ethertype ARP
(0x0806), length 42: arp reply 192.168.1.2 is-at 00:02:a5:4e:93:d9
19:00:21.462231 00:15:6d:c3:81:b1  00:02:a5:4e:93:d9, ethertype IPv4
(0x0800), length 98: 192.168.1.1  192.168.1.2: ICMP echo request, id 1331,
seq 0, length 64
19:00:21.462253 00:02:a5:4e:93:d9  00:15:6d:c3:81:b1, ethertype IPv4
(0x0800), length 98: 192.168.1.2  192.168.1.1: ICMP echo reply, id 1331,
seq 0, length 64
19:00:22.456433 00:15:6d:c3:81:b1  00:02:a5:4e:93:d9, ethertype IPv4
(0x0800), length 98: 192.168.1.1  192.168.1.2: ICMP echo request, id 1331,
seq 1, length 64
19:00:22.456453 00:02:a5:4e:93:d9  00:15:6d:c3:81:b1, ethertype IPv4
(0x0800), length 98: 192.168.1.2  192.168.1.1: ICMP echo reply, id 1331,
seq 1, length 64

config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'

config 'interface' 'lan'
option 'ifname' 'eth1.1'
option 'proto' 'static'
option 'ipaddr' '192.168.1.1'
option 'netmask' '255.255.255.0'

config 'interface' 'wan'
option 'ifname' 'eth0'
option 'proto' 'dhcp'

config 'alias'
option 'interface' 'wan'
option 'proto' 'static'
option 'ipaddr' '1.1.1.20'
option 'netmask' '255.255.255.0'

config 'switch'
option 'name' 'eth1'
option 'reset' '1'
option 'enable_vlan' '1'
option 'enable' '1'

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '1'
option 'vid' '1'
option 'ports' '0t 1t 2t 3t 4t 5t'



On Fri, Apr 1, 2011 at 4:59 PM, Peter Lebbing pe...@digitalbrains.comwrote:

 On -10/01/37 20:59, Yeoh Chun Yeow wrote:
  It seems that ADM6996FC is different from ADM6996M. How to ensure the
  port get tagged? Is this by simply modifying Configuration register Bit
 4?

 It's a lot more involved on the M model. A whole bunch of bits need to be
 changed before it works as one would expect. Okay, perhaps as I would
 expect.

  2. VLAN separation is alright but VLAN tagging is not working. I
  am using the following:
 
  config 'switch'
  option 'name' 'eth1'
  option 'reset' '1'

 This is a point for the documentation to be written: the ADM6996 appears to
 have
 no possibility to reset. The reset swconfig option is a no-op.

  option 'enable_vlan' '1'
  option 'enable' '1'
 
  config 'switch_vlan'
  option 'device' 'eth1'
  option 'vlan' '1'
  option 'vid' '1'
  option 'ports' '0t 1t 5t'
 
  Tag and No Tag on the port, I am still able to PING a host
  without VLAN tagging. It means that the VLAN tagging is not
 working.

 I just did a quick test, and it confirmed my suspicion. At least Windows 7
 couldn't care less if incoming packets are VLAN tagged, it processes them
 equally to untagged packets. I can ping fine from a switch port that only
 sends
 tagged packets to the Windows box.

 Not unexpected, my Linux box is more picky and drops VLAN tagged packets
 when
 VLANs aren't configured.

 So it depends on the OS you use to test. On a Linux box, you can get a lot
 more
 info with, for example:

 # tcpdump -eni eth0

 The -e argument says to print the link-level header. Without it, tcpdump
 won't
 give an indication that the incoming packet is VLAN tagged.

 Furthermore, watch out that the numbering printed beneath the ports on your
 router doesn't necessarily correspond to the numbering in the switch chip.
 On my
 router, the port labeled LAN 1 is connected to switch port 3, for
 example.

 HTH,

 Peter.

 --
 I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
 You can send me encrypted mail if you want some privacy.
 My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-04-01 Thread Yeoh Chun Yeow
David,

Can you send me the datasheet. Thanks

On Fri, Apr 1, 2011 at 5:34 PM, David Goodenough 
david.goodeno...@linkchoose.co.uk wrote:

 On Friday 01 April 2011, Peter Lebbing wrote:
  On 01/04/11 03:27, Yeoh Chun Yeow wrote:
   Ok I found the script.
  
   read-all-adm output attach.
 
  Thanks very much. It's not vital, but if you still have the setup ready,
  could you remove the VLAN related config from your /etc/config/network
 and
  run the script again? It would be helpful if the driver didn't configure
  VLANs before running the register dumping script.
 
  Other than that, I've had a quick look, and it doesn't make me happy.
 First
  and foremost, the product ID for the FC and M chips is identical down to
  the last bit! They reserve a whopping 32 bits for a Chip Identifier and
  still they both read 0007:1023! So there doesn't seem to be a standard
 way
  to tell the chips apart.
 Well I suppose if all else fails it will have to be a module parameter, but
 that would definitely be second best.

 David
 
  And they do seem to differ, which makes sense. There is a lot in common.
 I
  could really use the datasheet for the -FC variant, but all the so-called
  datasheets for that chip I've found describe a completely different
  device.
 Its a shame that Ubiquiti, who after all ship Openwrt with their board, can
 not be prevailed upon to provide some information.

 Over time I have accumulated three adm6996 datasheets, one for the L
 variant,
 one for M and one for F (but not FC).  The M one is vast (7MB), but the F
 is small (700K) and the L 1.7M.  I can email them to you direct if you want
 as I suspect the list would not appreciate them being broadcast.  I have
 no idea where I got them from although none are marked confidential so they
 should be freely distributable.

 David
 
  I even get the impression that the values read from your chip aren't the
  power-on-reset default values. Perhaps there's an EEPROM attached with
  settings specific to your router.
 
  I do see one possibility for hope. Maybe Infineon at some point stopped
  producing the real FC variant described in those datasheets I found, and
  from then on simply relabeled their M chip and sold that as the FC
  variant. Discrepancies in default values could be explained by an EEPROM
  with router-specific settings.
 
  Thanks for your help,
 
  Peter.


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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-31 Thread Yeoh Chun Yeow
It seems that ADM6996FC is different from ADM6996M. How to ensure the port
get tagged? Is this by simply modifying Configuration register Bit 4?

On Thu, Mar 31, 2011 at 3:27 PM, Yeoh Chun Yeow yeohchuny...@gmail.comwrote:



 On Wed, Mar 30, 2011 at 10:52 PM, Yeoh Chun Yeow 
 yeohchuny...@gmail.comwrote:

 Dear all,

 I am able to get the patch works by adding the following in mach-ubnt.c:

 ar71xx_eth1_data.phy_mask = UBNT_RS_LAN_PHYMASK

 However, there is two issues here:
 1. RouterStation has two ports on ETH1. One port can only be activated
 after the other port is connected with cable. If this port is unplug, the
 port will not be activated even with cable connect.
 2. VLAN separation is alright but VLAN tagging is not working. I am using
 the following:

 config 'switch'
 option 'name' 'eth1'
 option 'reset' '1'
 option 'enable_vlan' '1'
 option 'enable' '1'

 config 'switch_vlan'
 option 'device' 'eth1'
 option 'vlan' '1'
 option 'vid' '1'
 option 'ports' '0t 1t 5t'

 Tag and No Tag on the port, I am still able to PING a host without VLAN
 tagging. It means that the VLAN tagging is not working.

 Please advice. Thanks

 Regards,
 Chun Yeow



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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-31 Thread David Goodenough
Well the first problem is to detect that this is an FC not an M.  This code
was written on the assumption (as I understand it) that it would only work
on the M, but I had a suspicion that it would also work on the FC but I 
could not get a kernel built to test it (my bad).  We obviously can not 
simply change the way registers are handled so that the FC works if that
stops the M working.  If we could tell the difference then we could set
up each properly.

Peter Lebbing asked me to compile his code with DEBUG turned on, (there
is a #DEFINE near the top of the code), and then to run the attached
program to see what it going on.  Could you try this code and then post
the results for Peter (and the rest of us) to see.

David


On Thursday 31 March 2011, Yeoh Chun Yeow wrote:
 It seems that ADM6996FC is different from ADM6996M. How to ensure the port
 get tagged? Is this by simply modifying Configuration register Bit 4?
 
 On Thu, Mar 31, 2011 at 3:27 PM, Yeoh Chun Yeow 
yeohchuny...@gmail.comwrote:
  On Wed, Mar 30, 2011 at 10:52 PM, Yeoh Chun Yeow 
yeohchuny...@gmail.comwrote:
  Dear all,
  
  I am able to get the patch works by adding the following in mach-ubnt.c:
  
  ar71xx_eth1_data.phy_mask = UBNT_RS_LAN_PHYMASK
  
  However, there is two issues here:
  1. RouterStation has two ports on ETH1. One port can only be activated
  after the other port is connected with cable. If this port is unplug,
  the port will not be activated even with cable connect.
  2. VLAN separation is alright but VLAN tagging is not working. I am
  using the following:
  
  config 'switch'
  
  option 'name' 'eth1'
  option 'reset' '1'
  option 'enable_vlan' '1'
  option 'enable' '1'
  
  config 'switch_vlan'
  
  option 'device' 'eth1'
  option 'vlan' '1'
  option 'vid' '1'
  option 'ports' '0t 1t 5t'
  
  Tag and No Tag on the port, I am still able to PING a host without VLAN
  tagging. It means that the VLAN tagging is not working.
  
  Please advice. Thanks
  
  Regards,
  Chun Yeow



read-all-adm
Description: application/shellscript
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-31 Thread Yeoh Chun Yeow
Yes, I will do that. By the way, what should I check with debug info?

On Thu, Mar 31, 2011 at 8:53 PM, David Goodenough 
david.goodeno...@linkchoose.co.uk wrote:

 Well the first problem is to detect that this is an FC not an M.  This code
 was written on the assumption (as I understand it) that it would only work
 on the M, but I had a suspicion that it would also work on the FC but I
 could not get a kernel built to test it (my bad).  We obviously can not
 simply change the way registers are handled so that the FC works if that
 stops the M working.  If we could tell the difference then we could set
 up each properly.

 Peter Lebbing asked me to compile his code with DEBUG turned on, (there
 is a #DEFINE near the top of the code), and then to run the attached
 program to see what it going on.  Could you try this code and then post
 the results for Peter (and the rest of us) to see.

 David


 On Thursday 31 March 2011, Yeoh Chun Yeow wrote:
  It seems that ADM6996FC is different from ADM6996M. How to ensure the
 port
  get tagged? Is this by simply modifying Configuration register Bit 4?
 
  On Thu, Mar 31, 2011 at 3:27 PM, Yeoh Chun Yeow
 yeohchuny...@gmail.comwrote:
   On Wed, Mar 30, 2011 at 10:52 PM, Yeoh Chun Yeow
 yeohchuny...@gmail.comwrote:
   Dear all,
  
   I am able to get the patch works by adding the following in
 mach-ubnt.c:
  
   ar71xx_eth1_data.phy_mask = UBNT_RS_LAN_PHYMASK
  
   However, there is two issues here:
   1. RouterStation has two ports on ETH1. One port can only be activated
   after the other port is connected with cable. If this port is unplug,
   the port will not be activated even with cable connect.
   2. VLAN separation is alright but VLAN tagging is not working. I am
   using the following:
  
   config 'switch'
  
   option 'name' 'eth1'
   option 'reset' '1'
   option 'enable_vlan' '1'
   option 'enable' '1'
  
   config 'switch_vlan'
  
   option 'device' 'eth1'
   option 'vlan' '1'
   option 'vid' '1'
   option 'ports' '0t 1t 5t'
  
   Tag and No Tag on the port, I am still able to PING a host without
 VLAN
   tagging. It means that the VLAN tagging is not working.
  
   Please advice. Thanks
  
   Regards,
   Chun Yeow


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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-31 Thread Peter Lebbing
On 31/03/11 17:08, Yeoh Chun Yeow wrote:
 Yes, I will do that. By the way, what should I check with debug info?

Nothing needs to be checked. But the read-all-adm script uses a facility in the
driver that is only compiled in when DEBUG is enabled.

It reads the contents of all addressable registers into the file named regs.
This direct register addressing via the swconfig utility is only compiled in
with DEBUG.

By the way, you will need to manually select the SWCONFIG item (Switch
configuration API) in PHY Device support (...) in the kernel configuration.
The fact that the ADM6996 driver depends on this is not included in my initial
patch. Obviously this needs to be fixed before the patch can be committed; but
the problem with FC versus M models is a show stopper for now anyway.

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-31 Thread Peter Lebbing
On -10/01/37 20:59, John Crispin wrote:
 can you post a link to the patch ?

Also using pointers about patchwork use recently posted here, I unearthed my 
patch:

http://patchwork.midlink.org/patch/574/

Apparently patchwork thought that my one-line fix superseded a 666-line patch
file :). That would be a really impressive one-liner.

Peter.

-- 
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-31 Thread Yeoh Chun Yeow
Please send me the script that you mentioned

I have run the following:

:~# swconfig dev eth1 vlan 2 set ports '0 1 2 3t 4t 5t'
:~# swconfig dev eth1 get addr
0
:~# swconfig dev eth1 get data
65535

dmesg
Infineon ADM6996 ag71xx-mdio:10: set_pvid port 0 vlan 2
Infineon ADM6996 ag71xx-mdio:10: set_pvid port 1 vlan 2
Infineon ADM6996 ag71xx-mdio:10: set_pvid port 2 vlan 2
Infineon ADM6996 ag71xx-mdio:10: set_ports port_vlan 2 ports 0 1 2 3T 4T 5T
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-30 Thread David Goodenough
On Wednesday 30 March 2011, Yeoh Chun Yeow wrote:
 Dear all,
 
 Any one has tried the patch from Peter Lebbing on VLAN tag on UBNT
 RouterStation platform and get it work properly.
 
 Regards,
 Chun Yeow
I am afraid that I have difficulty building the kernel to try it on 
an ADM6996FC (on the Routerstation - not pro), and am buried in other
things at the moment.  So no progress here I am afraid.  But I am 
still interested and will try again when I get some free time.

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-30 Thread John Crispin
can you post a link to the patch ?

On 30/03/11 10:34, David Goodenough wrote:
 On Wednesday 30 March 2011, Yeoh Chun Yeow wrote:
 Dear all,

 Any one has tried the patch from Peter Lebbing on VLAN tag on UBNT
 RouterStation platform and get it work properly.

 Regards,
 Chun Yeow
 I am afraid that I have difficulty building the kernel to try it on 
 an ADM6996FC (on the Routerstation - not pro), and am buried in other
 things at the moment.  So no progress here I am afraid.  But I am 
 still interested and will try again when I get some free time.
 
 David
 ___
 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] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-30 Thread David Goodenough
Its not on a web site, just in the archive of this mail-list.

David

On Wednesday 30 March 2011, John Crispin wrote:
 can you post a link to the patch ?
 
 On 30/03/11 10:34, David Goodenough wrote:
  On Wednesday 30 March 2011, Yeoh Chun Yeow wrote:
  Dear all,
  
  Any one has tried the patch from Peter Lebbing on VLAN tag on UBNT
  RouterStation platform and get it work properly.
  
  Regards,
  Chun Yeow
  
  I am afraid that I have difficulty building the kernel to try it on
  an ADM6996FC (on the Routerstation - not pro), and am buried in other
  things at the moment.  So no progress here I am afraid.  But I am
  still interested and will try again when I get some free time.
  
  David
  ___
  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

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-30 Thread John Crispin
yes and the archive can be linked to :)

On 30/03/11 10:51, David Goodenough wrote:
 Its not on a web site, just in the archive of this mail-list.
 
 David
 
 On Wednesday 30 March 2011, John Crispin wrote:
 can you post a link to the patch ?

 On 30/03/11 10:34, David Goodenough wrote:
 On Wednesday 30 March 2011, Yeoh Chun Yeow wrote:
 Dear all,

 Any one has tried the patch from Peter Lebbing on VLAN tag on UBNT
 RouterStation platform and get it work properly.

 Regards,
 Chun Yeow

 I am afraid that I have difficulty building the kernel to try it on
 an ADM6996FC (on the Routerstation - not pro), and am buried in other
 things at the moment.  So no progress here I am afraid.  But I am
 still interested and will try again when I get some free time.

 David
 ___
 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
 
 ___
 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] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-30 Thread John Crispin
https://lists.openwrt.org/pipermail/openwrt-devel/2011-January/009100.html

this is assume

On 30/03/11 10:55, John Crispin wrote:
 yes and the archive can be linked to :)
 
 On 30/03/11 10:51, David Goodenough wrote:
 Its not on a web site, just in the archive of this mail-list.

 David

 On Wednesday 30 March 2011, John Crispin wrote:
 can you post a link to the patch ?

 On 30/03/11 10:34, David Goodenough wrote:
 On Wednesday 30 March 2011, Yeoh Chun Yeow wrote:
 Dear all,

 Any one has tried the patch from Peter Lebbing on VLAN tag on UBNT
 RouterStation platform and get it work properly.

 Regards,
 Chun Yeow

 I am afraid that I have difficulty building the kernel to try it on
 an ADM6996FC (on the Routerstation - not pro), and am buried in other
 things at the moment.  So no progress here I am afraid.  But I am
 still interested and will try again when I get some free time.

 David
 ___
 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

 ___
 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
 

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


Re: [OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-30 Thread Florian Fainelli
On Wednesday 30 March 2011 10:41:10 John Crispin wrote:
 can you post a link to the patch ?

Thread starts here:

https://lists.openwrt.org/pipermail/openwrt-devel/2011-January/009100.html
--
Florian
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-30 Thread Yeoh Chun Yeow
Dear all,

I am able to get the patch works by adding the following in mach-ubnt.c:

ar71xx_eth1_data.phy_mask = UBNT_RS_LAN_PHYMASK

However, there is two issues here:
1. RouterStation has two ports on ETH1. One port can only be activated after
the other port is connected with cable. If this port is unplug, the port
will not be activated even with cable connect.
2. VLAN separation is alright but VLAN tagging is not working. I am using
the following:

config 'switch'
option 'name' 'eth1'
option 'reset' '1'
option 'enable_vlan' '1'
option 'enable' '1'

config 'switch_vlan'
option 'device' 'eth1'
option 'vlan' '1'
option 'vid' '1'
option 'ports' '0t 1t 5t'

Tag and No Tag on the port, I am still able to PING a host without VLAN
tagging. It means that the VLAN tagging is not working.

Please advice. Thanks

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


[OpenWrt-Devel] 802.1Q VLAN support for Infineon ADM6996 switch chip for UBNT RouterStation

2011-03-29 Thread Yeoh Chun Yeow
Dear all,

Any one has tried the patch from Peter Lebbing on VLAN tag on UBNT
RouterStation platform and get it work properly.

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