[PATCH 05/10] via-cuda: Fix re-initialization of reply_ptr and reading_reply

2016-11-30 Thread Finn Thain
depends on the TREQ input. Fix this by re-initializing reply_ptr and reading_reply as soon as they are known to be invalid. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-cuda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh

[PATCH 08/10] via-cuda: Initialize data_index early and increment consistently

2016-11-30 Thread Finn Thain
vious what the data_index variable does. Moreover, the actual value of data_index when examined at any given moment tells me something about prior events, which did prove helpful. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-cuda.c | 6 +++--- 1 file changed, 3 in

[PATCH 09/10] via-cuda: Add support for Egret system controller

2016-11-30 Thread Finn Thain
. Accomodating these differences complicates the Cuda driver slightly but avoids a lot of duplication (see next patch). Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-cuda.c | 155 +-- 1 file changed, 134 insertions(+), 21

[PATCH RESEND 00/10] Replace via-maciisi with via-cuda driver

2016-12-31 Thread Finn Thain
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

[PATCH RESEND 04/10] via-cuda: Prevent read buffer overflow

2016-12-31 Thread Finn Thain
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 +++

[PATCH RESEND 02/10] via-cuda: Remove redundant temporary variable

2016-12-31 Thread Finn Thain
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

[PATCH RESEND 03/10] via-cuda: Add TREQ, TIP and TACK signal helpers

2016-12-31 Thread Finn Thain
e is no need to store pin directions in the 'status' variable. That was only useful for debugging messages. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-cuda.c | 76 ++-- 1 file changed, 53 insertions(+), 23 deletions

[PATCH RESEND 01/10] via-cuda: Cleanup printk calls

2016-12-31 Thread Finn Thain
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

[PATCH RESEND 06/10] via-cuda: Avoid TREQ race condition

2016-12-31 Thread Finn Thain
by calling cuda_start() first and then confirming that it succeeded. If not, test the current TREQ value before entering the 'reading' state. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-cuda.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-)

[PATCH RESEND 08/10] via-cuda: Initialize data_index early and increment consistently

2016-12-31 Thread Finn Thain
vious what the data_index variable does. Moreover, the actual value of data_index when examined at any given moment tells me something about prior events, which did prove helpful. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-cuda.c | 6 +++--- 1 file changed, 3 in

[PATCH RESEND 05/10] via-cuda: Fix re-initialization of reply_ptr and reading_reply

2016-12-31 Thread Finn Thain
input. Fix this by re-initializing reply_ptr and reading_reply as soon as they are known to be invalid. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-cuda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/via-cuda.c b

[PATCH RESEND 07/10] via-cuda: Use spinlock_irq_save/restore instead of enable/disable_irq

2016-12-31 Thread Finn Thain
ss of whether it is invoked normally or from cuda_poll(). This driver was written back when local irqs remained enabled during execution of interrupt handlers and cuda_poll() was probably trying to achieve the same effect by use of enable/disable_irq. Tested-by: Stan Johnson Signed-off-by: Finn

[PATCH RESEND 09/10] via-cuda: Add support for Egret system controller

2016-12-31 Thread Finn Thain
. Accomodating these differences complicates the Cuda driver slightly but avoids a lot of duplication (see next patch). Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/macintosh/via-cuda.c | 155 +-- 1 file changed, 134 insertions(+), 21

[PATCH RESEND 10/10] m68k/mac: Replace via-maciisi driver with via-cuda driver

2016-12-31 Thread Finn Thain
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

Re: [PATCH RESEND 10/10] m68k/mac: Replace via-maciisi driver with via-cuda driver

2017-01-02 Thread Finn Thain
On Mon, 2 Jan 2017, Geert Uytterhoeven wrote: > Hi Finn, Ben, > > On Sun, Jan 1, 2017 at 1:56 AM, Finn Thain > wrote: > > 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 &g

[PATCH] macintosh/via-pmu68k: Initialize PMU driver with setup_arch and arch_initcall

2018-01-27 Thread Finn Thain
... arch_initcall via_pmu_start Bring via-pmu68k.c into line with via-pmu.c to fix this issue. Cc: Geert Uytterhoeven Tested-by: Stan Johnson Signed-off-by: Finn Thain --- arch/m68k/mac/config.c | 4 ++ drivers/macintosh/via-pmu68k.c | 89 +- 2

[PATCH] macintosh/adb: Use C99 initializers for struct adb_driver instances

2018-03-12 Thread Finn Thain
Hopefully this will make it easier for the next reader who needs to check these pointers. No change to object files. Cc: Benjamin Herrenschmidt Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c| 14 +++--- drivers/macintosh/macio-adb.c | 15 +++ drivers

[PATCH] macintosh/adb: Use C99 initializers for struct adb_driver instances

2018-03-28 Thread Finn Thain
No change to object files. Cc: Benjamin Herrenschmidt Signed-off-by: Finn Thain --- drivers/macintosh/adb-iop.c| 14 +++--- drivers/macintosh/macio-adb.c | 15 +++ drivers/macintosh/via-macii.c | 14 +++--- drivers/macintosh/via-pmu.c| 14

[PATCH 09/12] block/swim: Rename macros to avoid inconsistent inverted logic

2018-03-31 Thread Finn Thain
Vivier Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Cc: Jens Axboe Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/block/swim.c | 8 drivers/block/swim3.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/block/swim.c b/drivers/bl

[PATCH v2 07/10] block/swim: Rename macros to avoid inconsistent inverted logic

2018-04-11 Thread Finn Thain
Vivier Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org Cc: Jens Axboe Cc: sta...@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier --- drivers/block/swim.c | 8 drivers/block/swim3.c | 6 +++--- 2 files changed, 7 insert

[PATCH] powerpc: Fix "integer constant is too large" build failure

2018-05-12 Thread Finn Thain
;t fit. Fix the errors with a 'ULL' suffix on the relevant constants. Fixes: 2c979c489fee ("powerpc/lib/sstep: Add prty instruction emulation") Fixes: dcbd19b48d31 ("powerpc/lib/sstep: Add popcnt instruction emulation") Signed-off-by: Finn Thain --- This chang

[PATCH RESEND] powerpc/lib: Fix "integer constant is too large" build failure

2018-05-17 Thread Finn Thain
;t fit. Fix the errors with a 'ULL' suffix on the relevant constants. Fixes: 2c979c489fee ("powerpc/lib/sstep: Add prty instruction emulation") Fixes: dcbd19b48d31 ("powerpc/lib/sstep: Add popcnt instruction emulation") Signed-off-by: Finn Thain --- This change was com

Re: [PATCH 1/2] m68k: Set default dma mask for platform devices

2018-05-18 Thread Finn Thain
On Fri, 18 May 2018, Christoph Hellwig wrote: > > This implementation of arch_setup_pdev_archdata() differs from the > > powerpc one, in that this one avoids clobbering a device dma mask > > which has already been initialized. > > I think your implementation should move into the generic impleme

<    1   2   3   4   5   6