[PATCH v3 04/12] scsi/ncr5380: Simplify register polling limit

2016-10-09 Thread Finn Thain
IN and DATA OUT). Some cards support only PIO transfers (even for DATA phases). CPU cycles are scarce on some of these systems, so a small improvement here makes a big difference. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> Reviewed-by: Hannes Reinecke <h...@suse.com> Teste

[PATCH v3 06/12] scsi/ncr5380: Improve hostdata struct member alignment and cache-ability

2016-10-09 Thread Finn Thain
Re-order struct members so that hot data lies at the beginning of the struct and cold data at the end. Improve the comments while we're here. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> Reviewed-by: Hannes Reinecke <h...@suse.com> Tested-by: Ondrej Zary <li...@rainb

[PATCH v3 03/12] scsi/atari_scsi: Make device register accessors re-entrant

2016-10-09 Thread Finn Thain
This patch fixes an old bug: accesses to device registers from the interrupt handler (after reselection, DMA completion etc.) could mess up a device register access elsewhere, if the latter takes place outside of an irq lock (during selection etc.). Signed-off-by: Finn Thain <

[PATCH v3 10/12] scsi/ncr5380: Expedite register polling

2016-10-09 Thread Finn Thain
Avoid the call to NCR5380_poll_politely2() when possible. The call is easily short-circuited on the PIO fast path, using the inline wrapper. This requires that the NCR5380_read macro be made available before any #include "NCR5380.h" so a few declarations have to be moved too. Signed-of

[PATCH v3 01/12] scsi/g_NCR5380: Merge g_NCR5380 and g_NCR5380_mmio drivers

2016-10-09 Thread Finn Thain
From: Ondrej Zary <li...@rainbow-software.org> Merge the port-mapped IO and memory-mapped IO support (with the help of ioport_map) into the g_NCR5380 module and delete g_NCR5380_mmio. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> Signed-off-by: Finn Thain <fth...@tele

[PATCH v3 00/12] Fixes, cleanup and g_NCR5380_mmio/g_NCR5380 merger

2016-10-09 Thread Finn Thain
and Michael tested atari_scsi. The other drivers have been compile-tested. Changes since v1: - rebased on 4.9/scsi-queue - added reviewed-by tags - tweaked the order of struct members in patch 7/12 Changes since v2: - added tested-by tags - fixed typo in log message for patch 3/12 Finn Thain (12

[PATCH v3 08/12] scsi/ncr5380: Use correct types for device register accessors

2016-10-09 Thread Finn Thain
to the board-specific routines instead of the Scsi_Host pointer. The board-specific code is concerned with hardware and not with SCSI protocol or the mid-layer. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> Reviewed-by: Hannes Reinecke <h...@suse.com> Tested-by: Ondrej Zary &l

[PATCH v3 02/12] scsi/cumana_1: Remove unused cumanascsi_setup() function

2016-10-09 Thread Finn Thain
Signed-off-by: Finn Thain <fth...@telegraphics.com.au> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/scsi/arm/cumana_1.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c index 8e9cfe8..f616756 100644 --- a/driv

Re: [GIT PULL] final round of SCSI updates for the 4.8+ merge window

2016-10-14 Thread Finn Thain
On Fri, 14 Oct 2016, James Bottomley wrote: > This is just a set of minor updates and fixes which weren't quite ready > in time for the first pull request. The only real thing of note is > Mike Christie is stepping down as Maintainer of iscsi to be replaced by > Lee Duncan and Chris Leech. > >

Re: [PATCH] scsi: g_NCR5380: add HAS_IOPORT_MAP dependency

2016-10-18 Thread Finn Thain
nstprop.0+0x388): undefined > reference to `ioport_map' > > This adds a Kconfig dependency. > > Fixes: 04c40f82ccc5 ("scsi: g_NCR5380: Merge g_NCR5380 and g_NCR5380_mmio > drivers") > Signed-off-by: Arnd Bergmann <a...@arndb.de> Acked-by: Finn Thain <fth...@

Re: [PATCH] scsi: dmx3191d: use module_pci_driver

2016-11-16 Thread Finn Thain
On Wed, 16 Nov 2016, Geliang Tang wrote: > Use module_pci_driver() helper to simplify the code. > > Signed-off-by: Geliang Tang <geliangt...@gmail.com> Acked-by: Finn Thain <fth...@telegraphics.com.au> > --- > drivers/scsi/dmx3191d.c | 13 + > 1 fi

Re: [PATCH 2/3] g_NCR5380: Test the IRQ before accepting it

2016-10-30 Thread Finn Thain
On Sun, 30 Oct 2016, Ondrej Zary wrote: > Trigger an IRQ first with a test IRQ handler to find out if it really > works. Disable the IRQ if not. > > This prevents hang when incorrect IRQ was specified by user. > > Signed-off-by: Ondrej Zary > --- >

Re: [PATCH 3/3] NCR5380: Check for chip presence in NCR5380_init()

2016-10-30 Thread Finn Thain
On Sun, 30 Oct 2016, Ondrej Zary wrote: > Read back MODE_REG after writing it in NCR5380_init() to check if the > chip is really there. > > This prevents hang when incorrect I/O address was specified by user. > > Signed-off-by: Ondrej Zary > --- >

Re: [PATCH 1/3] NCR5380: Use probe_irq_*() for IRQ probing

2016-10-30 Thread Finn Thain
On Sun, 30 Oct 2016, Ondrej Zary wrote: > Use standard probe_irq_on() and probe_irq_off() functions instead of own > implementation. Thanks for doing this. > This prevents warning messages like this in the kernel log: > genirq: Flags mismatch irq 1. (NCR-probe) vs. 0080 (i8042) >

Re: [PATCH 2/3] g_NCR5380: Test the IRQ before accepting it

2016-10-31 Thread Finn Thain
On Mon, 31 Oct 2016, Ondrej Zary wrote: > On Monday 31 October 2016, Finn Thain wrote: > > On Sun, 30 Oct 2016, Ondrej Zary wrote: > > > Trigger an IRQ first with a test IRQ handler to find out if it really > > > works. Disable the IRQ if not. > > > > &g

Re: [PATCH 3/3] NCR5380: Check for chip presence in NCR5380_init()

2016-10-31 Thread Finn Thain
On Mon, 31 Oct 2016, Ondrej Zary wrote: > On Monday 31 October 2016, Finn Thain wrote: > > On Sun, 30 Oct 2016, Ondrej Zary wrote: > > > Read back MODE_REG after writing it in NCR5380_init() to check if the > > > chip is really there. > > > > > >

Re: [PATCH 3/3] NCR5380: Check for chip presence in NCR5380_init()

2016-10-30 Thread Finn Thain
On Sun, 30 Oct 2016, Ondrej Zary wrote: > Read back MODE_REG after writing it in NCR5380_init() to check if the > chip is really there. > > This prevents hang when incorrect I/O address was specified by user. Do you know whereabouts in the driver the hang happens? Maybe there is a robustness

Re: [PATCH 1/3] NCR5380: Use probe_irq_*() for IRQ probing

2016-10-31 Thread Finn Thain
On Mon, 31 Oct 2016, Ondrej Zary wrote: > On Monday 31 October 2016, Finn Thain wrote: > > On Sun, 30 Oct 2016, Ondrej Zary wrote: > > > Use standard probe_irq_on() and probe_irq_off() functions instead of own > > > implementation. > > > > Thanks for doin

Re: [PATCH 2/6] g_NCR5380: Test the IRQ before accepting it

2016-11-02 Thread Finn Thain
On Wed, 2 Nov 2016, Ondrej Zary wrote: > On Wednesday 02 November 2016 08:45:26 Finn Thain wrote: > > On Mon, 31 Oct 2016, Ondrej Zary wrote: > > > Trigger an IRQ first with a test IRQ handler to find out if it > > > really works. Disable the IRQ if not. > >

Re: [PATCH 1/6] NCR5380: Use probe_irq_*() for IRQ probing

2016-11-02 Thread Finn Thain
On Wed, 2 Nov 2016, Ondrej Zary wrote: > On Wednesday 02 November 2016, Finn Thain wrote: > > On Mon, 31 Oct 2016, Ondrej Zary wrote: > > > > > + NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); > > > + NCR5380_write(OUTPUT_DATA_REG, hostd

Re: [PATCH 4/6] g_NCR5380: Add IRQ auto-configuration for HP C2502

2016-11-02 Thread Finn Thain
On Wed, 2 Nov 2016, Ondrej Zary wrote: > > Also, you've ignored the irq module parameters. From the user's point > > of view, surely the least surprising thing is to attempt to configure > > the card for whatever irq the user asked for. > > I haven't. NCR5380_find_irq is only called when irq

Re: [PATCH 4/6] g_NCR5380: Add IRQ auto-configuration for HP C2502

2016-11-03 Thread Finn Thain
On Thu, 3 Nov 2016, Ondrej Zary wrote: > On Thursday 03 November 2016, Finn Thain wrote: > > On Wed, 2 Nov 2016, Ondrej Zary wrote: > > > > > > The card is almost Plug The base address is already configured > > > automatically by the driver so doing the s

Re: [PATCH 2/6] g_NCR5380: Test the IRQ before accepting it

2016-11-02 Thread Finn Thain
On Mon, 31 Oct 2016, Ondrej Zary wrote: > Trigger an IRQ first with a test IRQ handler to find out if it really > works. Disable the IRQ if not. > > This prevents hang when incorrect IRQ was specified by user. > Once again, how does it cause a hang? If the user specifies an IRQ, we should

Re: [PATCH 3/6] g_NCR5380: Check for chip presence before calling NCR5380_init()

2016-11-02 Thread Finn Thain
On Mon, 31 Oct 2016, Ondrej Zary wrote: > Write and read back MODE_REG to check if the chip is really there > before doing more initialization. > > This prevents hang when incorrect I/O address was specified by user (in > the most common case where no device is present there so all reads >

Re: [PATCH 4/6] g_NCR5380: Add IRQ auto-configuration for HP C2502

2016-11-02 Thread Finn Thain
On Mon, 31 Oct 2016, Ondrej Zary wrote: > Find free and working IRQ automatically on HP C2502 cards. > Also allow IRQ 9 to work (aliases to IRQ 2 on the card). > > Signed-off-by: Ondrej Zary > --- > drivers/scsi/g_NCR5380.c | 29 +++-- > 1

Re: [PATCH 5/6] g_NCR5380: Autoprobe IRQ by default

2016-11-02 Thread Finn Thain
On Mon, 31 Oct 2016, Ondrej Zary wrote: > IRQ probing seems to work fine now. Default to autoprobe for IRQ instead > of disabling it. > > Signed-off-by: Ondrej Zary > --- > drivers/scsi/g_NCR5380.c |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

Re: [PATCH 1/6] NCR5380: Use probe_irq_*() for IRQ probing

2016-11-02 Thread Finn Thain
On Mon, 31 Oct 2016, Ondrej Zary wrote: > Use standard probe_irq_on() and probe_irq_off() functions instead of own > implementation. This prevents warning messages like this in the kernel > log: genirq: Flags mismatch irq 1. (NCR-probe) vs. 0080 > (i8042) > > Move the IRQ

Re: [PATCH 6/6] g_NCR5380: Fix release region in error handling

2016-11-02 Thread Finn Thain
ssigning base earlier. > > Signed-off-by: Ondrej Zary <li...@rainbow-software.org> This fix is not related to the others in this series. It could go at the beginning where it is easy to cherry-pick. Fixes: a8cfbcaec0c1 ("scsi: g_NCR5380: Stop using scsi_module.c") Acked

Re: [PATCH] scsi: NCR5380: no longer mark irq probing as __init

2016-10-11 Thread Finn Thain
Acked-by: Finn Thain <fth...@telegraphics.com.au> Thanks. On Tue, 11 Oct 2016, Arnd Bergmann wrote: > The g_NCR5380 has been converted to more regular probing, which > means its probe function can now be invoked after the __init section > is discarded, as pointed out by this

Re: [PATCH] scsi: NCR5380: no longer mark irq probing as __init

2016-10-11 Thread Finn Thain
On Tue, 11 Oct 2016, Ondrej Zary wrote: > > I've tested IRQ probing on my IRQ7-hardwired ISA card without any > success some time ago. No IRQ was detected because it wasn't even > generated (no increment in /proc/interruptts). The IRQ line does not appear in /proc/interrupts unless it has

Re: [PATCH v3 10/12] scsi/ncr5380: Expedite register polling

2016-10-10 Thread Finn Thain
On Mon, 10 Oct 2016, Russell King - ARM Linux wrote: > On Mon, Oct 10, 2016 at 12:46:53AM -0400, Finn Thain wrote: > > Avoid the call to NCR5380_poll_politely2() when possible. The call is > > easily short-circuited on the PIO fast path, using the inline wrapper. &g

Re: [PATCH 06/22] m68k/coldfire: Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > - Introduce helpers for printing debug messages, incl. dummies for > validating format strings when debugging is disabled, > - Convert from printk() to pr_*(), > - Correct printf()-style format specifiers, > - Drop superfluous casts, >

Re: [PATCH 08/22] m68k/mac: iop - Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > - Introduce helpers for printing debug messages, incl. dummies for > validating format strings when debugging is disabled, > - Convert from printk() to pr_*(), > - Add missing continuations, > - Drop superfluous casts. > >

Re: [PATCH 02/22] m68k/mac: macints - Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > - Introduce helpers for printing debug messages, incl. dummies for > validating format strings when debugging is disabled, > - Convert from printk() to pr_*(), > - Add missing continuations, to fix user-visible breakage. > > Fixes:

Re: [PATCH 10/22] m68k/mac: psc - Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > - Introduce helpers for printing debug messages, incl. dummies for > validating format strings when debugging is disabled, > - Convert from printk() to pr_*(), > - Add missing continuations, > - Drop superfluous casts. > >

Re: [PATCH 07/22] m68k/mac: baboon - Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > - Introduce helpers for printing debug messages, incl. dummies for > validating format strings when debugging is disabled, > - Convert from printk() to pr_*(), > - Drop superfluous casts. > > Signed-off-by: Geert Uytterhoeven

Re: [PATCH 09/22] m68k/mac: oss - Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > Convert from printk() to pr_*(). > > - Introduce helpers for printing debug messages, incl. dummies for > validating format strings when debugging is disabled, > - Convert from printk() to pr_*(), > - Drop superfluous casts, > - Add

Re: [PATCH 01/22] m68k/atari: Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > - Convert from printk() to pr_*(), > - Add missing continuations, to fix user-visible breakage, > - Drop useless WARNING prefix, > - Move trailing spaces to start of continuations. > > Fixes: 4bcc595ccd80decb ("printk: reinstate KERN_CONT

Re: [PATCH 03/22] m68k/mac: via - Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > - Introduce helpers for printing debug messages, incl. dummies for > validating format strings when debugging is disabled, > - Convert from printk() to pr_*(), > - Add missing continuations, to fix user-visible breakage, > - Drop

Re: [PATCH 01/22] m68k/atari: Modernize printing of kernel messages

2016-12-08 Thread Finn Thain
On Thu, 8 Dec 2016, Geert Uytterhoeven wrote: > On Wed, Dec 7, 2016 at 11:36 PM, Finn Thain <fth...@telegraphics.com.au> > wrote: > > On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > >> - Convert from printk() to pr_*(), > >> - Add missing continu

Re: [PATCH 0/4] g_NCR5380: Bug fix and some enhancements

2016-12-08 Thread Finn Thain
On Thu, 8 Dec 2016, Ondrej Zary wrote: > On Monday 05 December 2016 07:07:19 Finn Thain wrote: > > This patch series is based on the one submitted recently by Ondrej > > Zary. > > > > This version has a different irq probing fix for HP C2502 boards and a > > m

Re: [PATCH 18/22] m68k/mm: kmap - Modernize printing of kernel messages

2016-12-09 Thread Finn Thain
On Thu, 8 Dec 2016, I wrote: > > On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > > > - Convert from printk() to pr_*(), > > - Add missing continuations, > > - Remove #undef DEBUG. > > > > Note that "#ifdef DEBUG" is sometimes retained because pr_cont() is > > not optimized away when

Re: [PATCH 11/22] m68k/mac: Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > Convert from printk() to pr_*(). > > Signed-off-by: Geert Uytterhoeven > --- > arch/m68k/mac/config.c | 34 -- > arch/m68k/mac/misc.c | 8 > 2 files changed, 20 insertions(+), 22

Re: [PATCH 18/22] m68k/mm: kmap - Modernize printing of kernel messages

2016-12-07 Thread Finn Thain
On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > - Convert from printk() to pr_*(), > - Add missing continuations, > - Remove #undef DEBUG. > > Note that "#ifdef DEBUG" is sometimes retained because pr_cont() is not > optimized away when debugging is disabled. > I think that argues for

Re: [PATCH 02/22] m68k/mac: macints - Modernize printing of kernel messages

2016-12-08 Thread Finn Thain
On Thu, 8 Dec 2016, Geert Uytterhoeven wrote: > On Wed, Dec 7, 2016 at 11:45 PM, Finn Thain <fth...@telegraphics.com.au> > wrote: > > On Wed, 7 Dec 2016, Geert Uytterhoeven wrote: > > > >> - Introduce helpers for printing debug messages, incl. dummies for &

Re: [PATCH 0/3] ata: add m68k/Atari Falcon PATA support

2017-01-12 Thread Finn Thain
On Wed, 11 Jan 2017, Michael Schmitz wrote: > What is still correct is that the IDE driver does use the interrupt > only, not the ST-DMA chip. And a single IDE interrupt can be correctly > assigned to IDE by looking at the status register. > > With the SCSI (and IIRC also floppy) interrupts,

Re: [PATCH 27/39] Annotate hardware config module parameters in drivers/scsi/

2016-12-01 Thread Finn Thain
ed-off-by: David Howells <dhowe...@redhat.com> > cc: "Juergen E. Fischer" <fisc...@norbit.de> > cc: "James E.J. Bottomley" <j...@linux.vnet.ibm.com> > cc: "Martin K. Petersen" <martin.peter...@oracle.com> > cc: Dario Ballabio <balla

Re: [PATCH 5/6] g_NCR5380: Autoprobe IRQ by default

2016-12-02 Thread Finn Thain
Hi Ondrej, On Wed, 2 Nov 2016, I wrote: > > I think this patch is incomplete and you should add these changes: > > diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c > index 7299ad9..0bf0322 100644 > --- a/drivers/scsi/g_NCR5380.c > +++ b/drivers/scsi/g_NCR5380.c > @@ -44,7

[PATCH 0/4] g_NCR5380: Bug fix and some enhancements

2016-12-04 Thread Finn Thain
This patch series is based on the one submitted recently by Ondrej Zary. This version has a different irq probing fix for HP C2502 boards and a more comprehensive patch to change the default irq parameter. It needs testing on actual ISA hardware. Finn Thain (4): g_NCR5380: Check for chip

[PATCH 3/4] g_NCR5380: Fix automatic IRQ on HP C2502 cards

2016-12-04 Thread Finn Thain
;li...@rainbow-software.org> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/scsi/g_NCR5380.c | 70 +++- 1 file changed, 57 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c i

[PATCH 4/4] g_NCR5380: Autoprobe board IRQ by default

2016-12-04 Thread Finn Thain
Automatically probe the board irq when no irq parameter is provided, to simulate PnP. The old default behaviour was to disable the irq. Update driver documentation accordingly and add some printk messages to make this behaviour visible. Signed-off-by: Finn Thain <fth...@telegraphics.com

[PATCH 1/4] g_NCR5380: Check for chip presence before calling NCR5380_init()

2016-12-04 Thread Finn Thain
From: Ondrej Zary <li...@rainbow-software.org> Write and read back mode register to check that a chip is really there. If no card is present, reads result in 0xff. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> Signed-off-by: Finn Thain <fth...@telegraphics.com.au>

[PATCH 2/4] g_NCR5380: Use probe_irq_*() for IRQ probing

2016-12-04 Thread Finn Thain
r code from NCR5380 to g_NCR5380 where it is used. Also clear interrupt flag before and after the probe. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/scs

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

2016-11-30 Thread Finn Thain
directions in the 'status' variable. That was only useful for debugging messages. Tested-by: Stan Johnson <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-cuda.c | 76 ++-- 1 file changed, 5

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

2016-11-30 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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- arch/m68k/include/asm/macin

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

2016-11-30 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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drive

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

2016-11-30 Thread Finn Thain
Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- I wondered whether the use of enable/disable_irq was an attempt to reduce interrupt latency given that VIA register accesses are slow. But if the interrupt has not yet fired, only one VIA access will take place, which imposes negl

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

2016-11-30 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 <user...@yahoo.com> Signed-off-by: Finn Thai

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

2016-11-30 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 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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-

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

2016-11-30 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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-cuda.c | 26 ++ 1 fil

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

2016-11-30 Thread Finn Thain
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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-cuda.c | 7 +++ 1 fil

[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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-cuda.c | 4 ++-- 1 file changed,

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

2016-11-30 Thread Finn Thain
ious 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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers

[PATCH 2/3] m68k/mac: Remove SHUTUP_SONIC interrupt hack

2017-01-02 Thread Finn Thain
the odds for a few models, but so does setting CONFIG_MAC_SONIC=y. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> Reviewed-by: Laurent Vivier <laur...@vivier.eu> --- arch/m68k/mac/macints.c | 12 1 file changed, 12 deletions(-) diff --git a/arch/m68k/mac/macints.c

[PATCH 0/3] Remove interrupt debug code

2017-01-02 Thread Finn Thain
This patch series removes some interrupt debug code: printk statements, associated macros, dead code, etc. Finn Thain (3): m68k/mac: Improve NMI handler m68k/mac: Remove SHUTUP_SONIC interrupt hack m68k/mac: Clean up interrupt debug macros and printk statements arch/m68k/include/asm

[PATCH 1/3] m68k/mac: Improve NMI handler

2017-01-02 Thread Finn Thain
mac_nmi_handler() is useless in its present form and locks up my PowerBook 180. Let's throw out the dead code and make it do something useful: print a register dump and a stack trace. mac_debug_handler() is also dead code. Remove it along with its static data. Signed-off-by: Finn Thain <

[PATCH 3/3] m68k/mac: Clean up interrupt debug macros and printk statements

2017-01-02 Thread Finn Thain
Mac interrupt code has been debugged. The Penguin deficiencies that still cause unhandled interrupts aren't fixable here. Besides, interrupts are fast and frequent and these printk statements were never really useful IMO. Remove them. Signed-off-by: Finn Thain <fth...@telegraphics.com

[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 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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-

[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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- arch/m68k/include/asm/macin

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

2016-12-31 Thread Finn Thain
Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- I wondered whether the use of enable/disable_irq was an attempt to reduce interrupt latency given that VIA register accesses are slow. But if the interrupt has not yet fired, only one VIA access will take place, which imposes neglible la

[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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-cuda.c | 4 ++-- 1 file changed, 2 insertions(+),

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

2016-12-31 Thread Finn Thain
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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-cuda.c | 7 +++ 1 file changed,

[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 <user...@yahoo.com> Signed-off-by: Finn Thai

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

2016-12-31 Thread Finn Thain
ious 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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers

[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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drive

[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 <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-cuda.c | 26 ++ 1 fil

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

2016-12-31 Thread Finn Thain
directions in the 'status' variable. That was only useful for debugging messages. Tested-by: Stan Johnson <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/macintosh/via-cuda.c | 76 ++-- 1 file changed, 5

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 <fth...@telegraphics.com.au> > wrote: > > Change the device probe test in the via-cuda.c driver so it will load > > on Egret-based machines too. Remove t

Re: [PATCH 1/3] m68k/mac: Improve NMI handler

2017-01-02 Thread Finn Thain
On Mon, 2 Jan 2017, Geert Uytterhoeven wrote: > > > > -/* > > - * console_loglevel determines NMI handler function > > - */ > > +extern void show_registers(struct pt_regs *); > > Seems like we do have a declaration in ... . > Yes, and it would have to be moved outside of the #ifdef

Re: [PATCH 0/3] ata: add m68k/Atari Falcon PATA support

2017-01-14 Thread Finn Thain
On Sat, 14 Jan 2017, Michael Schmitz wrote: > Am 13.01.2017 um 15:33 schrieb Finn Thain: > > >> The case I'm worried about is both IDE and SCSI raising an interrupt. > >> We don't currently mask the IDE/ST-DMA interrupt so a stacked > >> interrupt m

Re: [PATCH 0/3] ata: add m68k/Atari Falcon PATA support

2017-01-14 Thread Finn Thain
On Sun, 15 Jan 2017, Michael Schmitz wrote: > Am 15.01.2017 um 12:47 schrieb Finn Thain: > > > For the sake of discussion, I'll assume that the FDC driver will not > > be using DMA. (Perhaps FDC and SCSI can share the ST-DMA chip, using > > the present locking

[PATCH trivial] drivers: Clean up duplicated email address

2017-03-19 Thread Finn Thain
My email address may be found in the git commit logs and in MAINTAINERS. Remove duplicate addresses so they won't have to be kept up-to-date. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> diff --git a/drivers/macintosh/via-macii.c b/drivers/macintosh/via-macii.c index 3725f08..4

[PATCH] scsi/mac_esp: Replace bogus memory barrier with spinlock

2017-04-02 Thread Finn Thain
ns between comparison and assignment of esp_chips[] pointers. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/scsi/mac_esp.c | 33 +++-- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/mac_esp.c b/drivers/scsi/mac_esp

[PATCH 07/10] nubus: Clean up printk calls (from mac68k CVS)

2017-04-08 Thread Finn Thain
_board() so I finished the job. I've also added some missing message severity levels and converted a printk loop to the MAC address "%pM" format specifier. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/nubus/nubus.c | 149 ++--

[PATCH 09/10] nubus: Clean up whitespace

2017-04-08 Thread Finn Thain
Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/nubus/nubus.c | 284 -- 1 file changed, 134 insertions(+), 150 deletions(-) diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c index eac5ec2..bb81347 100644 --- a/d

[PATCH 06/10] nubus: Remove slot zero probe (from mac68k CVS)

2017-04-08 Thread Finn Thain
rivers/nubus/nubus.c?r1=1.22.2.1=1.22.2.2=linux-2_2 Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/nubus/nubus.c | 112 +++--- 1 file changed, 6 insertions(+), 106 deletions(-) diff --git a/drivers/nubus/nubus.c b/drivers/nubus/n

[PATCH 08/10] nubus: Fix pointer validation

2017-04-08 Thread Finn Thain
Fix bounds checking on slot-space pointer movement. Remove redundant test for zero byte-lanes value. Fix broken byte-lanes vs. address validation. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/nubus/nubus.c | 15 +++ 1 file changed, 7 insertions(+), 8 del

[PATCH 05/10] nubus: Fix nubus_rewinddir (from mac68k CVS)

2017-04-08 Thread Finn Thain
linux-2_2 Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/nubus/nubus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c index 3319cf1..ea9202d 100644 --- a/drivers/nubus/nubus.c +++ b/drivers/nubus/nubus.c @

[PATCH 10/10] nubus: Add MVC and VSC video card definitions

2017-04-08 Thread Finn Thain
Also move the NUBUS_DRHW_APPLE_JET definition, for numerical order. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- include/uapi/linux/nubus.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/nubus.h b/include/uapi/linux/nubus.h index 7

[PATCH 01/10] m68k/mac: IOP - Modernize printing of kernel messages

2017-04-08 Thread Finn Thain
macros, adjusted log message severity and eliminated DEBUG_IOP. -- FT] Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- arch/m68k/mac/iop.c | 74 + 1 file changed, 29 insertions(+), 45 deletions(-) diff --git a/arch/m68k/mac/iop.c

[PATCH 00/10] mac68k: Miscellaneous fixes, cleanup and modernization

2017-04-08 Thread Finn Thain
This series has various patches from several different people. Two printk modernization patches were originally from Geert Uytterhoeven and three Nubus patches were originally committed to the Linux/mac68k CVS by David Huggins-Daines. Finn Thain (10): m68k/mac: IOP - Modernize printing

[PATCH 04/10] m68k/mac: Clarify IOP message alloc/free confusion

2017-04-08 Thread Finn Thain
The alloc/free metaphor used for IOP messages is misleading and can cause mistakes like the pointless msg2 temporary variable. Use a more meaningful name to help simplify the code. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- arch/m68k/mac/iop.c | 19 ++-

[PATCH 02/10] m68k/mac: Modernize printing of kernel messages

2017-04-08 Thread Finn Thain
From: Geert Uytterhoeven <ge...@linux-m68k.org> Convert from printk() to pr_*(). [Adjusted log message severity levels and retained bootinfo log. -- FT] Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- arch/m68k/mac/config.c | 12 +--- arch/m68k/mac/m

[PATCH 03/10] m68k/mac: Adopt platform_device_register_simple()

2017-04-08 Thread Finn Thain
These changes save 1014 bytes according to scripts/bloat-o-meter. Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- arch/m68k/mac/config.c | 49 - 1 file changed, 12 insertions(+), 37 deletions(-) diff --git a/arch/m68k/mac/conf

Re: [PATCH 00/10] mac68k: Miscellaneous fixes, cleanup and modernization

2017-04-16 Thread Finn Thain
On Sun, 16 Apr 2017, Geert Uytterhoeven wrote: > Hi Finn, > > On Sun, Apr 9, 2017 at 1:51 AM, Finn Thain <fth...@telegraphics.com.au> > wrote: > > This series has various patches from several different people. Two > > printk modernization patches were orig

[PATCH 2/5] scsi/mac_esp: Fix PIO transfers for MESSAGE IN phase

2017-08-03 Thread Finn Thain
patch also improves on the weak tests for unexpected interrupts and phase changes during PIO transfers. Tested-by: Stan Johnson <user...@yahoo.com> Fixes: 02507a80b35e ("[PATCH] [SCSI] mac_esp: fix PIO mode, take 2") Signed-off-by: Finn Thain <fth...@telegraphics.com.au>

[PATCH 5/5] scsi/esp_scsi: Always clear msg_out_len after MESSAGE OUT phase

2017-08-03 Thread Finn Thain
After sending a message, always clear esp->msg_out_len. Otherwise, eh_abort_handler may subsequently fail to send an ABORT TASK SET message. Tested-by: Stan Johnson <user...@yahoo.com> Signed-off-by: Finn Thain <fth...@telegraphics.com.au> --- drivers/scsi/esp_scsi.c | 2 ++ 1

[PATCH 0/5] esp_scsi, mac_esp: Various fixes and cleanups

2017-08-03 Thread Finn Thain
This series has been tested on m68k Macs (ESP236 equivalent). Some more testing with different targets and devices (FAS236 etc) might be nice. Being that the esp_scsi fixes are on error paths, more review may actually be more valuable than more testing... Finn Thain (5): scsi/mac_esp: Avoid

<    4   5   6   7   8   9   10   11   12   13   >