[PATCH v3 00/37] Fixes, cleanups and modernization for NCR5380 drivers

2014-11-11 Thread Finn Thain
This patch series has fixes for bugs and compiler warnings as well as code cleanup and modernization. It covers all ten NCR5380 drivers and the three core NCR5380 drivers so it's fairly large. These patches remove a lot of duplicated code and C pre-processor abuse. There are also patches for

[PATCH v3 02/37] ncr5380: Remove unused hostdata fields

2014-11-11 Thread Finn Thain
Remove unused fields from hostdata structs declared with the NCR5380_implementation_fields macro. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de --- drivers/scsi/dmx3191d.c |4 ++-- drivers/scsi/mac_scsi.c | 33

[PATCH v3 01/37] ncr5380: Use printk() not pr_debug()

2014-11-11 Thread Finn Thain
Having defined NDEBUG, and having set the console log level, I'd like to see some output. Don't use pr_debug(), it's annoying to have to define DEBUG as well. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz

[PATCH v3 06/37] ncr5380: Remove more useless prototypes

2014-11-11 Thread Finn Thain
defined Signed-off-by: Finn Thain fth...@telegraphics.com.au Tested-by: Michael Schmitz schmitz...@gmail.com Reviewed-by: Hannes Reinecke h...@suse.de --- drivers/scsi/NCR5380.h |8 drivers/scsi/atari_NCR5380.c |3 + drivers/scsi/atari_scsi.c| 76

[PATCH v3 07/37] ncr5380: Cleanup TAG_NEXT and TAG_NONE macros

2014-11-11 Thread Finn Thain
. But that routine doesn't use its tag argument as the tag was already assigned in NCR5380_main(). So remove the unused argument and the macro. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com --- drivers/scsi/NCR5380.c

[PATCH v3 08/37] ncr5380: Remove redundant AUTOSENSE macro

2014-11-11 Thread Finn Thain
Every NCR5380 driver sets AUTOSENSE so it need not be optional (and the mid-layer expects it). Remove this redundant macro to improve readability. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com

[PATCH v3 21/37] mac_scsi: Convert to platform device

2014-11-11 Thread Finn Thain
Convert mac_scsi to platform device and eliminate scsi_register(). Platform resources for chip registers now follow the documentation. This should fix issues with the Mac IIci (and possibly other models too). Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h

[PATCH v3 23/37] atari_scsi: Convert to platform device

2014-11-11 Thread Finn Thain
(IRQ_TYPE_SLOW == 0 anyway). Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com Acked-by: Geert Uytterhoeven ge...@linux-m68k.org --- Changes since v1: - Remove unnecessary return -ENODEV branch. - Move IRQ

[PATCH v3 14/37] ncr5380: Remove pointless compiler command line override macros

2014-11-11 Thread Finn Thain
Compile-time override of scsi host defaults is pointless for drivers that provide module parameters and __setup options for that. Too many macros make the code hard to read so remove them. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested

[PATCH v3 16/37] ncr5380: Drop legacy scsi.h include

2014-11-11 Thread Finn Thain
Convert Scsi_Cmnd to struct scsi_cmnd and drop the #include scsi.h. The sun3_NCR5380.c core driver already uses struct scsi_cmnd so converting the other core drivers reduces the diff which makes them easier to unify. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes

[PATCH v3 05/37] ncr5380: Remove useless prototypes

2014-11-11 Thread Finn Thain
Add missing static qualifiers and remove the now pointless prototypes. The NCR5380_* prototypes are all declared in NCR5380.h and renamed using macros. Further declarations are redundant (some are completely unused). Remove them. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed

[PATCH v3 29/37] atari_NCR5380: Refactor Falcon locking

2014-11-11 Thread Finn Thain
). Revise the locking for atari_scsi_bus_reset(): use local_irq_save/restore() instead of atari_turnoff/turnon_irq(). There is no guarantee that atari_scsi still holds the ST DMA lock during EH, so atari_turnoff/turnon_irq() could end up dropping an IDE or floppy interrupt. Signed-off-by: Finn

[PATCH v3 36/37] atari_NCR5380: Remove RESET_RUN_DONE macro

2014-11-11 Thread Finn Thain
There's no need to run the cmd-done callback for aborted commands. Remove the old EH code and the RESET_RUN_DONE macro. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com --- drivers/scsi/atari_NCR5380.c

[PATCH v3 26/37] sun3_scsi: Move macro definitions

2014-11-11 Thread Finn Thain
-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de --- drivers/scsi/sun3_scsi.c | 45 - drivers/scsi/sun3_scsi.h | 25 - 2 files changed, 32 insertions(+), 38 deletions(-) Index: linux/drivers/scsi

[PATCH v3 12/37] ncr5380: Cleanup host info() methods

2014-11-11 Thread Finn Thain
of the NCR5380_print_info() output. This also eliminates a bunch of code in g_NCR5380 which just duplicates functionality in the core driver. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com --- Changes since v1

[PATCH v3 11/37] ncr5380: Remove NCR5380_STATS

2014-11-11 Thread Finn Thain
readability and reduce divergence between the three core drivers. This patch and the next one completely eliminate the PRINTP and ANDP pre-processor abuse. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com

[PATCH v3 33/37] atari_NCR5380: Introduce FLAG_TAGGED_QUEUING

2014-11-11 Thread Finn Thain
use of platform data to configure the driver. Replace the static variable with a host flag. This way it can be reported along with the other flags. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com

[PATCH v3 37/37] atari_NCR5380: Fix transfered typo

2014-11-11 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_NCR5380.c |8 1 file changed, 4 insertions(+), 4 deletions(-) Index: linux/drivers/scsi/atari_NCR5380.c === --- linux.orig/drivers/scsi

[PATCH v3 24/37] atari_scsi: Remove header

2014-11-11 Thread Finn Thain
The #defines in atari_scsi.h are intended to influence subsequent #includes in atari_scsi.c. IMHO, that's too convoluted. Remove atari_scsi.h by moving those macro definitions to atari_scsi.c, consistent with other NCR5380 drivers. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed

[PATCH v3 13/37] ncr5380: Move static PDMA spin counters to host data

2014-11-11 Thread Finn Thain
-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com --- drivers/scsi/NCR5380.c | 22 ++ drivers/scsi/NCR5380.h |4 drivers/scsi/arm/oak.c |2 -- drivers/scsi/dtc.c | 13

[PATCH v3 17/37] dmx3191d: Use NO_IRQ

2014-11-11 Thread Finn Thain
polling apparently because of this issue. Set host-irq = NO_IRQ so the core driver will prevent targets from disconnecting. Don't request host-irq. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de --- Changes since v1: - Use NO_IRQ instead of IRQ_NONE

[PATCH v3 31/37] sun3_scsi: Adopt atari_NCR5380 core driver and remove sun3_NCR5380.c

2014-11-11 Thread Finn Thain
Given the preceding changes to atari_NCR5380.c, this patch should not change behaviour of the sun3_scsi and sun3_scsi_vme modules. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de --- MAINTAINERS |1 drivers/scsi/sun3_NCR5380.c

[PATCH v3 19/37] mac_scsi: Add module option to Kconfig

2014-11-11 Thread Finn Thain
Allow mac_scsi to be built as a module. Replace the old validation of __setup options with code that validates both module and __setup options. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de --- drivers/scsi/Kconfig|2 drivers/scsi

[PATCH v3 25/37] sun3_scsi: Convert to platform device

2014-11-11 Thread Finn Thain
Convert sun3_scsi to platform device and eliminate scsi_register(). Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Acked-by: Geert Uytterhoeven ge...@linux-m68k.org --- Changes since v1: - Use NO_IRQ instead of IRQ_NONE. - Move device IRQ

[PATCH v3 35/37] atari_NCR5380: Move static co-routine variables to host data

2014-11-11 Thread Finn Thain
the dev_id argument. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com --- drivers/scsi/NCR5380.h |2 + drivers/scsi/atari_NCR5380.c | 61 +++ drivers

[PATCH v3 27/37] ncr5380: Remove ENABLE_IRQ/DISABLE_IRQ macros

2014-11-11 Thread Finn Thain
atari_NCR5380.c enables its IRQ when it is already enabled. Sun3 doesn't use the ENABLE_IRQ/DISABLE_IRQ cruft. Remove it. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com --- drivers/scsi/atari_NCR5380

[PATCH v3 20/37] mac_scsi: Cleanup PDMA code

2014-11-11 Thread Finn Thain
Fix whitespace, remove pointless volatile qualifiers and improve code style by use of INPUT_DATA_REG and OUTPUT_DATA_REG macros. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de --- drivers/scsi/mac_scsi.c | 122

[PATCH v3 32/37] atari_NCR5380: Merge from NCR5380.c

2014-11-11 Thread Finn Thain
The NCR5380.c core driver has moved on since the atari_NCR5380.c fork. Some of those changes are also relevant to atari_NCR5380.c so apply them there as well. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz

[PATCH v3 30/37] atari_NCR5380: Merge from sun3_NCR5380.c

2014-11-11 Thread Finn Thain
There is very little difference between the sun3_NCR5380.c core driver and atari_NCR5380.c. The former is a fork of the latter. Merge the sun3_NCR5380.c core driver into atari_NCR5380.c so that sun3_scsi.c can adopt the latter and the former can be deleted. Signed-off-by: Finn Thain fth

[PATCH v3 09/37] ncr5380: Remove duplicate comments

2014-11-11 Thread Finn Thain
The LIMIT_TRANSFERSIZE, PSEUDO_DMA, PARITY and UNSAFE options are all documented in the core drivers where they are used. The same goes for the chip databook reference. Remove the duplicate comments. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de

[PATCH v3 15/37] ncr5380: Remove *_RELEASE macros

2014-11-11 Thread Finn Thain
The *_RELEASE macros don't tell me anything. In some cases the version in the macro contradicts the version in the comments. Anyway, the Linux kernel version is sufficient information. Remove these macros to improve readability. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed

[PATCH v3 22/37] atari_scsi: Fix atari_scsi deadlocks on Falcon

2014-11-11 Thread Finn Thain
for the ST DMA interrupt), the solution is likely to be a lower value for host-can_queue. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com Acked-by: Geert Uytterhoeven ge...@linux-m68k.org --- Changes since

[PATCH v3 18/37] mac_scsi: Remove header

2014-11-11 Thread Finn Thain
The #defines in mac_scsi.h are intended to influence subsequent #includes in mac_scsi.c. IMHO, that's too convoluted. Remove mac_scsi.h by moving those macro definitions to mac_scsi.c, consistent with other NCR5380 drivers. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes

[PATCH v3 28/37] atari_NCR5380: Refactor Falcon special cases

2014-11-11 Thread Finn Thain
in atari_NCR5380.c so don't set it. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com --- drivers/scsi/NCR5380.h |4 drivers/scsi/atari_NCR5380.c | 30 +++--- drivers/scsi

[PATCH v3 10/37] ncr5380: Fix SCSI_IRQ_NONE bugs

2014-11-11 Thread Finn Thain
driver options. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz schmitz...@gmail.com --- Changes since v1: - Define NO_IRQ macro and use that instead of IRQ_NONE. --- drivers/scsi/NCR5380.c | 12 ++-- drivers/scsi

[PATCH v3 34/37] atari_NCR5380: Move static TagAlloc array to host data

2014-11-11 Thread Finn Thain
The atari_NCR5380.c core driver keeps some per-host data in a static variable which limits the driver to a single instance. Fix this by moving TagAlloc to the hostdata struct. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Tested-by: Michael Schmitz

[PATCH v4 25/37] sun3_scsi: Convert to platform device

2014-11-12 Thread Finn Thain
Convert sun3_scsi to platform device and eliminate scsi_register(). Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de Acked-by: Geert Uytterhoeven ge...@linux-m68k.org --- Changes since v1: - Use NO_IRQ instead of IRQ_NONE. - Move device IRQ

Re: [PATCH v3 00/37] Fixes, cleanups and modernization for NCR5380 drivers

2014-11-20 Thread Finn Thain
On Thu, 20 Nov 2014, Christoph Hellwig wrote: Thanks, I've applied all patches to the drivers-for-3.19 branch. I had a few rejects due to Hannes logging changes. I think I've fixed them properly, but please verify it. The merge looks good, thanks. -- -- To unsubscribe from this list:

Re: [PATCH 0/7] scsi: Some seq_file cleanups/optimizations

2014-11-29 Thread Finn Thain
On Sat, 29 Nov 2014, Rasmus Villemoes wrote: These patches mostly replace seq_printf with simpler and faster equivalents, e.g. seq_printf(m, something) = seq_puts(m, something) and seq_printf(m, \n) = seq_putc(m, '\n). But before my Coccinelle scripts could be unleashed I had to clean up

Re: [PATCH 1/1] Remove of old NCR53C9x/esp family of drivers

2008-01-04 Thread Finn Thain
On Fri, 4 Jan 2008, Geert Uytterhoeven wrote: I totally object to keeping these things around any longer. And this I support these changes going in. BTW, I hope you do remember why NCR53C9x.[ch] incarnated in the first place... OK, we'll see what we can do... I have a partially

Re: [PATCH 1/1] Remove of old NCR53C9x/esp family of drivers

2008-01-04 Thread Finn Thain
On Fri, 4 Jan 2008, David Miller wrote: From: Finn Thain [EMAIL PROTECTED] Date: Fri, 4 Jan 2008 22:05:20 +1100 (EST) I have a partially written replacement for mac_esp. Unlike the other NCR53C9x drivers it needs PIO or pseudo DMA depending on the machine -- so it is not as straight

Re: [PATCH 2/3] m68k/atari - atari_scsi: change abort/reset return codes

2014-03-11 Thread Finn Thain
This is a larger version of Michael's patch. It takes care of the header files and comments and it addresses sun3_NCR5380 as well as atari_NCR5380. This means that the initio.h include (!) can be dropped from sun3_scsi.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Michael, I'm

Re: [PATCH 2/3] m68k/atari - atari_scsi: change abort/reset return codes

2014-03-12 Thread Finn Thain
This is a larger version of Michael's patch. It takes care of the header files and comments and it addresses sun3_NCR5380 as well as atari_NCR5380. This means that the initio.h include (!) can be dropped from sun3_scsi.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This version

[PATCH 02/12] scsi/NCR5380: remove redundant HOSTS_C macro tests

2014-03-17 Thread Finn Thain
HOSTS_C is always undefined. There is no hosts.c anymore. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/g_NCR5380.h |3 --- drivers/scsi/mac_scsi.h |3 --- drivers/scsi/pas16.h |3 --- drivers/scsi/sun3_scsi.h |3 --- drivers/scsi/t128.h |3

[PATCH 00/12] scsi/NCR5380: fix debugging macros and #include structure

2014-03-17 Thread Finn Thain
(Second attempt... sorry for the earlier spam.) This patch series addresses several issues with NCR5380 drivers: 1. The complex network of #include directives. 2. Three inconsistent implementations of the core driver all attempting to share the same macro definitions in NCR5380.h. 3.

[PATCH 08/12] scsi/NCR5380: adopt dprintk()

2014-03-17 Thread Finn Thain
(NDEBUG_MAIN | NDEBUG_QUEUES, ...) Replace the *_PRINTK macros from atari_NCR5380.h and sun3_NCR5380.h with the equivalent macros from NCR5380.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_NCR5380.c | 130 +-- drivers/scsi

[PATCH 11/12] scsi/NCR5380: reduce depth of sun3_scsi nested includes

2014-03-17 Thread Finn Thain
-by: Finn Thain fth...@telegraphics.com.au --- Here's a graph showing the present #include structure. sun3_scsi_vme.c - sun3_scsi.h - NCR5380.h

[PATCH 10/12] scsi/NCR5380: remove unused macro definitions

2014-03-17 Thread Finn Thain
Remove the unused (and divergent) debugging macro definitions from the sun3_NCR5380 and atari_NCR5380 drivers. These drivers have been converted to use the common macros in NCR5380.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_scsi.h | 93

[PATCH 12/12] scsi/NCR5380: merge sun3_scsi_vme.c into sun3_scsi.c

2014-03-17 Thread Finn Thain
SUN3_SCSI_DEBUG is undesirable. Dead code within #ifdef OLD_DMA is also dropped, consistent with sun3_scsi_vme.c. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/sun3_scsi.c | 222 drivers/scsi/sun3_scsi_vme.c | 583 --- 2

[PATCH 07/12] scsi/NCR5380: adopt NCR5380_dprint() and NCR5380_dprint_phase()

2014-03-17 Thread Finn Thain
(NDEBUG_MAIN | NDEBUG_QUEUES, ...) Replace the NCR_PRINT* macros from atari_NCR5380.h and sun3_NCR5380.h with the equivalent macros from NCR5380.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_NCR5380.c | 22 +++--- drivers/scsi/sun3_NCR5380.c

[PATCH 01/12] scsi/NCR5380: remove unused BOARD_NORMAL and BOARD_NCR53C400

2014-03-17 Thread Finn Thain
BOARD_NORMAL is completely unused and BOARD_NCR53C400 is used only by g_NCR5380 internally. Remove the unused definitions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/arm/cumana_1.c |3 --- drivers/scsi/arm/oak.c |3 --- drivers/scsi/mac_scsi.h |3

[PATCH 03/12] scsi/NCR5380: remove old CVS keywords

2014-03-17 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.c |2 -- drivers/scsi/NCR5380.h |4 drivers/scsi/g_NCR5380.c |4 drivers/scsi/g_NCR5380.h |4 drivers/scsi/mac_scsi.c |4 drivers/scsi/mac_scsi.h |4 drivers/scsi

[PATCH 06/12] scsi/NCR5380: fix dprintk macro usage and definition

2014-03-17 Thread Finn Thain
on the variable argument list. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.c | 126 - drivers/scsi/NCR5380.h |6 +- 2 files changed, 66 insertions(+), 66 deletions(-) Index: linux-m68k/drivers/scsi/NCR5380.c

[PATCH 04/12] scsi/NCR5380: use NCR5380_dprint() instead of NCR5380_print()

2014-03-17 Thread Finn Thain
Only the NCR5380_dprint() macro should invoke the NCR5380_print() function. That's why NCR5380.c only defines the function #if NDEBUG. Use the standard macro. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/sun3_scsi.c |4 +--- 1 file changed, 1 insertion(+), 3

[PATCH 05/12] scsi/NCR5380: fix build failures when debugging is enabled

2014-03-17 Thread Finn Thain
) that caused compiler warnings. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.c | 14 +++--- drivers/scsi/sun3_NCR5380.c |4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) Index: linux-m68k/drivers/scsi/sun3_NCR5380.c

Re: [PATCH 00/12] scsi/NCR5380: fix debugging macros and #include structure

2014-03-18 Thread Finn Thain
On Mon, 17 Mar 2014, Joe Perches wrote: My preference would be to change dprintk to scsi_dbg Can you be more specific? I gather you're not referring to the debugging routines in include/scsi/scsi_dbg.h as they aren't equivalent. Is it the name dprintk you object to? I went looking in

Re: [PATCH 00/12] scsi/NCR5380: fix debugging macros and #include structure

2014-03-18 Thread Finn Thain
On Tue, 18 Mar 2014, Joe Perches wrote: On Tue, 2014-03-18 at 13:55 +0100, Geert Uytterhoeven wrote: #define dprintk(flg, fmt, ...) no_printk(fmt, ##__VA_ARGS__) Fine, but with a correction. no_printk keeps all side effects like performing any function calls made by the statement

Re: [PATCH 00/12] scsi/NCR5380: fix debugging macros and #include structure

2014-03-18 Thread Finn Thain
On Tue, 18 Mar 2014, Joe Perches wrote: But using if (0) prevents the no_printk from occurring at all so there would be no side-effects and the format args would still be verified by the compiler. I'd prefer this (for symmetry and clarity): #if NDEBUG #define dprintk(flg, fmt, ...) \

[PATCH v2 00/12] scsi/NCR5380: fix debugging macros and #include structure

2014-03-19 Thread Finn Thain
This patch series addresses several issues with NCR5380 drivers: 1. The complex network of #include directives. 2. Three inconsistent implementations of the core driver all attempting to share the same macro definitions in NCR5380.h. 3. Broken debugging code. In the past these issues have

[PATCH v2 10/12] scsi/NCR5380: remove unused macro definitions

2014-03-19 Thread Finn Thain
Remove the unused (and divergent) debugging macro definitions from the sun3_NCR5380 and atari_NCR5380 drivers. These drivers have been converted to use the common macros in NCR5380.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_scsi.h | 93

[PATCH v2 12/12] scsi/NCR5380: merge sun3_scsi_vme.c into sun3_scsi.c

2014-03-19 Thread Finn Thain
SUN3_SCSI_DEBUG is undesirable. Dead code within #ifdef OLD_DMA is also dropped, consistent with sun3_scsi_vme.c. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/sun3_scsi.c | 222 drivers/scsi/sun3_scsi_vme.c | 583 --- 2

[PATCH v2 11/12] scsi/NCR5380: reduce depth of sun3_scsi nested includes

2014-03-19 Thread Finn Thain
-by: Finn Thain fth...@telegraphics.com.au --- Here's a graph showing the present #include structure. sun3_scsi_vme.c - sun3_scsi.h - NCR5380.h

[PATCH v2 09/12] scsi/NCR5380: fix and standardize NDEBUG macros

2014-03-19 Thread Finn Thain
:418: warning: 'NCR5380_print' defined but not used drivers/scsi/NCR5380.c:459: warning: 'NCR5380_print_phase' defined but not used The debugging code is now enabled when NDEBUG != 0. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changes since v1: - Use C99 __VA_ARGS__ for dprintk

[PATCH v2 08/12] scsi/NCR5380: adopt dprintk()

2014-03-19 Thread Finn Thain
(NDEBUG_MAIN | NDEBUG_QUEUES, ...) Replace the *_PRINTK macros from atari_NCR5380.h and sun3_NCR5380.h with the equivalent macros from NCR5380.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_NCR5380.c | 130 +-- drivers/scsi

[PATCH v2 05/12] scsi/NCR5380: fix build failures when debugging is enabled

2014-03-19 Thread Finn Thain
) that caused compiler warnings. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changes since v1: - Fixed a build failure in sun3_NCR5380.c with NDEBUG_LISTS. --- drivers/scsi/NCR5380.c | 14 +++--- drivers/scsi/sun3_NCR5380.c | 10 +++--- 2 files changed, 10

[PATCH v2 06/12] scsi/NCR5380: fix dprintk macro usage and definition

2014-03-19 Thread Finn Thain
on the variable argument list. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changes since v1: - Use C99-style dprintk() macro. --- drivers/scsi/NCR5380.c | 126 ++-- drivers/scsi/NCR5380.h |6 +- drivers/scsi/sun3_NCR5380.c |2 3

[PATCH v2 07/12] scsi/NCR5380: adopt NCR5380_dprint() and NCR5380_dprint_phase()

2014-03-19 Thread Finn Thain
(NDEBUG_MAIN | NDEBUG_QUEUES, ...) Replace the NCR_PRINT* macros from atari_NCR5380.h and sun3_NCR5380.h with the equivalent macros from NCR5380.h. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_NCR5380.c | 22 +++--- drivers/scsi/sun3_NCR5380.c

[PATCH v2 04/12] scsi/NCR5380: use NCR5380_dprint() instead of NCR5380_print()

2014-03-19 Thread Finn Thain
Only the NCR5380_dprint() macro should invoke the NCR5380_print() function. That's why NCR5380.c only defines the function #if NDEBUG. Use the standard macro. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/sun3_scsi.c |4 +--- 1 file changed, 1 insertion(+), 3

[PATCH v2 02/12] scsi/NCR5380: remove redundant HOSTS_C macro tests

2014-03-19 Thread Finn Thain
HOSTS_C is always undefined. There is no hosts.c anymore. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/g_NCR5380.h |3 --- drivers/scsi/mac_scsi.h |3 --- drivers/scsi/pas16.h |3 --- drivers/scsi/sun3_scsi.h |3 --- drivers/scsi/t128.h |3

[PATCH v2 03/12] scsi/NCR5380: remove old CVS keywords

2014-03-19 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.c |2 -- drivers/scsi/NCR5380.h |4 drivers/scsi/g_NCR5380.c |4 drivers/scsi/g_NCR5380.h |4 drivers/scsi/mac_scsi.c |4 drivers/scsi/mac_scsi.h |4 drivers/scsi

[PATCH v2 01/12] scsi/NCR5380: remove unused BOARD_NORMAL and BOARD_NCR53C400

2014-03-19 Thread Finn Thain
BOARD_NORMAL is completely unused and BOARD_NCR53C400 is used only by g_NCR5380 internally. Remove the unused definitions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/arm/cumana_1.c |3 --- drivers/scsi/arm/oak.c |3 --- drivers/scsi/mac_scsi.h |3

Re: [PATCH v2 00/12] scsi/NCR5380: fix debugging macros and #include structure

2014-04-28 Thread Finn Thain
On Sat, 26 Apr 2014, James Bottomley wrote: OK, so this is a pretty big change to an unmaintained driver. I'll take it if you're willing to maintain the driver afterwards ... in which case I need another patch to add you to the MAINTAINERS file. Sure, I'm happy to support these patches

[PATCH] MAINTAINERS: add an entry for all the NCR5380 drivers

2014-05-04 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au Cc: Michael Schmitz schmitz...@gmail.com --- As requested: http://marc.info/?l=linux-arm-kernelm=139853302724112w=2 diff --git a/MAINTAINERS b/MAINTAINERS index e67ea24..60ea600 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5996,6 +5996,28

Re: [PATCH 05/12] scsi/NCR5380: fix build failures when debugging is enabled

2014-05-28 Thread Finn Thain
On Wed, 28 May 2014, Christoph Hellwig wrote: Looks good, Reviewed-by: Christoph Hellwig h...@lst.de Thanks for reviewing. There was a later submission (version 2) with changes made to three of these patches, [PATCH v2 05/12] scsi/NCR5380: fix build failures when debugging is enabled

[PATCH] scsi/NCR5380: dprintk macro

2014-05-28 Thread Finn Thain
the compiler to check the parameters of disabled printk() calls so that the debugging code doesn't rot again. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- I know the whitespace is wrong throughout these drivers but when I put this patch series together it seemed best to defer

mac_esp and PIO, was Re: [PATCH 1/1] Remove of old NCR53C9x/esp family of drivers

2008-02-21 Thread Finn Thain
, 4 Jan 2008, David Miller wrote: From: Finn Thain [EMAIL PROTECTED] Date: Fri, 4 Jan 2008 22:05:20 +1100 (EST) I have a partially written replacement for mac_esp. Unlike the other NCR53C9x drivers it needs PIO or pseudo DMA depending on the machine -- so it is not as straight

Re: [PATCH v3] scsi: NCR5380: use msecs_to_jiffies for conversions

2015-02-04 Thread Finn Thain
HZ 100 were adjusted to HZ independent settings based on review of the original drivers in 1.0.31 and 2.2.16. Signed-off-by: Nicholas Mc Guire hof...@osadl.org --- v2: the original patch was not taking care of all the dependencies as reported by Finn Thain fth...@telegraphics.com.au

Re: [PATCH] g_NCR5380: Kill compiler warning if builtin

2015-01-28 Thread Finn Thain
Acked-by: Finn Thain fth...@telegraphics.com.au On Sat, 3 Jan 2015, Geert Uytterhoeven wrote: If CONFIG_SCSI_GENERIC_NCR5380=y: drivers/scsi/g_NCR5380.c:727: warning: ?id_table? defined but not used In the non-modular case, MODULE_DEVICE_TABLE() expands to nothing, and id_table

Re: [PATCH v2 0/6] scsi: Some seq_file cleanups/optimizations

2015-01-28 Thread Finn Thain
I have one reservation about this patch series. For example, the changes, - seq_printf(m, %s, p); + seq_puts(m, p); These calls are not equivalent because the bounds check is not the same. seq_puts will fail when m-count + strlen(p) == m-size. seq_write() does the same check as

Re: [PATCH] scsi: ncr5380: use msecs_to_jiffies for conversions

2015-01-28 Thread Finn Thain
NAK. Does your compiler not warn? CC drivers/scsi/pas16.o In file included from drivers/scsi/pas16.c:557:0: drivers/scsi/NCR5380.c: In function 'prepare_info': drivers/scsi/NCR5380.c:674:11: warning: format '%d' expects argument of type 'int', but argument 16 has type 'long unsigned int'

Re: [PATCH 17/28] scsi: drop owner assignment from platform_drivers

2015-01-28 Thread Finn Thain
Acked-by: Finn Thain fth...@telegraphics.com.au On Sun, 21 Dec 2014, Wolfram Sang wrote: This platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang w...@the-dreams.de --- Generated with coccinelle. SmPL file

Re: [PATCH v2] scsi: NCR5380: use msecs_to_jiffies for conversions

2015-01-31 Thread Finn Thain
. Signed-off-by: Nicholas Mc Guire der.h...@hofr.at v2: the original patch was not taking care of all the dependencies as reported by Finn Thain fth...@telegraphics.com.au - this version now uses the suggested config to check the patch. No. The original patch introduced compiler

Re: [PATCH v2] scsi: NCR5380: use msecs_to_jiffies for conversions

2015-01-31 Thread Finn Thain
On Sun, 1 Feb 2015, Michael Schmitz wrote: Finn, Nicholas, On Sat, 31 Jan 2015, Nicholas Mc Guire wrote: This is only an API consolidation to make things more readable. Instances of var * HZ / 1000 are replaced by msecs_to_jiffies(var). ... and some instances of value are

[PATCH 0/3] NCR5380 patches from mailing list

2015-03-09 Thread Finn Thain
As requested by James, these are the NCR5380 patches that were reviewed on the linux-scsi mailing list. I've changed my acked-by tags to signed-off-by tags. git am and git format-patch helpfully moved the email From: headers to the message bodies, but not the Date: headers, and it chucked out the

[PATCH 1/3] ncr5380: Drop owner assignment from platform_drivers

2015-03-09 Thread Finn Thain
From: Wolfram Sang w...@the-dreams.de This platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang w...@the-dreams.de Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/atari_scsi.c | 1 - drivers/scsi/mac_scsi.c

[PATCH 2/3] g_NCR5380: Kill compiler warning if builtin

2015-03-09 Thread Finn Thain
this. Signed-off-by: Geert Uytterhoeven ge...@linux-m68k.org Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/g_NCR5380.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index f35792f..74ec2f5 100644 --- a/drivers

Re: [PATCH v2 2/6] scsi/advansys: Replace seq_printf with seq_puts

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes li

Re: [PATCH v2 6/6] scsi: misc: Print single-character strings with seq_putc

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au For the NCR5380 bits: Acked-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Using seq_putc to print a single character saves at least a strlen() call and a memory access, and may also give a small

Re: [PATCH v2 4/6] scsi: misc: Replace seq_printf with seq_puts

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au For the NCR5380 bits: Acked-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace

Re: [PATCH v2 3/6] scsi/aha152x: Replace seq_printf with seq_puts

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Using seq_printf to print a simple string is a lot more expensive than it needs to be, since seq_puts exists. Replace seq_printf with seq_puts when possible. Signed-off-by: Rasmus Villemoes li

Re: [PATCH v2 1/6] scsi: Remove SPRINTF macro

2015-01-29 Thread Finn Thain
, for consistency with atari_NCR5380. Reviewed-by: Finn Thain fth...@telegraphics.com.au For the NCR5380 bits: Acked-by: Finn Thain fth...@telegraphics.com.au Signed-off-by: Rasmus Villemoes li...@rasmusvillemoes.dk --- drivers/scsi/NCR5380.c | 20 ++- drivers/scsi/aha152x.c

Re: [PATCH v2 5/6] scsi: misc: Merge consecutive seq_puts calls

2015-01-29 Thread Finn Thain
Reviewed-by: Finn Thain fth...@telegraphics.com.au On Wed, 3 Dec 2014, Rasmus Villemoes wrote: Consecutive seq_puts calls with literal strings may be replaced by a single call, saving a little .text. Signed-off-by: Rasmus Villemoes li...@rasmusvillemoes.dk --- drivers/scsi/advansys.c

[RFC v2 04/24] m68k/atari: Replace nvram_{read,write}_byte with arch_nvram_ops

2015-06-14 Thread Finn Thain
. Replace this validate-checksum-and-read-byte sequence with the equivalent rtc_nvram_ops.read() call and remove the now unused functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The advantage of the new ops struct over the old global nvram_* functions is that the misc device module can

[RFC 02/24] scsi/atari_scsi: Dont select CONFIG_NVRAM

2015-05-30 Thread Finn Thain
the valkyriefb driver with powerpc, and since that driver uses NVRAM, it is affected by CONFIG_ATARI_SCSI, because of the use of select NVRAM. Adopt the powerpc convention on m68k to avoid surprises. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This patch temporarily disables

[RFC 04/24] m68k/atari: Replace nvram_{read,write}_byte with arch_nvram_ops

2015-05-30 Thread Finn Thain
. Replace this validate-checksum-and-read-byte sequence with the equivalent rtc_nvram_ops.read() call and remove the now unused functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The advantage of the new ops struct over the old global nvram_* functions is that the misc device module can

[RFC v3 01/24] scsi/atari_scsi: Dont select CONFIG_NVRAM

2015-06-27 Thread Finn Thain
the valkyriefb driver with powerpc, and since that driver uses NVRAM, it is affected by CONFIG_ATARI_SCSI, because of the use of select NVRAM. Adopt the powerpc convention on m68k to avoid surprises. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- This patch temporarily disables

[RFC v3 03/24] m68k/atari: Replace nvram_{read,write}_byte with arch_nvram_ops

2015-06-27 Thread Finn Thain
. Replace this validate-checksum-and-read-byte sequence with the equivalent rtc_nvram_ops.read() call and remove the now unused functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- The advantage of the new ops struct over the old global nvram_* functions is that the misc device module can

[RFC v6 03/25] m68k/atari: Replace nvram_{read,write}_byte with arch_nvram_ops

2015-08-23 Thread Finn Thain
. Replace this validate-checksum-and-read-byte sequence with the equivalent rtc_nvram_ops.read() call and remove the now unused functions. Signed-off-by: Finn Thain fth...@telegraphics.com.au Tested-by: Christian T. Steigies c...@debian.org Acked-by: Geert Uytterhoeven ge...@linux-m68k.org

[RFC v6 01/25] scsi/atari_scsi: Dont select CONFIG_NVRAM

2015-08-23 Thread Finn Thain
the valkyriefb driver with powerpc, and since that driver uses NVRAM, it is affected by CONFIG_ATARI_SCSI, because of the use of select NVRAM. Adopt the powerpc convention on m68k to avoid surprises. Signed-off-by: Finn Thain fth...@telegraphics.com.au Tested-by: Christian T. Steigies c

[RFC v5 01/26] scsi/atari_scsi: Dont select CONFIG_NVRAM

2015-07-25 Thread Finn Thain
the valkyriefb driver with powerpc, and since that driver uses NVRAM, it is affected by CONFIG_ATARI_SCSI, because of the use of select NVRAM. Adopt the powerpc convention on m68k to avoid surprises. Signed-off-by: Finn Thain fth...@telegraphics.com.au Tested-by: Christian T. Steigies c

<    1   2   3   4   5   6   7   8   9   >