|
Lines 353-388
static void xpp_set_syncer(xbus_t *xbus, bool on)
Link Here
|
| 353 |
(syncer) ? syncer->busname : "NO-SYNC"); |
353 |
(syncer) ? syncer->busname : "NO-SYNC"); |
| 354 |
} |
354 |
} |
| 355 |
|
355 |
|
| 356 |
static void xbus_command_timer(unsigned long param) |
|
|
| 357 |
{ |
| 358 |
xbus_t *xbus = (xbus_t *)param; |
| 359 |
struct timeval now; |
| 360 |
|
| 361 |
BUG_ON(!xbus); |
| 362 |
do_gettimeofday(&now); |
| 363 |
xbus_command_queue_tick(xbus); |
| 364 |
if (!xbus->self_ticking) /* Must be 1KHz rate */ |
| 365 |
mod_timer(&xbus->command_timer, jiffies + 1); |
| 366 |
} |
| 367 |
|
| 368 |
void xbus_set_command_timer(xbus_t *xbus, bool on) |
| 369 |
{ |
| 370 |
XBUS_DBG(SYNC, xbus, "%s\n", (on) ? "ON" : "OFF"); |
| 371 |
if (on) { |
| 372 |
if (!timer_pending(&xbus->command_timer)) { |
| 373 |
XBUS_DBG(SYNC, xbus, "add_timer\n"); |
| 374 |
xbus->command_timer.function = xbus_command_timer; |
| 375 |
xbus->command_timer.data = (unsigned long)xbus; |
| 376 |
xbus->command_timer.expires = jiffies + 1; |
| 377 |
add_timer(&xbus->command_timer); |
| 378 |
} |
| 379 |
} else if (timer_pending(&xbus->command_timer)) { |
| 380 |
XBUS_DBG(SYNC, xbus, "del_timer\n"); |
| 381 |
del_timer(&xbus->command_timer); |
| 382 |
} |
| 383 |
xbus->self_ticking = !on; |
| 384 |
} |
| 385 |
|
| 386 |
/* |
356 |
/* |
| 387 |
* Called when the Astribank replies to a sync change request |
357 |
* Called when the Astribank replies to a sync change request |
| 388 |
*/ |
358 |
*/ |
| 389 |
- |
|
|