This patch series has some improvements for the the Cuda driver: cleanup,
bug fixes and new functionality.
The broken via-maciisi driver is then replaced by via-cuda. This
eliminates over 600 LoC.
Thanks to Stan Johnson for testing these patches on a Mac LC III and
a PowerMac G3.
Finn Thain (10
If the Cuda driver does not enter the 'read_done' state for some
reason, it may continue in the 'reading' state until the buffer
overflows. Add a bounds check to prevent this.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
drivers/macintosh/via-cuda.c | 8 +++-
1 file changed, 7 inse
There is no possibility that current_req can change during execution of
cuda_start(). This can be confirmed by inspection: cuda_lock is always
held whenever cuda_start() is called or current_req is modified.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
drivers/macintosh/via-cuda.c | 8
Introduce some helpers for handling the signalling between VIA and
Cuda. This abstraction will be used to add support for Egret devices,
which utilize slightly different signalling.
Don't invert the sense of the Cuda's active-low signals when storing
them in the 'status' variable. Just assert, neg
Add missing log message severity, remove old debug messages and
replace printk() loop with print_hex_dump() call.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
drivers/macintosh/via-cuda.c | 26 ++
1 file changed, 6 insertions(+), 20 deletions(-)
diff --git a/dr
When a read transaction completes, one of several things will happen:
a new transfer is started by the driver, a new transfer request
is raised by the Cuda (i.e. TREQ asserted), or both happen at once.
When both happen at once, there is a race condition between the TREQ test
in the read_done state
Initialize data_index where appropriate to improve readability and
assist debugging. This change doesn't affect driver behaviour.
I prefer to see
current_req->data[data_index++]
in place of
current_req->data[0]
or
current_req->data[1]
inasmuchas it becomes obvious what the
When reading_reply is set, reply_ptr points into an adb_request struct.
Conversely, when reply_ptr instead points into the global cuda_rbuf,
reading_reply must be false.
Unfortunately, this rule can be violated because re-initialization
of reply_ptr and reading_reply presently depends on the TREQ
The cuda_start() function uses spinlock_irq_save/restore for mutual
exclusion. Let's have cuda_poll() do the same when polling the VIA
interrupt.
The benefit to disabling local irqs when the interrupt is being polled
is that the interrupt handler now has the same timing properties
regardless of wh
The Egret system controller was the predecessor to the Cuda and the
differences are minor.
On Cuda, byte acknowledgement requires one transition of the TACK
signal; on Egret two are needed. On Cuda, TIP is active low; on Egret
it is active high. And Cuda raises certain interrupts that Egret omits.
Change the device probe test in the via-cuda.c driver so it will load on
Egret-based machines too. Remove the now redundant via-maciisi.c driver.
Tested-by: Stan Johnson
Signed-off-by: Finn Thain
---
arch/m68k/include/asm/macintosh.h | 2 +-
arch/m68k/mac/config.c| 18 +-
arch/m6
11 matches
Mail list logo