Commit 75e82bec authored by Julian Wiedmann's avatar Julian Wiedmann Committed by Vasily Gorbik

s390/qdio: put thinint indicator after early error

qdio_establish() calls qdio_setup_thinint() via qdio_setup_irq().
If the subsequent qdio_establish_thinint() fails, we miss to put the
DSCI again. Thus the DSCI isn't available for re-use. Given enough of
such errors, we could end up with having only the shared DSCI available.

Merge qdio_setup_thinint() into qdio_establish_thinint(), and deal with
such an error internally.

Fixes: 779e6e1c ("[S390] qdio: new qdio driver.")
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: default avatarBenjamin Block <bblock@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 68a38174
...@@ -364,7 +364,6 @@ static inline int multicast_outbound(struct qdio_q *q) ...@@ -364,7 +364,6 @@ static inline int multicast_outbound(struct qdio_q *q)
extern u64 last_ai_time; extern u64 last_ai_time;
/* prototypes for thin interrupt */ /* prototypes for thin interrupt */
void qdio_setup_thinint(struct qdio_irq *irq_ptr);
int qdio_establish_thinint(struct qdio_irq *irq_ptr); int qdio_establish_thinint(struct qdio_irq *irq_ptr);
void qdio_shutdown_thinint(struct qdio_irq *irq_ptr); void qdio_shutdown_thinint(struct qdio_irq *irq_ptr);
void tiqdio_add_device(struct qdio_irq *irq_ptr); void tiqdio_add_device(struct qdio_irq *irq_ptr);
......
...@@ -480,7 +480,6 @@ int qdio_setup_irq(struct qdio_irq *irq_ptr, struct qdio_initialize *init_data) ...@@ -480,7 +480,6 @@ int qdio_setup_irq(struct qdio_irq *irq_ptr, struct qdio_initialize *init_data)
} }
setup_qib(irq_ptr, init_data); setup_qib(irq_ptr, init_data);
qdio_setup_thinint(irq_ptr);
set_impl_params(irq_ptr, init_data->qib_param_field_format, set_impl_params(irq_ptr, init_data->qib_param_field_format,
init_data->qib_param_field, init_data->qib_param_field,
init_data->input_slib_elements, init_data->input_slib_elements,
......
...@@ -227,17 +227,19 @@ int __init tiqdio_register_thinints(void) ...@@ -227,17 +227,19 @@ int __init tiqdio_register_thinints(void)
int qdio_establish_thinint(struct qdio_irq *irq_ptr) int qdio_establish_thinint(struct qdio_irq *irq_ptr)
{ {
int rc;
if (!is_thinint_irq(irq_ptr)) if (!is_thinint_irq(irq_ptr))
return 0; return 0;
return set_subchannel_ind(irq_ptr, 0);
}
void qdio_setup_thinint(struct qdio_irq *irq_ptr)
{
if (!is_thinint_irq(irq_ptr))
return;
irq_ptr->dsci = get_indicator(); irq_ptr->dsci = get_indicator();
DBF_HEX(&irq_ptr->dsci, sizeof(void *)); DBF_HEX(&irq_ptr->dsci, sizeof(void *));
rc = set_subchannel_ind(irq_ptr, 0);
if (rc)
put_indicator(irq_ptr->dsci);
return rc;
} }
void qdio_shutdown_thinint(struct qdio_irq *irq_ptr) void qdio_shutdown_thinint(struct qdio_irq *irq_ptr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment