diff options
author | Harald Freudenberger <freude@linux.ibm.com> | 2020-07-02 16:57:00 +0200 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-10-07 21:50:00 +0200 |
commit | 4f2fcccdb547b09a4532c705078811e672fb9235 (patch) | |
tree | ac32311d3cb3db4cb5e4f3a01a90f48cfdf2c587 /drivers/s390/crypto/ap_bus.h | |
parent | s390/ap: add error response code field for ap queue devices (diff) | |
download | linux-4f2fcccdb547b09a4532c705078811e672fb9235.tar.xz linux-4f2fcccdb547b09a4532c705078811e672fb9235.zip |
s390/ap: add card/queue deconfig state
This patch adds a new config state to the ap card and queue
devices. This state reflects the response code
0x03 "AP deconfigured" on TQAP invocation and is tracked with
every ap bus scan.
Together with this new state now a card/queue device which
is 'deconfigured' is not disposed any more. However, for backward
compatibility the online state now needs to take this state into
account. So a card/queue is offline when the device is not configured.
Furthermore a device can't get switched from offline to online state
when not configured.
The config state is shown in sysfs at
/sys/devices/ap/cardxx/config
for the card and
/sys/devices/ap/cardxx/xx.yyyy/config
for each queue within each card.
It is a read-only attribute reflecting the negation of the
'AP deconfig' state as it is noted in the AP documents.
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/ap_bus.h')
-rw-r--r-- | drivers/s390/crypto/ap_bus.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/crypto/ap_bus.h b/drivers/s390/crypto/ap_bus.h index 0b66e8866a2c..56c8bed7b6a1 100644 --- a/drivers/s390/crypto/ap_bus.h +++ b/drivers/s390/crypto/ap_bus.h @@ -166,6 +166,7 @@ struct ap_card { unsigned int functions; /* AP device function bitfield. */ int queue_depth; /* AP queue depth.*/ int id; /* AP card number. */ + bool config; /* configured state */ atomic64_t total_request_count; /* # requests ever for this AP device.*/ }; @@ -178,6 +179,7 @@ struct ap_queue { spinlock_t lock; /* Per device lock. */ void *private; /* ap driver private pointer. */ enum ap_dev_state dev_state; /* queue device state */ + bool config; /* configured state */ ap_qid_t qid; /* AP queue id. */ int interrupt; /* indicate if interrupts are enabled */ int queue_count; /* # messages currently on AP queue. */ |