Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers

2015-11-24 Thread Finn Thain
On Tue, 24 Nov 2015, Ondrej Zary wrote: > On Tuesday 24 November 2015, Finn Thain wrote: > > > > On Mon, 23 Nov 2015, Ondrej Zary wrote: > > > > > > > > PDMA seems to be broken in multiple ways. NCR5380_pread cannot > > > process less tha

Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers

2015-11-24 Thread Finn Thain
On Tue, 24 Nov 2015, Ondrej Zary wrote: > On Tuesday 24 November 2015 10:13:17 Finn Thain wrote: > > > > On Tue, 24 Nov 2015, Ondrej Zary wrote: > > > > > On Tuesday 24 November 2015, Finn Thain wrote: > > > > > > > > On Mon, 23 Nov 2015,

Re: [PATCH 22/71] ncr5380: Eliminate selecting state

2015-11-24 Thread Finn Thain
On Tue, 24 Nov 2015, Ondrej Zary wrote: > On Wednesday 18 November 2015 09:35:17 Finn Thain wrote: > > Linux v2.1.105 changed the algorithm for polling for the BSY signal > > in NCR5380_select() and NCR5380_main(). > > > > Presently, this code has a bug. Back then, NC

Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers

2015-11-25 Thread Finn Thain
On Wed, 25 Nov 2015, Ondrej Zary wrote: > On Wednesday 25 November 2015, Finn Thain wrote: > > > > On Tue, 24 Nov 2015, Ondrej Zary wrote: > > > > > Instead of fixing split transfers, simply forced everything > > > non-modulo-128 to PIO: > > &

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

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 m

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 --- Michael, I'm assuming that

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 --- This version defines RESET_RUN_DO

[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 --- 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 --- 5 files changed, 15

[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. Broken

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

2014-03-17 Thread Finn Thain
drivers/scsi/NCR5380.c: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 --- drivers/scsi/NCR5380.c |7

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

2014-03-17 Thread Finn Thain
rintk(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 --- drivers/scsi/atari_NCR5380.c | 130 +-- drivers/scsi/atari_scsi.c|

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

2014-03-17 Thread Finn Thain
s my head in. Signed-off-by: Finn Thain --- Here's a graph showing the present #include structure. sun3_scsi_vme.c ->

[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 --- drivers/scsi/atari_scsi.h | 93 --- drivers/scsi

[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 --- drivers/scsi/sun3_scsi.c | 222 drivers/scsi/sun3_scsi_vme.c | 583 --- 2 files changed, 171 insertions

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

2014-03-17 Thread Finn Thain
print(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 --- 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 --- drivers/scsi/arm/cumana_1.c |3 --- drivers/scsi/arm/oak.c |3 --- drivers/scsi/mac_scsi.h |3 --- drivers/scsi

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

2014-03-17 Thread Finn Thain
Signed-off-by: Finn Thain --- 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/sun3_scsi.c |4

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

2014-03-17 Thread Finn Thain
variable argument list. Signed-off-by: Finn Thain --- 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 --- drivers/scsi/sun3_scsi.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Index: linux

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

2014-03-17 Thread Finn Thain
Also fix some format strings (%ul becomes %lu) that caused compiler warnings. Signed-off-by: Finn Thain --- drivers/scsi/NCR5380.c | 14 +++--- drivers/scsi/sun3_NCR5380.c |4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) Index: linu

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 d

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 s

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 l

[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 --- drivers/scsi/atari_scsi.h | 93 --- drivers/scsi

[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 --- drivers/scsi/sun3_scsi.c | 222 drivers/scsi/sun3_scsi_vme.c | 583 --- 2 files changed, 171 insertions

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

2014-03-19 Thread Finn Thain
s my head in. Signed-off-by: Finn Thain --- Here's a graph showing the present #include structure. sun3_scsi_vme.c ->

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

2014-03-19 Thread Finn Thain
drivers/scsi/NCR5380.c: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 --- Changes since v1: - Use C99 __VA_ARGS__

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

2014-03-19 Thread Finn Thain
rintk(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 --- drivers/scsi/atari_NCR5380.c | 130 +-- drivers/scsi/atari_scsi.c|

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

2014-03-19 Thread Finn Thain
Also fix some format strings (%ul becomes %lu) that caused compiler warnings. Signed-off-by: Finn Thain --- 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 f

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

2014-03-19 Thread Finn Thain
variable argument list. Signed-off-by: Finn Thain --- 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 files changed, 67 insertions

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

2014-03-19 Thread Finn Thain
print(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 --- 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 --- drivers/scsi/sun3_scsi.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Index: linux

[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 --- 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 --- 5 files changed, 15

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

2014-03-19 Thread Finn Thain
Signed-off-by: Finn Thain --- 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/sun3_scsi.c |4

[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 --- drivers/scsi/arm/cumana_1.c |3 --- drivers/scsi/arm/oak.c |3 --- drivers/scsi/mac_scsi.h |3 --- drivers/scsi

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 Cc: Michael Schmitz --- As requested: http://marc.info/?l=linux-arm-kernel&m=139853302724112&w=2 diff --git a/MAINTAINERS b/MAINTAINERS index e67ea24..60ea600 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5996,6 +5996,28 @@ M: Petr Vandrovec S:

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 > 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 v2

[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 --- I know the whitespace is wrong throughout these drivers but when I put this patch series together it seemed best to defer the whitespace cleanup

Re: [PATCH 0/4] ARM randconfig fixes for SCSI

2014-06-25 Thread Finn Thain
On Wed, 25 Jun 2014, Christoph Hellwig wrote: > Can I get another set of reviews for these? Reviewed-by: Finn Thain (All four patches.) > > [SCSI] pas16: don't call free_dma() > > [SCSI] qlogicfas: don't call free_dma() BTW, I found that the suprious free_dma()

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

2018-12-25 Thread Finn Thain
l. 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 Tested-by: Christian T. Steigies Acked-by: Geert Uytterhoeven --- The advantage of the new ops struct over the old global nvram

[PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-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 Tested-by: Christian T. Steigies --- This patch temporaril

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-28 Thread Finn Thain
On Fri, 28 Dec 2018, LEROY Christophe wrote: > Finn Thain a ?crit?: > > > On powerpc, setting CONFIG_NVRAM=n builds a kernel with no NVRAM support. > > Setting CONFIG_NVRAM=m enables the /dev/nvram misc device module without > > enabling NVRAM support in drivers. Settin

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-28 Thread Finn Thain
On Sat, 29 Dec 2018, Michael Schmitz wrote: > > IS_BUILTIN(CONFIG_NVRAM) is probably what Christophe really meant to suggest. > > Or (really going out on a limb here): > > IS_BUILTIN(CONFIG_NVRAM) || > ( IS_MODULE(CONFIG_ATARI_SCSI) && IS_ENABLED(CONFIG_NVRAM) ) > > Not that I'd advocate that,

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-30 Thread Finn Thain
On Sun, 30 Dec 2018, James Bottomley wrote: > > That said, as has been pointed out, the current #ifdef has a failing > corner case when both are modular (because the code should then be > included). The runtime macro that correctly expresses this is > IS_REACHABLE(CONFIG_NVRAM). > No, in th

Re: [PATCH v8 01/25] scsi/atari_scsi: Don't select CONFIG_NVRAM

2018-12-30 Thread Finn Thain
On Mon, 31 Dec 2018, Finn Thain wrote: > On Sun, 30 Dec 2018, James Bottomley wrote: > > > > > That said, as has been pointed out, the current #ifdef has a failing > > corner case when both are modular (because the code should then be > > included). The runtime

[PATCH v9 00/22] Re-use nvram module

2019-01-14 Thread Finn Thain
- Changed the CONFIG_NVRAM default to better approximate the present code. In particular, the CONFIG_GENERIC_NVRAM default and use of "select NVRAM". - Added more tested-by tags. For older change logs, please refer to, https://lore.kernel.org/lkml/20151101104202.301856...@telegraphics.com.a

[PATCH v9 04/22] nvram: Replace nvram_* function exports with static functions

2019-01-14 Thread Finn Thain
-implemented in subsequent patches. Replace the sole validate-checksum-and-read-byte sequence with a call to nvram_read() which will gain the same semantics in subsequent patches. Remove unused exports. Acked-by: Geert Uytterhoeven Signed-off-by: Finn Thain --- arch/m68k/atari/nvram.c | 39

[PATCH v9 01/22] scsi/atari_scsi: Don't select CONFIG_NVRAM

2019-01-14 Thread Finn Thain
n this patch and the subsequent fbdev driver patch, the convention is adopted across all relevant platforms whereby NVRAM functionality gets enabled in a given device driver when the nvram misc device is built-in or when both drivers are modules. Acked-by: Michael Schmitz Signed-off-by: Finn T

Re: [PATCH v9 00/22] Re-use nvram module

2019-01-22 Thread Finn Thain
On Tue, 22 Jan 2019, Greg Kroah-Hartman wrote: > On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > > The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a > > /dev/nvram misc device. This module is used only by 32-bit PowerPC > > pl

Re: [PATCH v2] scsi: NCR5380: Mark expected switch fall-through

2019-02-28 Thread Finn Thain
On Thu, 28 Feb 2019, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. > This switch case is already marked. So I think the patch description should state that this patch is actually a workaround for a gcc

[PATCH] scsi/NCR5380: Avoid compiler warning when -Wimplicit-fallthrough is enabled

2019-03-07 Thread Finn Thain
Adjust comments accordingly. Cc: Gustavo A. R. Silva Cc: Michael Schmitz Signed-off-by: Finn Thain --- drivers/scsi/NCR5380.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 7fed9bb72784..fe0535affc14 100644

[PATCH] scsi/NCR5380: Remove set but unused variable

2019-03-07 Thread Finn Thain
Cc: Michael Schmitz Signed-off-by: Finn Thain --- drivers/scsi/NCR5380.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 01c23d27f290..7fed9bb72784 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c

Re: [PATCH] scsi: remove extra white space at the end of the line

2017-12-23 Thread Finn Thain
Hi Bart, On Thu, 21 Dec 2017, Bart Van Assche wrote: > There are several reasons why most kernel maintainers ignore patches > like this one silently: > I don't disagree with your conclusion but I think that these objections may have solutions, at least in principle. Your message prompted me w

Re: [PATCH] [RESEND] scsi: ips: fix firmware timestamps for 32-bit

2018-01-18 Thread Finn Thain
On Wed, 17 Jan 2018, Arnd Bergmann wrote: > do_gettimeofday() is deprecated since it will stop working in 2038 on > 32-bit platforms. The firmware interface here actually supports times > until year 25500, so we should use longer timestamps. > I think that reasoning is flawed. If the firmware su

Re: [4.4-stable 08/22] ncr5380: shut up gcc indentation warning

2018-02-20 Thread Finn Thain
> > This was addressed in mainline kernels as part of a rework on commit > 12150797d064 ("ncr5380: Use runtime register mapping"). Acked-by: Finn Thain > We don't want the entire patch backported to stable kernels, but we can > backport one hunk to get rid of th

Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

2018-03-03 Thread Finn Thain
Code largely based on board specific parts of the old drivers (blz1230.c, > blz2060.c, cyberstorm.c, cyberstormII.c, fastlane.c which were removed > after the 2.6 kernel series for lack of maintenance) with contributions > by Tuomas Vainikka (TCQ bug tests and workaround) and Finn Thain (T

Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

2018-03-03 Thread Finn Thain
On Sun, 4 Mar 2018, I wrote: > > + } else { > > + scsi_esp_cmd(esp, ESP_CMD_FLUSH); > > + > > + if (esp_count >= ZORRO_ESP_FIFO_SIZE) { > > + ZORRO_ESP_PIO_FILL("%0@+,%2@", esp_count); > > + } else { > > + ZORRO_ESP_PIO_LOOP("%0@+

Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

2018-03-04 Thread Finn Thain
On Sun, 4 Mar 2018, Michael Schmitz wrote: > Am 04.03.2018 um 15:55 schrieb Finn Thain: > >> +/* zorro_esp.c: ESP front-end for Amiga ZORRO SCSI systems. > >> + * > >> + * Copyright (C) 1996 Jesper Skov (js...@cygnus.co.uk) > >> + * > >> +

Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

2018-03-04 Thread Finn Thain
On Mon, 5 Mar 2018, Michael Schmitz wrote: > >> +fail_unmap_dma_regs: > >> + if (ioaddr > 0xff) > >> + iounmap(esp->dma_regs); > > > > I think you need to test for ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 here? > > On second thought - no, I don't. the ID check above only determ

Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

2018-03-04 Thread Finn Thain
On Mon, 5 Mar 2018, Michael Schmitz wrote: > > The TCQ issue showed up on the AV Quadras becasue mac_esp doesn't know > > how to do PDMA or DMA on that hardware, and so it always uses PIO. It > > sounds like this bug would show up too given the right kind of target. > > If so, I will need to pa

Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

2018-03-04 Thread Finn Thain
On Mon, 5 Mar 2018, Michael Schmitz wrote: > All Zorro-3 boards have to have both their regs and dma_regs remapped. > I see. > What's confusing is that there is only a single Zorro-3 board currently > supported by the driver. Others will be added and I"ll use a switch > statement to pick the

Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

2018-03-05 Thread Finn Thain
On Tue, 6 Mar 2018, Michael Schmitz wrote: > >> +static void zorro_esp_send_pio_cmd(struct esp *esp, u32 addr, u32 > >> esp_count, > >> +u32 dma_count, int write, u8 cmd) > >> +{ > >> + struct zorro_esp_priv *zep = ZORRO_ESP_GET_PRIV(esp); > >> + u8 __i

Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

2018-03-06 Thread Finn Thain
On Tue, 6 Mar 2018, Michael Schmitz wrote: > The whole !write branch will never be executed, and I could just omit it > entirely for now, or leave it as it was in the Mac driver. > We could make use of the !write branch in zorro_esp, even if it was only to figure out the SELAS/MSG OUT issue fo

Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

2018-03-06 Thread Finn Thain
On Wed, 7 Mar 2018, Michael Schmitz wrote: > The major obstacle now seems to be dynamic allocation of the driver > private data and storing a pointer to that in a way that it can be > retrieved using just the esp pointer. dev_set_drvdata(esp->dev, zep) > causes the module load to crash ... I'v

[PATCH] scsi: jazz_esp, sun3x_esp: Pass struct device pointer in dma calls

2018-03-06 Thread Finn Thain
In jazz_esp and sun3x_esp, the esp_driver_ops methods pass esp->dev in dma api calls as if it was a pointer to a struct device. But it actually points to a struct platform_device. Fix this. Cc: Thomas Bogendoerfer Signed-off-by: Finn Thain --- drivers/scsi/jazz_esp.c | 2 +- drivers/s

Re: [PATCH v3] m68k/amiga - Amiga Zorro NCR53C9x boards: new zorro_esp.c

2018-03-12 Thread Finn Thain
uomas Vainikka (tuomas.vaini...@aalto.fi) for > + * Blizzard 1230 DMA and probe function fixes > + * > + * Copyright (C) 2017 Finn Thain for PIO code from Mac ESP driver adapted > here > + */ > +/* > + * ZORRO bus code from: > + */ > +/* > + * De

Re: [PATCH v3] m68k/amiga - Amiga Zorro NCR53C9x boards: new zorro_esp.c

2018-03-13 Thread Finn Thain
> > I forgot to add your Reviewed-by tag - will do that for the next > version, OK? Sure. Geert's tag may be harder to bag though :-) --

Re: [PATCH v3] m68k/amiga - Amiga Zorro NCR53C9x boards: new zorro_esp.c

2018-03-15 Thread Finn Thain
On Wed, 14 Mar 2018, Michael Schmitz wrote: > > > > Please pass "addr" and "fifo" as macro parameters, too, so it's easier > > for the reviewer to notice they are used. > > Yes, I can do that (meaning Finn would need to make the same change to > keep our versions in sync). Personally, I would

Re: [PATCH v3] m68k/amiga - Amiga Zorro NCR53C9x boards: new zorro_esp.c

2018-03-16 Thread Finn Thain
On Fri, 16 Mar 2018, Michael Schmitz wrote: > Hi Finn, Geert, > > In the interest of making minimal changes between the Mac and Amiga > versions, I'd leave the macros as they are, and add a comment to the > macro definitions stating that both addr and fifo are local-scope > variables in the on

Re: [PATCH 2/2] scsi: esp: make it working on SG_CHAIN

2019-06-04 Thread Finn Thain
On Tue, 4 Jun 2019, Ming Lei wrote: > The driver supporses that there isn't sg chain, and itereate the > list one by one. This way is obviously wrong. > > Fixes it by sgl helper. > > Cc: Christoph Hellwig > Cc: Bart Van Assche > Cc: Ewan D. Milne > Cc: Hannes Reinecke > Cc: Guenter Roeck >

Re: [PATCH V2 3/3] scsi: esp: make it working on SG_CHAIN

2019-06-04 Thread Finn Thain
On Wed, 5 Jun 2019, Ming Lei wrote: > The driver expects that SCSI SGL is a simply array of SG, and itereate > the SGL via integer index. This way is obviously wrong, because of > SG_CHAIN. > > Fixes it by using sgl helper. > > V2: > - as suggested by Finn Thai

Re: [PATCH V3 0/3] scsi: three SG_CHAIN related fixes

2019-06-06 Thread Finn Thain
On Thu, 6 Jun 2019, Martin K. Petersen wrote: > > Ming, > > > Guenter reported scsi boot issue caused by commit c3288dd8c232 ("scsi: > > core: avoid pre-allocating big SGL for data"). > > Applied to 5.3/scsi-queue, thank you! > Thanks, that seems to fix the esp_scsi regression. Am I right in

Re: [PATCH V3 10/15] scsi: aha152x: use sg helper to operate scatterlist

2019-06-13 Thread Finn Thain
Hi Ming, On Fri, 14 Jun 2019, Ming Lei wrote: > Use the scatterlist iterators and remove direct indexing of the > scatterlist array. > > This way allows us to pre-allocate one small scatterlist, which can be > chained with one runtime allocated scatterlist if the pre-allocated one > isn't enough

Re: [PATCH V3 07/15] usb: image: microtek: use sg helper to operate scatterlist

2019-06-13 Thread Finn Thain
On Fri, 14 Jun 2019, Ming Lei wrote: > Use the scatterlist iterators and remove direct indexing of the > scatterlist array. > > This way allows us to pre-allocate one small scatterlist, which can be > chained with one runtime allocated scatterlist if the pre-allocated one > isn't enough for the w

Re: [PATCH V3 10/15] scsi: aha152x: use sg helper to operate scatterlist

2019-06-14 Thread Finn Thain
On Fri, 14 Jun 2019, Ming Lei wrote: > > Follows the fixed version, could you review again? > > From f03484d4bac083c39d70665cfbadb641093b63de Mon Sep 17 00:00:00 2001 > From: Ming Lei > Date: Wed, 12 Jun 2019 20:37:35 +0800 > Subject: [PATCH] scsi: aha152x: use sg helper to operate scatterlist

Re: [PATCH V4 11/16] scsi: aha152x: use sg helper to operate scatterlist

2019-06-16 Thread Finn Thain
n't enough for the whole request. > > Finn added the change to replace SCp.buffers_residual with sg_is_last() > for fixing updating it, and the similar change has been applied on > NCR5380.c > > Cc: Finn Thain > Signed-off-by: Ming Lei Reviewed-by: Finn Thain

Re: [PATCH V4 11/16] scsi: aha152x: use sg helper to operate scatterlist

2019-06-17 Thread Finn Thain
On Mon, 17 Jun 2019, Finn Thain wrote: > On Mon, 17 Jun 2019, Ming Lei wrote: > > > Use the scatterlist iterators and remove direct indexing of the > > scatterlist array. > > > > This way allows us to pre-allocate one small scatterlist, which can be > >

Re: [PATCH V5 11/16] scsi: aha152x: use sg helper to operate scatterlist

2019-06-17 Thread Finn Thain
On Tue, 18 Jun 2019, Ming Lei wrote: > From: Finn Thain > > Use the scatterlist iterators and remove direct indexing of the > scatterlist array. > > This way allows us to pre-allocate one small scatterlist, which can be > chained with one runtime allocated scatterlist if

Re: [PATCH V5 10/16] s390: zfcp_fc: use sg helper to operate scatterlist

2019-06-24 Thread Finn Thain
> diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c > index dccdb41bed8c..c7129f5234f0 100644 > --- a/drivers/s390/scsi/zfcp_dbf.c > +++ b/drivers/s390/scsi/zfcp_dbf.c > @@ -552,7 +552,7 @@ static u16 zfcp_dbf_san_res_cap_len_if_gpn_ft(char *tag, > if (x % (ZFCP

Re: [PATCH V5 10/16] s390: zfcp_fc: use sg helper to operate scatterlist

2019-06-24 Thread Finn Thain
On Tue, 25 Jun 2019, Ming Lei wrote: > On Tue, Jun 25, 2019 at 12:01:24PM +1000, Finn Thain wrote: > > > diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c > > > index dccdb41bed8c..c7129f5234f0 100644 > > > --- a/drivers/s390/scsi/zfcp_dbf.c

Re: [PATCH 0/2] Fix SCSI & USB Storage CHECK CONDITION handling

2019-09-27 Thread Finn Thain
[snipped selective measurements of word usage] On Fri, 27 Sep 2019, Alan Stern wrote: > > So I guess this was never defined precisely. > The O.E.D. defines these terms: residual a. [...] n. 1. a quantity remaining after other things have been subtracted

Re: [PATCH V2] scsi: save/restore command resid for error handling

2019-09-30 Thread Finn Thain
On Sat, 28 Sep 2019, Damien Le Moal wrote: > When a non-passthrough command is terminated with CHECK CONDITION, > request sense is executed by hijacking the command descriptor. Since > scsi_eh_prep_cmnd() and scsi_eh_restore_cmnd() do not save/restore the > original command resid, the value return

Re: [PATCH v3] scsi: core: fix uninit-value access of variable sshdr

2019-10-16 Thread Finn Thain
On Sat, 12 Oct 2019, zhengbin wrote: > kmsan report a warning in 5.1-rc4: > > BUG: KMSAN: uninit-value in sr_get_events drivers/scsi/sr.c:207 [inline] > BUG: KMSAN: uninit-value in sr_check_events+0x2cf/0x1090 drivers/scsi/sr.c:243 > CPU: 1 PID: 13858 Comm: syz-executor.0 Tainted: GB

[RFC] scsi: Avoid sign extension when setting command result bytes, was Re: [PATCH v5 00/13] scsi: core: fix uninit-value access of variable sshdr

2019-10-18 Thread Finn Thain
On Fri, 18 Oct 2019, Martin K. Petersen wrote: > > (Sorry, zhengbin, you opened a can of worms. This is some of our oldest > and most arcane code in SCSI) > A call to set_host_byte(cmd, x) or set_msg_byte(cmd, x) when x & 0x80 is set clobbers the most significant bytes in cmd->result. Avoid t

Re: [PATCH 10/24] scsi: introduce set_status_byte()

2019-10-21 Thread Finn Thain
On Mon, 21 Oct 2019, Hannes Reinecke wrote: > To be in-line with the other set_XX_byte() functions. > > Signed-off-by: Hannes Reinecke > --- > include/scsi/scsi_cmnd.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h > index 91bd

Re: [PATCH 03/24] wd33c93: use SCSI status

2019-10-21 Thread Finn Thain
On Mon, 21 Oct 2019, Hannes Reinecke wrote: > Use standard SCSI status and drop usage of the linux-specific ones. > > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/wd33c93.c | 21 - > 1 file changed, 8 insertions(+), 13 deletions(-) > > diff --git a/drivers/scsi/wd33c

Re: [PATCH 05/24] scsi: use standard SAM status codes

2019-10-21 Thread Finn Thain
On Mon, 21 Oct 2019, Hannes Reinecke wrote: > Use standard SAM status codes and omit the explicit shift to convert > to linus-specific ones. "Linux-specific". -- > > Signed-off-by: Hannes Reinecke > --- > drivers/ata/libata-scsi.c | 2 +- > drivers/infiniband/ulp/srp/ib_srp.c

Re: [PATCH RFC 00/24] scsi: Revamp result values

2019-10-21 Thread Finn Thain
On Mon, 21 Oct 2019, Douglas Gilbert wrote: > > > As usual, comments and reviews are welcome. > > It is hard to make an omelette without breaking some eggs. > Coccinelle can minimize the breakage; particularly the straight-forward conversion of (FOO << 1) to SAM_STAT_BAR. -- > Doug Gilbert

Re: [PATCH 12/24] scsi: introduce scsi_build_sense()

2019-10-21 Thread Finn Thain
On Mon, 21 Oct 2019, Hannes Reinecke wrote: > Introduce scsi_build_sense() as a wrapper around > scsi_build_sense_buffer() to format the buffer and set > the correct SCSI status. > > Signed-off-by: Hannes Reinecke > --- > drivers/ata/libata-scsi.c | 7 ++-- > drivers/s390/scsi/zf

Re: [PATCH 13/24] scsi: Kill DRIVER_SENSE

2019-10-21 Thread Finn Thain
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c > b/drivers/scsi/megaraid/megaraid_sas_base.c > index c40fbea06cc5..649f9610ca72 100644 > --- a/drivers/scsi/megaraid/megaraid_sas_base.c > +++ b/drivers/scsi/megaraid/megaraid_sas_base.c > @@ -1,3 +1,4 @@ > + > // SPDX-License-Identifier

Re: [PATCH] scsi/NCR5380: Avoid compiler warning when -Wimplicit-fallthrough is enabled

2019-04-08 Thread Finn Thain
On Mon, 8 Apr 2019, Gustavo A. R. Silva wrote: > Hi all, > > Friendly ping: > > Who can take this? > > Thanks > It has been queued up by Martin and James on git.kernel.org. Apparently it is to be pushed in the v5.2 merge window. --

[PATCH 2/4] g_NCR5380: End PDMA transfer correctly on target disconnection

2017-06-15 Thread Finn Thain
is not an error so don't return -1. Instead, store the remaining byte count for use by NCR5380_dma_residual(). [Modified to improve the BASR_END_DMA_TRANSFER error message rather than remove it -- F.T.] Signed-off-by: Ondrej Zary Signed-off-by: Finn Thain --- drivers/scsi/g_NCR5380.c

[PATCH 0/4] g_NCR5380: PDMA fixes and cleanup

2017-06-15 Thread Finn Thain
Ondrej, would you please test this patch series? One of your patches has been modified slightly and the two I wrote are untested. Finn Thain (2): g_NCR5380: Limit sg_tablesize to avoid PDMA read overruns on DTC436 g_NCR5380: Cleanup comments and whitespace Ondrej Zary (2): g_NCR5380: Fix

[PATCH 1/4] g_NCR5380: Fix PDMA transfer size

2017-06-15 Thread Finn Thain
From: Ondrej Zary generic_NCR5380_dma_xfer_len() incorrectly uses cmd->transfersize which causes rescan-scsi-bus and CD-ROM access to hang the system. Use cmd->SCp.this_residual instead, like other NCR5380 drivers. Signed-off-by: Ondrej Zary Signed-off-by: Finn Thain --- driver

[PATCH 3/4] g_NCR5380: Limit sg_tablesize to avoid PDMA read overruns on DTC436

2017-06-15 Thread Finn Thain
Back-to-back DMA receive transfers can lose a byte due to a 5380 flaw. This makes scatter-receive difficult or impossible on affected hardware, so limit the scatter/gather tablesize to 1. Signed-off-by: Finn Thain --- drivers/scsi/g_NCR5380.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH 4/4] g_NCR5380: Cleanup comments and whitespace

2017-06-15 Thread Finn Thain
Signed-off-by: Finn Thain --- drivers/scsi/g_NCR5380.c | 61 ++-- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index 784913193ea5..e9a942d86865 100644 --- a/drivers/scsi/g_NCR5380.c

Re: [PATCH 0/4] g_NCR5380: PDMA fixes and cleanup

2017-06-22 Thread Finn Thain
On Thu, 22 Jun 2017, Ondrej Zary wrote: > Works only with HDD on non-DTC chips. CD-ROM hangs. DTC hangs even with > HDD. The PDMA code really needs to be fixed. > Does this patch help? It should be applied on top of this series of 4. diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5

<    2   3   4   5   6   7   8   9   10   >