1
linux/arch/m68k/kernel
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
..
asm-offsets.c
bios32.c
dma.c
entry.S m68k: reformat various m68k files 2007-05-04 17:59:06 -07:00
head.S m68k: reformat various m68k files 2007-05-04 17:59:06 -07:00
ints.c [PATCH] Declare init_irq_proc before we use it. 2007-02-19 14:21:50 -08:00
m68k_ksyms.c [PATCH] clean m68k ksyms 2006-10-11 11:17:06 -07:00
Makefile [PATCH] sort the devres mess out 2007-02-11 11:18:07 -08:00
module.c
process.c [PATCH] clean m68k ksyms 2006-10-11 11:17:06 -07:00
ptrace.c [PATCH] M68K: user ARRAY_SIZE macro when appropriate 2007-02-11 10:51:20 -08:00
semaphore.c
setup.c m68k: Mac II ADB fixes 2007-05-04 17:59:07 -07:00
signal.c
sun3-head.S [PATCH] Sun3: General updates 2006-12-09 09:41:18 -08:00
sys_m68k.c
time.c [PATCH] Consolidate default sched_clock() 2007-02-11 10:51:28 -08:00
traps.c [PATCH] M68K: user ARRAY_SIZE macro when appropriate 2007-02-11 10:51:20 -08:00
vmlinux-std.lds [PATCH] disable init/initramfs.c: architectures 2007-02-11 10:51:25 -08:00
vmlinux-sun3.lds [PATCH] disable init/initramfs.c: architectures 2007-02-11 10:51:25 -08:00
vmlinux.lds.S