1
0
Fork 0
alistair23-linux/arch
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
..
alpha [STRING]: Move strcasecmp/strncasecmp to lib/string.c 2007-04-26 01:54:39 -07:00
arm power management: implement pm_ops.valid for everybody 2007-04-30 16:40:40 -07:00
arm26 [PATCH] arch/arm26/kernel/entry.S: remove dead code 2007-03-01 14:53:35 -08:00
avr32 AVR32: Remove useless config option "GENERIC_BUST_SPINLOCK". 2007-04-27 13:45:26 +02:00
cris [PATCH] MSI-X: fix resume crash 2007-03-28 13:59:37 -07:00
frv [PATCH] MSI-X: fix resume crash 2007-03-28 13:59:37 -07:00
h8300 [PATCH] Declare init_irq_proc before we use it. 2007-02-19 14:21:50 -08:00
i386 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq 2007-05-04 17:38:48 -07:00
ia64 [AF_RXRPC/AFS]: Arch-specific fixes. 2007-04-27 15:28:45 -07:00
m32r Various typo fixes. 2007-02-17 19:07:33 +01:00
m68k m68k: Mac II ADB fixes 2007-05-04 17:59:07 -07:00
m68knommu [PATCH] m68knommu: remove local_bh_count 2007-03-06 18:08:38 -08:00
mips MIPSnet: Modernize use platform_device API. 2007-04-28 11:01:01 -04:00
parisc libata/IDE: remove combined mode quirk 2007-04-28 14:15:59 -04:00
powerpc i2c: Cleanup the includes of <linux/i2c.h> 2007-05-01 23:26:29 +02:00
ppc Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
s390 [S390] add hardware capability support (ELF_HWCAP). 2007-05-04 18:48:35 +02:00
sh power management: implement pm_ops.valid for everybody 2007-04-30 16:40:40 -07:00
sh64 [PATCH] sysctl: remove insert_at_head from register_sysctl 2007-02-14 08:09:59 -08:00
sparc [SPARC]: device_node name constification fallout 2007-04-26 01:55:45 -07:00
sparc64 [SPARC64]: Convert PCI over to generic struct iommu/strbuf. 2007-04-26 21:08:21 -07:00
um [SK_BUFF]: Introduce skb_mac_header() 2007-04-25 22:24:41 -07:00
v850 kbuild: Replace remaining "depends" with "depends on" 2007-02-17 19:05:24 +01:00
x86_64 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq 2007-05-04 17:38:48 -07:00
xtensa Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-04-27 09:29:04 -07:00