macintosh/adb-iop: Send correct poll command
authorFinn Thain <fthain@telegraphics.com.au>
Fri, 20 Nov 2020 04:39:56 +0000 (15:39 +1100)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 7 Dec 2020 09:48:16 +0000 (10:48 +0100)
commit10199e90ee20e68859f8128331ec8d85b036d349
treea7c4ca2cff5a739479e61e38a7b2b0491bc4a9e9
parent2c9cfbadfa234b03473f1ef54e6f4772cc07a371
macintosh/adb-iop: Send correct poll command

The behaviour of the IOP firmware is not well documented but we do know
that IOP message reply data can be used to issue new ADB commands.
Use the message reply to better control autopoll behaviour by sending
a Talk Register 0 command after every ADB response, not unlike the
algorithm in the via-macii driver. This poll command is addressed to
that device which last received a Talk command (explicit or otherwise).

Cc: Joshua Thompson <funaho@jurai.org>
Fixes: 32226e817043 ("macintosh/adb-iop: Implement idle -> sending state transition")
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Link: https://lore.kernel.org/r/58bba4310da4c29b068345a4b36af8a531397ff7.1605847196.git.fthain@telegraphics.com.au
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
drivers/macintosh/adb-iop.c