Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275506
b: refs/heads/master
c: bc615de
h: refs/heads/master
v: v3
  • Loading branch information
Holger Dengler authored and Martin Schwidefsky committed Nov 14, 2011
1 parent 9b6f751 commit b85c253
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 96603b505cb6c54782a27599afef65cc108ef5f2
refs/heads/master: bc615deaf35ab06e7fe5672b0efb3c7a0b2dcf1a
23 changes: 17 additions & 6 deletions trunk/drivers/s390/crypto/ap_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,18 +1271,16 @@ ap_config_timeout(unsigned long ptr)
}

/**
* ap_schedule_poll_timer(): Schedule poll timer.
* __ap_schedule_poll_timer(): Schedule poll timer.
*
* Set up the timer to run the poll tasklet
*/
static inline void ap_schedule_poll_timer(void)
static inline void __ap_schedule_poll_timer(void)
{
ktime_t hr_time;

spin_lock_bh(&ap_poll_timer_lock);
if (ap_using_interrupts() || ap_suspend_flag)
goto out;
if (hrtimer_is_queued(&ap_poll_timer))
if (hrtimer_is_queued(&ap_poll_timer) || ap_suspend_flag)
goto out;
if (ktime_to_ns(hrtimer_expires_remaining(&ap_poll_timer)) <= 0) {
hr_time = ktime_set(0, poll_timeout);
Expand All @@ -1293,6 +1291,18 @@ static inline void ap_schedule_poll_timer(void)
spin_unlock_bh(&ap_poll_timer_lock);
}

/**
* ap_schedule_poll_timer(): Schedule poll timer.
*
* Set up the timer to run the poll tasklet
*/
static inline void ap_schedule_poll_timer(void)
{
if (ap_using_interrupts())
return;
__ap_schedule_poll_timer();
}

/**
* ap_poll_read(): Receive pending reply messages from an AP device.
* @ap_dev: pointer to the AP device
Expand Down Expand Up @@ -1374,8 +1384,9 @@ static int ap_poll_write(struct ap_device *ap_dev, unsigned long *flags)
*flags |= 1;
*flags |= 2;
break;
case AP_RESPONSE_Q_FULL:
case AP_RESPONSE_RESET_IN_PROGRESS:
__ap_schedule_poll_timer();
case AP_RESPONSE_Q_FULL:
*flags |= 2;
break;
case AP_RESPONSE_MESSAGE_TOO_BIG:
Expand Down

0 comments on commit b85c253

Please sign in to comment.