diff -r eec7639c7be9 -r a3dbd6bc8fce master/canopen.c --- a/master/canopen.c Mon Mar 20 12:54:17 2006 +0000 +++ b/master/canopen.c Mon Mar 20 13:36:10 2006 +0000 @@ -194,8 +194,10 @@ start = get_cycles(); timeout = cpu_khz; // 1ms - do + while (1) { + udelay(10); + ec_command_init_nprd(&command, slave->station_address, 0x808, 8); if (unlikely(ec_master_simple_io(master, &command))) { EC_ERR("Mailbox checking failed on slave %i!\n", @@ -208,12 +210,12 @@ if (EC_READ_U8(command.data + 5) & 8) { // Written bit is high break; } - } - while (likely((end - start) < timeout)); - - if (unlikely((end - start) >= timeout)) { - EC_ERR("Mailbox check on slave %i timed out.\n", slave->ring_position); - return -1; + + if (unlikely((end - start) >= timeout)) { + EC_ERR("Mailbox check on slave %i timed out.\n", + slave->ring_position); + return -1; + } } ec_command_init_nprd(&command, slave->station_address, 0x18F6, 0xF6);