diff options
author | Julian Wiedmann <jwi@linux.ibm.com> | 2021-06-11 10:33:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-11 22:49:15 +0300 |
commit | 838e4cc80814aad973fbfdd836b2b25eb27681f1 (patch) | |
tree | ea9d42e4845752831be90a70b999d97373fc6dd3 /drivers/s390/net/qeth_core.h | |
parent | f875d880f04970e86039c670cabfc52b0412a1b3 (diff) | |
download | linux-838e4cc80814aad973fbfdd836b2b25eb27681f1.tar.xz |
s390/qeth: remove QAOB's pointer to its TX buffer
Maintaining a pointer inside the aob's user-definable area is fragile
and unnecessary. At this stage we only need it to overload the buffer's
state field, and to access the buffer's TX queue.
The first part is easily solved by tracking the aob's state within the
aob itself. This also feels much cleaner and self-contained.
For enabling the access to the associated TX queue, we can store the
queue's index in the aob.
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_core.h')
-rw-r--r-- | drivers/s390/net/qeth_core.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 5de5b419a761..457224b7b97f 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -417,12 +417,17 @@ enum qeth_qdio_out_buffer_state { QETH_QDIO_BUF_EMPTY, /* Filled by driver; owned by hardware in order to be sent. */ QETH_QDIO_BUF_PRIMED, - /* Discovered by the TX completion code: */ - QETH_QDIO_BUF_PENDING, - /* Finished by the TX completion code: */ - QETH_QDIO_BUF_NEED_QAOB, - /* Received QAOB notification on CQ: */ - QETH_QDIO_BUF_QAOB_DONE, +}; + +enum qeth_qaob_state { + QETH_QAOB_ISSUED, + QETH_QAOB_PENDING, + QETH_QAOB_DONE, +}; + +struct qeth_qaob_priv1 { + unsigned int state; + u8 queue_no; }; struct qeth_qdio_out_buffer { |