Re: Manual driver binding and unbinding broken for SCSI

2017-02-17 Thread James Bottomley
On Fri, 2017-02-17 at 16:30 -0800, Omar Sandoval wrote: > Hi, everyone, > > As per $SUBJECT, I can cause a crash on v4.10-rc8, Jens' block/for > -next, > and Jan's bdi branch [1] by doing this: > > # lsscsi > [0:0:0:0]diskQEMU QEMU HARDDISK2.5+ /dev/sda > # echo 0:0:0:0 >

Manual driver binding and unbinding broken for SCSI

2017-02-17 Thread Omar Sandoval
Hi, everyone, As per $SUBJECT, I can cause a crash on v4.10-rc8, Jens' block/for-next, and Jan's bdi branch [1] by doing this: # lsscsi [0:0:0:0]diskQEMU QEMU HARDDISK2.5+ /dev/sda # echo 0:0:0:0 > /sys/bus/scsi/drivers/sd/unbind # echo 0:0:0:0 > /sys/bus/scsi/drivers/sd/bind

Re: g_NCR5380 PDMA, was Re: [PATCH 0/6] ncr5380: Miscellaneous minor patches

2017-02-17 Thread Finn Thain
On Thu, 16 Feb 2017, Ondrej Zary wrote: > On Tuesday 31 January 2017 02:31:45 Finn Thain wrote: > [...] > > Are you trying to figure out which commands are going to disconnect > > during a transfer? This is really a function of the firmware in the > > target; there are no good heuristics

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

2017-02-17 Thread Subhash Jadavani
Dan Carpenter reported this: --- The patch 9c46b8676271: "scsi: ufs-qcom: dump additional testbus registers" from Feb 3, 2017, leads to the following static checker warning: drivers/scsi/ufs/ufs-qcom.c:1531 ufs_qcom_testbus_cfg_is_ok() warn: impossible condition

[PATCH] scsi: fusion: fix spelling mistakes of "primitive"

2017-02-17 Thread Colin King
From: Colin Ian King trivial fix to spelling mistakes of "primitive" and also re-join a literal string that spans 2 lines to squelch a checkpatch warning. Signed-off-by: Colin Ian King --- drivers/message/fusion/lsi/mpi_cnfg.h | 2 +-

RE: Driver version for PMC Adaptec HBA in Linux and from vendor

2017-02-17 Thread Raghava Aditya Renukunta
Hello Paul, > Dear Raghava, dear Linux folks, > > > Using a PMC Adaptec HBA 1000-8e with latest Linux, it only initializes > in sync mode, instead of async mode. The patches that enable async mode in HBA 1000-8e , have been included in the James Bottomley's linux-scsi Branch and are on

Driver version for PMC Adaptec HBA in Linux and from vendor

2017-02-17 Thread Paul Menzel
Dear Raghava, dear Linux folks, Using a PMC Adaptec HBA 1000-8e with latest Linux, it only initializes in sync mode, instead of async mode. ``` $ git describe --tag v4.10-rc8-47-g0722f57bf $ dmesg [ 21.359635] Adaptec aacraid driver 1.2-1[41066]-ms [ 21.360017] aacraid :04:00.0:

[PATCH] smartpqi: fix time handling

2017-02-17 Thread Arnd Bergmann
When we have turned off RTC support, the smartpqi driver fails to build: ERROR: "rtc_time64_to_tm" [drivers/scsi/smartpqi/smartpqi.ko] undefined! This is easily avoided by using the generic 'struct tm' based helper rather than the RTC specific one. While fixing this, I noticed that even though

Re: hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-17 Thread Mike Snitzer
On Fri, Feb 17 2017 at 4:04am -0500, h...@infradead.org wrote: > On Thu, Feb 16, 2017 at 01:21:29PM -0500, Mike Snitzer wrote: > > multipath-tools has tables that specify all the defaults for a given > > target backend. NVMe will just be yet another. > > No, if we get

Re: hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-17 Thread Mike Snitzer
On Fri, Feb 17 2017 at 4:05am -0500, Christoph Hellwig wrote: > On Thu, Feb 16, 2017 at 08:05:36PM +0200, Sagi Grimberg wrote: > > I guess one config option that we'd need is multibus vs. failover > > which are used per use-case. > > Which fundamentally is a property of the

Re: hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-17 Thread Mike Snitzer
On Fri, Feb 17 2017 at 4:33am -0500, Christoph Hellwig wrote: > On Thu, Feb 16, 2017 at 10:13:37AM -0500, Mike Snitzer wrote: > > Not following what you're saying Keith did. Please feel free to > > clarify. > > Keith demonstrated what it takes to support NVMe with dm. He

Re: [PATCHv2 11/11] mpt3sas: register reserved commands

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 02:18:42PM +0100, Hannes Reinecke wrote: > Well, once I'm switching over to embedded commands I'll have to > integrate with SCSI midlayer to actually _allocate_ the tracker > structure for me. > At the same time the midlayer should _not_ use that structure for normal > I/O;

Re: [PATCHv2 11/11] mpt3sas: register reserved commands

2017-02-17 Thread Hannes Reinecke
On 02/17/2017 01:38 PM, Christoph Hellwig wrote: > On Fri, Feb 17, 2017 at 09:23:10AM +0100, Hannes Reinecke wrote: >> The mpt3sas driver requires a reserved command space to handle >> SCSI passthrough commands. >> >> Signed-off-by: Hannes Reinecke >> --- >>

Re: [PATCHv2 11/11] mpt3sas: register reserved commands

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 09:23:10AM +0100, Hannes Reinecke wrote: > The mpt3sas driver requires a reserved command space to handle > SCSI passthrough commands. > > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/mpt3sas/mpt3sas_base.c | 5 - > 1 file changed, 4

Re: [PATCHv2 10/11] scsi: allocate reserved commands

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 10:00:28AM +0100, Hannes Reinecke wrote: > So here's my question: how are 'reserved' commands are imagined to be used? > ATM they exist for blk-mq solely, and are not even implemented for > legacy sq. Yes. > At the same time quite some drivers (like mpt3sas) really could

Re: [PATCH 00/35] treewide trivial patches converting pr_warning to pr_warn

2017-02-17 Thread Rafael J. Wysocki
On Fri, Feb 17, 2017 at 8:11 AM, Joe Perches wrote: > There are ~4300 uses of pr_warn and ~250 uses of the older > pr_warning in the kernel source tree. > > Make the use of pr_warn consistent across all kernel files. > > This excludes all files in tools/ as there is a separate >

Re: [PATCHv3] scsi: use 'scsi_device_from_queue()' for scsi_dh

2017-02-17 Thread kbuild test robot
-scsi_device_from_queue-for-scsi_dh/20170217-161522 base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next config: x86_64-randconfig-a0-02171706 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: # save the attached .config to linux build tree make

Ihre Kooperation erwünscht,

2017-02-17 Thread Mr. Steve Morgan
Hallo Ich bin Herr Wuilan Lan, Bitte ich brauche Ihre Kooperation auf dieser Grund schreiben ich mit meinen private email Adresse um meine Interesse sowie vorhaben mit Ihnen zur Teilen. Sie sollen wissen das Sie die gleichen Nachnamen mit unsere verstobenen Kunden haben.Der Bank Mitarbeitern

Re: [PATCHv2 06/11] mpt3sas: Introduce mpt3sas_get_st_from_smid()

2017-02-17 Thread Johannes Thumshirn
On 02/17/2017 10:35 AM, Johannes Thumshirn wrote: > On 02/17/2017 09:23 AM, Hannes Reinecke wrote: >> +struct scsiio_tracker * >> +mpt3sas_get_st_from_smid(struct MPT3SAS_ADAPTER *ioc, u16 smid) >> +{ >> +WARN_ON(!smid); >> +WARN_ON(smid >= ioc->hi_priority_smid); >> +return

Re: [PATCHv2 06/11] mpt3sas: Introduce mpt3sas_get_st_from_smid()

2017-02-17 Thread Johannes Thumshirn
On 02/17/2017 09:23 AM, Hannes Reinecke wrote: > +struct scsiio_tracker * > +mpt3sas_get_st_from_smid(struct MPT3SAS_ADAPTER *ioc, u16 smid) > +{ > + WARN_ON(!smid); > + WARN_ON(smid >= ioc->hi_priority_smid); > + return >scsi_lookup[smid - 1]; > +} Hmm if smid == 0 we'd be accessing

Re: [dm-devel] hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-17 Thread Christoph Hellwig
On Thu, Feb 16, 2017 at 10:13:37AM -0500, Mike Snitzer wrote: > Not following what you're saying Keith did. Please feel free to > clarify. Keith demonstrated what it takes to support NVMe with dm. He also gave a couple presentations on it in addition to various ptches on the list. > The middle

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

2017-02-17 Thread lixiubo
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. The struct tcmu_cmd_entry {} size is fixed about 44 bytes without iovec[N], and the size of struct iovec[N] is about (16

Re: [PATCHv2 09/11] mpt3sas: lockless command submission for scsi-mq

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 10:03:03AM +0100, Hannes Reinecke wrote: > Yes, true; it will fail. > > It will be fixed up by using reserved commands in patch 11. Patches should be fully bisectable. If that is too much work they need to be merged with a good explanation on why it is done. > > You

Re: [dm-devel] hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-17 Thread Christoph Hellwig
On Thu, Feb 16, 2017 at 08:05:36PM +0200, Sagi Grimberg wrote: > I guess one config option that we'd need is multibus vs. failover > which are used per use-case. Which fundamentally is a property of the target first, and it should tell us that. There might be the occasional need for an override,

Re: [dm-devel] hch's native NVMe multipathing [was: Re: [PATCH 1/2] Don't blacklist nvme]

2017-02-17 Thread h...@infradead.org
On Thu, Feb 16, 2017 at 01:21:29PM -0500, Mike Snitzer wrote: > multipath-tools has tables that specify all the defaults for a given > target backend. NVMe will just be yet another. No, if we get things right it won't. ALUA already got rid of most of the parameter people would have to set under

Re: [PATCHv2 09/11] mpt3sas: lockless command submission for scsi-mq

2017-02-17 Thread Hannes Reinecke
On 02/17/2017 09:54 AM, Christoph Hellwig wrote: > On Fri, Feb 17, 2017 at 09:23:08AM +0100, Hannes Reinecke wrote: >> Enable lockless command submission for scsi-mq by moving the >> command structure into the payload for struct request. >> >> Signed-off-by: Hannes Reinecke >> ---

Re: [PATCHv2 10/11] scsi: allocate reserved commands

2017-02-17 Thread Hannes Reinecke
On 02/17/2017 09:55 AM, Christoph Hellwig wrote: > On Fri, Feb 17, 2017 at 09:23:09AM +0100, Hannes Reinecke wrote: >> The block layer already has the notion of 'reserved' commands, so >> we should be enabling hosts to allocate them. > > How does this interact with the non blk-mq path? > It

Re: [PATCHv2 10/11] scsi: allocate reserved commands

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 09:23:09AM +0100, Hannes Reinecke wrote: > The block layer already has the notion of 'reserved' commands, so > we should be enabling hosts to allocate them. How does this interact with the non blk-mq path?

Re: [PATCHv2 09/11] mpt3sas: lockless command submission for scsi-mq

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 09:23:08AM +0100, Hannes Reinecke wrote: > Enable lockless command submission for scsi-mq by moving the > command structure into the payload for struct request. > > Signed-off-by: Hannes Reinecke > --- > drivers/scsi/mpt3sas/mpt3sas_base.c | 123

Re: [PATCHv2 08/11] mpt3sas: always use smid 1 for ioctl passthrough

2017-02-17 Thread Hannes Reinecke
On 02/17/2017 09:45 AM, Christoph Hellwig wrote: > On Fri, Feb 17, 2017 at 09:23:07AM +0100, Hannes Reinecke wrote: >> ioctl passthrough commands require a SCSIIO smid, but cannot >> easily integrate with the block layer. But as we're only ever >> allowing one ioctl command at a time we can

Re: [PATCHv2 08/11] mpt3sas: always use smid 1 for ioctl passthrough

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 09:23:07AM +0100, Hannes Reinecke wrote: > ioctl passthrough commands require a SCSIIO smid, but cannot > easily integrate with the block layer. But as we're only ever > allowing one ioctl command at a time we can reserve smid 1 > for ioctl commands. I like the idea, but I

Re: [PATCHv2 07/11] mpt3sas: check command status before attempting abort

2017-02-17 Thread Hannes Reinecke
On 02/17/2017 09:35 AM, Christoph Hellwig wrote: > On Fri, Feb 17, 2017 at 09:23:06AM +0100, 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. >> >> Signed-off-by: Hannes

Re: [PATCHv2 07/11] mpt3sas: check command status before attempting abort

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 09:23:06AM +0100, 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. > > Signed-off-by: Hannes Reinecke > --- >

Re: [PATCHv2 03/11] mpt3sas: use 'list_splice_init()'

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 09:23:02AM +0100, Hannes Reinecke wrote: > Use 'list_splice_init()' instead of hand-crafted function. > No functional change. > > Signed-off-by: Hannes Reinecke Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCHv3] scsi: use 'scsi_device_from_queue()' for scsi_dh

2017-02-17 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCHv2] scsi: use 'scsi_device_from_queue()' for scsi_dh

2017-02-17 Thread Christoph Hellwig
On Fri, Feb 17, 2017 at 09:06:14AM +0100, Hannes Reinecke wrote: > We could, but why? > ATM we're only having SCSI devices able to use device handler; adding > another layer of indirection doesn't solve anything here. > Moving the infrastructure one level up will only make sense if we're > getting

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

2017-02-17 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 'use_blk_mq' to enable full mq support; the parameter itself is off by

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

2017-02-17 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

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

2017-02-17 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 --

[PATCHv2 0/3] mpt3sas: Full mq support, part 2

2017-02-17 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

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

2017-02-17 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

[PATCHv2 05/11] mpt3sas: open-code _scsih_scsi_lookup_get()

2017-02-17 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(-)

[PATCHv2 10/11] scsi: allocate reserved commands

2017-02-17 Thread Hannes Reinecke
The block layer already has the notion of 'reserved' commands, so we should be enabling hosts to allocate them. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_lib.c | 1 + include/scsi/scsi_host.h | 1 + 2 files changed, 2 insertions(+) diff --git

[PATCHv2 03/11] mpt3sas: use 'list_splice_init()'

2017-02-17 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 | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c

[PATCHv2 06/11] mpt3sas: Introduce mpt3sas_get_st_from_smid()

2017-02-17 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 | 20 drivers/scsi/mpt3sas/mpt3sas_base.h | 2

[PATCHv2 01/11] mpt3sas: switch to pci_alloc_irq_vectors

2017-02-17 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 +---

[PATCHv2 09/11] mpt3sas: lockless command submission for scsi-mq

2017-02-17 Thread Hannes Reinecke
Enable lockless command submission for scsi-mq by moving the command structure into the payload for struct request. Signed-off-by: Hannes Reinecke --- drivers/scsi/mpt3sas/mpt3sas_base.c | 123 - drivers/scsi/mpt3sas/mpt3sas_base.h | 13 +-

[PATCHv2 04/11] mpt3sas: separate out _base_recovery_check()

2017-02-17 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

[PATCHv2 08/11] mpt3sas: always use smid 1 for ioctl passthrough

2017-02-17 Thread Hannes Reinecke
ioctl passthrough commands require a SCSIIO smid, but cannot easily integrate with the block layer. But as we're only ever allowing one ioctl command at a time we can reserve smid 1 for ioctl commands. Signed-off-by: Hannes Reinecke --- drivers/scsi/mpt3sas/mpt3sas_base.c | 28

[PATCHv2 07/11] mpt3sas: check command status before attempting abort

2017-02-17 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 --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff

[PATCHv2 11/11] mpt3sas: register reserved commands

2017-02-17 Thread Hannes Reinecke
The mpt3sas driver requires a reserved command space to handle SCSI passthrough commands. Signed-off-by: Hannes Reinecke --- drivers/scsi/mpt3sas/mpt3sas_base.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c

[PATCHv2 00/11] mpt3sas: Full mq support, part 1

2017-02-17 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

Re: [PATCH V2 06/15] aacraid: Added sysfs for driver version

2017-02-17 Thread Johannes Thumshirn
On 02/16/2017 09:51 PM, Raghava Aditya Renukunta wrote: > Added support to retrieve driver version from a new sysfs variable called > driver_version. It makes it easier for the user to figure out the driver > version that is currently running. > > Signed-off-by: Raghava Aditya Renukunta >

Re: [PATCH V2 05/15] aacraid: Fix memory leak in fib init path

2017-02-17 Thread Johannes Thumshirn
On 02/16/2017 09:51 PM, Raghava Aditya Renukunta wrote: > aac_fib_map_free frees misaligned fib dma memory, additionally it does not > free up the whole memory. > > Fixed by changing the code to free up the correct and full memory > allocation. > > Cc: sta...@vger.kernel.org > Fixes:

Re: [PATCH V2 03/15] aacraid: Fix for excessive prints on EEH

2017-02-17 Thread Johannes Thumshirn
On 02/16/2017 09:51 PM, Raghava Aditya Renukunta wrote: > This issue showed up on a kdump debug(single CPU on powerkvm), when EEH > errors rendered the adapter unusable. The driver correctly detected the > issue and attempted to restart the controller, in doing so the driver > attempted to read

Re: [PATCHv2] scsi: use 'scsi_device_from_queue()' for scsi_dh

2017-02-17 Thread Hannes Reinecke
On 02/16/2017 06:05 PM, Keith Busch wrote: > On Thu, Feb 16, 2017 at 04:12:23PM +0100, Hannes Reinecke wrote: >> The device handler needs to check if a given queue belongs to >> a scsi device; only then does it make sense to attach a device >> handler. >> >> Signed-off-by: Hannes Reinecke

[PATCHv3] scsi: use 'scsi_device_from_queue()' for scsi_dh

2017-02-17 Thread Hannes Reinecke
The device handler needs to check if a given queue belongs to a scsi device; only then does it make sense to attach a device handler. Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_dh.c | 22 -- drivers/scsi/scsi_lib.c| 24