]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
s390/qdio: put thinint indicator after early error
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 9 Apr 2020 07:59:39 +0000 (09:59 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 28 Apr 2020 11:49:47 +0000 (13:49 +0200)
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: 779e6e1c724d ("[S390] qdio: new qdio driver.")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
drivers/s390/cio/qdio.h
drivers/s390/cio/qdio_setup.c
drivers/s390/cio/qdio_thinint.c

index 3cf223bc1d5f48951d758316e07a37f73f5ce185..a2afd7bc100bb960165cc485e30fd61de158ef83 100644 (file)
@@ -364,7 +364,6 @@ static inline int multicast_outbound(struct qdio_q *q)
 extern u64 last_ai_time;
 
 /* prototypes for thin interrupt */
-void qdio_setup_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 tiqdio_add_device(struct qdio_irq *irq_ptr);
index d12f094db056e0eecb57a71e783256e1847b007d..8edfa0982221fb3e29b07fc2afb0d6a2f6507ad9 100644 (file)
@@ -480,7 +480,6 @@ int qdio_setup_irq(struct qdio_irq *irq_ptr, struct qdio_initialize *init_data)
        }
 
        setup_qib(irq_ptr, init_data);
-       qdio_setup_thinint(irq_ptr);
        set_impl_params(irq_ptr, init_data->qib_param_field_format,
                        init_data->qib_param_field,
                        init_data->input_slib_elements,
index ae50373617cd4954bbe2211680fe0ef5b031acd6..0faa0ad217326832729ab871dadfe3dac5a74bbf 100644 (file)
@@ -227,17 +227,19 @@ int __init tiqdio_register_thinints(void)
 
 int qdio_establish_thinint(struct qdio_irq *irq_ptr)
 {
+       int rc;
+
        if (!is_thinint_irq(irq_ptr))
                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();
        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)