[PATCH] m68k link error and NCR5380_exit()

2005-03-06 Thread Finn Thain
If this patch looks okay to you SCSI people, I'll ask the m68k maintainer to apply it. It fixes a link failure in the !CONFIG_HOTPLUG m68k kernel caused by the mac_scsi driver. The patch should apply to v2.6.10. AFAICT, the introduction of __devexit NCR5380_exit() in 2.6.9 necessitated this

Re: mac_scsi boot crash, was Re: [PATCH] m68k link error and NCR5380_exit()

2005-03-08 Thread Finn Thain
On Mon, 7 Mar 2005, Kenn Humborg wrote: On Mon, Mar 07, 2005 at 09:53:22AM -0800, Brad Boyer wrote: ... Looks to me like the interrupt came in after the driver already decided to give up for some reason. I had a big problem with that while I was trying to fix the driver to use DMA

[PATCH] mac_scsi boot crash fix

2005-03-09 Thread Finn Thain
like your patch :-) Did it make it upstream? -f Signed-off-by: Finn Thain [EMAIL PROTECTED] --- a/drivers/scsi/mac_scsi.c 2005-03-09 22:21:01.369397570 +1100 +++ b/drivers/scsi/mac_scsi.c 2005-03-09 22:02:12.594082086 +1100 @@ -302,7 +302,7 @@ int macscsi_detect(Scsi_Host_Template

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 fth...@telegraphics.com.au (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

Re: Debugging scsi abort handling ?

2014-08-28 Thread Finn Thain
On Thu, 28 Aug 2014, James Bottomley wrote: I'm fine with not calling scsi_done from eh_abort, but I cannot guarantee that another thread will not complete the cmnd in the mean time before hand. This is expected. After error handling begins, the block layer ignores all done

Re: Debugging scsi abort handling ?

2014-08-28 Thread Finn Thain
On Thu, 28 Aug 2014, Hannes Reinecke wrote: What might happen, though, that the command is already dead and gone by the time you're calling -scsi_done() (if you call it after eh_abort). So there might not _be_ a command upon which you can call -scsi_done() to start with. Hence any LLDD

Re: Debugging scsi abort handling ?

2014-08-29 Thread Finn Thain
On Fri, 29 Aug 2014, Hannes Reinecke wrote: On 08/29/2014 06:39 AM, Finn Thain wrote: On Thu, 28 Aug 2014, Hannes Reinecke wrote: What might happen, though, that the command is already dead and gone by the time you're calling -scsi_done() (if you call it after eh_abort). So

Re: [PATCH 1/5] NCR5380: Whitespace cleanup

2014-10-02 Thread Finn Thain
On Thu, 2 Oct 2014, Hannes Reinecke wrote: Signed-off-by: Hannes Reinecke h...@suse.de --- drivers/scsi/NCR5380.c | 652 + 1 file changed, 333 insertions(+), 319 deletions(-) This is going to break about 30 or 40 patches that I'm working

Re: [PATCH 5/5] scsi: Remove scmd-tag

2014-10-02 Thread Finn Thain
On Thu, 2 Oct 2014, Hannes Reinecke wrote: struct scsi_cmnd has a 'tag' field, which was supposed to be used to support SCSI-II tagged command queueing. In the end tagged command queueing support moved into the block layer, with the tag number available in the request. So the 'tag' field

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

2014-10-02 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 --- Use of pr_debug() here was a bad idea of mine. Joe was right when he questioned

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

2014-10-02 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. At the end of this series about a thousand lines (net) have been removed including two header files. A

[PATCH 04/29] ncr5380: Remove unused macros

2014-10-02 Thread Finn Thain
Some macros are never evaluated (i.e. FOO, USLEEP, SCSI2 and USE_WRAPPER; and in some drivers, NCR5380_intr and NCR5380_proc_info). DRIVER_SETUP serves no purpose anymore. Remove these macro definitions. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.c|2

[PATCH 03/29] ncr5380: Fix compiler warnings and __setup options

2014-10-02 Thread Finn Thain
[-Wunused-function] Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/dtc.c |8 +++- drivers/scsi/pas16.c | 10 +- drivers/scsi/t128.c | 11 ++- 3 files changed, 26 insertions(+), 3 deletions(-) Index: linux/drivers/scsi/dtc.c

[PATCH 10/29] ncr5380: Fix SCSI_IRQ_NONE bugs

2014-10-02 Thread Finn Thain
is understood to mean no IRQ. This remains supported so as to avoid breaking existing ISA setups (which can be difficult to get working) and because existing documentation (SANE, TLDP etc) describes this usage for the ISA NCR5380 driver options. Signed-off-by: Finn Thain fth...@telegraphics.com.au

[PATCH 02/29] ncr5380: Remove unused hostdata fields

2014-10-02 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 --- drivers/scsi/dmx3191d.c |4 ++-- drivers/scsi/mac_scsi.c | 33 - drivers/scsi/mac_scsi.h |3

[PATCH 08/29] ncr5380: Remove redundant AUTOSENSE macro

2014-10-02 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 --- drivers/scsi/NCR5380.c | 14 +- drivers/scsi/NCR5380.h |5

[PATCH 18/29] mac_scsi: Remove header

2014-10-02 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 --- drivers/scsi

[PATCH 15/29] ncr5380: Remove *_RELEASE macros

2014-10-02 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 --- drivers

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

2014-10-02 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 --- drivers/scsi/NCR5380.c | 29 + drivers/scsi/NCR5380.h | 11

[PATCH 11/29] ncr5380: Remove NCR5380_STATS

2014-10-02 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 --- drivers/scsi/NCR5380.c | 64 --- drivers/scsi

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

2014-10-02 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 --- drivers/scsi/NCR5380.c | 75 ++- drivers/scsi/NCR5380.h |3 drivers

[PATCH 21/29] mac_scsi: Convert to platform device

2014-10-02 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 --- The new hwreg_present() call

[PATCH 25/29] sun3_scsi: Convert to platform device

2014-10-02 Thread Finn Thain
Convert sun3_scsi to platform device and eliminate scsi_register(). Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/m68k/sun3/config.c | 11 + drivers/scsi/sun3_scsi.c | 405 +++ drivers/scsi/sun3_scsi.h |8 3 files changed, 214

[PATCH 09/29] ncr5380: Remove duplicate comments

2014-10-02 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 --- drivers/scsi/dtc.c | 17

[PATCH 24/29] atari_scsi: Remove header

2014-10-02 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

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

2014-10-02 Thread Finn Thain
-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.c | 22 ++ drivers/scsi/NCR5380.h |4 drivers/scsi/arm/oak.c |2 -- drivers/scsi/dtc.c | 13 ++--- drivers/scsi/pas16.c | 12 ++-- 5 files changed, 26 insertions

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

2014-10-02 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 --- drivers/scsi/atari_scsi.c |2 +- drivers/scsi

[PATCH 27/29] ncr5380: Remove ENABLE_IRQ/DISABLE_IRQ macros

2014-10-02 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 --- drivers/scsi/atari_NCR5380.c |2 -- drivers/scsi/atari_scsi.c| 21 - drivers/scsi

[PATCH 20/29] mac_scsi: Cleanup PDMA code

2014-10-02 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 --- drivers/scsi/mac_scsi.c | 122 1 file changed, 62

[PATCH 23/29] atari_scsi: Convert to platform device

2014-10-02 Thread Finn Thain
(IRQ_TYPE_SLOW == 0 anyway). Signed-off-by: Finn Thain fth...@telegraphics.com.au --- arch/m68k/atari/config.c |5 drivers/scsi/atari_scsi.c | 426 ++ drivers/scsi/atari_scsi.h | 17 - 3 files changed, 217 insertions(+), 231 deletions(-) Index

[PATCH 28/29] atari_NCR5380: Refactor Falcon special cases

2014-10-02 Thread Finn Thain
in atari_NCR5380.c so don't set it. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.h |4 drivers/scsi/atari_NCR5380.c | 30 +++--- drivers/scsi/atari_scsi.c| 21 - 3 files changed, 31 insertions(+), 24 deletions

[PATCH 17/29] dmx3191d: Use IRQ_NONE

2014-10-02 Thread Finn Thain
polling apparently because of this issue. Set host-irq = IRQ_NONE so the core driver will prevent targets from disconnecting. Don't request the irq. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/dmx3191d.c | 25 - 1 file changed, 8 insertions(+), 17

[PATCH 26/29] sun3_scsi: Move macro definitions

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

[PATCH 29/29] atari_NCR5380: Refactor Falcon locking

2014-10-02 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 22/29] atari_scsi: Fix atari_scsi deadlocks on Falcon

2014-10-02 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 --- arch/m68k/atari/stdma.c | 62 +++-- arch/m68k/include/asm/atari_stdma.h |4 - drivers/scsi/atari_NCR5380.c

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

2014-10-02 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 --- Line length issues

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

2014-10-02 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 --- drivers/scsi/Kconfig|2 drivers/scsi/mac_scsi.c | 112

[PATCH 06/29] ncr5380: Remove more useless prototypes

2014-10-02 Thread Finn Thain
defined Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.h |8 drivers/scsi/atari_NCR5380.c |3 + drivers/scsi/atari_scsi.c| 76 --- drivers/scsi/dtc.c |7 +-- drivers/scsi/pas16.c

[PATCH 05/29] ncr5380: Remove useless prototypes

2014-10-02 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 --- drivers

[PATCH] scsi: Fix choir and beeing malaprops

2014-10-02 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Documentation/scsi/scsi_eh.txt |4 ++-- drivers/scsi/aha152x.c |2 +- drivers/scsi/mac_scsi.c|2 +- include/scsi/scsi_host.h |2 +- 4 files changed, 5 insertions(+), 5 deletions(-) Index: linux

[PATCH] scsi_debug: Error message should say scsi_host_alloc not scsi_register

2014-10-02 Thread Finn Thain
Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/scsi_debug.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux/drivers/scsi/scsi_debug.c === --- linux.orig/drivers/scsi/scsi_debug.c

Re: [PATCH 07/29] ncr5380: Cleanup TAG_NEXT and TAG_NONE macros

2014-10-03 Thread Finn Thain
On Fri, 3 Oct 2014, Geert Uytterhoeven wrote: On Thu, Oct 2, 2014 at 8:56 AM, Finn Thain fth...@telegraphics.com.au wrote: --- linux.orig/drivers/scsi/NCR5380.h 2014-10-02 16:55:55.0 +1000 +++ linux/drivers/scsi/NCR5380.h2014-10-02 16:55:57.0 +1000 @@ -224,14

Re: [PATCH 10/29] ncr5380: Fix SCSI_IRQ_NONE bugs

2014-10-03 Thread Finn Thain
On Fri, 3 Oct 2014, Geert Uytterhoeven wrote: On Thu, Oct 2, 2014 at 8:56 AM, Finn Thain fth...@telegraphics.com.au wrote: Oak scsi doesn't use any IRQ, but it sets irq = IRQ_NONE rather than SCSI_IRQ_NONE. Problem is, the core NCR5380 driver expects SCSI_IRQ_NONE if it is to issue

Re: [PATCH 19/29] mac_scsi: Add module option to Kconfig

2014-10-03 Thread Finn Thain
On Fri, 3 Oct 2014, Geert Uytterhoeven wrote: On Thu, Oct 2, 2014 at 8:56 AM, Finn Thain fth...@telegraphics.com.au wrote: 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. --- linux.orig

Re: [PATCH 23/29] atari_scsi: Convert to platform device

2014-10-06 Thread Finn Thain
On Sun, 5 Oct 2014, Michael Schmitz wrote: On Fri, 3 Oct 2014, Geert Uytterhoeven wrote: + if (ATARIHW_PRESENT(TT_SCSI)) { + atari_scsi_reg_read = atari_scsi_tt_reg_read; + atari_scsi_reg_write = atari_scsi_tt_reg_write; + } else

Re: [PATCH 28/29] atari_NCR5380: Refactor Falcon special cases

2014-10-06 Thread Finn Thain
On Mon, 6 Oct 2014, Hannes Reinecke wrote: On 10/02/2014 08:56 AM, Finn Thain wrote: Make the atari_NCR5380.c core driver usable by sun3_scsi, mac_scsi and others by moving some of the Falcon-specific code out of the core driver: !IS_A_TT, atari_read_overruns and falcon_dont_release

Re: [PATCH 07/29] ncr5380: Cleanup TAG_NEXT and TAG_NONE macros

2014-10-06 Thread Finn Thain
On Mon, 6 Oct 2014, Hannes Reinecke wrote: On 10/02/2014 08:56 AM, Finn Thain wrote: Both atari_NCR5380.c and sun3_NCR5380.c core drivers #undef TAG_NONE and then redefine it. But the original definition is unused because NCR5380.c lacks support for tagged queueing. So just define

Re: [PATCH 23/29] atari_scsi: Convert to platform device

2014-10-08 Thread Finn Thain
On Mon, 6 Oct 2014, Michael Schmitz wrote: Can these be handled through the platform_device's resources? I don't know. Should be possible - I've seen that used in the ISP116x HCD driver (arch-dependent post-register access delay function passed via platform data).

Re: [PATCH 23/29] atari_scsi: Convert to platform device

2014-10-20 Thread Finn Thain
On Mon, 20 Oct 2014, Michael Schmitz wrote: Hi Finn, not certain it is related to this exact patch - the driver crashes pretty much on the spot when selecting the first target on the bus. If it isn't that exact patch then it will probably be one of the other atari_scsi patches. Most of

Re: [PATCH 23/29] atari_scsi: Convert to platform device

2014-10-26 Thread Finn Thain
On Sun, 26 Oct 2014, Michael Schmitz wrote: On Mon, 20 Oct 2014, Michael Schmitz wrote: not certain it is related to this exact patch - the driver crashes pretty much on the spot when selecting the first target on the bus. ... Turns out I missed a reject in patch 29 of

[PATCH v2 02/36] ncr5380: Remove unused hostdata fields

2014-10-27 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 v2 04/36] ncr5380: Remove unused macros

2014-10-27 Thread Finn Thain
Some macros are never evaluated (i.e. FOO, USLEEP, SCSI2 and USE_WRAPPER; and in some drivers, NCR5380_intr and NCR5380_proc_info). DRIVER_SETUP serves no purpose anymore. Remove these macro definitions. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h

[PATCH v2 00/36] Fixes, cleanups and modernization for NCR5380 drivers

2014-10-27 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 v2 10/36] ncr5380: Fix SCSI_IRQ_NONE bugs

2014-10-27 Thread Finn Thain
driver options. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changes since v1: - Define NO_IRQ macro and use that instead of IRQ_NONE. --- drivers/scsi/NCR5380.c | 12 ++-- drivers/scsi/NCR5380.h |5 - drivers/scsi/arm/oak.c |2 +- drivers/scsi/dmx3191d.c

[PATCH v2 26/36] sun3_scsi: Move macro definitions

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

[PATCH v2 09/36] ncr5380: Remove duplicate comments

2014-10-27 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 --- drivers/scsi/dtc.c | 17

[PATCH v2 11/36] ncr5380: Remove NCR5380_STATS

2014-10-27 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 --- drivers/scsi/NCR5380.c | 64 --- drivers/scsi

[PATCH v2 30/36] atari_NCR5380: Merge from sun3_NCR5380.c

2014-10-27 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 v2 17/36] dmx3191d: Use NO_IRQ

2014-10-27 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 --- Changes since v1: - Use NO_IRQ instead of IRQ_NONE. --- drivers/scsi/dmx3191d.c | 25

[PATCH v2 12/36] ncr5380: Cleanup host info() methods

2014-10-27 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 --- Changes since v1: - Dropped explicit NULL termination of snprintf() buffers. --- drivers/scsi/NCR5380.c

[PATCH v2 34/36] atari_NCR5380: Move static TagAlloc array to host data

2014-10-27 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 --- drivers/scsi/NCR5380.h | 12 drivers/scsi

[PATCH v2 28/36] atari_NCR5380: Refactor Falcon special cases

2014-10-27 Thread Finn Thain
in atari_NCR5380.c so don't set it. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.h |4 drivers/scsi/atari_NCR5380.c | 30 +++--- drivers/scsi/atari_scsi.c| 21 - 3 files changed, 31 insertions(+), 24 deletions

[PATCH v2 15/36] ncr5380: Remove *_RELEASE macros

2014-10-27 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 --- drivers

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

2014-10-27 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 --- MAINTAINERS |1 drivers/scsi/sun3_NCR5380.c | 2849

[PATCH v2 33/36] atari_NCR5380: Introduce FLAG_TAGGED_QUEUING

2014-10-27 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 --- drivers/scsi/NCR5380.h |1 + drivers/scsi/atari_NCR5380.c | 22

[PATCH v2 08/36] ncr5380: Remove redundant AUTOSENSE macro

2014-10-27 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 --- drivers/scsi/NCR5380.c | 14 +- drivers/scsi/NCR5380.h |5

[PATCH v2 29/36] atari_NCR5380: Refactor Falcon locking

2014-10-27 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 v2 36/36] atari_NCR5380: Remove RESET_RUN_DONE macro

2014-10-27 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 --- drivers/scsi/atari_NCR5380.c | 88 --- drivers/scsi/sun3_scsi.c |1

[PATCH v2 32/36] atari_NCR5380: Merge from NCR5380.c

2014-10-27 Thread Finn Thain
The NCR5380.c core driver has moved on since atari_NCR5380.c was forked. 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 --- drivers/scsi/atari_NCR5380.c | 209

[PATCH v2 27/36] ncr5380: Remove ENABLE_IRQ/DISABLE_IRQ macros

2014-10-27 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 --- drivers/scsi/atari_NCR5380.c |2 -- drivers/scsi/atari_scsi.c| 21 - drivers/scsi

[PATCH v2 22/36] atari_scsi: Fix atari_scsi deadlocks on Falcon

2014-10-27 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 --- Changes since v1: - Use Geert's suggestion for simpler stdma_is_locked_by() implementation. --- arch/m68k/atari/stdma.c | 61

[PATCH v2 07/36] ncr5380: Cleanup TAG_NEXT and TAG_NONE macros

2014-10-27 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 --- drivers/scsi/NCR5380.c | 29 + drivers/scsi/NCR5380.h | 11

[PATCH v2 23/36] atari_scsi: Convert to platform device

2014-10-27 Thread Finn Thain
(IRQ_TYPE_SLOW == 0 anyway). Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changes since v1: - Remove unnecessary return -ENODEV branch. - Move IRQ constants to platform resources. - Always assign instance-irq so that the atari_NCR5380.c core driver can adopt the NCR5380.c

[PATCH v2 14/36] ncr5380: Remove pointless compiler command line override macros

2014-10-27 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 --- drivers/scsi/atari_scsi.c |2 +- drivers/scsi

[PATCH v2 21/36] mac_scsi: Convert to platform device

2014-10-27 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 --- The new hwreg_present() call

[PATCH v2 25/36] sun3_scsi: Convert to platform device

2014-10-27 Thread Finn Thain
Convert sun3_scsi to platform device and eliminate scsi_register(). Signed-off-by: Finn Thain fth...@telegraphics.com.au --- Changes since v1: - Use NO_IRQ instead of IRQ_NONE. - Move device IRQ and address constants to platform resources. - Test idprom-id_machtype before registering platform

[PATCH v2 13/36] ncr5380: Move static PDMA spin counters to host data

2014-10-27 Thread Finn Thain
-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.c | 22 ++ drivers/scsi/NCR5380.h |4 drivers/scsi/arm/oak.c |2 -- drivers/scsi/dtc.c | 13 ++--- drivers/scsi/pas16.c | 12 ++-- 5 files changed, 26 insertions

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

2014-10-27 Thread Finn Thain
the dev_id argument. Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.h |2 + drivers/scsi/atari_NCR5380.c | 61 +++ drivers/scsi/atari_scsi.c|8 ++--- 3 files changed, 28 insertions(+), 43 deletions

[PATCH v2 18/36] mac_scsi: Remove header

2014-10-27 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 --- drivers/scsi

[PATCH v2 20/36] mac_scsi: Cleanup PDMA code

2014-10-27 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 --- drivers/scsi/mac_scsi.c | 122 1 file changed, 62

[PATCH v2 06/36] ncr5380: Remove more useless prototypes

2014-10-27 Thread Finn Thain
defined Signed-off-by: Finn Thain fth...@telegraphics.com.au --- drivers/scsi/NCR5380.h |8 drivers/scsi/atari_NCR5380.c |3 + drivers/scsi/atari_scsi.c| 76 --- drivers/scsi/dtc.c |7 +-- drivers/scsi/pas16.c

[PATCH v2 24/36] atari_scsi: Remove header

2014-10-27 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

[PATCH v2 19/36] mac_scsi: Add module option to Kconfig

2014-10-27 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 --- drivers/scsi/Kconfig|2 drivers/scsi/mac_scsi.c | 112

[PATCH v2 16/36] ncr5380: Drop legacy scsi.h include

2014-10-27 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 --- Line length issues

[PATCH v2 05/36] ncr5380: Remove useless prototypes

2014-10-27 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 --- drivers

Re: [PATCH v2 19/36] mac_scsi: Add module option to Kconfig

2014-10-31 Thread Finn Thain
On Thu, 30 Oct 2014, Hannes Reinecke wrote: On 10/27/2014 06:26 AM, Finn Thain wrote: 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

Re: [PATCH v2 20/36] mac_scsi: Cleanup PDMA code

2014-10-31 Thread Finn Thain
On Thu, 30 Oct 2014, Hannes Reinecke wrote: On 10/30/2014 08:46 AM, Hannes Reinecke wrote: Any reason why you didn't re-indent [...] Ahh, forget it. Addressed with the next patch. So, does it get your reviewed-by tag? (Thanks for reviewing all this, BTW.) You also questioned

Re: [PATCH v2 29/36] atari_NCR5380: Refactor Falcon locking

2014-10-31 Thread Finn Thain
On Thu, 30 Oct 2014, Hannes Reinecke wrote: On 10/27/2014 06:26 AM, Finn Thain wrote: Simplify falcon_release_lock_if_possible() by making callers responsible for disabling local IRQ's, which they must do anyway to correctly synchronize the ST DMA lock with core driver data

Re: [PATCH v2 30/36] atari_NCR5380: Merge from sun3_NCR5380.c

2014-10-31 Thread Finn Thain
On Thu, 30 Oct 2014, Hannes Reinecke wrote: On 10/27/2014 06:26 AM, Finn Thain wrote: 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

Re: [PATCH v2 30/36] atari_NCR5380: Merge from sun3_NCR5380.c

2014-10-31 Thread Finn Thain
On Fri, 31 Oct 2014, Hannes Reinecke wrote: Hmm. I always feel a bit awkward by using personal names in the code. It's not good practice nowadays. Plus one can never be sure if that address is still valid. Or remains so for the foreseeable future. It was valid as of a couple of months ago.

Re: [PATCH v2 00/36] Fixes, cleanups and modernization for NCR5380 drivers

2014-11-02 Thread Finn Thain
On Sun, 2 Nov 2014, Michael Schmitz wrote: Tested atari_scsi on Falcon / CT60 hardware - no regressions over v1 that I've seen. Tested-by: Michael Schmitz schmitz...@gmail.com Thanks for testing. No regressions over v1 means no regressions, right? -- -- To unsubscribe from this list:

Re: [PATCH v2 00/36] Fixes, cleanups and modernization for NCR5380 drivers

2014-11-05 Thread Finn Thain
On Thu, 6 Nov 2014, Michael Schmitz wrote: Leaves the current instability - I did some work on the CT60 accelerator (reflashed the firmware so I can use the CTPCI board). This might have caused the system to become more unstable. Needs more investigation. I gather from the emails we've

Re: [PATCH v2 00/36] Fixes, cleanups and modernization for NCR5380 drivers

2014-11-06 Thread Finn Thain
On Fri, 7 Nov 2014, Michael Schmitz wrote: it's probably not Geert but James who needs to give the go-ahead. Given Geert's objections to the changes under arch/m68k in v1, I'm hoping for an acked-by from Geert for v2... -- -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v2 22/36] atari_scsi: Fix atari_scsi deadlocks on Falcon

2014-11-07 Thread Finn Thain
On Sat, 8 Nov 2014, Michael Schmitz wrote: Index: linux/drivers/scsi/atari_NCR5380.c === --- linux.orig/drivers/scsi/atari_NCR5380.c 2014-10-27 16:25:36.0 +1100 +++ linux/drivers/scsi/atari_NCR5380.c

Re: [PATCH v2 25/36] sun3_scsi: Convert to platform device

2014-11-09 Thread Finn Thain
On Sun, 9 Nov 2014, Geert Uytterhoeven wrote: On Mon, Oct 27, 2014 at 6:26 AM, Finn Thain fth...@telegraphics.com.au wrote: --- linux.orig/arch/m68k/sun3/config.c 2014-10-27 16:17:59.0 +1100 +++ linux/arch/m68k/sun3/config.c 2014-10-27 16:25:50.0 +1100 @@ -169,3

Re: [PATCH v2 19/36] mac_scsi: Add module option to Kconfig

2014-11-09 Thread Finn Thain
On Fri, 31 Oct 2014, Hannes Reinecke wrote: On 10/31/2014 08:17 AM, Finn Thain wrote: On Thu, 30 Oct 2014, Hannes Reinecke wrote: On 10/27/2014 06:26 AM, Finn Thain wrote: Allow mac_scsi to be built as a module. Replace the old validation of __setup options with code

Re: [PATCH v2 29/36] atari_NCR5380: Refactor Falcon locking

2014-11-09 Thread Finn Thain
Ping... On Fri, 31 Oct 2014, Finn Thain wrote: On Thu, 30 Oct 2014, Hannes Reinecke wrote: On 10/27/2014 06:26 AM, Finn Thain wrote: Simplify falcon_release_lock_if_possible() by making callers responsible for disabling local IRQ's, which they must do anyway to correctly

Re: [PATCH v2 06/36] ncr5380: Remove more useless prototypes

2014-11-09 Thread Finn Thain
Ping... On Wed, 29 Oct 2014, Hannes Reinecke wrote: On 10/27/2014 06:26 AM, Finn Thain wrote: Make use of the host template static initializer instead of assigning handlers at run-time. Move __maybe_unused qualifiers from declarations to definitions. Move the atari_scsi_bus_reset

[PATCH v3 04/37] ncr5380: Remove unused macros

2014-11-11 Thread Finn Thain
Some macros are never evaluated (i.e. FOO, USLEEP, SCSI2 and USE_WRAPPER; and in some drivers, NCR5380_intr and NCR5380_proc_info). DRIVER_SETUP serves no purpose anymore. Remove these macro definitions. Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h

[PATCH v3 03/37] ncr5380: Fix compiler warnings and __setup options

2014-11-11 Thread Finn Thain
[-Wunused-function] Signed-off-by: Finn Thain fth...@telegraphics.com.au Reviewed-by: Hannes Reinecke h...@suse.de --- drivers/scsi/dtc.c |8 +++- drivers/scsi/pas16.c | 10 +- drivers/scsi/t128.c | 11 ++- 3 files changed, 26 insertions(+), 3 deletions(-) Index: linux

  1   2   3   4   5   6   7   8   9   >