Modify

Opened 6 years ago

Last modified 4 years ago

#11059 new defect

ja73pf support broken - switch does not work

Reported by: jules-ow@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

Current trunk version for jjPlus fails to configure switch. eth0 interface is reported in dmesg as Generic PHY and it does not accepts configuration.

Attachments (0)

Change History (5)

comment:1 Changed 6 years ago by anonymous

dmesg output:

[    0.000000] Linux version 3.2.5 (julianszulc@debian) (gcc version 4.6.3 2012
0201 (prerelease) (Linaro GCC 4.6-2012.02) ) #16 Thu Mar 1 14:54:27 EST 2012
[    0.000000] MyLoader: sysp=00000000, boardp=371856a2, parts=0080e821
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR7130 rev 2
[    0.000000] Clocks: CPU:300.000MHz, DDR:300.000MHz, AHB:150.000MHz, Ref:40.0
00MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 802c1d70, node_mem_map 810000
00
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa
ges: 8128
[    0.000000] Kernel command line:  board=JWAP003 console=ttyS0,115200 ethaddr
=00.15.61.90.42.68 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32
 bytes
[    0.000000] Writing ErrCtl register=00010002
[    0.000000] Readback ErrCtl register=00010002
[    0.000000] Memory: 29324k/32768k available (2047k kernel code, 3444k reserv
ed, 393k data, 192k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, N
odes=1
[    0.000000] NR_IRQS:48
[    0.000000] Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is jjPlus JWAP003
[    2.690000] registering PCI controller with io_map_base unset
[    2.700000] bio: create slab <bio-0> at 0
[    2.710000] i2c-gpio i2c-gpio.0: using pins 1 (SDA) and 0 (SCL)
[    2.720000] Switching to clocksource MIPS
[    2.720000] NET: Registered protocol family 2
[    2.730000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    2.730000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    2.740000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    2.740000] TCP: Hash tables configured (established 1024 bind 1024)
[    2.750000] TCP reno registered
[    2.750000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.760000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.770000] NET: Registered protocol family 1
[    2.770000] PCI: CLS 0 bytes, default 32
[    2.800000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.800000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORIT
Y) (c) 2001-2006 Red Hat, Inc.
[    2.810000] msgmni has been set to 57
[    2.820000] io scheduler noop registered
[    2.820000] io scheduler deadline registered (default)
[    2.830000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    2.850000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    2.860000] console [ttyS0] enabled, bootconsole disabled
[    2.880000] m25p80 spi0.0: found m25p64, expected m25p80
[    2.880000] m25p80 spi0.0: m25p64 (8192 Kbytes)
[    2.890000] Searching for RedBoot partition table in spi0.0 at offset 0x7e00
00
[    3.120000] 6 RedBoot partitions found on MTD device spi0.0
[    3.130000] Creating 6 MTD partitions on "spi0.0":
[    3.130000] 0x000000000000-0x000000040000 : "RedBoot"
[    3.140000] 0x000000040000-0x000000120000 : "linux.bin"
[    3.150000] 0x000000120000-0x0000007e0000 : "rootfs"
[    3.150000] mtd: partition "rootfs" set to be root filesystem
[    3.160000] mtd: partition "rootfs_data" created automatically, ofs=280000, 
len=560000 
[    3.170000] 0x000000280000-0x0000007e0000 : "rootfs_data"
[    3.170000] 0x0000007e0000-0x0000007ef000 : "FIS directory"
[    3.180000] 0x0000007ef000-0x0000007f0000 : "RedBoot config"
[    3.190000] 0x0000007f0000-0x000000800000 : "boardconfig"
[    3.310000] ag71xx_mdio: probed
[    3.310000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    3.620000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.0:00 [uid
=004dd042, driver=Generic PHY]
[    3.630000] eth1: Atheros AG71xx at 0xba000000, irq 5
[    3.930000] ag71xx ag71xx.1: eth1: connected to PHY at ag71xx-mdio.0:04 [uid
=004dd042, driver=Generic PHY]
[    3.940000] TCP westwood registered
[    3.950000] NET: Registered protocol family 17
[    3.950000] 8021q: 802.1Q VLAN Support v1.8
[    3.970000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    3.980000] Freeing unused kernel memory: 192k freed
[   10.620000] ar71xx: pll_reg 0xb8050010: 0x1099
[   10.620000] eth0: link up (100Mbps/Full duplex)
[   12.730000] eth0: link down
[   13.820000] Compat-wireless backport release: compat-wireless-2012-02-23-9-g
3e5b1f0
[   13.830000] Backport based on wireless-testing.git master-2012-02-27
[   14.050000] cfg80211: Calling CRDA to update world regulatory domain
[   14.220000] cfg80211: World regulatory domain updated:
[   14.220000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_ga
in, max_eirp)
[   14.230000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2
000 mBm)
[   14.240000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2
000 mBm)
[   14.250000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2
000 mBm)
[   14.250000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2
000 mBm)
[   14.440000] usbcore: registered new interface driver usbfs
[   14.440000] usbcore: registered new interface driver hub
[   14.450000] usbcore: registered new device driver usb
[   16.000000] PPP generic driver version 2.4.2
[   16.190000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   16.330000] NET: Registered protocol family 24
[   16.500000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   16.510000] ath79-ehci ar71xx-ehci: Atheros built-in EHCI controller
[   16.520000] ath79-ehci ar71xx-ehci: new USB bus registered, assigned bus num
ber 1
[   16.550000] ath79-ehci ar71xx-ehci: irq 3, io mem 0x1b000000
[   16.570000] ath79-ehci ar71xx-ehci: USB 2.0 started, EHCI 1.00
[   16.570000] hub 1-0:1.0: USB hub found
[   16.580000] hub 1-0:1.0: 2 ports detected
[   16.600000] nf_conntrack version 0.5.0 (461 buckets, 1844 max)
[   16.820000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   16.830000] ath79-ohci ath79-ohci: Atheros built-in OHCI controller
[   16.840000] ath79-ohci ath79-ohci: new USB bus registered, assigned bus numb
er 2
[   16.840000] ath79-ohci ath79-ohci: irq 14, io mem 0x1c000000
[   16.910000] hub 2-0:1.0: USB hub found
[   16.910000] hub 2-0:1.0: 2 ports detected
[   19.130000] device eth1 entered promiscuous mode
[   19.690000] ar71xx: pll_reg 0xb8050010: 0x1099
[   19.690000] eth0: link up (100Mbps/Full duplex)
[   24.650000] device eth1 left promiscuous mode
[   24.650000] br-lan: port 1(eth1) entering disabled state
[   25.160000] device eth1 entered promiscuous mode
[   34.130000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   34.150000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   34.150000] jffs2_build_filesystem(): erasing all blocks after the end marke
r... done.
[  119.720000] JFFS2 notice: (1351) jffs2_build_xattr_subsystem: complete build
ing xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead,
 0 orphan) found.

comment:2 Changed 6 years ago by oc80z

I thought I fixed this some time ago. You may need to edit your kernel config, rather than just applying this de-feature patch.

Cheers

Index: ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
===================================================================
--- ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h     (revision 30513)
+++ ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h     (working copy)
@@ -34,7 +34,6 @@
        u8              is_ar91xx:1;
        u8              is_ar7240:1;
        u8              is_ar724x:1;
-       u8              has_ar8216:1;
 
        struct ag71xx_switch_platform_data *switch_data;
 
Index: ar71xx/files/drivers/net/ethernet/atheros/ag71xx/Kconfig
===================================================================
--- ar71xx/files/drivers/net/ethernet/atheros/ag71xx/Kconfig    (revision 30513)
+++ ar71xx/files/drivers/net/ethernet/atheros/ag71xx/Kconfig    (working copy)
@@ -21,13 +21,3 @@
        help
          Say Y, if you need access to various statistics provided by
          the ag71xx driver.
-
-config AG71XX_AR8216_SUPPORT
-       bool "special support for the Atheros AR8216 switch"
-       default n
-       default y if ATH79_MACH_WNR2000 || ATH79_MACH_MZK_W04NU
-       help
-         Say 'y' here if you want to enable special support for the
-         Atheros AR8216 switch found on some boards.
-
-endif
Index: ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
===================================================================
--- ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c      (revision 30513)
+++ ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c      (working copy)
@@ -201,8 +201,7 @@
        int reserve = 0;
 
        if (ag71xx_get_pdata(ag)->is_ar724x) {
-               if (!ag71xx_has_ar8216(ag))
-                       reserve = 2;
+               reserve = 2;
 
                if (ag->phy_dev)
                        reserve += 4 - (ag->phy_dev->pkt_align % 4);
@@ -685,9 +684,6 @@
        if (!ag71xx_desc_empty(desc))
                goto err_drop;
 
-       if (ag71xx_has_ar8216(ag))
-               ag71xx_add_ar8216_header(ag, skb);
-
        if (skb->len <= 0) {
                DBG("%s: packet len is too small\n", ag->dev->name);
                goto err_drop;
@@ -881,7 +877,6 @@
                struct ag71xx_desc *desc = ring->buf[i].desc;
                struct sk_buff *skb;
                int pktlen;
-               int err = 0;
 
                if (ag71xx_desc_empty(desc))
                        break;
@@ -905,21 +900,13 @@
                dev->stats.rx_bytes += pktlen;
 
                skb_put(skb, pktlen);
-               if (ag71xx_has_ar8216(ag))
-                       err = ag71xx_remove_ar8216_header(ag, skb, pktlen);
-
-               if (err) {
-                       dev->stats.rx_dropped++;
-                       kfree_skb(skb);
+               skb->dev = dev;
+               skb->ip_summed = CHECKSUM_NONE;
+               if (ag->phy_dev) {
+                       ag->phy_dev->netif_receive_skb(skb);
                } else {
-                       skb->dev = dev;
-                       skb->ip_summed = CHECKSUM_NONE;
-                       if (ag->phy_dev) {
-                               ag->phy_dev->netif_receive_skb(skb);
-                       } else {
-                               skb->protocol = eth_type_trans(skb, dev);
-                               netif_receive_skb(skb);
-                       }
+                       skb->protocol = eth_type_trans(skb, dev);
+                       netif_receive_skb(skb);
                }
 
                ring->buf[i].skb = NULL;
Index: ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h
===================================================================
--- ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h   (revision 30513)
+++ ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h   (working copy)
@@ -406,32 +406,6 @@
        ag71xx_cb(ag, AG71XX_REG_INT_ENABLE, ints);
 }
 
-#ifdef CONFIG_AG71XX_AR8216_SUPPORT
-void ag71xx_add_ar8216_header(struct ag71xx *ag, struct sk_buff *skb);
-int ag71xx_remove_ar8216_header(struct ag71xx *ag, struct sk_buff *skb,
-                               int pktlen);
-static inline int ag71xx_has_ar8216(struct ag71xx *ag)
-{
-       return ag71xx_get_pdata(ag)->has_ar8216;
-}
-#else
-static inline void ag71xx_add_ar8216_header(struct ag71xx *ag,
-                                          struct sk_buff *skb)
-{
-}
-
-static inline int ag71xx_remove_ar8216_header(struct ag71xx *ag,
-                                             struct sk_buff *skb,
-                                             int pktlen)
-{
-       return 0;
-}
-static inline int ag71xx_has_ar8216(struct ag71xx *ag)
-{
-       return 0;
-}
-#endif
-
 #ifdef CONFIG_AG71XX_DEBUG_FS
 int ag71xx_debugfs_root_init(void);
 void ag71xx_debugfs_root_exit(void);
Index: ar71xx/files/drivers/net/ethernet/atheros/ag71xx/Makefile
===================================================================
--- ar71xx/files/drivers/net/ethernet/atheros/ag71xx/Makefile   (revision 30513)
+++ ar71xx/files/drivers/net/ethernet/atheros/ag71xx/Makefile   (working copy)
@@ -9,7 +9,6 @@
 ag71xx-y       += ag71xx_ar7240.o
 
 ag71xx-$(CONFIG_AG71XX_DEBUG_FS)       += ag71xx_debugfs.o
-ag71xx-$(CONFIG_AG71XX_AR8216_SUPPORT) += ag71xx_ar8216.o
 
 obj-$(CONFIG_AG71XX)   += ag71xx.o
 
Index: ar71xx/config-3.2
===================================================================
--- ar71xx/config-3.2   (revision 30513)
+++ ar71xx/config-3.2   (working copy)
@@ -1,8 +1,7 @@
 CONFIG_AG71XX=y
-CONFIG_AG71XX_AR8216_SUPPORT=y
+# CONFIG_AG71XX_AR8216_SUPPORT is not set
 # CONFIG_AG71XX_DEBUG is not set
 # CONFIG_AG71XX_DEBUG_FS is not set
-CONFIG_AR8216_PHY=y
 # CONFIG_ARCH_DMA_ADDR_T_64BIT is not set
 # CONFIG_ARCH_HAS_ILOG2_U32 is not set
 # CONFIG_ARCH_HAS_ILOG2_U64 is not set

comment:3 Changed 5 years ago by vhrm

"me too" "+1" etc. This also seems to be the case on an actual WNR2000 for which the "special code" was supposedly put in. trunk/bleeding edge @ r35770
For me WAN (and i believe LAN) seem to work fine, but swconfig can't connect to the switch by any "dev" string i've tried.
see this thread for some description (but as of now no solutions):
https://forum.openwrt.org/viewtopic.php?pid=196145#p196145

[    0.800000] libphy: ag71xx_mdio: probed
[    0.800000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII
[    1.110000] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RMII
[    1.420000] ag71xx ag71xx.1 eth1: connected to PHY at ag71xx-mdio.0:04 [uid=004dd042, driver=Generic PHY]

The config looks like:

CONFIG_AG71XX=y
CONFIG_AG71XX_AR8216_SUPPORT=y
# CONFIG_AG71XX_DEBUG is not set
# CONFIG_AG71XX_DEBUG_FS is not set
CONFIG_AR8216_PHY=y

haven't yet tried to patch/deconfigure as described in this ticket.

comment:4 Changed 5 years ago by anonymous

I have tried patch described above, but still no go

comment:5 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.