changeset 64:8dc1a3bf372a

WIP e1000 sample
author Louis Opter <louis@lse.epitech.net>
date Sat, 18 Feb 2012 13:36:07 +0100
parents b820c4604946
children e77a4126576c 901af221334b
files rathaxes_correctly_use_chunk_and_template_sequences_parameters_in_e1000.patch
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/rathaxes_correctly_use_chunk_and_template_sequences_parameters_in_e1000.patch	Sat Feb 18 01:26:14 2012 +0100
+++ b/rathaxes_correctly_use_chunk_and_template_sequences_parameters_in_e1000.patch	Sat Feb 18 13:36:07 2012 +0100
@@ -1,5 +1,5 @@
 # HG changeset patch
-# Parent 293f1b3181e2a2339e31d7cdb0637a019b96d3cc
+# Parent e24ae3e49b73a2b799765d863f69f0c956ea2c54
 # User Louis Opter <louis@lse.epitech.net>, David Pineau <dav.pineau@gmail.com>
 rathaxes: correctly use chunk and template sequences parameters in the e1000 sample
 
@@ -55,8 +55,8 @@
 +             * all the fields at once (see, ioaddr) and cannot call a C
 +             * function within a placeholder (${}), it wasn't really worth it.
 +             */
-+            ${rtx_ether_ctx}->bars = pci_select_bars(${pdev}, IORESOURCE_MEM);
-+            ${rtx_ether_ctx}->irq = ${pdev}->irq;
++            ${rtx_ether_ctx}->hw_ctx.bars = pci_select_bars(${pdev}, IORESOURCE_MEM);
++            ${rtx_ether_ctx}->hw_ctx.irq = ${pdev}->irq;
 +
 +            if (pci_enable_device_mem(${pdev}))
              {
@@ -291,7 +291,7 @@
          }
  
          map
-@@ -45,7 +63,7 @@
+@@ -45,10 +63,10 @@
          {
              static int  rtx_ethernet_open(struct net_device *dev)
              {
@@ -299,7 +299,11 @@
 +                struct rtx_ethernet_dev* rtx_ether_dev = netdev_priv(dev);
                  struct rtx_e1000_ctx* ctx = &rtx_ether_dev->hw_ctx;
  
-                 ${pointcut ::IMPLEMENTATION};
+-                ${pointcut ::IMPLEMENTATION};
++                ${pointcut ::IMPLEMENTATION(local.rtx_ethernet_dev)};
+ 
+                 return 0;
+             }
 @@ -121,7 +139,7 @@
          }
      }
@@ -400,11 +404,11 @@
          {
 -            struct net_device *net_dev = pci_get_drvdata(pdev);
 +            /* workaround for cnorm unstrict */
-+            typedef int ${Ethernet::device};
++            typedef int ${Ethernet::Device};
  
 -            ${pointcut Ethernet::destroy_device};
 +            struct net_device *net_dev = pci_get_drvdata(${pdev});
-+            ${Ethernet::device} rtx_ether_ctx = netdev_priv(net_dev);
++            ${Ethernet::Device} rtx_ether_ctx = netdev_priv(net_dev);
 +
 +            ${pointcut Ethernet::destroy_device(pdev, local.rtx_ether_ctx)};