linux_dsm_epyc7002/arch/m68k
Finn Thain d95fd5fce8 m68k: Mac II ADB fixes
Fix a crash caused by requests placed in the queue with the completed flag
already set. This lead to some ADB_SYNC requests returning early and their
request structs being popped off the stack while still queued. Stack corruption
ensued or an invalid request callback pointer was invoked or both. Eliminate
macii_retransmit() and its buggy implementation of macii_write(). Have
macii_queue_poll() fully initialise the request queues.

Fix a bug in macii_queue_poll() where the last_req pointer was not being set.
This caused some requests to leave the queue before being completed (and would
also corrupt the stack under certain conditions).

Fix a race in macii_start that could set the state machine to "reading" while
current_req was null.

No longer send poll commands with the ADBREQ_REPLY flag -- doing that caused
the replies to be stored in the request buffer where they were forgotten
about.

Don't autopoll by continuously sending new Talk commands. Get the controller to
do that for us. This reduces the ADB interrupt rate on an idle bus to about 5
per second. Only autopoll the devices that were probed.

Explicitly clear the interrupt flag when polling.

Use disable_irq rather than local_irq_save when polling.

Remove excess local_irq_save/restore pairs.

Improve bus timeout and service request detection.

Remove unused code (last_reply, adb_dir etc) and unneeded code (prefix_len,
first_byte etc).

Change TIP and TACK to their correct names on this ADB controller (ST_EVEN and
ST_ODD).

Add some commentry.

Add a generous quantity of sanity checks (BUG_ONs).

Let m68k macs use the adb_sync boot param too.

Tested on Mac II, Mac IIci, Quadra 650, Quadra 700 etc.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-04 17:59:07 -07:00
..
amiga m68k: early parameter support 2007-05-04 17:59:06 -07:00
apollo
atari m68k: early parameter support 2007-05-04 17:59:06 -07:00
bvme6000 [PATCH] mark struct file_operations const 2 2007-02-12 09:48:44 -08:00
configs
fpsp040
hp300
ifpsp060
kernel m68k: Mac II ADB fixes 2007-05-04 17:59:07 -07:00
lib
mac m68k: Mac IRQ cleanup 2007-05-04 17:59:07 -07:00
math-emu
mm
mvme16x [PATCH] mark struct file_operations const 2 2007-02-12 09:48:44 -08:00
mvme147
q40 m68k: early parameter support 2007-05-04 17:59:06 -07:00
sun3 m68k: Correct number of interrupts for Sun3 2007-05-04 17:59:06 -07:00
sun3x m68k: early parameter support 2007-05-04 17:59:06 -07:00
tools/amiga
defconfig
Kconfig m68k: Atari keyboard and mouse support. 2007-05-04 17:59:05 -07:00
Kconfig.debug
Makefile m68k: CROSS_COMPILE = m68k-linux-gnu- 2007-05-04 17:59:05 -07:00