Skip to content

Commit bc615de

Browse files
Holger DenglerMartin Schwidefsky
authored andcommitted
[S390] ap: Setup processing for messages in request queue.
Setup timer for processing messages in request queue, if sending an AP message returns with reason code AP_RESPONSE_RESET_IN_PROGRESS. Signed-off-by: Holger Dengler <hd@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 96603b5 commit bc615de

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

‎drivers/s390/crypto/ap_bus.c‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,18 +1271,16 @@ ap_config_timeout(unsigned long ptr)
12711271
}
12721272

12731273
/**
1274-
* ap_schedule_poll_timer(): Schedule poll timer.
1274+
* __ap_schedule_poll_timer(): Schedule poll timer.
12751275
*
12761276
* Set up the timer to run the poll tasklet
12771277
*/
1278-
static inline void ap_schedule_poll_timer(void)
1278+
static inline void __ap_schedule_poll_timer(void)
12791279
{
12801280
ktime_t hr_time;
12811281

12821282
spin_lock_bh(&ap_poll_timer_lock);
1283-
if (ap_using_interrupts() || ap_suspend_flag)
1284-
goto out;
1285-
if (hrtimer_is_queued(&ap_poll_timer))
1283+
if (hrtimer_is_queued(&ap_poll_timer) || ap_suspend_flag)
12861284
goto out;
12871285
if (ktime_to_ns(hrtimer_expires_remaining(&ap_poll_timer)) <= 0) {
12881286
hr_time = ktime_set(0, poll_timeout);
@@ -1293,6 +1291,18 @@ static inline void ap_schedule_poll_timer(void)
12931291
spin_unlock_bh(&ap_poll_timer_lock);
12941292
}
12951293

1294+
/**
1295+
* ap_schedule_poll_timer(): Schedule poll timer.
1296+
*
1297+
* Set up the timer to run the poll tasklet
1298+
*/
1299+
static inline void ap_schedule_poll_timer(void)
1300+
{
1301+
if (ap_using_interrupts())
1302+
return;
1303+
__ap_schedule_poll_timer();
1304+
}
1305+
12961306
/**
12971307
* ap_poll_read(): Receive pending reply messages from an AP device.
12981308
* @ap_dev: pointer to the AP device
@@ -1374,8 +1384,9 @@ static int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags)
13741384
*flags |= 1;
13751385
*flags |= 2;
13761386
break;
1377-
case AP_RESPONSE_Q_FULL:
13781387
case AP_RESPONSE_RESET_IN_PROGRESS:
1388+
__ap_schedule_poll_timer();
1389+
case AP_RESPONSE_Q_FULL:
13791390
*flags |= 2;
13801391
break;
13811392
case AP_RESPONSE_MESSAGE_TOO_BIG:

0 commit comments

Comments
 (0)