aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/ap_card.c
diff options
context:
space:
mode:
authorHarald Freudenberger <freude@linux.vnet.ibm.com>2017-10-16 12:28:35 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-10-23 09:07:14 +0200
commit9a5641080bf433e195730e47a13de58dcd70f47f (patch)
tree22b37ce4146323f1d39b7e911f302e7558ce3aa7 /drivers/s390/crypto/ap_card.c
parents390/zcrypt: Enable special header file flag for AU CPRP (diff)
downloadlinux-dev-9a5641080bf433e195730e47a13de58dcd70f47f.tar.xz
linux-dev-9a5641080bf433e195730e47a13de58dcd70f47f.zip
s390/zcrypt: Introduce QACT support for AP bus devices.
This patch introduces a new ap_qact() function which exploits the PQAP(QACT) subfunction. QACT is a new interface to Query the Ap Compatilibity Type based on a given AP qid, type, mode and version. Based on this new function the AP bus scan code is slightly reworked to use this new interface for querying the compatible type for each new AP queue device detected. So new and unknown devices can get automatically mapped to a compatible type and handled without the need for toleration patches for every new hardware. The currently highest known hardware is CEX6S. With this patch a possible successor can get queried for a combatible type known by the device driver without the need for an toleration patch. Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/ap_card.c')
-rw-r--r--drivers/s390/crypto/ap_card.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/crypto/ap_card.c b/drivers/s390/crypto/ap_card.c
index e8300630e197..428623fa517e 100644
--- a/drivers/s390/crypto/ap_card.c
+++ b/drivers/s390/crypto/ap_card.c
@@ -170,19 +170,20 @@ static void ap_card_device_release(struct device *dev)
kfree(ac);
}
-struct ap_card *ap_card_create(int id, int queue_depth, int device_type,
- unsigned int functions)
+struct ap_card *ap_card_create(int id, int queue_depth, int raw_type,
+ int comp_type, unsigned int functions)
{
struct ap_card *ac;
ac = kzalloc(sizeof(*ac), GFP_KERNEL);
if (!ac)
return NULL;
+ INIT_LIST_HEAD(&ac->list);
INIT_LIST_HEAD(&ac->queues);
ac->ap_dev.device.release = ap_card_device_release;
ac->ap_dev.device.type = &ap_card_type;
- ac->ap_dev.device_type = device_type;
- ac->raw_hwtype = device_type;
+ ac->ap_dev.device_type = comp_type;
+ ac->raw_hwtype = raw_type;
ac->queue_depth = queue_depth;
ac->functions = functions;
ac->id = id;