sane-backends/sane-plustek-add-1ms.patch
Troy Dawson 4ea97043bd RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/sane-backends#e74855ce7e70772b50c980c582f52be711149f07
2020-10-15 09:18:32 -07:00

20 lines
701 B
Diff

diff --git a/backend/plustek-usbhw.c b/backend/plustek-usbhw.c
index 05d3cc7..28cbd52 100644
--- a/backend/plustek-usbhw.c
+++ b/backend/plustek-usbhw.c
@@ -1451,6 +1451,14 @@ usb_ResetRegisters( Plustek_Device *dev )
* CanoScan devices to work properly after power-up
*/
sanei_lm983x_write_byte( dev->fd, 0x5b, regs[0x5b] );
+
+ /* At least CanoScan N650U can have a problem with writing
+ * to register 0x59 due XHCI USB controller is too
+ * fast for him. Simulate EHCI USB controller's
+ * behavior here - wait 1ms.
+ */
+ usleep(1000);
+
sanei_lm983x_write_byte( dev->fd, 0x59, regs[0x59] );
sanei_lm983x_write_byte( dev->fd, 0x5a, regs[0x5a] );
} else {