diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2009-06-22 06:08:10 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-06-22 06:08:19 -0400 |
commit | 60b5df2f12f2ab54bfa7c1f0f0ce3f5953e73c0b (patch) | |
tree | 3135f3e560340cc8e419921a6f146f62df8bd635 /drivers/s390/cio/qdio_thinint.c | |
parent | f3dfa86caa4a54aceb2b235bf28a6f6ad73b2716 (diff) |
[S390] qdio: move adapter interrupt tasklet code
Move the adapter interrupt tasklet function to the qdio main code
since all the functions used by the tasklet are located there.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/qdio_thinint.c')
-rw-r--r-- | drivers/s390/cio/qdio_thinint.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/drivers/s390/cio/qdio_thinint.c b/drivers/s390/cio/qdio_thinint.c index c655d011a78d..e122f780f5ee 100644 --- a/drivers/s390/cio/qdio_thinint.c +++ b/drivers/s390/cio/qdio_thinint.c | |||
@@ -126,68 +126,11 @@ void tiqdio_remove_input_queues(struct qdio_irq *irq_ptr) | |||
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
129 | static inline int tiqdio_inbound_q_done(struct qdio_q *q) | ||
130 | { | ||
131 | unsigned char state = 0; | ||
132 | |||
133 | if (!atomic_read(&q->nr_buf_used)) | ||
134 | return 1; | ||
135 | |||
136 | qdio_siga_sync_q(q); | ||
137 | get_buf_state(q, q->first_to_check, &state, 0); | ||
138 | |||
139 | if (state == SLSB_P_INPUT_PRIMED) | ||
140 | /* more work coming */ | ||
141 | return 0; | ||
142 | return 1; | ||
143 | } | ||
144 | |||
145 | static inline int shared_ind(struct qdio_irq *irq_ptr) | 129 | static inline int shared_ind(struct qdio_irq *irq_ptr) |
146 | { | 130 | { |
147 | return irq_ptr->dsci == &q_indicators[TIQDIO_SHARED_IND].ind; | 131 | return irq_ptr->dsci == &q_indicators[TIQDIO_SHARED_IND].ind; |
148 | } | 132 | } |
149 | 133 | ||
150 | static void __tiqdio_inbound_processing(struct qdio_q *q) | ||
151 | { | ||
152 | qdio_perf_stat_inc(&perf_stats.thinint_inbound); | ||
153 | qdio_sync_after_thinint(q); | ||
154 | |||
155 | /* | ||
156 | * Maybe we have work on our outbound queues... at least | ||
157 | * we have to check the PCI capable queues. | ||
158 | */ | ||
159 | qdio_check_outbound_after_thinint(q); | ||
160 | |||
161 | if (!qdio_inbound_q_moved(q)) | ||
162 | return; | ||
163 | |||
164 | qdio_kick_handler(q); | ||
165 | |||
166 | if (!tiqdio_inbound_q_done(q)) { | ||
167 | qdio_perf_stat_inc(&perf_stats.thinint_inbound_loop); | ||
168 | if (likely(q->irq_ptr->state != QDIO_IRQ_STATE_STOPPED)) | ||
169 | tasklet_schedule(&q->tasklet); | ||
170 | } | ||
171 | |||
172 | qdio_stop_polling(q); | ||
173 | /* | ||
174 | * We need to check again to not lose initiative after | ||
175 | * resetting the ACK state. | ||
176 | */ | ||
177 | if (!tiqdio_inbound_q_done(q)) { | ||
178 | qdio_perf_stat_inc(&perf_stats.thinint_inbound_loop2); | ||
179 | if (likely(q->irq_ptr->state != QDIO_IRQ_STATE_STOPPED)) | ||
180 | tasklet_schedule(&q->tasklet); | ||
181 | } | ||
182 | } | ||
183 | |||
184 | void tiqdio_inbound_processing(unsigned long data) | ||
185 | { | ||
186 | struct qdio_q *q = (struct qdio_q *)data; | ||
187 | |||
188 | __tiqdio_inbound_processing(q); | ||
189 | } | ||
190 | |||
191 | /* check for work on all inbound thinint queues */ | 134 | /* check for work on all inbound thinint queues */ |
192 | static void tiqdio_tasklet_fn(unsigned long data) | 135 | static void tiqdio_tasklet_fn(unsigned long data) |
193 | { | 136 | { |