[PATCH] configfs: Fix race between create_link and configfs_rmdir

2017-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch closes a long standing race in configfs between the creation of a new symlink in create_link(), while the symlink target's config_item is being concurrently removed via configfs_rmdir(). This can happen because the symlink target's

[PATCH] iscsi-target: Reject immediate data underflow larger than SCSI transfer length

2017-06-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger When iscsi WRITE underflow occurs there are two different scenarios that can happen. Normally in practice, when an EDTL vs. SCSI CDB TRANSFER LENGTH underflow is detected, the iscsi immediate data payload is the smaller SCSI CDB TRANSFER LENGTH.

Re: [PATCH 01/15] qla2xxx: Combine Active command arrays.

2017-06-07 Thread Bart Van Assche
On Wed, 2017-06-07 at 14:43 -0700, Himanshu Madhani wrote: > +enum { > + TYPE_SRB, > + TYPE_TGT_CMD, > +}; > + > typedef struct srb { > + /* > + * Do not move cmd_type field, it needs to > + * line up with qla_tgt_cmd->cmd_type > + */ > + uint8_t cmd_type; > +

Re: [PATCH][scsi-next] scsi: qla2xxx: remove redundant null check on tgt

2017-06-07 Thread Madhani, Himanshu
> On Jun 5, 2017, at 10:29 AM, Colin King wrote: > > From: Colin Ian King > > An earlier commit ed7fb808477b846bb2 ("scsi: qla2xxx: Remove > redundant wait when target is stopped.") removed a null check > on ha->tgt.tgt_ops and replaced it

[PATCH 14/15] qla2xxx: Include Exchange offload/Extended Login into FW dump

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran Add missing memory dump of Exchange Offload and Extended login into FW dump. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dbg.c | 49

[PATCH 12/15] qla2xxx: Remove datasegs_per_cmd and datasegs_per_cont field

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran These fields only hold one set of value. Replace it with macros. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 12 +---

[PATCH 06/15] qla2xxx: Add fw_started flags to qpair

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran Add fw_started flag to qpair to reduce access to qla_hw_data structure by each qpair. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h| 21

[PATCH 05/15] qla2xxx: Add debug knob for user control workload

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran For Target mode, user can control the work load by placing qla2xxx's irq vector on certain CPU via the smp_affinity settings. This patch allows user to control the number of QPair's irq to be active. The irqs are allocated at driver load time until unload.

[PATCH 11/15] qla2xxx: Remove unused tgt_enable_64bit_addr flag

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran By default this flag is forced to true. Remove this flag and unneccessary check for this flag. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 44

[PATCH 13/15] qla2xxx: Move target stat counters from vha to qpair.

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 27 +++-- drivers/scsi/qla2xxx/qla_dfs.c | 48

[PATCH 10/15] qla2xxx: Add debug logging routine for qpair

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran For target main path io routines that uses qpair, create new logging and debugging routines to use qpair instead of reaching for scsi_qla_host. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani

[PATCH 09/15] qla2xxx: Add function call to qpair for door bell

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran Add call back to door bell for qpair. This help reduce access to qla_hw_data structure. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h| 3 ++

[PATCH 15/15] qla2xxx: Update driver version to 9.01.00.00-k

2017-06-07 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali --- drivers/scsi/qla2xxx/qla_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_version.h

[PATCH 02/15] qla2xxx: Preparation for Target MQ.

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran In Current code, Req Q 0, Resp Q 0 and hardware_lock are the main resources for sending and process completion of Target IO. These resources are now referenced behind a new qpair ("struct qla_qpair base_qpair"). Main path IO handle will access those

[PATCH 03/15] qla2xxx: Enable Target Multi Queue

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran Enable Multi Queue for Target mode. At Initiator LUN scan time, each LUN is assign to a QPair. Each QPair is assigned to a certain CPU. When new cmd arrives from the wire, the lunid is used to search for qpair. The qpair's assigned cpuid will be used to

[PATCH 00/15] qla2xxx: Add Target Multiqueue support

2017-06-07 Thread Himanshu Madhani
Hi Nic, This patch series adds support for multiqueue for qla2xxx target mode driver. I've also added patch ("qla2xxx: Include Exchange offload/Extended Login into FW dump") which was dropped from earlier series for rework. Please apply this series to target-pending for inclusion in 4.13 merge

[PATCH 01/15] qla2xxx: Combine Active command arrays.

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran Merge active/outstanding cmd arrays from target side and initiator side together in prepration for Target Multi Queue support. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani ---

[PATCH 04/15] qla2xxx: Fix mailbox failure while deleting Queue pairs

2017-06-07 Thread Himanshu Madhani
From: Sawan Chandak In target mode driver, queue pairs are created at the configuration time, instead of load time, after chip reset. If a user tries to load/unload driver after queue pairs are created, then there would be mailbox failure while trying to delete queue

[PATCH 07/15] qla2xxx: Move fields from qla_hw_data to qla_qpair

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran o Move chip_reset, enable_class_2 fields from qla_hw_data to qla_qpair to reduce cache thrash for target MQ. o Optimizations to reduce unnecessary memory load for good path io. Signed-off-by: Quinn Tran Signed-off-by: Himanshu

[PATCH 08/15] qla2xxx: Use shadow register for ISP27XX

2017-06-07 Thread Himanshu Madhani
From: Quinn Tran For ISP27XX, use shadow register to read FW provided REQQ's consumer index. The shadow register is dma'ed by firmware. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani ---

[PATCH] scsi: remove useless variable assignment

2017-06-07 Thread Gustavo A. R. Silva
Remove both variable assignments once the value stored in variable _reqlen_ is overwritten at some point either by line 2321: reqlen = mptr - msg; or by line 2330: reqlen = 12; Addresses-Coverity-ID: 1226930 Addresses-Coverity-ID: 1226931 Signed-off-by: Gustavo A. R. Silva

Re: [PATCH net-next] cxgb4: Fix tids count for ipv6 offload connection

2017-06-07 Thread David Miller
From: Ganesh Goudar Date: Wed, 7 Jun 2017 15:04:51 +0530 > the adapter consumes two tids for every ipv6 offload > connection be it active or passive, calculate tid usage > count accordingly. > > Also change the signatures of relevant functions to get > the address family.

Re: [PATCH 0/7] Enable iSCSI offload drivers to use information from iface.

2017-06-07 Thread Robert LeBlanc
On Wed, Jun 7, 2017 at 10:28 AM, Chris Leech wrote: > On Tue, Jun 06, 2017 at 12:07:10PM -0600, Robert LeBlanc wrote: >> This patchset enables iSCSI offload drivers to have access to the iface >> information provided by iscsid. This allows users to have more control >> of how

Re: [PATCH 0/7] Enable iSCSI offload drivers to use information from iface.

2017-06-07 Thread Chris Leech
On Tue, Jun 06, 2017 at 12:07:10PM -0600, Robert LeBlanc wrote: > This patchset enables iSCSI offload drivers to have access to the iface > information provided by iscsid. This allows users to have more control > of how the driver connects to the iSCSI target. iSER is updated to use >

[PATCH v4 23/23] scsi: hisi_sas: modify internal abort dev flow for v3 hw

2017-06-07 Thread John Garry
From: Xiang Chen There is a change for abort dev for v3 hw: add registers to configure unaborted iptt for a device, and then inform this to logic. Signed-off-by: Xiang Chen Signed-off-by: John Garry ---

[PATCH v4 22/23] scsi: hisi_sas: add v3 code to fill some more hw function pointers

2017-06-07 Thread John Garry
From: Xiang Chen Add code to fill the interface of phy_hard_reset, phy_get_max_linkrate, and phy enable/disable. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 39

[PATCH v4 21/23] scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error

2017-06-07 Thread John Garry
From: Xiang Chen For ECC 1bit error, logic can recover it, so we only print a warning. For ECC multi-bit and AXI bus fatal error, we panic. Note: once v3 hw controller reset support is added, the panic will be replaced by a controller reset, like v2 hw.

[PATCH v4 18/23] scsi: hisi_sas: add v3 code for itct setup and free

2017-06-07 Thread John Garry
From: Xiang Chen Add code to itct setup and free for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 114 + 1 file changed, 114

[PATCH v4 04/23] scsi: hisi_sas: relocate get_ata_protocol()

2017-06-07 Thread John Garry
From: Xiang Chen Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry ---

[PATCH v4 11/23] scsi: hisi_sas: add v3 hw init

2017-06-07 Thread John Garry
From: Xiang Chen Add code to initialise v3 hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 277 + 1 file changed, 277

[PATCH v4 02/23] scsi: hisi_sas: define hisi_sas_device.device_id as int

2017-06-07 Thread John Garry
Currently hisi_sas_device.device_id is a u64. This can create a problem in selecting the queue for a device, in that this code does a 64b division on device id. For some 32b systems, 64b division is slow and the lib reference must be explicitly included. The device id does not need to be 64b in

[PATCH v4 13/23] scsi: hisi_sas: add phy up/down/bcast and channel ISR

2017-06-07 Thread John Garry
From: Xiang Chen Add code to initialise interrupts and add some interrupt handlers. Also add function hisi_sas_v3_destroy_irqs() to clean-up irqs upon module unloading. Signed-off-by: John Garry Signed-off-by: Xiang Chen

[PATCH v4 20/23] scsi: hisi_sas: add get_wideport_bitmap_v3_hw()

2017-06-07 Thread John Garry
From: Xiang Chen Add code for interface get_wideport_bitmap. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 + 1 file changed, 13 insertions(+) diff

[PATCH v4 16/23] scsi: hisi_sas: add v3 code to send SMP frame

2017-06-07 Thread John Garry
From: Xiang Chen Add code to prepare SMP frame. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 74 ++ 1 file changed, 74

[PATCH v4 08/23] scsi: hisi_sas: create hisi_sas_get_fw_info()

2017-06-07 Thread John Garry
Move the functionality to retrieve the fw info into a dedicated device type-agnostic function, hisi_sas_get_fw_info(). The reasoning is that this function will be required for future pci-based platforms. Also add some debug logs for failure. Signed-off-by: John Garry ---

[PATCH v4 19/23] scsi: hisi_sas: add v3 code to send internal abort command

2017-06-07 Thread John Garry
From: Xiang Chen Add code to prepare internal abort command. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 38 ++ 1 file changed, 38

[PATCH v4 14/23] scsi: hisi_sas: add v3 cq interrupt handler

2017-06-07 Thread John Garry
From: Xiang Chen Add v3 cq interrupt handler slot_complete_v2_hw(). Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 365 + 1 file

[PATCH v4 09/23] scsi: hisi_sas: add skeleton v3 hw driver

2017-06-07 Thread John Garry
Add skeleton driver for v3 hw in hisi_sas_v3_hw.c File hisi_sas_v3_hw.c will serve 2 purposes: - probing and initialisation of the controller based on pci device - hw layer for v3-based controllers The controller design is quite similar to v2 hw in hip07. However key differences include: -All

[PATCH v4 12/23] scsi: hisi_sas: add v3 hw PHY init

2017-06-07 Thread John Garry
From: Xiang Chen Add code to configure PHYs for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 127 - 1 file changed, 126

[PATCH v4 07/23] scsi: hisi_sas: add pci_dev in hisi_hba struct

2017-06-07 Thread John Garry
Since hip08 SAS controller is based on pci device, add hisi_hba.pci_dev for hip08 (will be v3), and also rename hisi_hba.pdev to .platform_dev for clarity. In addition, for common code which wants to reference the controller device struct, add hisi_hba.dev, and change the common code to use it.

[PATCH v4 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock

2017-06-07 Thread John Garry
From: Xiang Chen Currently hisi_hba.lock is locked to deliver and receive a command to/from any hw queue. This causes much contention at high data-rates. To boost performance, lock on a per queue basis for sending and receiving commands to/from hw. Certain critical

[PATCH v4 00/23] hisi_sas: hip08 support

2017-06-07 Thread John Garry
This patchset adds support for the HiSilicon SAS controller in the hip08 chipset. The key difference compared to earlier chipsets is that the controller is an integrated PCI endpoint in hip08. As such, the controller is a pci device (not a platform device, like v2 hw in hip07). The driver is

[PATCH v4 15/23] scsi: hisi_sas: add v3 code to send SSP frame

2017-06-07 Thread John Garry
From: Xiang Chen Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 208 + 1

[PATCH v4 10/23] scsi: hisi_sas: add initialisation for v3 pci-based controller

2017-06-07 Thread John Garry
Add the code to initialise the controller which is based on pci device in hisi_sas_v3_hw.c The core controller routines are still in hisi_sas_main.c; some common initialisation functions are also exported from hisi_sas_main.c For pci-based controller, the device properties, like phy count and

[PATCH v4 01/23] scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort()

2017-06-07 Thread John Garry
From: Xiang Chen We need to check for timeout before task status, or the task will be mistook as completed internal abort command. Also add protection for sas_task.task_state_flags in hisi_sas_tmf_timedout(). Signed-off-by: Xiang Chen

[PATCH v4 05/23] scsi: hisi_sas: relocate sata_done_v2_hw()

2017-06-07 Thread John Garry
From: Xiang Chen Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry ---

[PATCH v4 17/23] scsi: hisi_sas: add v3 code to send ATA frame

2017-06-07 Thread John Garry
From: Xiang Chen Add code to prepare ATA frame for v3 hw Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 106 + 1 file changed, 106

[PATCH v4 06/23] scsi: hisi_sas: relocate get_ncq_tag_v2_hw()

2017-06-07 Thread John Garry
From: Xiang Chen Relocate get_ncq_tag_v2_hw() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry ---

Re: [PATCH V4 2/2] scsi: ufshcd-pci: Add Intel CNL support

2017-06-07 Thread Christoph Hellwig
On Tue, Jun 06, 2017 at 02:35:31PM +0300, Adrian Hunter wrote: > Add PCI id and variant ops for Intel CNL UFS host controller. Looks good: Reviewed-by: Christoph Hellwig It would be great if we could fold tc-dwc-g210-pci into ufshcd-pci the same way.

Re: [PATCH V4 1/2] scsi: ufshcd-pci: Fix PM config

2017-06-07 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

[PATCH net-next] cxgb4: Fix tids count for ipv6 offload connection

2017-06-07 Thread Ganesh Goudar
the adapter consumes two tids for every ipv6 offload connection be it active or passive, calculate tid usage count accordingly. Also change the signatures of relevant functions to get the address family. Signed-off-by: Rizwan Ansari Signed-off-by: Varun Prakash

Re: [PATCH] scsi_lib: increase {host|target|device}_busy count after dispatch cmd

2017-06-07 Thread Ganesh Mahendran
Ping~ Willing to hear some feed back :-) Thanks 2017-06-05 17:37 GMT+08:00 Ganesh Mahendran : > In android system, when there are lots of threads running. Thread A > holding *host_busy* count is easily to be preempted, and if at the > same time, thread B set

Re: [PATCH 0/7] Enable iSCSI offload drivers to use information from iface.

2017-06-07 Thread Hannes Reinecke
On 06/06/2017 08:07 PM, Robert LeBlanc wrote: > This patchset enables iSCSI offload drivers to have access to the iface > information provided by iscsid. This allows users to have more control > of how the driver connects to the iSCSI target. iSER is updated to use > iface.ipaddress to set the

Re: [PATCH blktests v2 0/3] Add SCSI generic test group

2017-06-07 Thread Johannes Thumshirn
On 06/07/2017 08:44 AM, Omar Sandoval wrote: > Sorry for the delay, I was chasing down a few Btrfs bugs for the last > couple of weeks. I applied these with some small changes. I stuck with > running syzkaller on the scsi-debug device like you had here, we can > revisit that for future tests if it

Re: [PATCH blktests v2 0/3] Add SCSI generic test group

2017-06-07 Thread Omar Sandoval
On Fri, May 19, 2017 at 03:55:28PM +0200, Johannes Thumshirn wrote: > Add a test group for the SCSI generic driver and one syzcaller > reproducer for this group. > > The reprodcuer is distributed as a C program, so the makefile is > amended to build C files to be used in the test. > > Changes to