On Fri, Mar 11, 2011 at 9:39 AM, Layne M. Edwards <ledwa...@astrumtech.net> wrote: > On Thu, 10 Mar 2011 21:44:24 -0500, "Layne M. Edwards" > <ledwa...@astrumtech.net> wrote: >> >> On Fri, 11 Mar 2011 00:09:53 +0200, Roman Yeryomin >> <leroi.li...@gmail.com> wrote: >>> >>> On 10 March 2011 19:09, Layne M. Edwards <ledwa...@astrumtech.net> wrote: >>>> >>>> Also, the switch configuration (swconfig) is not working as expected >>>> (when >>>> using r24328). The VLANs for LAN (eth0.1) and WAN (eth0.2) are not >>>> configured properly by default (i.e. WAN port is on one of the LAN >>>> ports). >>>> Modifying the swconfig in '/etc/config/network' seems to have no effect. >>>> Is >>>> this a bug or has swconfig not been implemented yet for ramips? >>>> >>>> I haven't had time to review the ramips eth/esw drivers (ramips.c, >>>> ramips_esw.c) to identify the problem yet. I was hoping one of the >>>> ramips >>>> driver developers (John Crispin <blogic> and/or Gabor Juhos <juhosg>) >>>> could >>>> take a look at this and provide some insight. Thanks for your >>>> contributions >>>> to this. >>>> >>> >>> There is no support for swlib in ramips_esw driver - it should be >>> rewritten to support it. >> >> Thanks, that explains why swconfig doesn't work for ramips. >> >>> And this is real problem because, e.g. Belkin board I have has >>> external switch, and there is no other way (at least with existing >>> code) except modifying ramips_esw and partially braking ramips target >>> to make it work correctly. See my patches from this thread: >>> https://forum.openwrt.org/viewtopic.php?id=21998 for example. >>> Hopefully me or Juhos or someone else will have time to rewrite >>> ramips_esw to support swlib. I see no other right way to do it. But >>> maybe I'm blind.. :) >> >> Is there anyone working on this? I can take a look at it if no one >> is working on it. >> >> Thanks, >> Layne >> > > I managed to find a solution to my VLAN issue. It looks like the VLAN > configuration is hard-coded in ramips_esw.c, but the definitions are > incorrect for the HW550-3G. Using the r24328 driver (as discussed before), > I patched it for the HW550-3G: > > Index: target/linux/ramips/files/drivers/net/ramips_esw.c > =================================================================== > --- target/linux/ramips/files/drivers/net/ramips_esw.c (revision 24328) > +++ target/linux/ramips/files/drivers/net/ramips_esw.c (working copy) > @@ -115,8 +115,12 @@ > rt305x_sysc_wr(0x0, 0x670); //GPIO41-GPIO50 output low > > /* set default vlan */ > - ramips_esw_wr(0x2001, 0x50); > - ramips_esw_wr(0x504f, 0x70); > + ramips_esw_wr(0x2001, 0x50); // VLAN Identifier: VLAN 0 = ethx.1; > VLAN 1 = ethx.2 > + ramips_esw_wr(0x003f, 0xe4); // Enable VLAN Double Tag > + ramips_esw_wr(0x1002, 0x40); > + ramips_esw_wr(0x1001, 0x44); > + ramips_esw_wr(0x1001, 0x48); > + ramips_esw_wr(0x415e, 0x70); // VLAN Member Ports: VLAN 0 = 1 2 3 > 4 6*; VLAN 1 = 0 6* > > return 0; > } > > This is only a temporary solution (it's a hack just for the HW550-3g)... but > at least my VLANs are configured properly now. We should try to get > swconfig support into the ramips_esw driver. > > There's still the problem with the latest trunk eth/esw drivers not working > (at least for this board). I will try to find the issue when I have time. > > Thanks, > Layne > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel >
AFAIK Fonera has a configurable driver for RT305x switch. -- Pozdrawiam, Sławomir Cygan _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel