Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135629
b: refs/heads/master
c: c38f960
h: refs/heads/master
i:
  135627: 4b2e503
v: v3
  • Loading branch information
Jan Glauber authored and Martin Schwidefsky committed Mar 26, 2009
1 parent 4a2c989 commit 9fc1bde
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4c14e2085cd32f61e9ffc47d5b20d4f5f7639f3
refs/heads/master: c38f96080955854e54df9cb392bc674e1ae330e1
35 changes: 24 additions & 11 deletions trunk/drivers/s390/cio/qdio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,21 +778,17 @@ static void __qdio_outbound_processing(struct qdio_q *q)

spin_unlock_irqrestore(&q->lock, flags);

if (queue_type(q) == QDIO_ZFCP_QFMT) {
if (queue_type(q) == QDIO_ZFCP_QFMT)
if (!pci_out_supported(q) && !qdio_outbound_q_done(q))
tasklet_schedule(&q->tasklet);
return;
}
goto sched;

/* bail out for HiperSockets unicast queues */
if (queue_type(q) == QDIO_IQDIO_QFMT && !multicast_outbound(q))
return;

if ((queue_type(q) == QDIO_IQDIO_QFMT) &&
(atomic_read(&q->nr_buf_used)) > QDIO_IQDIO_POLL_LVL) {
tasklet_schedule(&q->tasklet);
return;
}
(atomic_read(&q->nr_buf_used)) > QDIO_IQDIO_POLL_LVL)
goto sched;

if (q->u.out.pci_out_enabled)
return;
Expand All @@ -810,6 +806,12 @@ static void __qdio_outbound_processing(struct qdio_q *q)
qdio_perf_stat_inc(&perf_stats.debug_tl_out_timer);
}
}
return;

sched:
if (unlikely(q->irq_ptr->state == QDIO_IRQ_STATE_STOPPED))
return;
tasklet_schedule(&q->tasklet);
}

/* outbound tasklet */
Expand All @@ -822,6 +824,9 @@ void qdio_outbound_processing(unsigned long data)
void qdio_outbound_timer(unsigned long data)
{
struct qdio_q *q = (struct qdio_q *)data;

if (unlikely(q->irq_ptr->state == QDIO_IRQ_STATE_STOPPED))
return;
tasklet_schedule(&q->tasklet);
}

Expand Down Expand Up @@ -863,6 +868,9 @@ static void qdio_int_handler_pci(struct qdio_irq *irq_ptr)
int i;
struct qdio_q *q;

if (unlikely(irq_ptr->state == QDIO_IRQ_STATE_STOPPED))
return;

qdio_perf_stat_inc(&perf_stats.pci_int);

for_each_input_queue(irq_ptr, q, i)
Expand Down Expand Up @@ -1090,11 +1098,11 @@ static void qdio_shutdown_queues(struct ccw_device *cdev)
int i;

for_each_input_queue(irq_ptr, q, i)
tasklet_disable(&q->tasklet);
tasklet_kill(&q->tasklet);

for_each_output_queue(irq_ptr, q, i) {
tasklet_disable(&q->tasklet);
del_timer(&q->u.out.timer);
tasklet_kill(&q->tasklet);
}
}

Expand Down Expand Up @@ -1125,6 +1133,12 @@ int qdio_shutdown(struct ccw_device *cdev, int how)
return 0;
}

/*
* Indicate that the device is going down. Scheduling the queue
* tasklets is forbidden from here on.
*/
qdio_set_state(irq_ptr, QDIO_IRQ_STATE_STOPPED);

tiqdio_remove_input_queues(irq_ptr);
qdio_shutdown_queues(cdev);
qdio_shutdown_debug_entries(irq_ptr, cdev);
Expand Down Expand Up @@ -1556,7 +1570,6 @@ static void handle_outbound(struct qdio_q *q, unsigned int callflags,
qdio_perf_stat_inc(&perf_stats.fast_requeue);
}
out:
/* Fixme: could wait forever if called from process context */
tasklet_schedule(&q->tasklet);
}

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/s390/cio/qdio_thinint.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ void tiqdio_add_input_queues(struct qdio_irq *irq_ptr)
list_add_rcu(&q->entry, &tiq_list);
mutex_unlock(&tiq_list_lock);
xchg(irq_ptr->dsci, 1);
tasklet_schedule(&tiqdio_tasklet);
}

/*
Expand Down Expand Up @@ -159,15 +158,15 @@ static void __tiqdio_inbound_processing(struct qdio_q *q)
*/
qdio_check_outbound_after_thinint(q);

again:
if (!qdio_inbound_q_moved(q))
return;

qdio_kick_inbound_handler(q);

if (!tiqdio_inbound_q_done(q)) {
qdio_perf_stat_inc(&perf_stats.thinint_inbound_loop);
goto again;
if (likely(q->irq_ptr->state != QDIO_IRQ_STATE_STOPPED))
tasklet_schedule(&q->tasklet);
}

qdio_stop_polling(q);
Expand All @@ -177,7 +176,8 @@ static void __tiqdio_inbound_processing(struct qdio_q *q)
*/
if (!tiqdio_inbound_q_done(q)) {
qdio_perf_stat_inc(&perf_stats.thinint_inbound_loop2);
goto again;
if (likely(q->irq_ptr->state != QDIO_IRQ_STATE_STOPPED))
tasklet_schedule(&q->tasklet);
}
}

Expand Down

0 comments on commit 9fc1bde

Please sign in to comment.