linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Proper way to flush caches
@ 2001-06-27 12:43 Justin (Gus) Hurwitz
  2001-06-29 17:46 ` 405GP network receive problem John Cagle
  0 siblings, 1 reply; 5+ messages in thread
From: Justin (Gus) Hurwitz @ 2001-06-27 12:43 UTC (permalink / raw)
  To: linuxppc-embedded


Sorry for the doltish question, but what's the proper way to flush the
entire data cache? (preferably a c call)

Also, is there a way to allocate a block of non-cacheable memory?

Thanks
-Gus


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

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

* 405GP network receive problem
  2001-06-27 12:43 Proper way to flush caches Justin (Gus) Hurwitz
@ 2001-06-29 17:46 ` John Cagle
  2001-06-29 18:57   ` Armin Kuster
  2001-07-04 18:52   ` Raymond Lo
  0 siblings, 2 replies; 5+ messages in thread
From: John Cagle @ 2001-06-29 17:46 UTC (permalink / raw)
  To: linuxppc-embedded


I am debugging a custom board design based on the 405GP and have a problem
receiving lots of TCP/IP traffic (like FTP).  We're using a 2.4 kernel based
on Monta Vista's CDK 1.2.  UDP traffic (like TFTP) works very well, but it
doesn't ever have back-to-back receives, typically.  The problem occurs
at both 10mbit and 100Mbit.

I have narrowed the problem down (using ttcp) to the following:

During back-to-back receives (within microseconds) of two large (1500 bytes)
TCP packets, the second packet is usually dropped by the 405GP.  When I
check ifconfig statistics, it shows the 1 lost packet, but also shows 2
framing errors.

Has anyone else seen this type of problem with the 405GP or does anyone
know what the problem might be?

Thanks,
John
------------------------------
John Cagle <jcagle@kernel.org>

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

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

* Re: 405GP network receive problem
  2001-06-29 17:46 ` 405GP network receive problem John Cagle
@ 2001-06-29 18:57   ` Armin Kuster
  2001-07-04 18:52   ` Raymond Lo
  1 sibling, 0 replies; 5+ messages in thread
From: Armin Kuster @ 2001-06-29 18:57 UTC (permalink / raw)
  To: John Cagle; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 981 bytes --]

John Cagle wrote:
>
> I am debugging a custom board design based on the 405GP and have a problem
> receiving lots of TCP/IP traffic (like FTP).  We're using a 2.4 kernel based
> on Monta Vista's CDK 1.2.  UDP traffic (like TFTP) works very well, but it
> doesn't ever have back-to-back receives, typically.  The problem occurs
> at both 10mbit and 100Mbit.
>
> I have narrowed the problem down (using ttcp) to the following:
>
> During back-to-back receives (within microseconds) of two large (1500 bytes)
> TCP packets, the second packet is usually dropped by the 405GP.  When I
> check ifconfig statistics, it shows the 1 lost packet, but also shows 2
> framing errors.
>
> Has anyone else seen this type of problem with the 405GP or does anyone
> know what the problem might be?
>
> Thanks,
> John


John,

the ethernet driver in hhl 1.2 had only one tx & rx buffer and we where
not flushing the cache properly.  I have included the latest driver &
header file.

regards,

armin

[-- Attachment #2: 405_enet_latest.tar.gz --]
[-- Type: application/octet-stream, Size: 13069 bytes --]

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

* Re: 405GP network receive problem
  2001-06-29 17:46 ` 405GP network receive problem John Cagle
  2001-06-29 18:57   ` Armin Kuster
@ 2001-07-04 18:52   ` Raymond Lo
  1 sibling, 0 replies; 5+ messages in thread
From: Raymond Lo @ 2001-07-04 18:52 UTC (permalink / raw)
  To: John Cagle, linuxppc-embedded


----- Original Message -----
From: "John Cagle" <jcagle@kernel.org>
To: <linuxppc-embedded@lists.linuxppc.org>
Sent: Friday, June 29, 2001 10:46 AM
Subject: 405GP network receive problem


>
> I am debugging a custom board design based on the 405GP and have a problem
> receiving lots of TCP/IP traffic (like FTP).  We're using a 2.4 kernel
based
> on Monta Vista's CDK 1.2.  UDP traffic (like TFTP) works very well, but it
> doesn't ever have back-to-back receives, typically.  The problem occurs
> at both 10mbit and 100Mbit.
>
> I have narrowed the problem down (using ttcp) to the following:
>
> During back-to-back receives (within microseconds) of two large (1500
bytes)
> TCP packets, the second packet is usually dropped by the 405GP.  When I
> check ifconfig statistics, it shows the 1 lost packet, but also shows 2
> framing errors.
>
> Has anyone else seen this type of problem with the 405GP or does anyone
> know what the problem might be?
>
> Thanks,
> John
> ------------------------------
> John Cagle <jcagle@kernel.org>
>
>

This can happen if the 405gp MAC is in full-duplex mode, but the other side
is in half-duplex.  The second packet could be corrupted by 405gp sending
TCP acknowledgments without listening for traffic first.

The function in the ppc405_enet driver determines half/full duplex is
ppc405_phy_duplex.  If reading PHY_BMCR does not give the correct duplex
setting, you can try the following.

 -Raymond


static int
ppc405_phy_duplex(void)
{
        int duplex = HALF;          /* Assume HALF */
        unsigned short anlpar = 0x0;

        if (ppc405_phy_read(PHY_ANLPAR,&anlpar)) {
                printk(KERN_ERR "phy duplex read failed \n\r");
                ppc405_phy_dump(KERN_ERR);
        }

        if ((anlpar & (PHY_ANLPAR_10FD | PHY_ANLPAR_TXFD)) != 0)
                duplex = FULL;

        return (duplex);
}


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

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

* RE: 405GP network receive problem
@ 2001-07-04 20:31 Marti, Felix
  0 siblings, 0 replies; 5+ messages in thread
From: Marti, Felix @ 2001-07-04 20:31 UTC (permalink / raw)
  To: 'Raymond Lo', John Cagle, linuxppc-embedded


Hmmm, I'm sorry if this is too obvious and you already checked it, but I
remember that our montavista kernel 2.4.0-test2 did not set the MAC address
correctly... which caused some packets to be dropped.

felix

-----Original Message-----
From: Raymond Lo [mailto:lo@routefree.com]
Sent: Wednesday, July 04, 2001 11:53 AM
To: John Cagle; linuxppc-embedded@lists.linuxppc.org
Subject: Re: 405GP network receive problem



----- Original Message -----
From: "John Cagle" <jcagle@kernel.org>
To: <linuxppc-embedded@lists.linuxppc.org>
Sent: Friday, June 29, 2001 10:46 AM
Subject: 405GP network receive problem


>
> I am debugging a custom board design based on the 405GP and have a problem
> receiving lots of TCP/IP traffic (like FTP).  We're using a 2.4 kernel
based
> on Monta Vista's CDK 1.2.  UDP traffic (like TFTP) works very well, but it
> doesn't ever have back-to-back receives, typically.  The problem occurs
> at both 10mbit and 100Mbit.
>
> I have narrowed the problem down (using ttcp) to the following:
>
> During back-to-back receives (within microseconds) of two large (1500
bytes)
> TCP packets, the second packet is usually dropped by the 405GP.  When I
> check ifconfig statistics, it shows the 1 lost packet, but also shows 2
> framing errors.
>
> Has anyone else seen this type of problem with the 405GP or does anyone
> know what the problem might be?
>
> Thanks,
> John
> ------------------------------
> John Cagle <jcagle@kernel.org>
>
>

This can happen if the 405gp MAC is in full-duplex mode, but the other side
is in half-duplex.  The second packet could be corrupted by 405gp sending
TCP acknowledgments without listening for traffic first.

The function in the ppc405_enet driver determines half/full duplex is
ppc405_phy_duplex.  If reading PHY_BMCR does not give the correct duplex
setting, you can try the following.

 -Raymond


static int
ppc405_phy_duplex(void)
{
        int duplex = HALF;          /* Assume HALF */
        unsigned short anlpar = 0x0;

        if (ppc405_phy_read(PHY_ANLPAR,&anlpar)) {
                printk(KERN_ERR "phy duplex read failed \n\r");
                ppc405_phy_dump(KERN_ERR);
        }

        if ((anlpar & (PHY_ANLPAR_10FD | PHY_ANLPAR_TXFD)) != 0)
                duplex = FULL;

        return (duplex);
}


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

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

end of thread, other threads:[~2001-07-04 20:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-27 12:43 Proper way to flush caches Justin (Gus) Hurwitz
2001-06-29 17:46 ` 405GP network receive problem John Cagle
2001-06-29 18:57   ` Armin Kuster
2001-07-04 18:52   ` Raymond Lo
  -- strict thread matches above, loose matches on Subject: below --
2001-07-04 20:31 Marti, Felix

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).