changeset 67:b916396fc577

merge
author David Pineau <dav.pineau@gmail.com>
date Sat, 18 Feb 2012 15:57:45 +0100
parents 901af221334b (current diff) e77a4126576c (diff)
children ef460b936b5f
files rathaxes_correctly_use_chunk_and_template_sequences_parameters_in_e1000.patch
diffstat 1 files changed, 92 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/rathaxes_correctly_use_chunk_and_template_sequences_parameters_in_e1000.patch	Sat Feb 18 15:51:06 2012 +0100
+++ b/rathaxes_correctly_use_chunk_and_template_sequences_parameters_in_e1000.patch	Sat Feb 18 15:57:45 2012 +0100
@@ -150,6 +150,15 @@
          }
  
          chunk   ::CALL
+@@ -227,7 +244,7 @@
+             static void rtx_e1000_print_status(struct rtx_e1000_ctx *ctx)
+             {
+                 unsigned int status = rtx_e1000_register_read32(ctx, E1000_STATUS);
+-                pr_info("rtx_e1000 status: \n");
++                pr_info("card status: \n");
+                 pr_info("\tRegister value: 0x%x\n", status);
+                 pr_info("\tMode: %s\n", (status & 1) ? "Full": "Half");
+                 pr_info("\tLink: %s\n", (status & 2) ? "Up" : "Down");
 @@ -275,7 +292,7 @@
  
          chunk   ::CALL()
@@ -177,7 +186,15 @@
      {
          chunk   LKM::includes()
          {
-@@ -352,13 +369,13 @@
+@@ -345,20 +362,20 @@
+ 
+                 if (error)
+                 {
+-                    ${Log::info("Cannot register the interruption")};
++                    ${Log::info("cannot register the interrupt handler")};
+                 }
+ 
+                 return error;
              }
          }
  
@@ -193,6 +210,15 @@
                  if (error)
                  {
                      return error;
+@@ -423,7 +440,7 @@
+             intr = rtx_e1000_register_read32(ctx, E1000_ICR);
+             if (intr & E1000_INTR_LSC)
+             {
+-                ${Log::info("Link status changed")};
++                ${Log::info("cable link status changed")};
+             }
+ 
+             if (intr)
 diff --git a/rathaxes/samples/e1000/e1000.rti b/rathaxes/samples/e1000/e1000.rti
 --- a/rathaxes/samples/e1000/e1000.rti
 +++ b/rathaxes/samples/e1000/e1000.rti
@@ -339,7 +365,7 @@
      {
          chunk LKM::data()
          {
-@@ -133,18 +151,20 @@
+@@ -133,83 +151,75 @@
              };
          }
  
@@ -364,7 +390,8 @@
              net_dev = alloc_etherdev(sizeof(*rtx_ether_ctx));
              if (net_dev == 0)
              {
-@@ -152,64 +172,54 @@
+-                ${Log::info("Cannot allocate memory")};
++                ${Log::info("cannot allocate memory")};
                  /*
                   * Again, the error should be "raised" in the parent context.
                   *
@@ -400,7 +427,8 @@
 +            error = register_netdev(net_dev);
 +            if (error)
              {
-                 ${Log::info("Cannot register the driver")};
+-                ${Log::info("Cannot register the driver")};
++                ${Log::info("cannot register the driver in the net subsystem")};
                  return error;
              }
  
@@ -480,15 +508,72 @@
 diff --git a/rathaxes/samples/e1000/lkm.rtx b/rathaxes/samples/e1000/lkm.rtx
 --- a/rathaxes/samples/e1000/lkm.rtx
 +++ b/rathaxes/samples/e1000/lkm.rtx
-@@ -3,7 +3,7 @@
+@@ -2,44 +2,44 @@
+ {
      Ethernet::open(Ethernet::Device dev)
      {
-         Log::info("Open the device");
+-        Log::info("Open the device");
 -        e1000::setup_interrupt_handler();
+-        Log::info("Interrupt handler installed");
++        Log::info("open the device");
 +        e1000::setup_interrupt_handler(dev);
-         Log::info("Interrupt handler installed");
++        Log::info("interrupt handler installed");
          e1000::set_up_device();
          e1000::activate_device_interruption();
+     }
+ 
+     Ethernet::close(Ethernet::Device dev)
+     {
+-        Log::info("Close the device");
++        Log::info("close the device");
+         e1000::free_interrupt_handler();
+     }
+ 
+     Ethernet::interrupt_handler(Ethernet::Device dev)
+     {
+-        Log::info("Got an interruption");
++        Log::info("got an interruption");
+         e1000::handle_intr();
+     }
+ 
+     Ethernet::send(Ethernet::Device dev, Socket::SKBuff skb)
+     {
+-        Log::info("We have one packet to transmit!");
++        Log::info("we have one packet to transmit!");
+     }
+ 
+     LKM::init()
+     {
+-        Log::info("Hello this is LKM");
++        Log::info("loading module");
+     }
+ 
+     LKM::exit()
+     {
+-        Log::info("Good bye this was LKM");
++        Log::info("unloading module");
+     }
+ }
+ 
+ configuration
+ {
+-    LKM::name = "hello";
++    LKM::name = "rtx_e1k";
+     LKM::author = "Rathaxes";
+     LKM::description = "Hello World Loadable Kernel Module (LKM)";
+     LKM::license = "GPL";
+diff --git a/rathaxes/samples/e1000/log.blt b/rathaxes/samples/e1000/log.blt
+--- a/rathaxes/samples/e1000/log.blt
++++ b/rathaxes/samples/e1000/log.blt
+@@ -4,7 +4,7 @@
+     {
+         chunk   ::CALL
+         {
+-            pr_info("%s\n", ${msg});
++            pr_info("%s: %s\n", ${config.name}, ${msg});
+         }
+     }
+ }
 diff --git a/rathaxes/samples/e1000/pci.blt b/rathaxes/samples/e1000/pci.blt
 --- a/rathaxes/samples/e1000/pci.blt
 +++ b/rathaxes/samples/e1000/pci.blt