[PATCH 2/2] scsi: hisi_sas: Change frame type for SET MAX commands

2017-12-28 Thread chenxiang
According to ATA protocol, SET MAX commands belong to different frame types. So judge features field of SET MAX commands to decide which frame type they belongs to. Signed-off-by: Xiang Chen Signed-off-by: John Garry ---

[PATCH 1/2] ata: enhance the definition of SET MAX feature field value

2017-12-28 Thread chenxiang
There are two other values for SET MAX feature field according to ata protocol. So definite them. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- include/linux/ata.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 0/2] Change frame type for SET MAX commands

2017-12-28 Thread chenxiang
According to ATA protocol, there are two other values for SET MAX commands' feature field. So definite them. Also those SET MAX commands belong to different frame types,and judge feature field of SET MAX commands to decide which frame type they belongs to. chenxiang (2): ata: enhance the

[PATCH v3 1/9] ufs: sysfs: device descriptor

2017-12-28 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS device descriptor parameters. The group adds "device_descriptor" folder under the UFS driver sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The parameters are shown as hexadecimal numbers. The full information about the parameters could be

[PATCH v3 3/9] ufs: sysfs: geometry descriptor

2017-12-28 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS geometry descriptor parameters. The group adds "geometry_descriptor" folder under the UFS driver sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The parameters are shown as hexadecimal numbers. The full information about the parameters could

[PATCH v3 4/9] ufs: sysfs: health descriptor

2017-12-28 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS health descriptor parameters. The group adds "health_descriptor" folder under the UFS driver sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The parameters are shown as hexadecimal numbers. The full information about the parameters could be

[PATCH v3 7/9] ufs: sysfs: unit descriptor

2017-12-28 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS unit descriptor parameters. The group adds "unit_descriptor" folder under the corresponding SCSI device sysfs entry (/sys/class/scsi_device/*/device/). The parameters are shown as hexadecimal numbers. The full information about the parameters

[PATCH v3 0/9] ufs: sysfs: read-only access to device descriptors, attributes and flags

2017-12-28 Thread Stanislav Nijnikov
This patch introduces sysfs entries that will provide read-only access to device management data that could be received with UFS query requests. User-space applications will be able to read UFS device descriptors, flags and attributes. This will allow to get full UFS device configuration and its

[PATCH v3 9/9] ufs: sysfs: attributes

2017-12-28 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS attributes. The group adds "attributes" folder under the UFS driver sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The attributes are shown as hexadecimal numbers. The full information about the attributes could be found at UFS

[PATCH v3 8/9] ufs: sysfs: flags

2017-12-28 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS flags. The group adds "flags" folder under the UFS driver sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The flags are shown as boolean value ("true" or "false"). The full information about the UFS flags could be found at UFS specifications

[PATCH v3 2/9] ufs: sysfs: interconnect descriptor

2017-12-28 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS interconnect descriptor parameters. The group adds "interconnect_descriptor" folder under the UFS driver sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The parameters are shown as hexadecimal numbers. The full information about the

[PATCH v3 6/9] ufs: sysfs: string descriptors

2017-12-28 Thread Stanislav Nijnikov
This patch introduces a sysfs group entry for the UFS string descriptors. The group adds "string_descriptors" folder under the UFS driver sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The folder will contain 5 files that will show string values defined by the UFS spec: a manufacturer name, a

[PATCH v2 33/37] qla2xxx: Prevent relogin trigger from sending too many commands

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran This patch adds check for pending work event before queueing relogin work to prevent redundant work to be active at the same time. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani ---

[PATCH v2 11/37] qla2xxx: Add option for use reserve exch for ELS

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Add option to tell FW to reserve 1/2 of emergency exchanges for ELS. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gbl.h | 1 +

[PATCH v2 16/37] qla2xxx: Fix session cleanup for N2N

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran When connection type is N_Port to N_Port (point-to-point), there is a possibilty where initiator will not send PLOGI request and will directly send PRLI. In N2N connection the port has higher port name sends the PLOGI but not allow to send PRLI if is a

[PATCH v2 14/37] qla2xxx: Allow target mode to accept PRLI in dual mode

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran For Dual Mode, Initiator side of the driver finish login, target side receive PRLI, but driver terminates PRLI. This patch allows target side to go ahead and accept PRLI. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani

[PATCH v2 18/37] qla2xxx: Add switch command to simplify fabric discovery

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran - add "async" gpn_ft, gnn_ft, gfpn_id, gnn_id switch commands. - For 8G and newer adapters, use async commands when it comes to fabric scan to reduce bottle neck. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani

[PATCH v2 36/37] qla2xxx: Serialize session free in qlt_free_session_done

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Add free_pending flag to serialize queueing of free_work element onto the work queue Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h| 1 +

[PATCH v2 37/37] qla2xxx: Update driver version to 10.00.00.04-k

2017-12-28 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 911b82226d13..0843def08356 100644 ---

[PATCH v2 34/37] qla2xxx: Remove unused argument from qlt_schedule_sess_for_deletion()

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Immeadiate flag is not used for scheduling session deletion. Remove it to simplfy session deletion code path. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani ---

[PATCH v2 22/37] qla2xxx: Fix login state machine freeze

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Relogin stop moving forward due to improper check of scan_state flag. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 6 -- 1 file changed, 6

[PATCH v2 31/37] qla2xxx: Add retry limit for fabric scan logic

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Switch scan is assumed to succeed most of the time. If the scan failed, then scan is limit 5 retries. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 2

[PATCH v2 32/37] qla2xxx: Prevent multiple active discovery commands per session

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Add check to allow single discovery command per session to be sent Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gs.c | 34 +-

Re: [PATCH v3 4/9] ufs: sysfs: health descriptor

2017-12-28 Thread Jaegeuk Kim
On 12/28, Stanislav Nijnikov wrote: > This patch introduces a sysfs group entry for the UFS health descriptor > parameters. The group adds "health_descriptor" folder under the UFS driver > sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The parameters are shown > as hexadecimal numbers. The full

Re: [PATCH 2/2 v4] scsi: ufs: introduce sysfs entries exposing UFS health info

2017-12-28 Thread Jaegeuk Kim
On 12/27, Greg Kroah-Hartman wrote: > On Wed, Dec 27, 2017 at 09:00:10AM +, Avri Altman wrote: > > > > > > > -Original Message- > > > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > > > ow...@vger.kernel.org] On Behalf Of Greg Kroah-Hartman > > > Sent: Thursday, December

[PATCH v2 01/37] qla2xxx: Fix NULL pointer access for fcport structure

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran when processing iocb in a timeout case, driver was trying to log messages without verifying if the fcport structure could have valid data. This results in a NULL pointer access. Fixes: 726b85487067("qla2xxx: Add framework for async fabric discovery")

[PATCH v2 27/37] qla2xxx: Add ability to use GPNFT/GNNFT for RSCN handling

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran add ability to use gpnft/gnnft to handle RSCN. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 7 +++ drivers/scsi/qla2xxx/qla_gbl.h | 1 +

[PATCH v2 21/37] qla2xxx: Reduce trace noise for Async Events

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Add NPIV id check to reduce multiple debug messages of the same RSCN event. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_mid.c | 11 +-- 1 file

[PATCH v2 26/37] qla2xxx: Properly extract ADISC error codes

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran This patch fixes issue with extraction of ADISC error codes for decoding the error returned Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 24

[PATCH v2 30/37] qla2xxx: Delay loop id allocation at login

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Delay loop id allocation to login time Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c | 64 ++--- 1 file changed, 35

[PATCH v2 12/37] qla2xxx: Add ability to send PRLO

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Add ability to send Implicit PRLO to flush IOs from FW back to driver. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 3 +++

[PATCH v2 23/37] qla2xxx: Migrate switch registration commands away from mailbox interface

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Migrate switch registration commands: RFTID, RFFID, RNNID and RSNN_NN out of mailbox interface to reduce fabric scan bottle neck. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani ---

[PATCH v2 10/37] qla2xxx: Use shadow register for ISP27XX

2017-12-28 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 v2 05/37] qla2xxx: Chip reset uses wrong lock during IO flush.

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran As part of chip reset, all commands from all QPairs are flushed. This patch fixes code to use Q Pair lock for flush instead of using old hardware_lock. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani

[PATCH v2 02/37] qla2xxx: Use IOCB path to submit Control VP MBX command

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Use IOCB patch to submit Control VP MBX command to reduce bottle-neck for mbx interface. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h| 7

[PATCH v2 09/37] qla2xxx: Enable ATIO interrupt handshake for ISP27XX

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Enable ATIO Q interrupt handshake for ISP27XX. This patch coalesce ATIO's interrupts for Quad port ISP27XX adapter. Interrupt coalesce allows performance to scale for this specific case. Signed-off-by: Quinn Tran Signed-off-by:

[PATCH v2 08/37] qla2xxx: Move work element processing out of DPC thread

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran DPC thread can stall during switch scan due to slow switch response. This will stall other work element that needs attention. Moving work element processing and relogin logic out of DPC thread and into its own work queue. Signed-off-by: Quinn Tran

[PATCH v2 19/37] qla2xxx: Add lock protection around host lookup

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Host lookup via btree is currently protected by the hardware_lock. Add hardware_lock when modifying btree to store host pointer. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani ---

[PATCH v2 20/37] qla2xxx: Reduce the use of terminate exchange

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran reduce usage of terminate exchange when command encounter resource bottle neck. Remote initiator view it as command drop. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani ---

[PATCH v2 13/37] qla2xxx: Don't call dma_free_coherent with IRQ disabled.

2017-12-28 Thread Himanshu Madhani
From: Giridhar Malavali The logo ELS command allocates dma coherent memory for the data payload and serialize the completions. When this command times out, the timeout routine completes the thread waiting for completion which in turn cleanup resources allocated for

[PATCH v2 04/37] qla2xxx: Add boundary checks for exchanges to be offloaded

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Max boundary for exchange off load is 32k exchanges. If a system is unable to allocate large memory buffer to support this feature, then driver will reduce the number of exchanges down to a value system can support. Signed-off-by: Quinn Tran

[PATCH v2 00/37] qla2xxx: driver updates

2017-12-28 Thread Himanshu Madhani
Hi Martin, This series contains number of improvments in handling of switch registration commands in the driver. Switch commands are now submitted via IOCB patch asynchronously instead of mailbox interface. Please apply this series to 4.16/scsi-queue branch at your earliest convenience.

[PATCH v2 17/37] qla2xxx: Use known NPort ID for Management Server login

2017-12-28 Thread Himanshu Madhani
Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_def.h | 4 ++-- drivers/scsi/qla2xxx/qla_mid.c | 2 +- drivers/scsi/qla2xxx/qla_os.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_def.h

[PATCH v2 15/37] qla2xxx: Tweak resource count dump

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Fetch actual data from firmware instead of static data at chip reset time. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_dfs.c | 32

[PATCH v2 07/37] qla2xxx: Replace GPDB with async ADISC command

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Replace call to Get Port DataBase MB with PDO_FORCE_ADISC flag with async ADISC command so driver can see ADISC command has error or not. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani ---

[PATCH v2 06/37] qla2xxx: Fix Firmware dump size for Extended login and Exchange Offload

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran This patch adjusts and reallocates fw_dump memory for target mode to save for extended login and exchange offload buffers into dump captured. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani

[PATCH v2 03/37] qla2xxx: Use chip reset to bring down laser on unload.

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Current code uses Stop Firmware MB cmd to stop the chip before driver unload. This will leave the laser in its current state. This give the illusion of this adapter is still alive. For 8G & newer adapters, use chip reset to stop the chip and bring down

[PATCH v2 28/37] qla2xxx: Allow relogin and session creation after reset

2017-12-28 Thread Himanshu Madhani
When any kind of reset is issued, current code was setting state of LOGIN pending too early. This resulted into driver not retrying relogin until pervious reloin completes. Signed-off-by: Himanshu Madhani Signed-off-by: Quinn Tran ---

[PATCH v2 25/37] qla2xxx: Fix GPNFT/GNNFT error handling

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran retry gpnft/gnnft if error is encountered. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gs.c | 15 +++ drivers/scsi/qla2xxx/qla_init.c | 8

[PATCH v2 29/37] qla2xxx: Increase verbosity of debug messages logged

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Add verbose bit for debug messages to reduce excessive log messages Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 8 1 file changed, 4

[PATCH v2 24/37] qla2xxx: Remove session creation redundant code

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran Current code creates a session when a new port is discovered, and a PLOGI/PRLI is received. There is no need to create session when command has arrived. Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani

[PATCH v2 35/37] qla2xxx: Serialize session deletion by using work_lock

2017-12-28 Thread Himanshu Madhani
From: Quinn Tran for session deletion, replace sess_lock with work_lock. Under certain case sess_lock is not feasiable to acquire. The lock is needed temporarily to make sure a single call to schedule of the work element. Signed-off-by: Quinn Tran

Re: [PATCH v3 1/9] ufs: sysfs: device descriptor

2017-12-28 Thread Jaegeuk Kim
On 12/28, Stanislav Nijnikov wrote: > This patch introduces a sysfs group entry for the UFS device descriptor > parameters. The group adds "device_descriptor" folder under the UFS driver > sysfs entry (/sys/bus/platform/drivers/ufshcd/*). The parameters are shown > as hexadecimal numbers. The full

Re: [PATCH v3 9/9] ufs: sysfs: attributes

2017-12-28 Thread Jaegeuk Kim
On 12/28, Stanislav Nijnikov wrote: > This patch introduces a sysfs group entry for the UFS attributes. The > group adds "attributes" folder under the UFS driver sysfs entry > (/sys/bus/platform/drivers/ufshcd/*). The attributes are shown > as hexadecimal numbers. The full information about the