Re: [BUG] mpt2sas: driver init fails on kernel >=4.2 for 9211-8i IT

2016-03-20 Thread Sreekanth Reddy
Hi Matthias, Can you please share us the driver logs with driver logging_level set to 0x3f8. So that we can get more info from this log. Thanks, Sreekanth On Mon, Mar 21, 2016 at 1:44 AM, Matthias Prager wrote: > Hello, > > I don't know what's the correct procedure,

[PATCH v3 07/23] ncr5380: Remove BOARD_REQUIRES_NO_DELAY macro

2016-03-20 Thread Finn Thain
The io_recovery_delay macro is intended to insert a microsecond delay between the chip register accesses that begin a DMA operation. This is reportedly needed for some ISA boards. Reverse the sense of the macro test so that in the common case, where no delay is required, drivers need not define

[PATCH v3 01/23] g_ncr5380: Remove CONFIG_SCSI_GENERIC_NCR53C400

2016-03-20 Thread Finn Thain
This change brings a number of improvements: fewer macros, better test coverage, simpler code and sane Kconfig options. The downside is a small chance of incompatibility (which seems unavoidable). CONFIG_SCSI_GENERIC_NCR53C400 exists to enable or inhibit pseudo DMA transfers when the driver is

[PATCH v3 08/23] ncr5380: Use DMA hooks for PDMA

2016-03-20 Thread Finn Thain
Those wrapper drivers which use DMA define the REAL_DMA macro and those which use pseudo DMA define PSEUDO_DMA. These macros need to be removed for a number of reasons, not least of which is to have drivers share more code. Redefine the PDMA send and receive hooks as DMA setup hooks, so that the

[PATCH v3 03/23] ncr5380: Remove REAL_DMA and REAL_DMA_POLL macros

2016-03-20 Thread Finn Thain
For the NCR5380.c core driver, these macros are never used. If REAL_DMA were to be defined, compilation would fail. For the atari_NCR5380.c core driver, REAL_DMA is always defined. Hence these macros are pointless. Signed-off-by: Finn Thain Reviewed-by: Hannes

[PATCH v3 09/23] ncr5380: Adopt uniform DMA setup convention

2016-03-20 Thread Finn Thain
Standardize the DMA setup hooks so that the DMA implementation in atari_NCR5380.c can be reconciled with pseudo DMA implementation in NCR5380.c. Calls to NCR5380_dma_recv_setup() and NCR5380_dma_send_setup() return a negative value on failure, zero on PDMA transfer success and a positive byte

[PATCH v3 10/23] ncr5380: Merge DMA implementation from atari_NCR5380 core driver

2016-03-20 Thread Finn Thain
Adopt the DMA implementation from atari_NCR5380.c. This means that atari_scsi and sun3_scsi can make use of the NCR5380.c core driver and the atari_NCR5380.c driver fork can be made redundant. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke

[PATCH v3 12/23] sun3_scsi: Adopt NCR5380.c core driver

2016-03-20 Thread Finn Thain
Add support for the custom Sun 3 DMA logic to the NCR5380.c core driver. This code is copied from atari_NCR5380.c. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz --- The Sun 3 DMA code is

[PATCH v3 11/23] atari_scsi: Adopt NCR5380.c core driver

2016-03-20 Thread Finn Thain
Add support for the Atari ST DMA chip to the NCR5380.c core driver. This code is copied from atari_NCR5380.c. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz --- drivers/scsi/NCR5380.c|

[PATCH v3 14/23] ncr5380: Reduce max_lun limit

2016-03-20 Thread Finn Thain
The driver has a limit of eight LUs because of the byte-sized bitfield that is used for busy flags. That means the maximum LUN is 7. The default is 8. Signed-off-by: Finn Thain Tested-by: Michael Schmitz --- Changed since v1: - Reduce

[PATCH v3 18/23] ncr5380: Remove DONT_USE_INTR and AUTOPROBE_IRQ macros

2016-03-20 Thread Finn Thain
Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz --- drivers/scsi/NCR5380.c | 12 +--- drivers/scsi/NCR5380.h |4 drivers/scsi/arm/oak.c |2 --

[PATCH v3 15/23] dmx3191d: Drop max_sectors limit

2016-03-20 Thread Finn Thain
The dmx3191d driver is not capable of DMA or PDMA so all transfers use PIO. Now that large slow PIO transfers periodically stop and call cond_resched(), the max_sectors limit can go away. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke ---

[PATCH v3 20/23] atari_scsi: Set a reasonable default for cmd_per_lun

2016-03-20 Thread Finn Thain
This setting does not need to be conditional on Atari ST or TT. Signed-off-by: Finn Thain Tested-by: Michael Schmitz --- Changed since v1: - Set the default cmd_per_lun to 4 based on test results. Changed since v2: - Revert the default

[PATCH v3 13/23] ncr5380: Remove disused atari_NCR5380.c core driver

2016-03-20 Thread Finn Thain
Now that atari_scsi and sun3_scsi have been converted to use the NCR5380.c core driver, remove atari_NCR5380.c. Also remove the last vestiges of its Tagged Command Queueing implementation from the wrapper drivers. The TCQ support in atari_NCR5380.c is abandoned by this patch. It is not merged

[PATCH v3 16/23] ncr5380: Fix register decoding for debugging

2016-03-20 Thread Finn Thain
Decode all bits in the chip registers. They are all useful at times. Fix printk severity so that this output can be suppressed along with the other debugging output. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz

[PATCH v3 19/23] ncr5380: Update usage documentation

2016-03-20 Thread Finn Thain
Update kernel parameter documentation for atari_scsi, mac_scsi and g_NCR5380 drivers. Remove duplication. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke --- Documentation/scsi/g_NCR5380.txt | 17 ++-

[PATCH v3 17/23] ncr5380: Remove remaining register storage qualifiers

2016-03-20 Thread Finn Thain
Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Michael Schmitz --- drivers/scsi/NCR5380.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux/drivers/scsi/NCR5380.c

[PATCH v3 22/23] mac_scsi: Fix pseudo DMA implementation

2016-03-20 Thread Finn Thain
Fix various issues: Comments about bus errors are incorrect. The PDMA asm must return the size of the memory access that faulted so the transfer count can be adjusted accordingly. A phase change may cause a bus error but should not be treated as failure. A bus error does not always imply a phase

[PATCH v3 23/23] ncr5380: Call complete_cmd() for disconnected commands on bus reset

2016-03-20 Thread Finn Thain
I'm told that some targets are liable to disconnect a REQUEST SENSE command. Theoretically this would cause a command undergoing autosense to be moved onto the disconnected list. The bus reset handler must call complete_cmd() for these commands, otherwise the hostdata->sensing pointer will not get

[PATCH v3 05/23] ncr5380: Disable the DMA errata workaround flag by default

2016-03-20 Thread Finn Thain
The only chip that needs the workarounds enabled is an early NMOS device. That means that the common case is to disable them. Unfortunately the sense of the flag is such that it has to be set for the common case. Rename the flag so that zero can be used to mean "no errata workarounds needed".

[PATCH v3 21/23] atari_scsi: Allow can_queue to be increased for Falcon

2016-03-20 Thread Finn Thain
The benefit of limiting can_queue to 1 is that atari_scsi shares the ST DMA chip more fairly with other drivers (e.g. falcon-ide). Unfortunately, this can limit SCSI bus utilization. On systems without IDE, atari_scsi should issue SCSI commands whenever it can arbitrate for the bus. Make that

[PATCH v3 06/23] ncr5380: Remove PSEUDO_DMA macro

2016-03-20 Thread Finn Thain
For those wrapper drivers which only implement Programmed IO, have NCR5380_dma_xfer_len() evaluate to zero. That allows PDMA to be easily disabled at run-time and so the PSEUDO_DMA macro is no longer needed. Also remove the spin counters used for debugging pseudo DMA drivers. Signed-off-by: Finn

[PATCH v3 04/23] atari_NCR5380: Remove DMA_MIN_SIZE macro

2016-03-20 Thread Finn Thain
Only the atari_scsi and sun3_scsi drivers define DMA_MIN_SIZE. Both drivers also define NCR5380_dma_xfer_len, which means DMA_MIN_SIZE can be removed from the core driver. This removes another discrepancy between the two core drivers. Signed-off-by: Finn Thain

[PATCH v3 00/23] ncr5380: Eliminate macros, reduce code duplication, fix bugs etc

2016-03-20 Thread Finn Thain
This patch series has more macro elimination and some tweaks to the DMA hooks so that all the wrapper drivers can share the same core DMA algorithm. This resolves the major discrepancies between the two core drivers, which relate to code conditional on the REAL_DMA and PSEUDO_DMA macros. After

[PATCH v3 02/23] ncr5380: Remove FLAG_NO_PSEUDO_DMA where possible

2016-03-20 Thread Finn Thain
Drivers that define PSEUDO_DMA also define NCR5380_dma_xfer_len. The core driver must call NCR5380_dma_xfer_len which means FLAG_NO_PSEUDO_DMA can be eradicated from the core driver. dmx3191d doesn't define PSEUDO_DMA and has no use for FLAG_NO_PSEUDO_DMA, so remove it there also. Signed-off-by:

Re: [PATCHv3] scsi: disable automatic target scan

2016-03-20 Thread Bart Van Assche
On 03/19/16 08:18, Hannes Reinecke wrote: On 03/18/2016 10:56 PM, Bart Van Assche wrote: On 03/17/2016 12:39 AM, Hannes Reinecke wrote: On larger installations it is useful to disable automatic LUN scanning, and only add the required LUNs via udev rules. This can speed up bootup dramatically.

[BUG] mpt2sas: driver init fails on kernel >=4.2 for 9211-8i IT

2016-03-20 Thread Matthias Prager
Hello, I don't know what's the correct procedure, whether I should file a bug or first report this issue on the kernel mailing-list. So please feel free to tell me to open a ticket in the bugtracker (bugzilla.kernel.org?). But first let me present the issue I encounter: Kernels >= 4.2 (4.2.1

RE: [PATCH 1/1] scsi: storvsc: Support manual scan of FC hosts on Hyper-V

2016-03-20 Thread KY Srinivasan
> -Original Message- > From: James Bottomley [mailto:james.bottom...@hansenpartnership.com] > Sent: Friday, March 18, 2016 3:41 PM > To: KY Srinivasan ; Martin K. Petersen > > Cc: Christoph Hellwig ;

Re: [BUG] "block: make generic_make_request handle arbitrarily sized bios" breaks boot on parisc-linux

2016-03-20 Thread Helge Deller
Hi Eike, On 10.03.2016 08:04, Rolf Eike Beer wrote: >> Right. >> I just succeeded in reproducing the bug with moving blk_bio_segment_split() >> into an own file (and with "extern" instead of "static" in blk-merge.c). >> When compiled with -O2 it still crashes. So, next step is to analyze what >>

Re: [PATCH] scsi: fc: use get/put_unaligned64 for wwn access

2016-03-20 Thread Ewan D. Milne
On Wed, 2016-03-16 at 17:39 +0100, Arnd Bergmann wrote: > A bug in the gcc-6.0 prerelease version caused at least one > driver (lpfc) to have excessive stack usage when dealing with > wwn data, on the ARM architecture. > > lpfc_scsi.c: In function 'lpfc_find_next_oas_lun': > lpfc_scsi.c:117:1:

Re: [PATCH] qla2xxx: avoid maybe_uninitialized warning

2016-03-20 Thread Tomas Henzl
On 16.3.2016 16:03, Tomas Henzl wrote: > On 15.3.2016 22:40, Arnd Bergmann wrote: >> The qlt_check_reserve_free_req() function produces an incorrect warning >> when CONFIG_PROFILE_ANNOTATED_BRANCHES is set: >> >> drivers/scsi/qla2xxx/qla_target.c: In function 'qlt_check_reserve_free_req': >>

Re: [PATCH] fnic: move printk()s outside of the critical code section.

2016-03-20 Thread Martin K. Petersen
> "Maurizio" == Maurizio Lombardi writes: Maurizio> This patch moves a printk() outside of the code section where Maurizio> interrupt are disabled. In some cases a flood of error Maurizio> messages may cause a kernel panic. It also removes one of the Maurizio> printk()s

Re: [PATCH] scsi: fc: use get/put_unaligned64 for wwn access

2016-03-20 Thread Martin K. Petersen
> "Arnd" == Arnd Bergmann writes: Arnd> A bug in the gcc-6.0 prerelease version caused at least one driver Arnd> (lpfc) to have excessive stack usage when dealing with wwn data, Arnd> on the ARM architecture. Applied to 4.6/scsi-fixes. -- Martin K. Petersen Oracle

Re: [PATCH] scsi: fc: use get/put_unaligned64 for wwn access

2016-03-20 Thread Hannes Reinecke
On 03/16/2016 05:39 PM, Arnd Bergmann wrote: > A bug in the gcc-6.0 prerelease version caused at least one > driver (lpfc) to have excessive stack usage when dealing with > wwn data, on the ARM architecture. > > lpfc_scsi.c: In function 'lpfc_find_next_oas_lun': > lpfc_scsi.c:117:1: warning: the

Re: [PATCH] fnic: move printk()s outside of the critical code section.

2016-03-20 Thread Laurence Oberman
Reviewed-by: Laurence Oberman Laurence Oberman Principal Software Maintenance Engineer Red Hat Global Support Services - Original Message - From: "Maurizio Lombardi" To: linux-scsi@vger.kernel.org Cc: hiral...@cisco.com, sram...@cisco.com,