annotate rathaxes_e1000_move_the_interrupt_init_and_cleanup_into_ethernet.patch @ 105:fb20f01ea997

Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
author Louis Opter <louis@lse.epita.fr>
date Fri, 22 Mar 2013 00:25:52 -0700
parents c4c33ac02b93
children 976a4b87803f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
1 # HG changeset patch
105
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
2 # Parent 1e9f01563db8cac05d81f26c5e100d9629b67f1e
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
3 Move the interrupt handler init/cleanup out of e1000.blt
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
4
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
5 This is not device dependant and can be done from the Ethernet subsystem
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
6 right now, (plus the interrupt handler itself was already in the
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
7 Ethernet subsytem).
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
8
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
9 diff --git a/rathaxes/samples/e1000/e1000.blt b/rathaxes/samples/e1000/e1000.blt
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
10 --- a/rathaxes/samples/e1000/e1000.blt
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
11 +++ b/rathaxes/samples/e1000/e1000.blt
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
12 @@ -249,7 +249,6 @@
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
13 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
14 int bars;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
15 unsigned char /* __iomem */ *ioaddr;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
16 - int irq;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
17
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
18 ${e1000::RxRing} rx_ring;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
19 ${e1000::TxRing} tx_ring;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
20 @@ -267,14 +266,12 @@
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
21
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
22 chunk Ethernet::adapter_init_context(Ethernet::Device rtx_ether_ctx,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
23 Builtin::number bars,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
24 - Builtin::symbol ioaddr,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
25 - Builtin::number irq)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
26 + Builtin::symbol ioaddr)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
27 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
28 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
29 ${e1000::Context} *hw_ctx = &${rtx_ether_ctx}->hw_ctx;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
30 hw_ctx->bars = ${bars};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
31 hw_ctx->ioaddr = ${ioaddr};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
32 - hw_ctx->irq = ${irq};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
33 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
34 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
35
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
36 @@ -606,68 +603,6 @@
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
37 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
38 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
39
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
40 - template sequence e1000::setup_interrupt_handler(Ethernet::Device rtx_ether_ctx)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
41 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
42 - chunk LKM::includes()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
43 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
44 - #include <linux/interrupt.h>
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
45 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
46 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
47 - chunk LKM::prototypes()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
48 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
49 - static int e1000_setup_interrupt_handler(${Ethernet::Device} *);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
50 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
51 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
52 - chunk LKM::code()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
53 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
54 - static int e1000_setup_interrupt_handler(${Ethernet::Device} *rtx_ether_ctx)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
55 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
56 - int error;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
57 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
58 - error = request_irq(rtx_ether_ctx->hw_ctx.irq,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
59 - rtx_ethernet_interrupt_handler,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
60 - IRQF_SHARED,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
61 - ${config.name},
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
62 - rtx_ether_ctx);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
63 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
64 - if (error)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
65 - ${Log::info("cannot register the interrupt handler")};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
66 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
67 - return error;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
68 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
69 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
70 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
71 - chunk ::CALL()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
72 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
73 - int error = e1000_setup_interrupt_handler(${rtx_ether_ctx});
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
74 - if (error)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
75 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
76 - return error;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
77 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
78 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
79 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
80 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
81 - template sequence free_interrupt_handler(Ethernet::Device rtx_ether_ctx)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
82 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
83 - chunk prototypes()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
84 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
85 - static void e1000_free_interrupt_handler(${Ethernet::Device} *rtx_ether_ctx);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
86 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
87 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
88 - chunk code()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
89 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
90 - static void e1000_free_interrupt_handler(${Ethernet::Device} *rtx_ether_ctx)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
91 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
92 - free_irq(rtx_ether_ctx->hw_ctx.irq, rtx_ether_ctx);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
93 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
94 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
95 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
96 - chunk ::CALL()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
97 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
98 - e1000_free_interrupt_handler(${rtx_ether_ctx});
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
99 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
100 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
101 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
102 template sequence activate_device_interruption(Ethernet::Device rtx_ether_ctx)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
103 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
104 chunk ::CALL()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
105 diff --git a/rathaxes/samples/e1000/e1000.rti b/rathaxes/samples/e1000/e1000.rti
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
106 --- a/rathaxes/samples/e1000/e1000.rti
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
107 +++ b/rathaxes/samples/e1000/e1000.rti
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
108 @@ -13,8 +13,7 @@
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
109 /* Callbacks/Hooks which should probably be in the front-end: */
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
110 chunk Ethernet::adapter_init_context(Ethernet::Device,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
111 Builtin::number,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
112 - Builtin::symbol,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
113 - Builtin::number);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
114 + Builtin::symbol);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
115 chunk Ethernet::adapter_reset(Ethernet::Device);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
116 chunk Ethernet::adapter_load_mac_address(Ethernet::Device);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
117 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
118 @@ -85,21 +84,6 @@
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
119 provided chunk ::CALL();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
120 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
121
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
122 - provided sequence setup_interrupt_handler(Ethernet::Device)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
123 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
124 - provided chunk LKM::includes(); // works without this one
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
125 - provided chunk LKM::prototypes();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
126 - provided chunk LKM::code();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
127 - provided chunk ::CALL();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
128 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
129 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
130 - provided sequence free_interrupt_handler(Ethernet::Device)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
131 - {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
132 - provided chunk LKM::prototypes();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
133 - provided chunk LKM::code();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
134 - provided chunk ::CALL();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
135 - }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
136 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
137 provided sequence activate_device_interruption(Ethernet::Device)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
138 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
139 provided chunk ::CALL();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
140 diff --git a/rathaxes/samples/e1000/ethernet.blt b/rathaxes/samples/e1000/ethernet.blt
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
141 --- a/rathaxes/samples/e1000/ethernet.blt
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
142 +++ b/rathaxes/samples/e1000/ethernet.blt
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
143 @@ -1,4 +1,4 @@
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
144 -with Ethernet, PCI, LKM, Log
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
145 +with Ethernet, PCI, LKM, Log, Builtin
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
146 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
147 template type Ethernet::ProtocolId()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
148 {
105
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
149 @@ -106,11 +106,17 @@
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
150 net_device: ${self}->net_dev;
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
151 perm_addr: ${self}->net_dev->ndev.perm_addr;
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
152 dev_addr: ${self}->net_dev->ndev.dev_addr;
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
153 + irq: ${self}->pci_dev->data.irq;
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
154 }
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
155 }
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
156
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
157 template sequence Ethernet::open(Ethernet::Device dev)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
158 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
159 + chunk LKM::includes()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
160 + {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
161 + #include <linux/interrupt.h>
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
162 + }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
163 +
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
164 chunk LKM::prototypes()
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
165 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
166 static int rtx_ethernet_open(struct net_device *);
105
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
167 @@ -123,9 +129,28 @@
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
168 ${Ethernet::Device} *rtx_ether_ctx = netdev_priv(dev);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
169
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
170 ${cast local.rtx_ether_ctx as Ethernet::Device};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
171 +
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
172 + int error;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
173 + {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
174 + ${Log::info("installing the interrupt handler")};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
175 + }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
176 + error = request_irq(${local.rtx_ether_ctx.irq},
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
177 + rtx_ethernet_interrupt_handler,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
178 + IRQF_SHARED,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
179 + ${config.name},
105
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
180 + dev);
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
181 + if (error)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
182 + {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
183 + ${Log::info("Cannot register the interrupt handler")};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
184 + goto error;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
185 + }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
186 +
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
187 ${pointcut ::IMPLEMENTATION(local.rtx_ether_ctx)};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
188
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
189 return 0;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
190 +
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
191 + error:
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
192 + return error;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
193 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
194 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
195 }
105
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
196 @@ -165,7 +190,16 @@
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
197 ${Ethernet::Device} *rtx_ether_ctx = netdev_priv(dev);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
198
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
199 ${cast local.rtx_ether_ctx as Ethernet::Device};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
200 - ${pointcut ::IMPLEMENTATION(local.rtx_ether_ctx)};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
201 +
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
202 + /* TODO: change this pointcut into a pointcut/adapter/callback: */
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
203 + {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
204 + ${pointcut ::IMPLEMENTATION(local.rtx_ether_ctx)};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
205 + }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
206 +
105
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
207 + free_irq(${local.rtx_ether_ctx.irq}, dev);
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
208 + {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
209 + ${Log::info("interrupt handler free'ed")};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
210 + }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
211
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
212 return 0;
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
213 }
105
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
214 @@ -267,14 +301,11 @@
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
215 */
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
216 int bars = ${rtx_pci_dev.bars};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
217 unsigned char /* __iomem */ *ioaddr = ${rtx_pci_dev.ioaddr};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
218 - int irq = ${rtx_pci_dev.irq};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
219 ${cast local.bars as Builtin::number};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
220 - ${cast local.irq as Builtin::number};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
221 ${cast local.rtx_ether_ctx as Ethernet::Device};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
222 ${pointcut Ethernet::adapter_init_context(local.rtx_ether_ctx,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
223 local.bars,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
224 - local.ioaddr,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
225 - local.irq)};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
226 + local.ioaddr)};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
227 ${pointcut Ethernet::adapter_reset(local.rtx_ether_ctx)};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
228 ${pointcut Ethernet::adapter_load_mac_address(local.rtx_ether_ctx)};
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
229 memcpy(${local.rtx_ether_ctx.perm_addr},
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
230 diff --git a/rathaxes/samples/e1000/ethernet.rti b/rathaxes/samples/e1000/ethernet.rti
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
231 --- a/rathaxes/samples/e1000/ethernet.rti
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
232 +++ b/rathaxes/samples/e1000/ethernet.rti
105
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
233 @@ -36,10 +36,12 @@
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
234 */
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
235 attribute Builtin::symbol perm_addr;
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
236 attribute Builtin::symbol dev_addr;
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
237 + attribute Builtin::symbol irq;
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
238 }
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
239
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
240 required sequence open(Ethernet::Device)
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
241 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
242 + provided chunk LKM::includes();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
243 provided chunk LKM::prototypes();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
244 provided chunk LKM::code();
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
245 }
105
fb20f01ea997 Wip, note: the interrupt handler refactoring patch is broken, I have to find the fix from the abstract type notation patch
Louis Opter <louis@lse.epita.fr>
parents: 104
diff changeset
246 @@ -69,8 +71,7 @@
104
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
247
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
248 provided pointcut Ethernet::adapter_init_context(Ethernet::Device,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
249 Builtin::number,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
250 - Builtin::symbol,
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
251 - Builtin::number);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
252 + Builtin::symbol);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
253 provided pointcut Ethernet::adapter_reset(Ethernet::Device);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
254 provided pointcut Ethernet::adapter_load_mac_address(Ethernet::Device);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
255 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
256 diff --git a/rathaxes/samples/e1000/lkm.rtx b/rathaxes/samples/e1000/lkm.rtx
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
257 --- a/rathaxes/samples/e1000/lkm.rtx
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
258 +++ b/rathaxes/samples/e1000/lkm.rtx
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
259 @@ -4,13 +4,6 @@
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
260 {
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
261 Log::info("opening the device");
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
262
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
263 - /*
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
264 - * Maybe e1000::create_device should be called from here, to be
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
265 - * more coherent.
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
266 - */
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
267 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
268 - e1000::setup_interrupt_handler(dev);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
269 - Log::info("interrupt handler installed");
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
270
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
271 e1000::set_up_device(dev);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
272 Log::info("device activated");
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
273 @@ -32,9 +25,6 @@
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
274 */
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
275 e1000::free_rx_tx(dev);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
276 Log::info("free'ed up rx/tx resources");
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
277 -
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
278 - e1000::free_interrupt_handler(dev);
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
279 - Log::info("interrupt handler free'ed");
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
280 }
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
281
c4c33ac02b93 First try at splitting the type nightmare and the refactoring
Louis Opter <louis@lse.epita.fr>
parents:
diff changeset
282 Ethernet::interrupt_handler(Ethernet::Device dev)