Skip to contentSkip to conversation

eth1 on linux 2.4.25 from ELDK 3.1.1 becomes slowly when is pinged by great packets

DISCUSSION Igor Marnat 3 participants 5 messages Jul 28, 2005 – Dec 25, 2005

lore
Share & tools
lore
#0 lore raw

Hi list!
I tried to work with kernel 2.4.25 from ELDK 3.1.1 from Denx. My board is PPChameleon EVB (PPC 405 EP). First, the kernel even didn't compile as is for this architecture, I've forced to made changes (see the patch below) to be able to build the kernel for this board. Now I'm experiencing the following
problem: I've inited both interfaces (eth0 and eth1). When I ping eth1 with small packet (less that 2k), it works fine. When I ping eth1 with the packets of size greater that 2k, time of responce becomes about n * 1000 milliseconds. I.e., ping writes me:

3008 bytes from 90.0.0.139: icmp_seq=1 ttl=64 time=3001 ms 3008 bytes from 90.0.0.139: icmp_seq=2 ttl=64 time=3002 ms
...
3008 bytes from 90.0.0.139: icmp_seq=6 ttl=64 time=3003 ms 3008 bytes from 90.0.0.139: icmp_seq=7 ttl=64 time=3003 ms

Sometimes it is 2000 ms, sometimes it is 1000 ms, but it's always like this. After it was one time pinged by the great packets, it'll responce in such a fashion allways, even when is pinged by the smapll packets. Once crashed, it is crashed till it is reinited. To make it work normally once again, I do:
#ifconfig eth1 down
#ifconfig eth1 up

and it helps, i.e. after reinitialization eth1 work normally. Eth0 works fine anyway with pings of any sizes. What is the status of PPChameleon in ELDK 3.1.1? Is it supported in general? Any ideas or suggestions? I've searched the archives and tried the patches of Matt Porter (of Mar 3, about jumbo packets size), but it didn't help.

Regards,
Igor Marnat

diff -uprN -X dontdiff linux-2.4.25/arch/ppc/platforms/ibm405ep.c linux-2.4.25-07-mar-2005/arch/ppc/platforms/ibm405ep.c
--- linux-2.4.25/arch/ppc/platforms/ibm405ep.c 2003-11-11 19:33:37.000000000 +0300
+++ linux-2.4.25-07-mar-2005/arch/ppc/platforms/ibm405ep.c 2005-07-28
14:25:21.000000000 +0400
@@ -31,6 +31,7 @@ static struct ocp_func_emac_data ibm405e

        .mal_tx1_chan   = 0,            /* MAL tx channel 1 number */
        .mal_tx2_chan   = 1,            /* MAL tx channel 2 number */
        .wol_irq        = BL_MAC_WOL,   /* WOL interrupt number */
+       .jumbo          = 0,
        .mdio_idx       = -1,           /* No shared MDIO */

};

@@ -43,6 +44,7 @@ static struct ocp_func_emac_data ibm405e

        .mal_tx1_chan   = 2,            /* MAL tx channel 1 number */
        .mal_tx2_chan   = 3,            /* MAL tx channel 2 number */
        .wol_irq        = BL_MAC_WOL,   /* WOL interrupt number */
+       .jumbo          = 0,
        .mdio_idx       = -1,           /* No shared MDIO */

};

diff -uprN -X dontdiff linux-2.4.25/drivers/mtd/nand/ppchameleonevb.c linux-2.4.25-07-mar-2005/drivers/mtd/nand/ppchameleonevb.c
--- linux-2.4.25/drivers/mtd/nand/ppchameleonevb.c 2004-05-29
19:46:27.000000000 +0400
+++ linux-2.4.25-07-mar-2005/drivers/mtd/nand/ppchameleonevb.c 2005-07-28 14:35:06.000000000 +0400
@@ -58,12 +58,30 @@ __setup("ppchameleonevb_fio_pbase=",ppch
/*
* Define static partitions for flash device
*/
+/*

 static struct mtd_partition partition_info[] = {
        { name: "PPChameleonEVB Nand Flash",
                  offset: 0,
                  size: 32*1024*1024 }

};
#define NUM_PARTITIONS 1
+*/
+/*
+ * Define static partitions for flash device
+ */
+static struct mtd_partition partition_info[] = {
+ { name: "PPChameleonEVB NAND flash main part",
+ offset: 0,
+ size: 24*1024*1024 },
+ { name: "PPChameleonEVB Nand Flash etc part",
+ offset: 24*1024*1024,
+ size: 4*1024*1024 },
+ { name: "PPChameleonEVB Nand Flash var part",
+ offset: (24 + 4)*1024*1024,
+ size: 4*1024*1024 }
+
+};
+#define NUM_PARTITIONS 3
#endif

diff -uprN -X dontdiff linux-2.4.25/drivers/net/ibm_emac/ibm_ocp_enet.c linux-2.4.25-07-mar-2005/drivers/net/ibm_emac/ibm_ocp_enet.c
--- linux-2.4.25/drivers/net/ibm_emac/ibm_ocp_enet.c 2005-01-17
18:39:43.000000000 +0300
+++ linux-2.4.25-07-mar-2005/drivers/net/ibm_emac/ibm_ocp_enet.c

2005-07-28 15:30:12.000000000 +0400
@@ -1042,7 +1042,7 @@ emac_adjust_to_link(struct ocp_enet_priv
        /* set speed (default is 10Mb) */
     switch(speed) {
        case SPEED_1000:
-               mode_reg |= EMAC_M1_JUMBO_ENABLE | EMAC_M1_RFS_16K;
+               mode_reg |= EMAC_M1_JUMBO_ENABLE /*| EMAC_M1_RFS_16K */;

if (fep->rgmii_dev) {
struct ibm_ocp_rgmii *rgmii =
RGMII_PRIV(fep->rgmii_dev);

@@ -1264,7 +1264,7 @@ emac_init_rings(struct net_device *dev)

        int loop;

        ep->tx_desc = (struct mal_descriptor *) ((char *) 
ep->mal->tx_virt_addr +
-                                     (ep->mal_tx_chan * MAL_DT_ALIGN));
+                                     (ep->mal_tx1_chan * MAL_DT_ALIGN));
        ep->rx_desc = (struct mal_descriptor *) ((char *) 
ep->mal->rx_virt_addr +
                                      (ep->mal_rx_chan * MAL_DT_ALIGN));

@@ -1281,7 +1281,9 @@ emac_init_rings(struct net_device *dev)

        /* Format the receive descriptor ring. */
        ep->rx_slot = 0;
-       ep->rx_buffer_size = ENET_DEF_BUF_SIZE;
+       //ep->rx_buffer_size = ENET_DEF_BUF_SIZE;
+       ep->rx_buffer_size =
+               dev->mtu + ENET_HEADER_SIZE + ENET_FCS_SIZE;
        emac_rx_fill(dev, 0);
        if (ep->rx_slot != 0) {
                printk(KERN_ERR

@@ -1752,11 +1754,12 @@ static int emac_init_device(struct ocp_d

        /* Fill out MAL informations and register commac */
        ep->mal = mal;
-       ep->mal_tx_chan = emacdata->mal_tx_chan;
+       ep->mal_tx1_chan = emacdata->mal_tx1_chan;
+       ep->mal_tx2_chan = emacdata->mal_tx2_chan;
        ep->mal_rx_chan = emacdata->mal_rx_chan;
        ep->commac.ops = &emac_commac_ops;
        ep->commac.dev = ndev;
-       ep->commac.tx_chan_mask = MAL_CHAN_MASK(ep->mal_tx_chan);
+       ep->commac.tx_chan_mask = MAL_CHAN_MASK(ep->mal_tx1_chan) | 
MAL_CHAN_MASK(ep->mal_tx2_chan);
        ep->commac.rx_chan_mask = MAL_CHAN_MASK(ep->mal_rx_chan);
        rc = mal_register_commac(ep->mal, &ep->commac);
        if (rc != 0)

diff -uprN -X dontdiff linux-2.4.25/drivers/net/ibm_emac/ibm_ocp_enet.h linux-2.4.25-07-mar-2005/drivers/net/ibm_emac/ibm_ocp_enet.h
--- linux-2.4.25/drivers/net/ibm_emac/ibm_ocp_enet.h 2005-01-17
18:39:43.000000000 +0300
+++ linux-2.4.25-07-mar-2005/drivers/net/ibm_emac/ibm_ocp_enet.h

2005-07-28 13:59:14.000000000 +0400
@@ -158,7 +158,7 @@ struct ocp_enet_private {
        int zmii_input;

        struct ibm_ocp_mal *mal;
-       int mal_tx_chan, mal_rx_chan;
+       int mal_tx1_chan, mal_tx2_chan, mal_rx_chan;
        struct mal_commac commac;

     struct ocp_device *tah_dev;

diff -uprN -X dontdiff linux-2.4.25/include/asm-ppc/ibm4xx.h linux-2.4.25-07-mar-2005/include/asm-ppc/ibm4xx.h
--- linux-2.4.25/include/asm-ppc/ibm4xx.h 2005-01-17 18:39:44.000000000
+0300
+++ linux-2.4.25-07-mar-2005/include/asm-ppc/ibm4xx.h 2005-07-28
13:31:13.000000000 +0400
@@ -25,7 +25,7 @@
* The "residual" board information structure the boot loader passes
* into the kernel.
*/
-extern bd_t __res;
+extern unsigned char __res[];
#endif

/* Device Control Registers */
diff -uprN -X dontdiff linux-2.4.25/include/asm-ppc/ocp_ids.h linux-2.4.25-07-mar-2005/include/asm-ppc/ocp_ids.h
--- linux-2.4.25/include/asm-ppc/ocp_ids.h 2005-01-17 18:39:44.000000000
+0300
+++ linux-2.4.25-07-mar-2005/include/asm-ppc/ocp_ids.h 2005-07-28 13:46:40.000000000 +0400
@@ -112,7 +112,8 @@

                int     zmii_mux;       /* ZMII input of this EMAC */
                int     mal_idx;        /* MAL device index */
                int     mal_rx_chan;    /* MAL rx channel number */
-               int     mal_tx_chan;    /* MAL tx channel 1 number */
+               int     mal_tx1_chan;   /* MAL tx channel 1 number */
+               int     mal_tx2_chan;   /* MAL tx channel 2 number */
                int     wol_irq;        /* WOL interrupt */
                int     mdio_idx;       /* EMAC idx of MDIO master or -1 */
                int     tah_idx;        /* TAH device index or -1 */
#1 lore raw

Dear Igor,

Quoted 3 lines · in message <[email protected]> you wrote:

I tried to work with kernel 2.4.25 from ELDK 3.1.1 from Denx. My board is PPChameleon EVB (PPC 405 EP). First, the kernel even didn't compile as is for

You must be using old code (probably the version that came with ELDK 3.1.1?). Please fetch the current code from CVS; see commit "Fix problems with second ethernet interface on 405EP".

Best regards,

Wolfgang Denk

Signature · 3 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Any technology distinguishable from magic is insufficiently advanced.
#2 lore raw
Quoted 2 lines · Wolfgang Denk

You must be using old code (probably the version that came with =A0ELDK 3.1.1?). =A0Please =A0fetch =A0the =A0current =A0code from CVS; see commi=

t "Fix

Quoted 2 lines

problems with second ethernet interface on 405EP". Wolfgang Denk

Wolfgang, thank you!=20
I've renewed the kernel from CVS and it works much better now.=20 By the way, the driver for PPChameleonEVB is presented in linuxppc_2_4_deve= l=20
module only and is not presented in linux-2.4 module of CVS (there miss the= =20
whole <linux>/drivers/net/ibm_emac directory).

Thank you again, regards,
Igor Marnat

#3 lore raw
Quoted 2 lines · In message <[email protected]> you wrote:

Wolfgang, thank you!

You are welcome.

Quoted 1 line

I've renewed the kernel from CVS and it works much better now.

Fine.

Quoted 2 lines

By the way, the driver for PPChameleonEVB is presented in linuxppc_2_4_devel module only and is not presented in linux-2.4 module of CVS (there miss the

Yes, this is intentional. The linux-2.4 module is a more or less frozen version of linux kernel version 2.4.4 which we keep alife because some of our customers continue to use this in their projects.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
"In Christianity neither morality nor religion come into contact with
reality at any point."                          - Friedrich Nietzsche
#4 lore raw

'TIMER_MAGIC' undeclared in 2.6.15-rc5 kernel

Mr. Denk

One of my module can build with old 2.6.13 kernel(from AMCC's recent
3.0 resource CD), but it

Can't build with recent 2.6.15-rc5 kernel. The attached is my build Commands and echo.

Hardware platform : Yosemite AMCC 440EP

Kernel Version:

9a0f2aefb7fc6ece4b9dfed96f1d1dc515d2c7a1 Wolfgang Denk 2005-12-16 17:59
The CPM2 interrupt handler does not return success

ELDK 4.0:

Merry Christmas!

KylongMu

dxp:~/drvsrc_Linux/Driver/drv # make
make -C /root/linux-2.6-denx M=/root/drvsrc_Linux/Driver/drv modules make[1]: Entering directory `/root/linux-2.6-denx'

WARNING: Symbol version dump /root/linux-2.6-denx/Module.symvers
is missing; modules will have no dependencies and modversions.

  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/Os_Shared_Funct_IF.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/Os_Wrp_Funct.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/allocator.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/meminit.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fm.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmcfg.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmminiL.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmminiL16.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmproject_01002.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmwdm.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/h2m.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/mips.o

/root/drvsrc_Linux/Driver/drv/./h2m/mips.c: In function 'Process_Mips_Com_Buf':
/root/drvsrc_Linux/Driver/drv/./h2m/mips.c:1581: error: 'struct timer_list' has no member named 'magic' /root/drvsrc_Linux/Driver/drv/./h2m/mips.c:1581: error: 'TIMER_MAGIC' undeclared (first use in this function) /root/drvsrc_Linux/Driver/drv/./h2m/mips.c:1581: error: (Each undeclared identifier is reported only once /root/drvsrc_Linux/Driver/drv/./h2m/mips.c:1581: error: for each function it appears in.) make[2]: *** [/root/drvsrc_Linux/Driver/drv/./h2m/mips.o] Error 1
make[1]: *** [_module_/root/drvsrc_Linux/Driver/drv] Error 2
make[1]: Leaving directory `/root/linux-2.6-denx'
make: *** [all] Error 2
dxp:~/drvsrc_Linux/Driver/drv # echo $KERNEL_DIR
/root/linux-2.6-denx
dxp:~/drvsrc_Linux/Driver/drv # export KERNEL_DIR=/root/linux-2.6.13 dxp:~/drvsrc_Linux/Driver/drv # echo $KERNEL_DIR
/root/linux-2.6.13
dxp:~/drvsrc_Linux/Driver/drv # make
make -C /root/linux-2.6.13 M=/root/drvsrc_Linux/Driver/drv modules
make[1]: Entering directory `/root/linux-2.6.13'

WARNING: Symbol version dump /root/linux-2.6.13/Module.symvers
is missing; modules will have no dependencies and modversions.

  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/Os_General.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/Os_Int_Wrp.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/Os_Linux_Exit.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/Os_Linux_Init.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/Os_Shared_Funct_IF.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/Os_Wrp_Funct.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/allocator.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./os/linux32/meminit.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fm.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmcfg.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmminiL.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmminiL16.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmproject_01002.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/fmwdm.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/h2m.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./h2m/mips.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./dma/dma.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./i2c/i2c.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./gpio/gpio.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./spi/spi.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./sc/sc.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/streamer.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txcbda.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txcclose.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txcdev.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txcentry.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txcfrm.o
/root/drvsrc_Linux/Driver/drv/./txc/txcfrm.c: In function 'txc_mips_data_ready':
/root/drvsrc_Linux/Driver/drv/./txc/txcfrm.c:560: warning: cast to pointer from integer of different size
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txcmisc.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txcread.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txcrsa.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txctime.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./txc/txcwrite.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./tsd/tsd.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./tsd/tsd_if.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./mpp/mpp.o
  CC [M]  /root/drvsrc_Linux/Driver/drv/./sha1/sha1.o
  LD [M]  /root/drvsrc_Linux/Driver/drv/xcode2drv.o

Building modules, stage 2.
MODPOST
CC /root/drvsrc_Linux/Driver/drv/xcode2drv.mod.o
LD [M] /root/drvsrc_Linux/Driver/drv/xcode2drv.ko
make[1]: Leaving directory `/root/linux-2.6.13' dxp:~/drvsrc_Linux/Driver/drv #

9a0f2aefb7fc6ece4b9dfed96f1d1dc515d2c7a1 Wolfgang Denk   2005-12-16 17:59 The CPM2 interrupt handler does not return succes
415a890333bd39be6f3a7684de11191bd2d205a1 Wolfgang Denk   2005-12-13 17:04 Merge with /home/git/linux-2.6
d705b5443455208e2a59051d7823dec5ac115808 Wolfgang Denk   2005-12-13 10:46 Merge with /home/git/linux-2.6