Hello guys,

Trying to debug a bit farther I had backported my led-related changes to what I
think is Backfire 10.03.1 RC5 (core rev.27608). Also I had added a couple of
printk's at the places of interest - ones that trigger "reset link on DMA stuck"
behavior on new ag71xx driver revisions. Resulting patch is attached to this
letter.

I had successfully build firmware for my box with this patch applied and it is
running so far so good. Current uptime is around 18 hours and I still has the
connectivity to the box through LAN ports. Meanwhile kernel log gets spammed
with "user.info kernel: eth0: AR724x DMA might be stuck, buf desc non empty".
This is the debug printk I had added to ag71xx driver at the place where
backfire's version of driver simply breaks out of the function, while trunk
version checks for DMA stuck and subsequently triggers link down/up reset.
Checking throughput with iperf gives stable 95-96 Mbps when the box is acting as
server and around 35 Mbps when acting as client. Client throughput seems to be
so low due to iperf ceiling at the CPU - looking as the top output while iperf
being run as a client on a box shows that it consumes around 85% of CPU, and the
rest is being consumed by softirq (I suspect it is being mainly spent outputting
my debug printk into kernel circular log buffer).

Gabor, Imre, any comments on the topic? Without your wisdom it would take ages
to debug this issue.

-- 
Best regards,
Alexey Loukianov                          mailto:mooro...@mail.ru
System Engineer,                            Mob.:+7(926)218-1320
*nix Specialist

Index: target/linux/ar71xx/image/Makefile
===================================================================
--- target/linux/ar71xx/image/Makefile  (revision 27608)
+++ target/linux/ar71xx/image/Makefile  (working copy)
@@ -439,6 +439,14 @@
        $(call 
Image/Build/Template/$(fs_squash)/$(1),Cameo,dir-615-c1,board=DIR-615-C1,"AP81-AR9130-RT-070614-02")
 endef
 
+define Image/Build/Profile/DIR615E4
+       $(call 
Image/Build/Template/$(fs_64k)/$(1),Cameo7240,dir-615-e4,board=DIR-615-E4,"AP99-AR7240-RT-091105-05")
+endef
+
+define Image/Build/Profile/DIR615E4USB
+       $(call 
Image/Build/Template/$(fs_64k)/$(1),Cameo7240,dir-615-e4-usb,board=DIR-615-E4-USB,"AP99-AR7240-RT-091105-05")
+endef
+
 define Image/Build/Profile/TEW632BRP
        $(call 
Image/Build/Template/$(fs_squash)/$(1),Cameo,tew-632brp,board=TEW-632BRP,"AP81-AR9130-RT-070614-00")
 endef
Index: target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig
===================================================================
--- target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig  (revision 27608)
+++ target/linux/ar71xx/files/arch/mips/ar71xx/Kconfig  (working copy)
@@ -37,6 +37,25 @@
        select AR71XX_NVRAM
        default n
 
+config AR71XX_MACH_DIR_615_E4
+       bool "D-Link DIR-615 rev. E4 support"
+       select AR71XX_DEV_AP91_PCI if PCI
+       select AR71XX_DEV_M25P80
+       select AR71XX_DEV_GPIO_BUTTONS
+       select AR71XX_DEV_LEDS_GPIO
+       select AR71XX_NVRAM
+       default n
+
+config AR71XX_MACH_DIR_615_E4_USB
+       bool "D-Link DIR-615 rev. E4 support (with USB mod)"
+       select AR71XX_DEV_AP91_PCI if PCI
+       select AR71XX_DEV_M25P80
+       select AR71XX_DEV_GPIO_BUTTONS
+       select AR71XX_DEV_LEDS_GPIO
+       select AR71XX_NVRAM
+       select AR71XX_DEV_USB
+       default n
+
 config AR71XX_MACH_DIR_825_B1
        bool "D-Link DIR-825 rev. B1 board support"
        select AR71XX_DEV_M25P80
Index: target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-e4.c
===================================================================
--- target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-e4.c        
(revision 0)
+++ target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-e4.c        
(revision 0)
@@ -0,0 +1,177 @@
+/*
+ *  D-Link DIR-615 rev. E4 board support
+ *
+ *  Copyright (C) 2010 Gabor Juhos <juh...@openwrt.org>
+ *  Copyright (C) 2011 Alexey Loukianov <mooro...@mail.ru>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+
+#include <asm/mach-ar71xx/ar71xx.h>
+
+#include "machtype.h"
+#include "devices.h"
+#include "dev-m25p80.h"
+#include "dev-ap91-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "nvram.h"
+
+#define DIR_615_E4_GPIO_LED_WPS                        0
+#define DIR_615_E4_GPIO_LED_POWER_AMBER                1
+#define DIR_615_E4_GPIO_LED_POWER_GREEN                6
+
+#define DIR_615_E4_GPIO_LED_WAN_AMBER          7
+#define DIR_615_E4_GPIO_LED_WAN_GREEN          17 /* active_low */
+#define DIR_615_E4_GPIO_LED_PORT1              13 /* active_low */
+#define DIR_615_E4_GPIO_LED_PORT2              14 /* active_low */
+#define DIR_615_E4_GPIO_LED_PORT3              15 /* active_low */
+#define DIR_615_E4_GPIO_LED_PORT4              16 /* active_low */
+
+
+#define DIR_615_E4_GPIO_BTN_RESET              8
+#define DIR_615_E4_GPIO_BTN_WPS                        12
+
+#define DIR_615_E4_BUTTONS_POLL_INTERVAL       20
+
+#define DIR_615_E4_NVRAM_ADDR                  0x1f030000
+#define DIR_615_E4_NVRAM_SIZE                  0x10000
+
+#ifdef CONFIG_MTD_PARTITIONS
+static struct mtd_partition dir_615_e4_partitions[] = {
+       {
+               .name           = "u-boot",
+               .offset         = 0,
+               .size           = 0x030000,
+               .mask_flags     = MTD_WRITEABLE,
+       }, {
+               .name           = "nvram",
+               .offset         = 0x030000,
+               .size           = 0x010000,
+       }, {
+               .name           = "kernel",
+               .offset         = 0x040000,
+               .size           = 0x0e0000,
+       }, {
+               .name           = "rootfs",
+               .offset         = 0x120000,
+               .size           = 0x2c0000,
+       }, {
+               .name           = "mac",
+               .offset         = 0x3e0000,
+               .size           = 0x010000,
+               .mask_flags     = MTD_WRITEABLE,
+       }, {
+               .name           = "art",
+               .offset         = 0x3f0000,
+               .size           = 0x010000,
+               .mask_flags     = MTD_WRITEABLE,
+       }, {
+               .name           = "firmware",
+               .offset         = 0x040000,
+               .size           = 0x3a0000,
+       }
+};
+#endif /* CONFIG_MTD_PARTITIONS */
+
+static struct flash_platform_data dir_615_e4_flash_data = {
+#ifdef CONFIG_MTD_PARTITIONS
+       .parts          = dir_615_e4_partitions,
+       .nr_parts       = ARRAY_SIZE(dir_615_e4_partitions),
+#endif
+};
+
+static struct gpio_led dir_615_e4_leds_gpio[] __initdata = { 
+       {
+               .name           = "dir-615-e4:green:power",
+               .gpio           = DIR_615_E4_GPIO_LED_POWER_GREEN,
+       }, {
+               .name           = "dir-615-e4:amber:power",
+               .gpio           = DIR_615_E4_GPIO_LED_POWER_AMBER,
+       }, {
+               .name           = "dir-615-e4:amber:wan",
+               .gpio           = DIR_615_E4_GPIO_LED_WAN_AMBER,
+       }, {
+               .name           = "dir-615-e4:blue:wps",
+               .gpio           = DIR_615_E4_GPIO_LED_WPS,
+               .active_low     = 1,
+       }
+};
+
+static struct gpio_button dir_615_e4_gpio_buttons[] __initdata = {
+       {
+               .desc           = "reset",
+               .type           = EV_KEY,
+               .code           = BTN_0,
+               .threshold      = 3,
+               .gpio           = DIR_615_E4_GPIO_BTN_RESET,
+               .active_low     = 1,
+       }, {
+               .desc           = "wps",
+               .type           = EV_KEY,
+               .code           = BTN_1,
+               .threshold      = 3,
+               .gpio           = DIR_615_E4_GPIO_BTN_WPS,
+               .active_low     = 1,
+       }
+};
+
+static void __init dir_615_e4_setup(void)
+{
+       const char *nvram = (char *) KSEG1ADDR(DIR_615_E4_NVRAM_ADDR);
+       u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+       u8 mac_buff[6];
+       u8 *mac = NULL;
+
+       if (nvram_parse_mac_addr(nvram, DIR_615_E4_NVRAM_SIZE,
+                               "lan_mac=", mac_buff) == 0) {
+               mac = mac_buff;
+       }
+
+       ar71xx_add_device_m25p80(&dir_615_e4_flash_data);
+
+       ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(dir_615_e4_leds_gpio),
+                                       dir_615_e4_leds_gpio);
+
+       ar71xx_add_device_gpio_buttons(-1, DIR_615_E4_BUTTONS_POLL_INTERVAL,
+                                       ARRAY_SIZE(dir_615_e4_gpio_buttons),
+                                       dir_615_e4_gpio_buttons);
+
+       ar71xx_gpio_function_enable(
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN
+                               );
+
+       ar71xx_eth1_data.has_ar7240_switch = 1;
+       ar71xx_set_mac_base(mac);
+
+       /* WAN port */
+       ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+       ar71xx_eth0_data.speed = SPEED_100;
+       ar71xx_eth0_data.duplex = DUPLEX_FULL;
+       ar71xx_eth0_data.phy_mask = BIT(4);
+
+       /* LAN ports */
+       ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+       ar71xx_eth1_data.speed = SPEED_1000;
+       ar71xx_eth1_data.duplex = DUPLEX_FULL;
+
+       ar71xx_add_device_mdio(0x0);
+       ar71xx_add_device_eth(1);
+       ar71xx_add_device_eth(0);
+
+       ap91_pci_setup_wmac_led_pin(17);
+
+       ap91_pci_init(ee, mac);
+}
+
+MIPS_MACHINE(AR71XX_MACH_DIR_615_E4, "DIR-615-E4", "D-Link DIR-615 rev. E4",
+            dir_615_e4_setup);
Index: target/linux/ar71xx/files/arch/mips/ar71xx/Makefile
===================================================================
--- target/linux/ar71xx/files/arch/mips/ar71xx/Makefile (revision 27608)
+++ target/linux/ar71xx/files/arch/mips/ar71xx/Makefile (working copy)
@@ -31,6 +31,8 @@
 obj-$(CONFIG_AR71XX_MACH_AW_NR580)     += mach-aw-nr580.o
 obj-$(CONFIG_AR71XX_MACH_DIR_600_A1)   += mach-dir-600-a1.o
 obj-$(CONFIG_AR71XX_MACH_DIR_615_C1)   += mach-dir-615-c1.o
+obj-$(CONFIG_AR71XX_MACH_DIR_615_E4)   += mach-dir-615-e4.o
+obj-$(CONFIG_AR71XX_MACH_DIR_615_E4_USB)+= mach-dir-615-e4-usb.o
 obj-$(CONFIG_AR71XX_MACH_DIR_825_B1)   += mach-dir-825-b1.o
 obj-$(CONFIG_AR71XX_MACH_MZK_W04NU)    += mach-mzk-w04nu.o
 obj-$(CONFIG_AR71XX_MACH_MZK_W300NH)   += mach-mzk-w300nh.o
Index: target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
===================================================================
--- target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h       (revision 27608)
+++ target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h       (working copy)
@@ -21,6 +21,8 @@
        AR71XX_MACH_AW_NR580,   /* AzureWave AW-NR580 */
        AR71XX_MACH_DIR_600_A1, /* D-Link DIR-600 rev. A1 */
        AR71XX_MACH_DIR_615_C1, /* D-Link DIR-615 rev. C1 */
+       AR71XX_MACH_DIR_615_E4, /* D-Link DIR-615 rev. E4 */
+       AR71XX_MACH_DIR_615_E4_USB, /* D-Link DIR-615 rev. E4 with USB mod */
        AR71XX_MACH_DIR_825_B1, /* D-Link DIR-825 rev. B1 */
        AR71XX_MACH_RB_411,     /* MikroTik RouterBOARD 411/411A/411AH */
        AR71XX_MACH_RB_411U,    /* MikroTik RouterBOARD 411U */
Index: target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-e4-usb.c
===================================================================
--- target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-e4-usb.c    
(revision 0)
+++ target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-e4-usb.c    
(revision 0)
@@ -0,0 +1,197 @@
+/*
+ *  D-Link DIR-615 rev. E4 board support (with USB mod)
+ *
+ *  Copyright (C) 2010 Gabor Juhos <juh...@openwrt.org>
+ *  Copyright (C) 2011 Alexey Loukianov <mooro...@mail.ru>
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+
+#include <asm/mach-ar71xx/ar71xx.h>
+
+#include "machtype.h"
+#include "devices.h"
+#include "dev-m25p80.h"
+#include "dev-ap91-pci.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-usb.h"
+#include "nvram.h"
+
+#define DIR_615_E4_USB_GPIO_LED_WPS            0 /* active_low */
+#define DIR_615_E4_USB_GPIO_LED_POWER_AMBER    1
+#define DIR_615_E4_USB_GPIO_LED_POWER_GREEN    6
+#define DIR_615_E4_USB_GPIO_LED_WAN_AMBER      7
+#define DIR_615_E4_USB_GPIO_LED_WAN_GREEN      17 /* active_low */
+#define DIR_615_E4_USB_GPIO_LED_PORT1          13 /* active_low */
+#define DIR_615_E4_USB_GPIO_LED_PORT2          14 /* active_low */
+#define DIR_615_E4_USB_GPIO_LED_PORT3          15 /* active_low */
+#define DIR_615_E4_USB_GPIO_LED_PORT4          16 /* active_low */
+
+#define DIR_615_E4_USB_GPIO_BTN_RESET          8
+#define DIR_615_E4_USB_GPIO_BTN_WPS            12
+
+#define DIR_615_E4_USB_BUTTONS_POLL_INTERVAL   20
+
+#define DIR_615_E4_USB_NVRAM_ADDR              0x1f030000
+#define DIR_615_E4_USB_NVRAM_SIZE              0x10000
+
+#ifdef CONFIG_MTD_PARTITIONS
+static struct mtd_partition dir_615_e4_usb_partitions[] = {
+       {
+               .name           = "u-boot",
+               .offset         = 0,
+               .size           = 0x030000,
+               .mask_flags     = MTD_WRITEABLE,
+       }, {
+               .name           = "nvram",
+               .offset         = 0x030000,
+               .size           = 0x010000,
+       }, {
+               .name           = "kernel",
+               .offset         = 0x040000,
+               .size           = 0x0e0000,
+       }, {
+               .name           = "rootfs",
+               .offset         = 0x120000,
+               .size           = 0x2c0000,
+       }, {
+               .name           = "mac",
+               .offset         = 0x3e0000,
+               .size           = 0x010000,
+               .mask_flags     = MTD_WRITEABLE,
+       }, {
+               .name           = "art",
+               .offset         = 0x3f0000,
+               .size           = 0x010000,
+               .mask_flags     = MTD_WRITEABLE,
+       }, {
+               .name           = "firmware",
+               .offset         = 0x040000,
+               .size           = 0x3a0000,
+       }
+};
+#endif /* CONFIG_MTD_PARTITIONS */
+
+static struct flash_platform_data dir_615_e4_usb_flash_data = {
+#ifdef CONFIG_MTD_PARTITIONS
+       .parts          = dir_615_e4_usb_partitions,
+       .nr_parts       = ARRAY_SIZE(dir_615_e4_usb_partitions),
+#endif
+};
+
+static struct gpio_led dir_615_e4_usb_leds_gpio[] __initdata = {
+       {
+               .name           = "dir-615-e4:green:power",
+               .gpio           = DIR_615_E4_USB_GPIO_LED_POWER_GREEN,
+       }, {
+               .name           = "dir-615-e4:amber:power",
+               .gpio           = DIR_615_E4_USB_GPIO_LED_POWER_AMBER,
+       }, {
+               .name           = "dir-615-e4:amber:wan",
+               .gpio           = DIR_615_E4_USB_GPIO_LED_WAN_AMBER,
+       },/* {
+               .name           = "dir-615-e4:green:wan",
+               .gpio           = DIR_615_E4_USB_GPIO_LED_WAN_GREEN,
+               .active_low     = 1,
+       }, {
+               .name           = "dir-615-e4:green:port1",
+               .gpio           = DIR_615_E4_USB_GPIO_LED_PORT1,
+               .active_low     = 1,
+       }, {
+               .name           = "dir-615-e4:green:port2",
+               .gpio           = DIR_615_E4_USB_GPIO_LED_PORT2,
+               .active_low     = 1,
+       }, {
+               .name           = "dir-615-e4:green:port3",
+               .gpio           = DIR_615_E4_USB_GPIO_LED_PORT3,
+               .active_low     = 1,
+       }, {
+               .name           = "dir-615-e4:green:port4",
+               .gpio           = DIR_615_E4_USB_GPIO_LED_PORT4,
+               .active_low     = 1, 
+       },*/ { 
+               .name           = "dir-615-e4:blue:wps",
+               .gpio           = DIR_615_E4_USB_GPIO_LED_WPS,
+               .active_low     = 1,
+       }
+};
+
+static struct gpio_button dir_615_e4_usb_gpio_buttons[] __initdata = {
+       {
+               .desc           = "reset",
+               .type           = EV_KEY,
+               .code           = BTN_0,
+               .threshold      = 3,
+               .gpio           = DIR_615_E4_USB_GPIO_BTN_RESET,
+               .active_low     = 1,
+       }, {
+               .desc           = "wps",
+               .type           = EV_KEY,
+               .code           = BTN_1,
+               .threshold      = 3,
+               .gpio           = DIR_615_E4_USB_GPIO_BTN_WPS,
+               .active_low     = 1,
+       }
+};
+
+static void __init dir_615_e4_usb_setup(void)
+{
+       const char *nvram = (char *) KSEG1ADDR(DIR_615_E4_USB_NVRAM_ADDR);
+       u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
+       u8 mac_buff[6];
+       u8 *mac = NULL;
+
+       if (nvram_parse_mac_addr(nvram, DIR_615_E4_USB_NVRAM_SIZE,
+                               "lan_mac=", mac_buff) == 0) {
+               mac = mac_buff;
+       }
+
+       ar71xx_add_device_m25p80(&dir_615_e4_usb_flash_data);
+
+       ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(dir_615_e4_usb_leds_gpio),
+                                       dir_615_e4_usb_leds_gpio);
+
+       ar71xx_add_device_gpio_buttons(-1, DIR_615_E4_USB_BUTTONS_POLL_INTERVAL,
+                                       ARRAY_SIZE(dir_615_e4_usb_gpio_buttons),
+                                       dir_615_e4_usb_gpio_buttons);
+
+       ar71xx_gpio_function_enable(
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
+                               AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN
+                               );
+
+       ar71xx_eth1_data.has_ar7240_switch = 1;
+       ar71xx_set_mac_base(mac);
+
+       /* WAN port */
+       ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+       ar71xx_eth0_data.speed = SPEED_100;
+       ar71xx_eth0_data.duplex = DUPLEX_FULL;
+       ar71xx_eth0_data.phy_mask = BIT(4);
+
+       /* LAN ports */
+       ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
+       ar71xx_eth1_data.speed = SPEED_1000;
+       ar71xx_eth1_data.duplex = DUPLEX_FULL;
+
+       ar71xx_add_device_mdio(0x0);
+       ar71xx_add_device_eth(1);
+       ar71xx_add_device_eth(0);
+
+       ar71xx_add_device_usb();
+
+       ap91_pci_setup_wmac_led_pin(17);
+       ap91_pci_init(ee, mac);
+}
+
+MIPS_MACHINE(AR71XX_MACH_DIR_615_E4_USB, "DIR-615-E4-USB", "D-Link DIR-615 
rev. E4 with USB mod",
+            dir_615_e4_usb_setup);
Index: target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c
===================================================================
--- target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c        
(revision 27608)
+++ target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_ar7240.c        
(working copy)
@@ -465,7 +465,6 @@
 {
        struct mii_bus *mii = as->mii_bus;
        u32 ctrl;
-       u32 dest_ports;
        u32 vlan;
 
        ctrl = AR7240_PORT_CTRL_STATE_FORWARD | AR7240_PORT_CTRL_LEARN |
@@ -513,7 +512,7 @@
        /* allow the port to talk to all other ports, but exclude its
         * own ID to prevent frames from being reflected back to the
         * port that they came from */
-       dest_ports = AR7240_PORT_MASK_BUT(port);
+       portmask &= AR7240_PORT_MASK_BUT(port);
 
        /* set default VID and and destination ports for this VLAN */
        vlan |= (portmask << AR7240_PORT_VLAN_DEST_PORTS_S);
@@ -842,6 +841,9 @@
                }
        }
 
+       // FIXME by LeXa2: Skip link going down in case no connectivity found 
on any switch port
+       status = 1;
+
        spin_lock_irqsave(&ag->lock, flags);
        if(status != ag->link) {
                ag->link = status;
Index: target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
===================================================================
--- target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c  (revision 27608)
+++ target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c  (working copy)
@@ -735,9 +735,11 @@
 {
        struct ag71xx *ag = netdev_priv(dev);
 
-       if (netif_msg_tx_err(ag))
-               printk(KERN_DEBUG "%s: tx timeout\n", ag->dev->name);
+// FIXME by LeXa2: Remove comment below and revert changes when done with debug
+//     if (netif_msg_tx_err(ag))
+//             printk(KERN_DEBUG "%s: tx timeout\n", ag->dev->name);
 
+       printk(KERN_INFO "%s: tx timeout\n", ag->dev->name);
        schedule_work(&ag->restart_work);
 }
 
@@ -767,8 +769,11 @@
                struct ag71xx_desc *desc = ring->buf[i].desc;
                struct sk_buff *skb = ring->buf[i].skb;
 
-               if (!ag71xx_desc_empty(desc))
+               if (!ag71xx_desc_empty(desc)) {
+                       // FIXME by LeXa2: Reverse changes when done with debug
+                       printk(KERN_INFO "%s: AR724x DMA might be stuck, buf 
desc non empty\n", ag->dev->name);
                        break;
+               }
 
                ag71xx_wr(ag, AG71XX_REG_TX_STATUS, TX_STATUS_PS);
 
Index: target/linux/ar71xx/profiles/d-link.mk
===================================================================
--- target/linux/ar71xx/profiles/d-link.mk      (revision 27608)
+++ target/linux/ar71xx/profiles/d-link.mk      (working copy)
@@ -28,7 +28,29 @@
 
 $(eval $(call Profile,DIR615C1))
 
+define Profile/DIR615E4
+       NAME:=D-Link DIR-615 rev. E4
+       PACKAGES:=kmod-ath9k wpad-mini
+endef
 
+define Profile/DIR615E4USB/Description
+       Package set optimized for the D-Link DIR-615 rev. E4 with USB mod.
+endef
+
+$(eval $(call Profile,DIR615E4))
+
+define Profile/DIR615E4USB
+       NAME:=D-Link DIR-615 rev. E4 with USB mod
+       PACKAGES:=kmod-ath9k wpad-mini kmod-usb-core kmod-usb-ohci 
kmod-ledtrig-usbdev
+endef
+
+define Profile/DIR615E4USB/Description
+       Package set optimized for the D-Link DIR-615 rev. E4 with USB mod.
+endef
+
+$(eval $(call Profile,DIR615E4USB))
+
+
 define Profile/DIR825B1
        NAME:=D-Link DIR-825 rev. B1
        PACKAGES:=kmod-ath9k wpad-mini kmod-usb-core kmod-usb2
Index: target/linux/ar71xx/base-files/lib/ar71xx.sh
===================================================================
--- target/linux/ar71xx/base-files/lib/ar71xx.sh        (revision 27608)
+++ target/linux/ar71xx/base-files/lib/ar71xx.sh        (working copy)
@@ -22,6 +22,9 @@
        *"DIR-600 rev. A1")
                name="dir-600-a1"
                ;;
+       *"DIR-615 rev. E4"*)
+               name="dir-615-e4"
+               ;;
        *"DIR-825 rev. B1")
                name="dir-825-b1"
                ;;
Index: target/linux/ar71xx/base-files/lib/upgrade/platform.sh
===================================================================
--- target/linux/ar71xx/base-files/lib/upgrade/platform.sh      (revision 27608)
+++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh      (working copy)
@@ -69,7 +69,7 @@
        [ "$ARGC" -gt 1 ] && return 1
 
        case "$board" in
-       ap81 | ap83 | dir-600-a1 | dir-615-c1 | dir-825-b1 | mzk-w04nu | 
mzk-w300nh | tew-632brp | wrt400n | bullet-m | nanostation-m | rocket-m | 
wzr-hp-g300nh )
+       ap81 | ap83 | dir-600-a1 | dir-615-e4 | dir-615-c1 | dir-825-b1 | 
mzk-w04nu | mzk-w300nh | tew-632brp | wrt400n | bullet-m | nanostation-m | 
rocket-m | wzr-hp-g300nh )
                [ "$magic" != "2705" ] && {
                        echo "Invalid image type."
                        return 1
Index: target/linux/ar71xx/base-files/etc/defconfig/dir-615-e4/network
===================================================================
--- target/linux/ar71xx/base-files/etc/defconfig/dir-615-e4/network     
(revision 0)
+++ target/linux/ar71xx/base-files/etc/defconfig/dir-615-e4/network     
(revision 0)
@@ -0,0 +1,24 @@
+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   eth0
+       option type     bridge
+       option proto    static
+       option ipaddr   192.168.1.1
+       option netmask  255.255.255.0
+
+config interface wan
+       option ifname   eth1
+       option proto    dhcp
+
+config switch eth0
+       option enable_vlan      1
+
+config switch_vlan
+       option device   eth0
+       option vlan     1
+       option ports    "0 1 2 3 4"
Index: target/linux/ar71xx/base-files/etc/diag.sh
===================================================================
--- target/linux/ar71xx/base-files/etc/diag.sh  (revision 27608)
+++ target/linux/ar71xx/base-files/etc/diag.sh  (working copy)
@@ -48,6 +48,9 @@
        dir-615-c1)
                status_led="dir-615c1:green:status"
                ;;
+       dir-615-e4)
+               status_led="dir-615-e4:green:power"
+               ;;
        dir-825-b1)
                status_led="dir825b1:orange:power"
                ;;
Index: target/linux/ar71xx/config-2.6.32
===================================================================
--- target/linux/ar71xx/config-2.6.32   (revision 27608)
+++ target/linux/ar71xx/config-2.6.32   (working copy)
@@ -3,7 +3,7 @@
 CONFIG_AG71XX=y
 CONFIG_AG71XX_AR8216_SUPPORT=y
 # CONFIG_AG71XX_DEBUG is not set
-# CONFIG_AG71XX_DEBUG_FS is not set
+CONFIG_AG71XX_DEBUG_FS=y
 # CONFIG_ALCHEMY_GPIO_INDIRECT is not set
 # CONFIG_AR7 is not set
 CONFIG_AR71XX_DEV_AP91_PCI=y
@@ -21,6 +21,8 @@
 CONFIG_AR71XX_MACH_AW_NR580=y
 CONFIG_AR71XX_MACH_DIR_600_A1=y
 CONFIG_AR71XX_MACH_DIR_615_C1=y
+CONFIG_AR71XX_MACH_DIR_615_E4=y
+CONFIG_AR71XX_MACH_DIR_615_E4_USB=y
 CONFIG_AR71XX_MACH_DIR_825_B1=y
 CONFIG_AR71XX_MACH_MZK_W04NU=y
 CONFIG_AR71XX_MACH_MZK_W300NH=y
Index: package/base-files/files/etc/preinit
===================================================================

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to