OSDN Git Service

s390/qeth: simplify reply object handling
authorJulian Wiedmann <jwi@linux.ibm.com>
Tue, 12 Feb 2019 17:33:21 +0000 (18:33 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 18:14:24 +0000 (13:14 -0500)
commit0951c6babf49d2f2429cbfbea5cf792d427ecc6a
tree0b466cff27337777a9d4d9943f6453a7c289770a
parent51581fd07d8b8f5c3ff4444d6a8d2dc130d6cf57
s390/qeth: simplify reply object handling

Current code enqueues & dequeues a reply object from the waiter list
in various places. In particular, the dequeue & enqueue in
qeth_send_control_data_cb() looks fragile - this can cause
qeth_clear_ipacmd_list() to skip the active object.
Add some helpers, and boil the logic down by giving
qeth_send_control_data() the sole responsibility to add and remove
objects.

qeth_send_control_data_cb() and qeth_clear_ipacmd_list() will now only
notify the reply object to interrupt its wait cycle. This can cause
a slight delay in the removal, but that's no concern.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c