view e1000_fix_rdt_set.patch @ 83:27f0e70df342

Wip on the transmission, tx init done, and tx hooked from Ethernet send
author Louis Opter <louis@lse.epitech.net>
date Sun, 08 Jul 2012 10:00:25 +0200
parents
children
line wrap: on
line source

# HG changeset patch
# Parent bcab8e474b3aca4c4b326869a05d3ee69e1c82a5
rathaxes: fix a stupid bug in e1000: the tail index for the rx descriptors ring was improperly set + couple of cosmetics

diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt
--- a/rathaxes/samples/e1000/e1000.blt
+++ b/rathaxes/samples/e1000/e1000.blt
@@ -49,7 +49,6 @@
     {
         chunk   LKM::includes()
         {
-
             static const ${e1000::RxRing}   force_rtx_e1000_rx_ring_decl;
         }
 
@@ -638,7 +637,7 @@
             rtx_e1000_register_set32(hw_ctx, E1000_RAH, E1000_RAH_AV);
 
             {
-                ${Log::info("setup_device: program receieve address done")};
+                ${Log::info("setup_device: receive address programmed")};
             }
 
             /* 2. Initialize the MTA */
@@ -668,7 +667,7 @@
             }
 
             {
-                ${Log::info("setup_device: descriptors allocated")};
+                ${Log::info("setup_device: rx descriptors allocated")};
             }
 
             /*
@@ -716,7 +715,7 @@
 
             /* 6. Setup RDH/RDT */
             rtx_e1000_register_write32(hw_ctx, E1000_RDH, 0);
-            rtx_e1000_register_write32(hw_ctx, E1000_RDT, hw_ctx->rx_ring.size - 1);
+            rtx_e1000_register_write32(hw_ctx, E1000_RDT, ${config.rx_ring_size} - 1);
 
             /* 7. Configure the buffer size, XXX: * E1000_RCTL_BSIZE_${config.rx_buffer_len} */
             rtx_e1000_register_set32(hw_ctx, E1000_RCTL, E1000_RCTL_BSIZE_2048);