timing issue fix

- fix a timing issue on USB3 hardware (or maybe on fast recent hardware)
	debugged and tracked by John S. Weber <jweber53@gmail.com>
merge-requests/1/head
Stéphane Voltz 2015-07-30 14:28:53 +02:00
rodzic 00c9ac83bf
commit 09daef4a68
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -961,6 +961,10 @@ sanei_genesys_test_buffer_empty (Genesys_Device * dev, SANE_Bool * empty)
if (dev->model->cmd_set->test_buffer_empty_bit (val))
{
/* fix timing issue on USB3 (or just may be too fast) hardware
* spotted by John S. Weber jweber53@gmail.com
*/
usleep(1000);
DBG (DBG_io2, "sanei_genesys_test_buffer_empty: buffer is empty\n");
*empty = SANE_TRUE;
return SANE_STATUS_GOOD;