2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 20:53:53 +08:00
linux-next/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 [PATCH] m68k: namespace pollution fix (custom->amiga_custom) 2006-01-12 09:09:00 -08:00
bios32.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
dma.c [PATCH] m68k: dma_alloc_coherent() has gfp_t as the last argument 2006-10-06 08:53:41 -07:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup.c m68k: Mac II ADB fixes 2007-05-04 17:59:07 -07:00
signal.c [PATCH] fix incorrect SA_ONSTACK behaviour for 64-bit processes 2006-06-23 07:43:05 -07:00
sun3-head.S [PATCH] Sun3: General updates 2006-12-09 09:41:18 -08:00
sys_m68k.c [PATCH] provide kernel_execve on all architectures 2006-10-02 07:57:23 -07:00
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 Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00