linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] correct initialization sequence in ppc405_enet_open
@ 2002-11-21  5:47 Eugene Surovegin
  2002-11-21 15:47 ` Matt Porter
  0 siblings, 1 reply; 2+ messages in thread
From: Eugene Surovegin @ 2002-11-21  5:47 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: David Gibson, Armin Kuster


Hi!

This patch fixes problem in drivers/net/ibm_ocp/ibm_ocp_enet.c.
Ring buffers initialization (init_rings) is called _after_ enabling MAL rx
channel.
If a packet arrives just after MAL was enabled but before init_rings
initialized buffers, you can see random crashes during EMAC open or receive
descriptor error interrupt.

This bug affects all systems that use drivers/net/ibm_ocp/ibm_ocp_enet.c
(405GP based, 440GP based, etc).
This patch is against current devel_2_4, but I think should apply without
any problems to devel_2_5 also.

Thanks.

===== drivers/net/ibm_ocp/ibm_ocp_enet.c 1.55 vs edited =====
--- 1.55/drivers/net/ibm_ocp/ibm_ocp_enet.c     Thu Aug 22 11:29:32 2002
+++ edited/drivers/net/ibm_ocp/ibm_ocp_enet.c   Wed Nov 20 21:34:30 2002
@@ -375,13 +375,15 @@
                 request_irq(BL_MAL_RXEOB,ppc405_eth_rxeob,0,"OCP EMAC RX
EOB",dev);
         }

-       /* enable all MAL transmit and receive channels */
+       /* init buffer descriptors rings */
+       init_rings(dev);

+       /* enable all MAL transmit and receive channels */
         enable_mal_chan(fep);

         /* set transmit and receive enable */
         out_be32(&emacp->em0mr0, EMAC_M0_TXE | EMAC_M0_RXE);
-       init_rings(dev);
+
         netif_start_queue(dev);
         printk(KERN_NOTICE "%s: IBM EMAC: open completed\n\n", dev->name);



  Eugene Surovegin <mailto:ebs@innocent.com>


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-21 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-21  5:47 [PATCH] correct initialization sequence in ppc405_enet_open Eugene Surovegin
2002-11-21 15:47 ` Matt Porter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).