1
0
Fork 0
alistair23-linux/drivers/macintosh
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
..
Kconfig [PATCH] enable mouse button 2+3 emulation for x86 macs 2007-02-09 09:25:47 -08:00
Makefile [POWERPC] Xserve cpu-meter driver 2006-12-04 20:39:30 +11:00
adb-iop.c [PATCH] m68k pt_regs fixes 2006-10-07 10:51:14 -07:00
adb.c [POWERPC] powermac: disallow pmu sleep notifiers from aborting sleep 2007-03-26 12:35:17 +10:00
adbhid.c [POWERPC] move variables in drivers/macintosh to bss 2007-02-13 15:35:52 +11:00
ans-lcd.c [POWERPC] Remove old interface find_devices 2007-04-24 22:09:02 +10:00
apm_emu.c [POWERPC] powermac: disallow pmu sleep notifiers from aborting sleep 2007-03-26 12:35:17 +10:00
mac_hid.c [POWERPC] Unexport mac_hid_mouse_emulate_buttons 2007-03-08 15:43:26 +11:00
macio-adb.c [POWERPC] Remove find_compatible_devices 2007-04-24 22:08:57 +10:00
macio_asic.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
macio_sysfs.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
mediabay.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
nvram.c [PATCH] mark struct file_operations const 4 2007-02-12 09:48:45 -08:00
rack-meter.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
smu.c Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
therm_adt746x.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
therm_pm72.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
therm_pm72.h [POWERPC] Xserve G5 thermal control fixes 2006-07-28 10:42:49 +10:00
therm_windtunnel.c i2c: Make i2c_del_driver a void function 2007-05-01 23:26:32 +02:00
via-cuda.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
via-macii.c m68k: Mac II ADB fixes 2007-05-04 17:59:07 -07:00
via-maciisi.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
via-pmu-backlight.c backlight: Separate backlight properties from backlight ops pointers 2007-02-20 09:26:53 +00:00
via-pmu-event.c Input: via-pmu - add input device support 2006-06-26 01:49:55 -04:00
via-pmu-event.h Input: via-pmu - add input device support 2006-06-26 01:49:55 -04:00
via-pmu-led.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
via-pmu.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
via-pmu68k.c m68k: pmu_queue_request() declaration conflict 2007-05-04 17:59:06 -07:00
windfarm.h [PATCH] powerpc: Thermal control for dual core G5s 2006-02-07 22:05:14 -08:00
windfarm_core.c [POWERPC] windfarm: don't die on suspend thread signal 2007-02-08 16:08:39 +11:00
windfarm_cpufreq_clamp.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
windfarm_lm75_sensor.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
windfarm_max6690_sensor.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
windfarm_pid.c [PATCH] windfarm license fix 2006-03-06 18:40:45 -08:00
windfarm_pid.h [PATCH] powerpc: Thermal control for dual core G5s 2006-02-07 22:05:14 -08:00
windfarm_pm81.c [PATCH] powerpc: windfarm shall request it's sub modules 2006-11-15 19:57:12 -08:00
windfarm_pm91.c [PATCH] powerpc: windfarm shall request it's sub modules 2006-11-15 19:57:12 -08:00
windfarm_pm112.c [PATCH] powerpc: windfarm shall request it's sub modules 2006-11-15 19:57:12 -08:00
windfarm_smu_controls.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
windfarm_smu_sat.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00
windfarm_smu_sensors.c [POWERPC] Rename get_property to of_get_property: partial drivers 2007-04-27 15:51:56 +10:00