[PATCH v3 05/12] scsi/ncr5380: Increase register polling limit

2016-10-09 Thread Finn Thain
If NCR5380_poll_politely() is called under irq lock, the polling time limit is clamped to avoid a spike in interrupt latency. When not under irq lock, the same polling time limit acts as the worst case delay between schedule() calls. During PDMA (under irq lock) I've found that the 10 ms time limi

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

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

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

2016-10-09 Thread Finn Thain
From: Ondrej Zary Merge the port-mapped IO and memory-mapped IO support (with the help of ioport_map) into the g_NCR5380 module and delete g_NCR5380_mmio. Signed-off-by: Ondrej Zary Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary --- MAINTAINERS

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

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

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

2016-10-09 Thread Finn Thain
This patch series has fixes for compatibility, reliability and performance issues and some cleanup. It also includes a new version of Ondrej Zary's patch that merges g_NCR5380_mmio into g_NCR5380. I've tested this patch series using mac_scsi on a Powerbook 180. Ondrej tested the g_NCR5380 driver a

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

2016-10-09 Thread Finn Thain
Re-order struct members so that hot data lies at the beginning of the struct and cold data at the end. Improve the comments while we're here. Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke Tested-by: Ondrej Zary Tested-by: Michael Schmitz --- drivers/scsi/NCR5380.h | 40 ++

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

2016-10-09 Thread Finn Thain
Signed-off-by: Finn Thain Reviewed-by: Hannes Reinecke --- drivers/scsi/arm/cumana_1.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c index 8e9cfe8..f616756 100644 --- a/drivers/scsi/arm/cumana_1.c +++ b/drivers/scsi/arm/cumana_1.

[PATCH v3 07/12] scsi/ncr5380: Store IO ports and addresses in host private data

2016-10-09 Thread Finn Thain
The various 5380 drivers inconsistently store register pointers either in the Scsi_Host struct "legacy crap" area or in special, board-specific members of the NCR5380_hostdata struct. Uniform use of the latter struct makes for simpler and faster code (see the following patches) and helps to reduce

[PATCH v3 09/12] scsi/ncr5380: Pass hostdata pointer to register polling routines

2016-10-09 Thread Finn Thain
Pass a NCR5380_hostdata struct pointer to the board-specific routines instead of a Scsi_Host struct pointer. This reduces pointer chasing in the PIO and PDMA fast paths. The old way was a mistake because it is slow and the board-specific code is not concerned with the mid-layer. Signed-off-by: Fin

[PATCH v3 12/12] scsi/ncr5380: Suppress unhelpful "interrupt without IRQ bit" message

2016-10-09 Thread Finn Thain
If a NCR5380 host instance ends up on a shared interrupt line then this printk will be a problem. It is already a problem on some Mac models: when testing mac_scsi on a PowerBook 180 I found that PDMA transfers (but not PIO transfers) cause the message to be logged. These spurious interrupts don't

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

2016-10-09 Thread Finn Thain
For timeout values adopt unsigned long, which is the type of jiffies etc. For chip register values and bit masks pass u8, which is the return type of readb, inb etc. For device register offsets adopt unsigned int, as it is suitable for adding to base addresses. Pass the NCR5380_hostdata pointer

[PATCH v3 11/12] scsi/ncr5380: Use correct types for DMA routines

2016-10-09 Thread Finn Thain
Apply prototypes to get consistent function signatures for the DMA functions implemented in the board-specific drivers. To avoid using macros to alter actual parameters, some of those functions are reworked slightly. This is a step toward the goal of passing the board-specific routines to the core

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

2016-10-09 Thread Finn Thain
When polling a device register under irq lock the polling loop terminates after a given number of jiffies. Make this timeout independent of the HZ setting. All 5380 drivers benefit from this patch, which optimizes the PIO fast path, because they all use PIO transfers (for phases other than DATA IN

Re: [dm-devel] [PATCH] scsi: replace wrong device handler name for CLARiiON arrays

2016-10-09 Thread James Bottomley
On Sun, 2016-10-09 at 17:19 +0200, Christoph Hellwig wrote: > On Sun, Oct 09, 2016 at 07:21:45AM +0800, James Bottomley wrote: > > Actually, should we replace? Aren't there older arrays still > > bearing > > the clariion name, so we should have these entries in addition? > > The changed string is

Re: [Open-FCoE] Issue with fc_exch_alloc failing initiated by fc_queuecommand on NUMA or large configurations with Intel ixgbe running FCOE

2016-10-09 Thread Laurence Oberman
- Original Message - > From: "Laurence Oberman" > To: "Hannes Reinecke" > Cc: "Linux SCSI Mailinglist" , > fcoe-de...@open-fcoe.org, "Curtis Taylor (c...@us.ibm.com)" > , "Bud Brown" > Sent: Saturday, October 8, 2016 3:44:16 PM > Subject: Re: [Open-FCoE] Issue with fc_exch_alloc faili

Re: [RESEND PATCH] scsi: fix ata_port_wait_eh() hang caused by missing to wake up eh thread

2016-10-09 Thread Christoph Hellwig
On Sun, Oct 09, 2016 at 10:21:45PM +0800, Wei Fang wrote: > ->host_eh_schedule and ->shost_state may be accessed simultaneously as > below: But we can't simply take shost_lock in every completion handler, as that would kill peformance. >From a quick look the most sensible options seems to be to r

Re: [Resend PATCH] SCSI: scan: fix use-after-free

2016-10-09 Thread Christoph Hellwig
Looks fine: Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] scsi: replace wrong device handler name for CLARiiON arrays

2016-10-09 Thread Christoph Hellwig
On Sun, Oct 09, 2016 at 07:21:45AM +0800, James Bottomley wrote: > Actually, should we replace? Aren't there older arrays still bearing > the clariion name, so we should have these entries in addition? The changed string isn't the inquiry vendor string, but the DH driver name it is mapped to. An

[RESEND PATCH] scsi: fix ata_port_wait_eh() hang caused by missing to wake up eh thread

2016-10-09 Thread Wei Fang
->host_eh_schedule and ->shost_state may be accessed simultaneously as below: 1.In ata port probe path: ata_std_sched_eh() scsi_schedule_eh() ... spin_lock_irqsave(shost->host_lock, flags); if (scsi_host_set_state(shost, SHOST_RECOVERY) == 0

Re: [PATCH v2 00/12] Fixes, cleanup and g_NCR5380_mmio/g_NCR5380 merger

2016-10-09 Thread Michael Schmitz
> This patch series has fixes for compatibility, reliability and > performance issues and some cleanup. It also includes a new version > of Ondrej Zary's patch that merges g_NCR5380_mmio into g_NCR5380. > > I've tested this patch series on a Powerbook 180. If someone would > test some of the other