android_kernel_xiaomi_sm7250/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 [PATCH] m68k/Apollo: Remove obsolete arch/m68k/apollo/dma.c 2006-10-09 14:54:46 -07:00
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 [PATCH] M68k: Mark Sun-3 NCR5380 SCSI broken 2005-06-12 20:43:22 -07:00
fpsp040 [PATCH] Add wording to m68k .S files to help clarify license info 2006-02-11 21:41:11 -08:00
hp300 IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
ifpsp060 [PATCH] m68k: convert thread flags to use bit fields 2005-11-13 18:14:14 -08:00
kernel m68k: Mac II ADB fixes 2007-05-04 17:59:07 -07:00
lib [NET]: M68K checksum annotations and cleanups. 2006-12-02 21:23:07 -08:00
mac m68k: Mac IRQ cleanup 2007-05-04 17:59:07 -07:00
math-emu Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mm [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
mvme16x [PATCH] mark struct file_operations const 2 2007-02-12 09:48:44 -08:00
mvme147 IRQ: Use the new typedef for interrupt handler function pointers 2006-10-09 12:19:47 +01:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
defconfig [PATCH] M68k: Update defconfigs 2005-06-12 20:43:21 -07:00
Kconfig m68k: Atari keyboard and mouse support. 2007-05-04 17:59:05 -07:00
Kconfig.debug Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile m68k: CROSS_COMPILE = m68k-linux-gnu- 2007-05-04 17:59:05 -07:00