daniel-santos / mcp2210-linux

MCP2210 driver for linux
http://danielthesantos.blogspot.com/search/label/mcp2210
51 stars 31 forks source link

Fix endless re-transmissions when num_xfers > 1 #46

Open kodidu opened 2 years ago

kodidu commented 2 years ago

Single xfer with 2 bytes: OK mcp2210-util -D /dev/spidevX spi 9800 // SPI_IOC_MESSAGE(1)

Two xfers with 1 byte: ERROR endless transmission mcp2210-util -D /dev/spidevX spi 98,00 // SPI_IOC_MESSAGE(2)

cmd->xfer is not updated after the first xfer finished => endless transmission

Looks like commit c4f83f1fc525ac75874db9ecbdbe285a14368afe introduced this issue: https://github.com/daniel-santos/mcp2210-linux/commit/c4f83f1fc525ac75874db9ecbdbe285a14368afe#diff-0215cfa293de9d1a72422d837fa2be64c49391dfb2835b99adb31403298f0206L772

daniel-santos commented 2 years ago

Thank you for your patch! I'll try to review and test in the next few days.

iDoka commented 2 years ago

@daniel-santos any updates?

kodidu commented 2 years ago

@iDoka I only can suggest you to step away from the MCP2210. This is a very poorly designed communication IC...

iDoka commented 2 years ago

@kodidu any alternative candidate to SPI -to-USB bridge with good works on Linux?