# HG changeset patch # User Louis Opter # Date 1329568567 -3600 # Node ID 8dc1a3bf372a767e4131c3b0ff6ad1e503be1f7b # Parent b820c4604946a6344e9331675e249ea483b1ca22 WIP e1000 sample diff -r b820c4604946 -r 8dc1a3bf372a rathaxes_correctly_use_chunk_and_template_sequences_parameters_in_e1000.patch --- 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 , David Pineau 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)};