All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] WIP: Fix unreliable networking
@ 2015-12-08  0:02 Cyril Bur
  2015-12-08  0:02 ` [PATCH 1/2] Fix: RX buffer size Cyril Bur
  2015-12-08  0:02 ` [PATCH 2/2] WIP: Fix unreliable networking Cyril Bur
  0 siblings, 2 replies; 3+ messages in thread
From: Cyril Bur @ 2015-12-08  0:02 UTC (permalink / raw)
  To: openbmc

This is a work in progress patch to fix the unreliable networking. Busy
networks can make the networking stop at a hardware level and stop
receiving packets this is particularly a problem on long tftp transfers.

The fix leads to the follow up question of "how did this ever work" which I
have yet to answer. Hopefully I'll know why soon and post a real fix once I
really understand the problem.

This the mean time this patch can be used.

Cyril Bur (2):
  Fix: RX buffer size
  WIP: Fix unreliable networking

 drivers/net/aspeednic.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.6.3

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

* [PATCH 1/2] Fix: RX buffer size
  2015-12-08  0:02 [PATCH 0/2] WIP: Fix unreliable networking Cyril Bur
@ 2015-12-08  0:02 ` Cyril Bur
  2015-12-08  0:02 ` [PATCH 2/2] WIP: Fix unreliable networking Cyril Bur
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Bur @ 2015-12-08  0:02 UTC (permalink / raw)
  To: openbmc

Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
---
 drivers/net/aspeednic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c
index d75ef67..0bfc8c1 100644
--- a/drivers/net/aspeednic.c
+++ b/drivers/net/aspeednic.c
@@ -227,7 +227,7 @@ static u8 g_phy_addr = 0;
 
 #define NUM_RX_DESC PKTBUFSRX
 #define NUM_TX_DESC 1     /* Number of TX descriptors   */
-#define RX_BUFF_SZ  PKTSIZE_ALIGN
+#define RX_BUFF_SZ  1600 /* Hardware defaults to this */
 #define TX_BUFF_SZ  1514
 
 #define TOUT_LOOP   1000000
-- 
2.6.3

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

* [PATCH 2/2] WIP: Fix unreliable networking
  2015-12-08  0:02 [PATCH 0/2] WIP: Fix unreliable networking Cyril Bur
  2015-12-08  0:02 ` [PATCH 1/2] Fix: RX buffer size Cyril Bur
@ 2015-12-08  0:02 ` Cyril Bur
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Bur @ 2015-12-08  0:02 UTC (permalink / raw)
  To: openbmc

This is not the final version of this patch as the fix only serves to raise
the "how did this ever work" question which I have yet to answer.

The reason this DOES work is that the hardware must be told to move data
from its RX FIFO to system memory where the driver can then consume it.
There are two mechanisms for this, a 'do this automatically' register which
can be set on device init or simply a 'copy data now' polling style which
is what this patch does.

Both options were investigated and as the entire network stack of u-boot is
polling and we're only polling when we expect to receive a message it make
sense to continue this down to the hardware level as well, doing the
automatic copy actually causes more noise and unnecessary work.

Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
---
 drivers/net/aspeednic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c
index 0bfc8c1..dca4ecc 100644
--- a/drivers/net/aspeednic.c
+++ b/drivers/net/aspeednic.c
@@ -1301,6 +1301,7 @@ static int aspeednic_recv(struct eth_device* dev)
 
   for ( ; ; )
   {
+    OUTL(dev, POLL_DEMAND, RXPD_REG);
     status = (s32)le32_to_cpu(rx_ring[rx_new].status);
 
     if ((status & RXPKT_STATUS) == 0) {
-- 
2.6.3

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

end of thread, other threads:[~2015-12-08  0:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08  0:02 [PATCH 0/2] WIP: Fix unreliable networking Cyril Bur
2015-12-08  0:02 ` [PATCH 1/2] Fix: RX buffer size Cyril Bur
2015-12-08  0:02 ` [PATCH 2/2] WIP: Fix unreliable networking Cyril Bur

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.