• Harald Freudenberger's avatar
    s390/zcrypt: make sysfs reset attribute trigger queue reset · 42a87d41
    Harald Freudenberger authored
    Until now there is no way to reset a AP queue or card. Driving a card
    or queue offline and online again does only toggle the 'software'
    online state. The only way to trigger a (hardware) reset is by running
    hot-unplug/hot-plug for example on the HMC.
    
    This patch makes the queue reset attribute in sysfs writable.
    Writing into this attribute triggers a reset on the AP queue's state
    machine. So the AP queue is flushed and state machine runs through the
    initial states which cause a reset (PQAP(RAPQ)) and a re-registration
    to interrupts (PQAP(AQIC)) if available.
    
    The reset sysfs attribute is writable by root only. So only an
    administrator is allowed to initiate a reset of AP queues. Please note
    that the queue's counter values are left untouched by the reset.
    Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    42a87d41
ap_queue.c 18.6 KB