Re: [PATCH 2/3] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2

2019-01-22 Thread Ching Huang
On Tue, 2019-01-22 at 10:48 +0300, Dan Carpenter wrote: > On Thu, Jan 17, 2019 at 05:52:28PM +0800, Ching Huang wrote: > > On Thu, 2019-01-17 at 12:16 +0300, Dan Carpenter wrote: > > > On Thu, Jan 17, 2019 at 04:47:07PM +0800, Ching Huang wrote: > > > > On Thu, 2019-01-17 at 10:59 +0300, Dan Carpen

[PATCH v3 0/3] scsi: ufs-bsg: Add read descriptor

2019-01-22 Thread Avri Altman
UFS Protocol Information Units (UPIU) are UFS packets that travel between the host and the device on the UniPro bus. Our previous series added the capability to send UPIUs to the ufs driver. It does not cover all the possible UPIU types - we are mainly focused on device management, provisioning, te

[PATCH v3 1/3] scsi: ufs-bsg: Change the calling convention for write descriptor

2019-01-22 Thread Avri Altman
When we had a write descriptor query upiu, we appended the descriptor right after the bsg request. This was fine as the bsg driver allows to allocate whatever buffer we needed in its job request. Still, the proper way to deliver payload, however small (we only write config descriptors of 144 byte

[PATCH v3 2/3] scsi: ufs: Allow reading descriptor via raw upiu

2019-01-22 Thread Avri Altman
Allow to read descriptors via raw upiu. This in fact was forbidden just as a precaution, as ufs-bsg actually enforces which functionality is supported. Signed-off-by: Avri Altman Reviewed-by: Christoph Hellwig --- drivers/scsi/ufs/ufshcd.c | 20 ++-- 1 file changed, 14 insertion

[PATCH v3 3/3] scsi: ufs-bsg: Allow reading descriptors

2019-01-22 Thread Avri Altman
Add this functionality, placing the descriptor being read in the actual data buffer in the bio. That is, for both read and write descriptors query upiu, we are using the job's request_payload. This in turn, is mapped back in user land to the applicable sg_io_v4 xferp: dout_xferp for write descrip

Re: [PATCH v9 00/22] Re-use nvram module

2019-01-22 Thread Greg Kroah-Hartman
On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a > /dev/nvram misc device. This module is used only by 32-bit PowerPC > platforms. > > The RTC "CMOS" NVRAM module, drivers/char/nvram.c, also implements a > /dev/nvr

[PATCH] scsi: tcmu: fix use after free

2019-01-22 Thread xiubli
From: Xiubo Li Fixes: 4147ebb3 ("scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes") Reported-by: Dan Carpenter Cc: Mike Christie Signed-off-by: Xiubo Li --- drivers/target/target_core_user.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tar

Re: dd hangs when reading large partitions

2019-01-22 Thread Marc Gonzalez
On 22/01/2019 04:12, Jianchao Wang wrote: > On 1/21/19 11:22 PM, Marc Gonzalez wrote: > >> Well, now we know for sure that the clk_scaling_lock is a red herring. >> I applied the patch below, and still the system locked up: >> >> # dd if=/dev/sde of=/dev/null bs=1M status=progress >> 3892314112 b

hi

2019-01-22 Thread shayelynne haver
Soy Shaye Lynne Haver, hay algo brillante en tu perfil. y te dice mucho sobre tu. ¿Podemos establecer una más confiable? Relación y quiero comunicarme contigo sinceramente. Aquí está mi dirección de correo electrónico

Re: dd hangs when reading large partitions

2019-01-22 Thread Marc Gonzalez
On 22/01/2019 11:59, Marc Gonzalez wrote: > 4GB RAM. And the system hangs after reading 3.8GB > I think this is not a coincidence. > NB: swap is disabled (this might be relevant) > > On a freshly booted system, I get > > # free > random: get_random_u64 called from copy_process.isra.9.part.10+0x2

Re: [PATCH 03/10] SCSI: fcoe: convert to use BUS_ATTR_WO

2019-01-22 Thread Greg Kroah-Hartman
On Fri, Dec 28, 2018 at 01:50:53PM +0100, Hannes Reinecke wrote: > On 12/21/18 4:29 PM, James Bottomley wrote: > > [scsi list cc added] > > On Fri, 2018-12-21 at 08:54 +0100, Greg Kroah-Hartman wrote: > > > We are trying to get rid of BUS_ATTR() and the usage of that in the > > > fcoe driver can be

[PATCH v2] SCSI: fcoe: convert to use BUS_ATTR_WO

2019-01-22 Thread Greg Kroah-Hartman
We are trying to get rid of BUS_ATTR() and the usage of that in the fcoe driver can be trivially converted to use BUS_ATTR_WO(), so use that instead. Cc: Johannes Thumshirn Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Greg Kroah-Hartman --- v2: Made simpler with wrapper f

[PATCH] SCSI: fcoe: remove unneeded fcoe_ctlr_destroy_store export

2019-01-22 Thread Greg Kroah-Hartman
There's no need to export fcoe_ctlr_destroy_store as a symbol, so remove the EXPORT_SYMBOL() line for it. Cc: Johannes Thumshirn Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/fcoe/fcoe_transport.c | 1 - 1 file changed, 1 deletion(-) d

[PATCH 6/7] scsi: qlogic: no need to check return value of debugfs_create functions

2019-01-22 Thread Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: qlogic-storage-upstr...@cavium.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.ker

[PATCH 1/7] scsi: bfa: no need to check return value of debugfs_create functions

2019-01-22 Thread Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vge

[PATCH 0/7] SCSI: cleanup debugfs usage

2019-01-22 Thread Greg Kroah-Hartman
When calling debugfs code, there is no need to ever check the return value of the call, as no logic should ever change if a call works properly or not. Fix up a bunch of x86-specific code to not care about the results of debugfs. Greg Kroah-Hartman (7): scsi: bfa: no need to check return value

[PATCH 7/7] scsi: qla2xxx: no need to check return value of debugfs_create functions

2019-01-22 Thread Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: qla2xxx-upstr...@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org

[PATCH 5/7] scsi: lpfc: no need to check return value of debugfs_create functions

2019-01-22 Thread Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.

[PATCH 2/7] scsi: csiostor: no need to check return value of debugfs_create functions

2019-01-22 Thread Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Varun Prakash Cc: Bjorn Helgaas Cc: Johannes Thumshirn

[PATCH 3/7] scsi: fnic: no need to check return value of debugfs_create functions

2019-01-22 Thread Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Satish Kharat Cc: Sesidhar Baddela Cc: Karan Tilak Kumar Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen"

[PATCH 4/7] scsi: snic: no need to check return value of debugfs_create functions

2019-01-22 Thread Greg Kroah-Hartman
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Karan Tilak Kumar Cc: Sesidhar Baddela Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vg

[PATCH] scsi: atp870u: clean up code style and indentation issues

2019-01-22 Thread Colin King
From: Colin Ian King Clean up { brace to fix cppcheck warning. Remove some trailing spaces at end of a statement. Also clean up an indentation issue. Signed-off-by: Colin Ian King --- drivers/scsi/atp870u.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/scs

[PATCH] scsi: hpsa: clean up two indentation issues

2019-01-22 Thread Colin King
From: Colin Ian King There are two statements that are indented incorrectly. Fix these. Signed-off-by: Colin Ian King --- drivers/scsi/hpsa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index ff67ef5d5347..528fdd10 10064

Re: dd hangs when reading large partitions

2019-01-22 Thread Marc Gonzalez
+ Greg On 22/01/2019 11:59, Marc Gonzalez wrote: > FULL SESSION LOG: https://pastebin.ubuntu.com/p/YSm82GxhNW/ I finally got the hung_task detector to fire: https://pastebin.ubuntu.com/p/XDDJjf7PTb/ Had a chat with GKH, who said that drivers/scsi/ufs is known to be not 100% functional, and req

Re: dd hangs when reading large partitions

2019-01-22 Thread Greg Kroah-Hartman
On Tue, Jan 22, 2019 at 05:17:56PM +0100, Marc Gonzalez wrote: > + Greg > > On 22/01/2019 11:59, Marc Gonzalez wrote: > > > FULL SESSION LOG: https://pastebin.ubuntu.com/p/YSm82GxhNW/ > > I finally got the hung_task detector to fire: > https://pastebin.ubuntu.com/p/XDDJjf7PTb/ > > Had a chat wi

Re: [PATCH] scsi: tcmu: fix use after free

2019-01-22 Thread Mike Christie
On 01/22/2019 04:10 AM, xiu...@redhat.com wrote: > From: Xiubo Li > > Fixes: 4147ebb3 ("scsi: tcmu: avoid cmd/qfull timers updated whenever a new > cmd comes") > > Reported-by: Dan Carpenter > Cc: Mike Christie > Signed-off-by: Xiubo Li > --- > drivers/target/target_core_user.c | 3 ++- > 1

[PATCH v2] MAINTAINERS: Mark UFS as Orphan

2019-01-22 Thread Marc Gonzalez
Looking through git log and the linux-scsi archives, it seems that Vinayak vanished after 2013. Removing him as a maintainer will make get_maintainer.pl generate the list of relevant contributors. Signed-off-by: Marc Gonzalez --- Martin, sorry for v1, it was a mistake. --- MAINTAINERS | 3 +-- 1

[RESEND PATCH v1] scsi: ufs: Use explicit access size in ufshcd_dump_regs

2019-01-22 Thread Marc Gonzalez
memcpy_fromio() doesn't provide any control over access size. For example, on arm64, it is implemented using readb and readq. This may trigger a synchronous external abort: [3.729943] Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP [3.737000] Modules linked in: [

Re: [PATCH v2] MAINTAINERS: Mark UFS as Orphan

2019-01-22 Thread Joao Pinto
Hi Marc and all, On 1/22/2019 5:15 PM, Marc Gonzalez wrote: > Looking through git log and the linux-scsi archives, it seems that > Vinayak vanished after 2013. Removing him as a maintainer will make > get_maintainer.pl generate the list of relevant contributors. > > Signed-off-by: Marc Gonzalez >

RE: [PATCH 3/7] scsi: fnic: no need to check return value of debugfs_create functions

2019-01-22 Thread Satish Kharat (satishkh)
Looks good to me. Acked-by: Satish Kharat Satish Kharat TECHNICAL LEADER.ENGINEERING satis...@cisco.com -Original Message- From: Greg Kroah-Hartman Sent: Tuesday, January 22, 2019 7:09 AM To: James Bottomley ; Martin Petersen Cc: linux-ker...@vger.kernel.org; linux-scsi@vger.kernel.

[PATCH v2 01/26] lpfc: cleanup: remove nrport from nvme command structure

2019-01-22 Thread James Smart
An hba-wide lock is taken in the nvme io completion routine. The lock covers null'ing of the nrport pointer in the cmd structure. The nrport member isn't necessary. After extracting the pointer from the command, the pointer was dereferenced to get the fc discovery node pointer. But the fc discover

[PATCH v2 08/26] lpfc: Adapt cpucheck debugfs logic to Hardware Queues

2019-01-22 Thread James Smart
Similar to the io execution path that reports cpu context information the debugfs routines for cpu information needs to be aligned with new hardware queue implementation. Convert debugfs cnd nvme cpucheck statistics to report information per Hardware Queue. Signed-off-by: Dick Kennedy Signed-off

[PATCH v2 05/26] lpfc: Replace io_channels for nvme and fcp with general hdw_queues per cpu

2019-01-22 Thread James Smart
Currently, both nvme and fcp each have their own concept of an io_channels, which a combination wq/cq and associated msix. Different cpus would share an io_channel. The driver is now moving to per-cpu wq/cq pairs and msix vectors. The driver will still use separate wq/cq pairs per protocol on each

[PATCH v2 02/26] lpfc: cleanup: Remove excess check on NVME io submit code path

2019-01-22 Thread James Smart
lpfc_nvme_prep_io_cmd() checks for null pnode, but caller lpfc_nvme_fcp_io_submit() has already ensured it's non-null. remove the pnode null check Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_nvme.c | 2 +- 1 file changed, 1 in

[PATCH v2 00/26] lpfc updates for 12.2.0.0

2019-01-22 Thread James Smart
Update lpfc to revision 12.2.0.0 This first 22 patches in this patch set are a rework of the I/O submission path in the driver to focus on cpu affinity. This work raises the performance of the lpfc driver from a level of 1-2M iops per port to numbers that have reached over 5M per port. The modific

[PATCH v2 09/26] lpfc: Move SCSI and NVME Stats to hardware queue structures

2019-01-22 Thread James Smart
Many io statics were being sampled and saved using adapter-based data structures. This was creating a lot of contention and cache thrashing in the I/O path. Move the statistics to the hardware queue data structures. Given the per queue data structures, use of atomic types is lessened. Add new syf

[PATCH v2 12/26] lpfc: Adapt partitioned XRI lists to efficient sharing

2019-01-22 Thread James Smart
The XRI get/put lists were partitioned per hardware queue. However, the adapter rarely had sufficient resources to give a large number of resources per queue. As such, it became common for a cpu to encounter a lack of XRI resource and request the upper io stack to retry after returning a BUSY condi

[PATCH v2 11/26] lpfc: Synchronize hardware queues with SCSI MQ interface

2019-01-22 Thread James Smart
Now that the lower half has much better per-cpu parallelization using the hardware queues, the SCSI MQ support needs to be tied into it. The involves the following mods: - Use the hardware queue info from the midlayer to help select the hardware queue to utilize. This required change to the ge

[PATCH v2 17/26] lpfc: Rework EQ/CQ processing to address interrupt coalescing

2019-01-22 Thread James Smart
When driving high iop counts, auto_imax coalescing kick in and drives the performance to extremely small iops levels. There are two issues: 1) auto_imax is enabled by default. The auto algorithm, when iops gets high divides the iops by the hdwq count and uses that value to calculate EQ_Delay

[PATCH v2 26/26] lpfc: Update lpfc version to 12.2.0.0

2019-01-22 Thread James Smart
Update lpfc version to 12.2.0.0 Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/lpfc/lpfc_version.h b/drivers/scsi/lpfc/lpfc_version.h index

[PATCH v2 23/26] lpfc: Correct upcalling nvmet_fc transport during io done downcall

2019-01-22 Thread James Smart
When the transport calls into the lpfc target to release an io job structure, which corresponds to an exchange, and if the driver was waiting for an exchange in order to post a previously received command to the transport, the driver immediately takes the io job and reuses the context for the prior

[PATCH v2 24/26] lpfc: Fix nvmet issues when link bounce under IO load

2019-01-22 Thread James Smart
Various null pointer dereference and general protection fault panics occur when there is a link bounce under load. There are a large number of "error" message 6413 indicating "bad release". The issues resolve to list corruptions due to missing or inconsistent lock protection. Lockups are due to ne

[PATCH v2 04/26] lpfc: Remove extra vector and SLI4 queue for Expresslane

2019-01-22 Thread James Smart
There is a extra queue and msix vector for expresslane. Now that the driver will be doing queues per cpu this oddball queue is no longer needed. Expresslane will utilize the normal per-cpu queues. Updated debugfs sli4 queue output to go along with the change Signed-off-by: Dick Kennedy Signed-o

[PATCH v2 14/26] lpfc: Fix setting affinity hints to correlate with hardware queues

2019-01-22 Thread James Smart
The desired affinity for the hardware queue behavior is for hdwq 0 to be affinitized with cpu 0, hdwq 1 to cpu 1, and so on. The implementation so far does not do this if the number of cpus is greating than the number of hardware queues (e.g. hardware queue allocation was administratively reduced o

[PATCH v2 21/26] lpfc: Rework locking on SCSI io completion

2019-01-22 Thread James Smart
A scsi host lock is taken on every io completion to check whether the abort handler is waiting on the io completion. This is an expensive lock to take on all completion when rarely in an abort condition. Replace scsi host lock with command-specific lock. Synchronize completion and abort paths by n

[PATCH v2 19/26] lpfc: Resize cpu maps structures based on possible cpus

2019-01-22 Thread James Smart
The work done to date utilized the number of present cpus when sizing per-cpu structures. Structures should have been sized based on the max possible cpu count. Convert the driver over to possible cpu count for sizing allocation. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-b

[PATCH v2 22/26] lpfc: Fix default driver parameter collision for allowing NPIV support

2019-01-22 Thread James Smart
The conversion to enable SCSI and NVME fc4 support ran into an issue with NPIV support. With NVME NPIV is not currently supported, but with SCSI it was. The driver reverted to it's lowest setting meaning NPIV with SCSI was not allowed. Convert the NPIV checks and implementation so that SCSI can co

[PATCH v2 16/26] lpfc: cleanup: convert eq_delay to usdelay

2019-01-22 Thread James Smart
Review of the eq coalescing logic showed the code was a bit fragmented. Sometimes it would save/set via an interrupt max value, while in others it would do so via a usdelay. There were also two places changing eq delay, one place that issued mailbox commands, and another that changed via register

[PATCH v2 20/26] lpfc: Enable SCSI and NVME fc4s by default

2019-01-22 Thread James Smart
Now that performance mods don't split resources by protocol and enable both protocols by default, there's no reason not to enable concurrent SCSI and NVME fc4 support. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc_attr.c | 4 ++--

[PATCH v2 03/26] lpfc: Implement common IO buffers between NVME and SCSI

2019-01-22 Thread James Smart
Currently, both NVME and SCSI get their IO buffers from separate pools. XRI's are associated 1:1 with IO buffers, so XRI's are also split between protocols. Eliminate the independent pools and use a single pool. Each buffer structure now has a common section and a protocol section. Per protocol ro

[PATCH v2 15/26] lpfc: Support non-uniform allocation of MSIX vectors to hardware queues

2019-01-22 Thread James Smart
So far msix vectors allocation assumed it would be 1:1 with hardware queues. However, there are several reasons why fewer MSIX vectors may be allocated than hardware queues such as the platform being out of vectors or adapter limits being less than cpu count. This patch reworks the MSIX/EQ relatio

[PATCH v2 07/26] lpfc: cleanup: Remove unused FCP_XRI_ABORT_EVENT slowpath event

2019-01-22 Thread James Smart
Both NVME and SCSI aborts are now processed off the CQ workqueue and do not generate events for the slowpath any more. Remove the unused event code. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- drivers/scsi/lpfc/lpfc.h | 1 - drivers/scsi/lp

[PATCH v2 06/26] lpfc: Partition XRI buffer list across Hardware Queues

2019-01-22 Thread James Smart
Once the IO buff allocations were made shared, there was a single XRI buffer list shared by all hardware queues. A single list isn't great for performance when shared across the per-cpu hardware queues. Create a separate XRI IO buffer get/put list for each Hardware Queue. As SGLs and associated

[PATCH v2 13/26] lpfc: Allow override of hardware queue selection policies

2019-01-22 Thread James Smart
Default behavior is to use the information from the upper io stacks to select the hardware queue to use for io submission. which typically has good cpu affinity. However, the driver, when used on some variants of the upstream kernel, has found queuing information to be suboptimal for FCP or io com

[PATCH v2 10/26] lpfc: Convert ring number to hardware queue for nvme wqe posting.

2019-01-22 Thread James Smart
SLI4 nvme functions are passing the SLI3 ring number when posting wqe to hardware. This should be indicating the hardware queue to use, not the ring number. Replace ring number with the hardware queue that should be used. Note: SCSI avoided this issue as it utilized an older lfpc_issue_iocb routi

[PATCH v2 18/26] lpfc: Utilize new IRQ API when allocating MSI-X vectors

2019-01-22 Thread James Smart
Current driver uses the older IRQ API for msix allocation Change driver to utilize pci_alloc_irq_vectors when allocation IRQ vectors. Make lpfc_cpu_affinity_check use pci_irq_get_affinity to determine how the kernel mapped all the IRQs. Remove msix_entries from SLI4 structure, replaced with pci_

[PATCH v2 25/26] lpfc: Update 12.2.0.0 file copyrights to 2019

2019-01-22 Thread James Smart
For files modifed as part of 12.2.0.0 patches, update copyright to 2019 Signed-off-by: Dick Kennedy Signed-off-by: James Smart --- drivers/scsi/lpfc/lpfc.h | 2 +- drivers/scsi/lpfc/lpfc_attr.c | 2 +- drivers/scsi/lpfc/lpfc_crtn.h | 2 +- drivers/scsi/lpfc/lpfc_ct.c

[PATCH] RDMA/srp: Increase max_segment_size

2019-01-22 Thread Bart Van Assche
The default behavior of the SCSI core is to set the block layer request queue parameter max_segment_size to 64 KB. That means that elements of scatterlists are limited to 64 KB. Since RDMA adapters support larger sizes, increase max_segment_size for the SRP initiator. Notes: - The SCSI max_segment

Re: [RESEND PATCH v1] scsi: ufs: Use explicit access size in ufshcd_dump_regs

2019-01-22 Thread Bjorn Andersson
On Tue 22 Jan 09:29 PST 2019, Marc Gonzalez wrote: > memcpy_fromio() doesn't provide any control over access size. > For example, on arm64, it is implemented using readb and readq. > This may trigger a synchronous external abort: > > [3.729943] Internal error: synchronous external abort: 9600

Re: [RESEND PATCH v1] scsi: ufs: Use explicit access size in ufshcd_dump_regs

2019-01-22 Thread Greg Kroah-Hartman
On Tue, Jan 22, 2019 at 06:29:22PM +0100, Marc Gonzalez wrote: > memcpy_fromio() doesn't provide any control over access size. > For example, on arm64, it is implemented using readb and readq. > This may trigger a synchronous external abort: > > [3.729943] Internal error: synchronous external

[PATCH 0/7] Fix handling of bidi commands

2019-01-22 Thread Bart Van Assche
Hi Martin, Recently Doug Gilbert reported that handling of bidi commands is broken in the scsi-mq code. This patch series fixes that bug and also simplifies bidi command handling. Please consider these patches for kernel v5.1. Thanks, Bart. Bart Van Assche (7): Introduce the bidi_supported fl

[PATCH 5/7] Move several function definitions in

2019-01-22 Thread Bart Van Assche
Since the next patch will call scsi_out_cmd() from scsi_[gs]et_resid(), reorder the function definitions in . Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Bart Van Assche --- include/scsi/scsi_cmnd.h | 50 1 file changed

[PATCH 2/7] Change scsi_cmnd.prot_sdb from a pointer into a regular member

2019-01-22 Thread Bart Van Assche
This patch slightly increases the size of struct scsi_cmnd if data protection is disabled, decreases the size of the data appended at the end of struct scsi_cmnd if data protection is enabled and simplifies the SCSI core. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-

[PATCH 4/7] Introduce scsi_out_cmd()

2019-01-22 Thread Bart Van Assche
This patch does not change any functionality. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Bart Van Assche --- include/scsi/scsi_cmnd.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h

[PATCH 1/7] Introduce the bidi_supported flag in the host template structure

2019-01-22 Thread Bart Van Assche
This patch does not change any functionality but makes the drivers that support bidirectional commands more compact. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Lee Duncan Cc: Chris Leech Signed-off-by: Bart Van Assche --- drivers/scsi/iscsi_tcp.c | 8 +-

[PATCH 3/7] Fix bidi handling

2019-01-22 Thread Bart Van Assche
Some code in the SCSI core interprets blk_mq_rq_to_pdu(cmd->request->next_rq) as a struct scsi_data_buffer, e.g. scsi_mq_prep_fn(). Other code in the SCSI core interprets the same data structure as a struct scsi_request, e.g. scsi_io_completion(). Avoid this confusion by using the SCSI data buffer

[PATCH 6/7] Introduce scsi_in_[sg]et_resid() and scsi_out_[sg]et_resid()

2019-01-22 Thread Bart Van Assche
This patch does not change any functionality. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Lee Duncan Cc: Chris Leech Cc: Paolo Bonzini Signed-off-by: Bart Van Assche --- drivers/scsi/libiscsi.c| 12 ++-- drivers/scsi/scsi_debug.c | 9 + drivers/s

[PATCH 7/7] Move the resid member from struct scsi_data_buffer into struct scsi_cmnd

2019-01-22 Thread Bart Van Assche
This patch does not change any functionality but reduces the size of struct scsi_cmnd. Cc: Douglas Gilbert Cc: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Bart Van Assche --- drivers/scsi/scsi_lib.c | 2 -- include/scsi/scsi_cmnd.h | 9 - 2 files changed, 4 insertions(+), 7

Re: dd hangs when reading large partitions

2019-01-22 Thread Evan Green
FWIW, I am unable to repro this in our 4.19 kernel [1]. I put mem=4G on the command line, and can dd till the cows come home. Seems like you're leaking buffers somewhere? localhost ~ # dd if=/dev/sda of=/dev/null bs=4M status=progress 12683575296 bytes (13 GB, 12 GiB) copied, 125.004 s, 101 MB/s^C

RE: [PATCH v2] MAINTAINERS: Mark UFS as Orphan

2019-01-22 Thread Avri Altman
+Vinayak Thanks, Avri > > On 1/22/2019 5:15 PM, Marc Gonzalez wrote: > > Looking through git log and the linux-scsi archives, it seems that > > Vinayak vanished after 2013. Removing him as a maintainer will make > > get_maintainer.pl generate the list of relevant contributors. > > > > Signed-off

Re: [PATCH] RDMA/srp: Increase max_segment_size

2019-01-22 Thread Douglas Gilbert
On 2019-01-22 1:25 p.m., Bart Van Assche wrote: The default behavior of the SCSI core is to set the block layer request queue parameter max_segment_size to 64 KB. That means that elements of scatterlists are limited to 64 KB. Since RDMA adapters support larger sizes, increase max_segment_size for

Re: [PATCH v9 00/22] Re-use nvram module

2019-01-22 Thread Finn Thain
On Tue, 22 Jan 2019, Greg Kroah-Hartman wrote: > On Tue, Jan 15, 2019 at 03:18:56PM +1100, Finn Thain wrote: > > The "generic" NVRAM module, drivers/char/generic_nvram.c, implements a > > /dev/nvram misc device. This module is used only by 32-bit PowerPC > > platforms. > > > > The RTC "CMOS" NVRA

Re: [PATCH v1 5/8] scsi: ufs: qcom: Expose the reset controller for PHY

2019-01-22 Thread Evan Green
On Fri, Jan 18, 2019 at 2:31 PM Stephen Boyd wrote: > > Quoting Evan Green (2019-01-11 15:01:26) > > diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c > > index 3aeadb14aae1e..db46f9a64b54c 100644 > > --- a/drivers/scsi/ufs/ufs-qcom.c > > +++ b/drivers/scsi/ufs/ufs-qcom.c > >

Re: [RESEND PATCH v1] scsi: ufs: Use explicit access size in ufshcd_dump_regs

2019-01-22 Thread Evan Green
On Tue, Jan 22, 2019 at 9:29 AM Marc Gonzalez wrote: > > memcpy_fromio() doesn't provide any control over access size. > For example, on arm64, it is implemented using readb and readq. > This may trigger a synchronous external abort: > > [3.729943] Internal error: synchronous external abort: 9

Re: [PATCH 0/7] Fix handling of bidi commands

2019-01-22 Thread Douglas Gilbert
On 2019-01-22 1:57 p.m., Bart Van Assche wrote: Hi Martin, Recently Doug Gilbert reported that handling of bidi commands is broken in the scsi-mq code. This patch series fixes that bug and also simplifies bidi command handling. Please consider these patches for kernel v5.1. Thanks, Bart. Bart

Re: [PATCH 0/7] Fix handling of bidi commands

2019-01-22 Thread Bart Van Assche
On Tue, 2019-01-22 at 18:30 -0500, Douglas Gilbert wrote: > This patchset needs something like the following if UAS (USB Attached > SCSI) is configured in your kernel. > > Beware of tabs/spaces/line_wraps as this is a cut and paste: > > diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage

Re: [PATCH for-5.0] scsi: communicate max segment size to the DMA mapping code

2019-01-22 Thread Martin K. Petersen
Christoph, > When a host driver sets a maximum segment size we should not only > propagate that setting to the block layer, which can merge segments, > but also to the DMA mapping layer which can merge segments as well. Applied to 5.0/scsi-fixes, thanks! -- Martin K. Petersen Oracle Linu

Re: [PATCH 0/2] Fix use-after-free errors in lpfc driver when using NVMe

2019-01-22 Thread Martin K. Petersen
Ewan, > These two patches fix use-after-free errors in the shutdown path of > the lpfc driver with both the Initiator and Target mode usage of FC > ports. > > The problem is very apparent with slub_debug enabled, as the memory > poisoning prevents the wait_for_completion_timeout() from returning

Re: [PATCH] scsi: csiostor: fix NULL pointer dereference in csio_vport_set_state()

2019-01-22 Thread Martin K. Petersen
Varun, > Assign fc_vport to ln->fc_vport before calling csio_fcoe_alloc_vnp() > to avoid a NULL pointer dereference in csio_vport_set_state(). > > ln->fc_vport is dereferenced in csio_vport_set_state(). Applied to 5.0/scsi-fixes. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: tcmu: fix use after free

2019-01-22 Thread Martin K. Petersen
Xiubo, > Fixes: 4147ebb3 ("scsi: tcmu: avoid cmd/qfull timers updated whenever a new > cmd comes") Not sure where that hash comes from? I fixed it up. Also, please use 12 char abbrev. Applied to 5.0/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: tcmu: fix use after free

2019-01-22 Thread Xiubo Li
On 2019/1/23 9:56, Martin K. Petersen wrote: Xiubo, Fixes: 4147ebb3 ("scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes") Not sure where that hash comes from? I fixed it up. Also, please use 12 char abbrev. Sorry, I may forgot to pull it from the upstream. Thanks. BRs X

Re: [PATCH v1] scsi: ufs: Use explicit access size in ufshcd_dump_regs

2019-01-22 Thread Martin K. Petersen
Marc, > memcpy_fromio() doesn't provide any control over access size. > For example, on arm64, it is implemented using readb and readq. > This may trigger a synchronous external abort: Applied to 5.0/scsi-fixes, thanks. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v3 0/3] scsi: ufs-bsg: Add read descriptor

2019-01-22 Thread Martin K. Petersen
Avri, > V2->v3: > Add a prep patch with write descriptor calling convention changes. > Elaborate the commit log of ufs-bsg: Allow reading descriptors. > Add Reviewed-by tag. I don't see Christoph's Reviewed-by tags on the list. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2 00/10] fnic driver updates

2019-01-22 Thread Martin K. Petersen
Satish, > The following patches are bug fixes and update for the fnic driver. Applied to 5.1/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 0/6] fnic devcmd2 changes

2019-01-22 Thread Martin K. Petersen
Satish, > Devcmd2 is a newer firmware interface exported by newer Cisco VIC > devices. This series of patches is to enable the devcmd2 interface for > fnic. Applied to 5.1/scsi-queue. Thanks. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2 0/7] sd patches for kernel v5.1

2019-01-22 Thread Martin K. Petersen
Bart, > This patch series includes the following patches: > - Six patches that clean up/rearrange the code in the sd driver. > - One micro-optimization for the SCSI core. Applied to 5.1/scsi-queue. Thanks again. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2 0/3] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2

2019-01-22 Thread Martin K. Petersen
Ching, > This patch series are against to mkp's 5.1/scsi-queue. Applied to 5.1/scsi-queue. Thank you. PS. Your file permissions are odd. I always have to change your diffs from 755 to 644 before applying. -- Martin K. Petersen Oracle Linux Engineering

Re: dd hangs when reading large partitions

2019-01-22 Thread jianchao.wang
On 1/22/19 6:59 PM, Marc Gonzalez wrote: > On 22/01/2019 04:12, Jianchao Wang wrote: > >> On 1/21/19 11:22 PM, Marc Gonzalez wrote: >> >>> Well, now we know for sure that the clk_scaling_lock is a red herring. >>> I applied the patch below, and still the system locked up: >>> >>> # dd if=/dev/s

Re: [PATCH v2 0/3] scsi: arcmsr: Fix suspend/resume of ACB_ADAPTER_TYPE_B part 2

2019-01-22 Thread Ching Huang
On Tue, 2019-01-22 at 21:41 -0500, Martin K. Petersen wrote: > Ching, > > > This patch series are against to mkp's 5.1/scsi-queue. > > Applied to 5.1/scsi-queue. Thank you. > > PS. Your file permissions are odd. I always have to change your diffs > from 755 to 644 before applying. > Thanks Mart

Re: [PATCH 0/7] Fix handling of bidi commands

2019-01-22 Thread Douglas Gilbert
On 2019-01-22 7:56 p.m., Bart Van Assche wrote: On Tue, 2019-01-22 at 18:30 -0500, Douglas Gilbert wrote: This patchset needs something like the following if UAS (USB Attached SCSI) is configured in your kernel. Beware of tabs/spaces/line_wraps as this is a cut and paste: diff --git a/drivers/

RE: [PATCH 6/7] scsi: qlogic: no need to check return value of debugfs_create functions

2019-01-22 Thread Manish Rangankar
> -Original Message- > From: Greg Kroah-Hartman > Sent: Tuesday, January 22, 2019 8:39 PM > To: James Bottomley ; Martin Petersen > > Cc: linux-ker...@vger.kernel.org; linux-scsi@vger.kernel.org; Greg Kroah- > Hartman ; QLogic-Storage- > upstr...@cavium.com > Subject: [PATCH 6/7] scsi: ql

RE: [PATCH v3 0/3] scsi: ufs-bsg: Add read descriptor

2019-01-22 Thread Avri Altman
> > Avri, > > > V2->v3: > > Add a prep patch with write descriptor calling convention changes. > > Elaborate the commit log of ufs-bsg: Allow reading descriptors. > > Add Reviewed-by tag. > > I don't see Christoph's Reviewed-by tags on the list. Sorry. Will remove and resend. Thanks, Avri

Re: [PATCH v3 0/3] scsi: ufs-bsg: Add read descriptor

2019-01-22 Thread Christoph Hellwig
On Tue, Jan 22, 2019 at 09:27:13PM -0500, Martin K. Petersen wrote: > > Avri, > > > V2->v3: > > Add a prep patch with write descriptor calling convention changes. > > Elaborate the commit log of ufs-bsg: Allow reading descriptors. > > Add Reviewed-by tag. > > I don't see Christoph's Reviewed-by