Lines 1350-1358
err:
Link Here
|
1350 |
return 0; |
1350 |
return 0; |
1351 |
} |
1351 |
} |
1352 |
|
1352 |
|
|
|
1353 |
#ifndef init_timer |
1354 |
static void xbus_command_timer(struct timer_list *t) |
1355 |
{ |
1356 |
xbus_t *xbus = from_timer(xbus, t, command_timer); |
1357 |
#else |
1353 |
static void xbus_command_timer(unsigned long param) |
1358 |
static void xbus_command_timer(unsigned long param) |
1354 |
{ |
1359 |
{ |
1355 |
xbus_t *xbus = (xbus_t *)param; |
1360 |
xbus_t *xbus = (xbus_t *)param; |
|
|
1361 |
#endif |
1356 |
struct timeval now; |
1362 |
struct timeval now; |
1357 |
|
1363 |
|
1358 |
BUG_ON(!xbus); |
1364 |
BUG_ON(!xbus); |
Lines 1368-1375
void xbus_set_command_timer(xbus_t *xbus, bool on)
Link Here
|
1368 |
if (on) { |
1374 |
if (on) { |
1369 |
if (!timer_pending(&xbus->command_timer)) { |
1375 |
if (!timer_pending(&xbus->command_timer)) { |
1370 |
XBUS_DBG(SYNC, xbus, "add_timer\n"); |
1376 |
XBUS_DBG(SYNC, xbus, "add_timer\n"); |
1371 |
xbus->command_timer.function = xbus_command_timer; |
|
|
1372 |
xbus->command_timer.data = (unsigned long)xbus; |
1373 |
xbus->command_timer.expires = jiffies + 1; |
1377 |
xbus->command_timer.expires = jiffies + 1; |
1374 |
add_timer(&xbus->command_timer); |
1378 |
add_timer(&xbus->command_timer); |
1375 |
} |
1379 |
} |
Lines 1642-1648
xbus_t *xbus_new(struct xbus_ops *ops, ushort max_send_size,
Link Here
|
1642 |
transport_init(xbus, ops, max_send_size, transport_device, priv); |
1646 |
transport_init(xbus, ops, max_send_size, transport_device, priv); |
1643 |
spin_lock_init(&xbus->lock); |
1647 |
spin_lock_init(&xbus->lock); |
1644 |
init_waitqueue_head(&xbus->command_queue_empty); |
1648 |
init_waitqueue_head(&xbus->command_queue_empty); |
1645 |
init_timer(&xbus->command_timer); |
1649 |
timer_setup(&xbus->command_timer, xbus_command_timer, 0); |
|
|
1650 |
#ifdef init_timer |
1651 |
xbus->command_timer.data = (unsigned long)xbus; |
1652 |
#endif |
1646 |
atomic_set(&xbus->pcm_rx_counter, 0); |
1653 |
atomic_set(&xbus->pcm_rx_counter, 0); |
1647 |
xbus->min_tx_sync = INT_MAX; |
1654 |
xbus->min_tx_sync = INT_MAX; |
1648 |
xbus->min_rx_sync = INT_MAX; |
1655 |
xbus->min_rx_sync = INT_MAX; |