Re: [PATCHv3 01/10] mpt3sas: switch to pci_alloc_irq_vectors

2017-02-22 Thread Christoph Hellwig
Martin, can we get at least this patch still in for 4.11? I'd really like to see as many intance of the old MSI-X allocation and IRQ affinity mess dead as soon as possible.

Re: [PATCHv3 07/10] mpt3sas: check command status before attempting abort

2017-02-22 Thread Sreekanth Reddy
On Tue, Feb 21, 2017 at 5:57 PM, Hannes Reinecke wrote: > When attempting a command abort we should check the command status > prior to sending the abort; the command might've been completed > already. I think we are already taking care of this. Before calling

Re: [PATCHv3 01/10] mpt3sas: switch to pci_alloc_irq_vectors

2017-02-22 Thread Hannes Reinecke
On 02/22/2017 09:28 AM, Christoph Hellwig wrote: > Martin, > > can we get at least this patch still in for 4.11? I'd really like > to see as many intance of the old MSI-X allocation and IRQ affinity > mess dead as soon as possible. > I'm currently reworking the patchset with the suggestions

[PATCHv4 3/3] mpt3sas: scsi-mq interrupt steering

2017-02-22 Thread Hannes Reinecke
The device has several reply queues, so this patch implements correct scsi-mq interrupt steering to take advantage of full blk-mq support. However, as performance results are inconclusive this patch also adds a module parameter 'enable_scsi_mq' to expose all completion queues via scsi-mq; default

[PATCHv4 0/3] mpt3sas: exposing all reply queues

2017-02-22 Thread Hannes Reinecke
Hi all, this is the second part of my patchset to enable scsi multiqueue for the mpt3sas driver. While the HBA only has a single mailbox register for submitting commands, it does have individual receive queues per MSI-X interrupt and as such does benefit from converting it to full multiqueue

[PATCHv4 2/3] block: Add blk_mq_make_unique_tag()

2017-02-22 Thread Hannes Reinecke
Implement blk_mq_make_unique_tag() to generate a unique tag value from a given hardware queue and tag value. Signed-off-by: Hannes Reinecke --- block/blk-mq-tag.c | 3 +-- include/linux/blk-mq.h | 5 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git

[PATCHv4 04/12] mpt3sas: separate out _base_recovery_check()

2017-02-22 Thread Hannes Reinecke
No functional change. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_base.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c

[PATCHv4 06/12] mpt3sas: Introduce mpt3sas_get_st_from_smid()

2017-02-22 Thread Hannes Reinecke
Abstract accesses to the scsi_lookup array by introducing mpt3sas_get_st_from_smid(). Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_base.c | 22 ++ drivers/scsi/mpt3sas/mpt3sas_base.h |

[PATCHv4 09/12] mpt3sas: simplify task management functions

2017-02-22 Thread Hannes Reinecke
One can simply check 'target_busy' or 'device_busy' when figuring out if there are outstanding commands; no need to painstakingly counting them by hand. Suggested-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 88

[PATCHv4 00/12] mpt3sas: lockless command submission

2017-02-22 Thread Hannes Reinecke
Hi all, this is the first part of my patchset to enable scsi multiqueue for the mpt3sas driver. While the HBA only has a single mailbox register for submitting commands, it does have individual receive queues per MSI-X interrupt and as such does benefit from converting it to full multiqueue

[PATCHv4 08/12] mpt3sas: always use first reserved smid for ioctl passthrough

2017-02-22 Thread Hannes Reinecke
ioctl passthrough commands require a SCSIIO smid, but cannot easily integrate with the block layer. But the driver already has reserved some SCSIIO smids and we're only ever allowing one ioctl command at a time we can use the first reserved smid for ioctl commands. Signed-off-by: Hannes Reinecke

[PATCHv4 01/12] mpt3sas: switch to pci_alloc_irq_vectors

2017-02-22 Thread Hannes Reinecke
Cleanup the MSI-X handling allowing us to use the PCI-layer provided vector allocation. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_base.c | 105 +---

[PATCHv4 07/12] mpt3sas: check command status before attempting abort

2017-02-22 Thread Hannes Reinecke
When attempting a command abort we should check the command status prior to sending the abort; the command might've been completed already. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 11 --- 1

[PATCHv4 1/3] mpt3sas: Use 'msix_index' as argument for put_smid functions

2017-02-22 Thread Hannes Reinecke
Use msix_index as explicit argument for the various put_smid callbacks. No functional change. Signed-off-by: Hannes Reinecke --- drivers/scsi/mpt3sas/mpt3sas_base.c | 56 +--- drivers/scsi/mpt3sas/mpt3sas_base.h | 18 --

Re: Manual driver binding and unbinding broken for SCSI

2017-02-22 Thread Ming Lei
On Wed, Feb 22, 2017 at 1:14 AM, Jan Kara wrote: > On Sun 19-02-17 18:19:58, Omar Sandoval wrote: >> On Fri, Feb 17, 2017 at 04:43:56PM -0800, James Bottomley wrote: >> > This seems to be related to a 0day test we got on the block tree, >> > details here: >> > >> >

[PATCHv4 03/12] mpt3sas: use 'list_splice_init()'

2017-02-22 Thread Hannes Reinecke
Use 'list_splice_init()' instead of hand-crafted function. No functional change. Signed-off-by: Hannes Reinecke --- drivers/scsi/mpt3sas/mpt3sas_base.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c

[PATCHv4 12/12] mpt3sas: lockless command submission

2017-02-22 Thread Hannes Reinecke
Instead of holding 'struct scsiio_tracker' in its own pool we can embed it into the payload of the scsi command. This allows us to get rid of the lock when submitting and receiving commands and streamline operations. Signed-off-by: Hannes Reinecke ---

[PATCHv4 05/12] mpt3sas: open-code _scsih_scsi_lookup_get()

2017-02-22 Thread Hannes Reinecke
Just a wrapper around the scsi lookup array and only used in one place, so open-code it. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-)

[PATCHv4 02/12] mpt3sas: set default value for cb_idx

2017-02-22 Thread Hannes Reinecke
No functional change. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_base.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c

[PATCHv4 10/12] mpt3sas: simplify mpt3sas_scsi_issue_tm()

2017-02-22 Thread Hannes Reinecke
Move the check for outstanding commands out of the function allowing us to simplify the overall code. Signed-off-by: Hannes Reinecke --- drivers/scsi/mpt3sas/mpt3sas_base.h | 6 +- drivers/scsi/mpt3sas/mpt3sas_ctl.c | 4 +- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 106

[PATCHv4 11/12] mpt3sas: simplify _wait_for_commands_to_complete()

2017-02-22 Thread Hannes Reinecke
Use 'host_busy' instead of counting outstanding commands by hand. Suggested-by: Christoph Hellwig Signed-off-by: Hannes Reinecke --- drivers/scsi/mpt3sas/mpt3sas_base.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git

Re: sense handling improvements

2017-02-22 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: >> I can bring them in after Linus' initial block pull. Christoph> Both the block and SCSI trees are now merged by Linus, and Christoph> Jens didn't pick up patch one from this series yet - maybe Christoph> it's best to send the whole

[PATCH] lpfc: add missing Kconfig NVME dependencies

2017-02-22 Thread James Smart
add missing Kconfig NVME dependencies Can't believe I missed posting this -- james Signed-off-by: James Smart --- drivers/scsi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index d4023bf..2558434 100644 ---

RE: [PATCH 2/3] cciss: Fix checkpatch OPEN_BRACE

2017-02-22 Thread Don Brace
> -Original Message- > From: Tobin C. Harding [mailto:m...@tobin.cc] > Sent: Wednesday, February 22, 2017 12:13 AM > To: Don Brace > Cc: linux-scsi@vger.kernel.org; kernel-janit...@vger.kernel.org; Tobin C. > Harding > Subject: [PATCH 2/3] cciss:

[Bug 120371] UBSAN splat in drivers/scsi/scsi_devinfo.c:458:21

2017-02-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=120371 Wilfried Klaebe (linux-ker...@lebenslange-mailadresse.de) changed: What|Removed |Added Status|NEW

[PATCH v2] lpfc: add missing Kconfig NVME dependencies

2017-02-22 Thread James Smart
add missing Kconfig NVME dependencies -- james Signed-off-by: James Smart --- drivers/scsi/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index d4023bf..2558434 100644 --- a/drivers/scsi/Kconfig +++

[PATCH] aacraid: Fixed expander hotplug for SMART family

2017-02-22 Thread Raghava Aditya Renukunta
Current driver Hotplug processing code skips over Enclosure channel, therefore any addition/removal of expander enclosure is not processed. Additionally device addition code relies on older device type, which prevents the hotplug of adapter expanders. Fixed by removing code that skips over

[PATCH] scsi/mac_scsi: Fix MAC_SCSI=m option when SCSI=m

2017-02-22 Thread Finn Thain
The mac_scsi driver still gets disabled when SCSI=m. This should have been fixed back when I enabled the tristate but I didn't see the bug. Fixes: 6e9ae6d560e1 ("[PATCH] mac_scsi: Add module option to Kconfig") Signed-off-by: Finn Thain --- drivers/scsi/Kconfig | 2

Re: [PATCHv2 0/5] SCSI EH cleanup

2017-02-22 Thread Bart Van Assche
On Wed, 2017-02-22 at 17:07 +0100, Hannes Reinecke wrote: > this is a resend of a small patchset for cleaning up SCSI EH. > Primary goal is to make asynchronous aborts mandatory; there hasn't > been a single report so far where asynchronous abort won't work, so > the 'no_async_abort' flag has

Re: [PATCH v5 02/11] phy: exynos-ufs: add UFS PHY driver for EXYNOS SoC

2017-02-22 Thread Alim Akhtar
On Fri, Feb 3, 2017 at 2:49 PM, Alim Akhtar wrote: > Hi Kishon, > > > On 11/19/2015 07:09 PM, Kishon Vijay Abraham I wrote: >> >> Hi, >> >> On Tuesday 17 November 2015 01:41 PM, Alim Akhtar wrote: >>> >>> Hi >>> Thanks again for looking into this. >>> >>> On 11/17/2015

Re: [PATCH] lpfc: add missing Kconfig NVME dependencies

2017-02-22 Thread Sagi Grimberg
add missing Kconfig NVME dependencies Can't believe I missed posting this -- james Heh, the this sort of comment should come after the '---' separator (below) unless you want it to live forever in the git log... Signed-off-by: James Smart --- [here]

Re: [PATCH v2] lpfc: add missing Kconfig NVME dependencies

2017-02-22 Thread Martin K. Petersen
> "James" == James Smart writes: James> add missing Kconfig NVME dependencies Applied to 4.11/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi, block: fix memory leak of sdpk on when gd fails to allocate

2017-02-22 Thread Martin K. Petersen
> "Colin" == Colin King writes: Colin> On an allocation failure of gd, the current exit path is via Colin> out_free_devt which leaves sdpk still allocated and hence it gets Colin> leaked. Fix this by correcting the order of resource free'ing Colin> with a change in

Re: [PATCH] scsi: ufs: Factor out ufshcd_read_desc_param

2017-02-22 Thread Martin K. Petersen
> "Michal" == Potomski, MichalX writes: Michal, Michal> Since in UFS 2.1 specification some of the descriptor lengths Michal> differs from 2.0 specification and some devices, which are Michal> reporting spec version 2.0 have different descriptor lengths we

Re: [PATCH V5 2/2] qedf: Add QLogic FastLinQ offload FCoE driver framework.

2017-02-22 Thread Martin K. Petersen
> "Chad" == Dupuis, Chad writes: Chad> The QLogic FastLinQ Driver for FCoE (qedf) is the FCoE specific Chad> module for 41000 Series Converged Network Adapters by QLogic. This Chad> patch consists of following changes: Now that Linus pulled Dave's tree I have gone

Re: [PATCH] PCI/MSI: Only disable affinity settings if pre and post vector count is equal to max_vecs and not min_vecs

2017-02-22 Thread Martin K. Petersen
> "Himanshu" == Himanshu Madhani writes: Himanshu, Himanshu> min_vecs is the minimum amount of vectors needed to operate in Himanshu> MSI-X mode which may just include the vectors that don't need Himanshu> affinity. Himanshu> Disabling affinity settings causes

Re: [PATCH v1 1/1] scsi: ufs-qcom: remove redundant condition check

2017-02-22 Thread Subhash Jadavani
On 2017-02-20 19:06, Martin K. Petersen wrote: "Subhash" == Subhash Jadavani writes: Subhash, Subhash> Dan Carpenter reported this: --- The Subhash> patch 9c46b8676271: "scsi: ufs-qcom: dump additional testbus Subhash> registers" from Feb

Re: [PATCH] scsi: ufs: Factor out ufshcd_read_desc_param

2017-02-22 Thread Subhash Jadavani
On 2017-02-20 23:36, Potomski, MichalX wrote: Since in UFS 2.1 specification some of the descriptor lengths differs from 2.0 specification and some devices, which are reporting spec version 2.0 have different descriptor lengths we can not rely on hardcoded values taken from 2.0 specification.

Re: [PATCHv3 01/10] mpt3sas: switch to pci_alloc_irq_vectors

2017-02-22 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> Martin, can we get at least this patch still in for 4.11? Christoph> I'd really like to see as many intance of the old MSI-X Christoph> allocation and IRQ affinity mess dead as soon as possible. Me too. I'll queue it up for

RE: [PATCH 3/3] cciss: Remove kmalloc cast

2017-02-22 Thread Don Brace
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of Tobin C. Harding > Sent: Wednesday, February 22, 2017 12:13 AM > To: Don Brace > Cc: linux-scsi@vger.kernel.org;

RE: [PATCH 1/3] cciss: Fix checkpatch TRAILING_WHITESPACE

2017-02-22 Thread Don Brace
> -Original Message- > From: Tobin C. Harding [mailto:m...@tobin.cc] > Sent: Wednesday, February 22, 2017 12:13 AM > To: Don Brace > Cc: linux-scsi@vger.kernel.org; kernel-janit...@vger.kernel.org; Tobin C. > Harding > Subject: [PATCH 1/3] cciss:

Re: [PATCHv2 0/5] SCSI EH cleanup

2017-02-22 Thread Hannes Reinecke
On 02/22/2017 10:21 PM, Bart Van Assche wrote: > On Wed, 2017-02-22 at 17:07 +0100, Hannes Reinecke wrote: >> this is a resend of a small patchset for cleaning up SCSI EH. >> Primary goal is to make asynchronous aborts mandatory; there hasn't >> been a single report so far where asynchronous abort

Re: [patch] scsi_dh_emc: return success in clariion_std_inquiry()

2017-02-22 Thread Martin K. Petersen
> "Dan" == Dan Carpenter writes: Dan, Dan> We accidentally return an uninitialized variable on success. Applied to 4.11/scsi-fixes. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: sense handling improvements

2017-02-22 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph, >> I can bring them in after Linus' initial block pull. Christoph> Both the block and SCSI trees are now merged by Linus, and Christoph> Jens didn't pick up patch one from this series yet - maybe Christoph> it's best to

[PATCH] target: Fix NULL dereference during LUN lookup + active I/O shutdown

2017-02-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger When transport_clear_lun_ref() is shutting down a se_lun via configfs with new I/O in-flight, it's possible to trigger a NULL pointer dereference in transport_lookup_cmd_lun() due to the fact percpu_ref_get() doesn't do any __PERCPU_REF_DEAD

Re: [PATCHv2 0/5] SCSI EH cleanup

2017-02-22 Thread Hannes Reinecke
On 02/22/2017 08:44 PM, Bart Van Assche wrote: > On 02/22/2017 08:07 AM, Hannes Reinecke wrote: >> this is a resend of a small patchset for cleaning up SCSI EH. >> Primary goal is to make asynchronous aborts mandatory; there hasn't >> been a single report so far where asynchronous abort won't

Re: [PATCH v5] sd: Check for unaligned partial completion

2017-02-22 Thread Damien Le Moal
Martin, On 2/23/17 13:44, Damien Le Moal wrote: > I do not see the problematic resid correction code in the mpt3sas driver > in 4.11/scsi-queue branch. Is this expected ? Did the mpt3sas driver > updates removed it ? > > It looks like that branch is based on 4.10.0-rc2. The mpt3sas was > applied

Re: [PATCH v5] sd: Check for unaligned partial completion

2017-02-22 Thread Damien Le Moal
Martin, On 2/22/17 13:24, Martin K. Petersen wrote: >> "Damien" == Damien Le Moal writes: > > Damien, > > Damien> I think we would still need the check for REQ_TYPE_FS to avoid > Damien> interfering with SG_IO commands. As for the "medium access > Damien> command"

[PATCHv2 3/5] scsi_error: do not escalate failed EH command

2017-02-22 Thread Hannes Reinecke
When a command is sent as part of the error handling there is not point whatsoever to start EH escalation when that command fails; we are _already_ in the error handler, and the escalation is about to commence anyway. So just call 'scsi_try_to_abort_cmd()' to abort outstanding commands and let the

[PATCHv2 1/5] libsas: allow async aborts

2017-02-22 Thread Hannes Reinecke
From: Christoph Hellwig We now first try to call ->eh_abort_handler from a work queue, but libsas was always failing that for no good reason. Allow async aborts. Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Christoph

[PATCHv2 5/5] scsi: make asynchronous aborts mandatory

2017-02-22 Thread Hannes Reinecke
There hasn't been any reports for HBAs where asynchronous abort would not work, so we should make it mandatory and remove the fallback. Signed-off-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn --- Documentation/scsi/scsi_eh.txt | 18 --

[PATCHv2 2/5] scsi: make eh_eflags persistent

2017-02-22 Thread Hannes Reinecke
To detect if a failed command has been retried we must not clear scmd->eh_eflags when EH finishes. The flag should be persistent throughout the lifetime of the command. Reviewed-by: Johannes Thumshirn Signed-off-by: Hannes Reinecke ---

[PATCHv2 0/5] SCSI EH cleanup

2017-02-22 Thread Hannes Reinecke
Hi all, this is a resend of a small patchset for cleaning up SCSI EH. Primary goal is to make asynchronous aborts mandatory; there hasn't been a single report so far where asynchronous abort won't work, so the 'no_async_abort' flag has never been used and will be removed with this patchset.

Re: [PATCH 0/3] cciss: Fix coccinelle/checkpatch warnings.

2017-02-22 Thread Jens Axboe
On 02/21/2017 11:12 PM, Tobin C. Harding wrote: > Re-send after spell checking. :( > > Coccinelle warns about unnecessary cast on call to kmalloc(). Checkpatch > emits various warnings when parsing file. > > Clean up two checkpatch warnings. Remove trailing whitespace and > clean up opening

[PATCHv2 4/5] scsi: make scsi_eh_scmd_add() always succeed

2017-02-22 Thread Hannes Reinecke
scsi_eh_scmd_add() currently only will fail if no error handler thread is started (which will never be the case) or if the state machine encounters an illegal transition. But if we're encountering an invalid state transition chances is we cannot fixup things with the error handler. So better add

Re: [PATCHv2 0/5] SCSI EH cleanup

2017-02-22 Thread Bart Van Assche
On 02/22/2017 08:07 AM, Hannes Reinecke wrote: > this is a resend of a small patchset for cleaning up SCSI EH. > Primary goal is to make asynchronous aborts mandatory; there hasn't > been a single report so far where asynchronous abort won't work, so > the 'no_async_abort' flag has never been used

Re: [PATCH] target/user: Add daynmic growing data area feature support

2017-02-22 Thread Andy Grover
On 02/17/2017 01:24 AM, lixi...@cmss.chinamobile.com wrote: > From: Xiubo Li > > Currently for the TCMU, the ring buffer size is fixed to 64K cmd > area + 1M data area, and this will be bottlenecks for high iops. Hi Xiubo, thanks for your work. daynmic -> dynamic