Re: [PATCH] scsi: ufs: remove the duplicated checking for supporting clkscaling

2017-03-22 Thread Bartlomiej Zolnierkiewicz
Hi, On Tuesday, March 21, 2017 09:19:57 PM Jaehoon Chung wrote: > There are same conditions for checking whether supporting clkscaling or > not. > When ufshcd is supporting clkscaling, active_reqs should be decreased by > two. I guess you meant "one" here, not "two"? > Signed-off-by: Jaehoon

[PATCH] scsi: fcoe: sanity check string size for store_ctrl_mode option

2017-03-22 Thread Colin King
From: Colin Ian King Reading and writing to mode[count - 1] implies the count should not be less than 1 so add a sanity check for this. Detected with CoverityScan, CID#1357345 ("Overflowed array index write") Signed-off-by: Colin Ian King

[PATCH 10/23] scsi: hisi_sas: hardreset for SATA disk in LU reset

2017-03-22 Thread John Garry
When issuing an LU reset for a SATA target, issue an internal abort and a hard reset. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_main.c | 38 ++- 1 file changed, 29

[PATCH 03/23] scsi: hisi_sas: move PHY init to hisi_sas_scan_start()

2017-03-22 Thread John Garry
Relocate the PHY init code from LLDD hw init path to hisi_sas_scan_start(). Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 9 +++--

[PATCH 04/23] scsi: hisi_sas: add softreset function for SATA disk

2017-03-22 Thread John Garry
From: Xiang Chen Add softreset to clear IO after internal abort device for SATA disk. The SATA error handling for the controller is based on device internal abort and softreset function. The controller does not support internal abort for single IO, so we need to

[PATCH 19/23] scsi: hisi_sas: add hisi_sas_clear_nexus_ha()

2017-03-22 Thread John Garry
Add function for upper-layer to reset controller when all else fails. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_main.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 15/23] scsi: hisi_sas: process error codes according to their priority

2017-03-22 Thread John Garry
From: Xiang Chen There are some rules to decide which error code has the high priority when errors happen together: (1) Error phase of CQ decides the error happens on RX or TX; (2) For TX error, when DMA/TRANS TX error happen simultaneously, the priority of DMA TX

[PATCH 06/23] scsi: hisi_sas: error hisi_sas_task_prep() when port down

2017-03-22 Thread John Garry
When sas_port is NULL, then return SAS_PHY_DOWN. In addition, when the sas_dev is gone then explicitly return SAS_PHY_DOWN. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_main.c | 5 ++--- 1 file

[PATCH 23/23] scsi: hisi_sas: add is_sata_phy_v2_hw()

2017-03-22 Thread John Garry
From: Xiaofei Tan Add helper function is_sata_phy_v2_hw() to judge whether the attached device is SATA disk for a root PHY. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c |

[PATCH 16/23] scsi: hisi_sas: some modifications to v2 hw reg init values

2017-03-22 Thread John Garry
This patch includes: (1) Disable transport layer retry (2) Support CQ time and count interrupt coal (3) fix link FIFO full issue Signed-off-by: Xiang Chen Signed-off-by: Zhao Nenglong Signed-off-by: John Garry ---

[PATCH 21/23] scsi: hisi_sas: check hisi_sas_lu_reset() error message

2017-03-22 Thread John Garry
Unless we actually get some sort of failure in hisi_sas_lu_reset(), don't print a message. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)

[PATCH 09/23] scsi: hisi_sas: modify hisi_sas_abort_task() for SSP

2017-03-22 Thread John Garry
Currently an internal abort is executed regardless of the result of the TMF. We should also check the result of the internal abort to see if we should free the slot. So change the status code STAT_IO_COMPLETE to TMF_RESP_FUNC_SUCC, meaning the slot has been successfully aborted. Signed-off-by:

[PATCH 22/23] scsi: hisi_sas: use dev_is_sata to identify SATA or SAS disk

2017-03-22 Thread John Garry
From: Xiang Chen When SMP IO is sent, sas_protocol_ata couldn't judge whether the disk is SATA or SAS disk. So use dev_is_sata to identify SATA or SAS disk. Signed-off-by: Xiang Chen Signed-off-by: John Garry ---

[PATCH 02/23] scsi: hisi_sas: add controller reset

2017-03-22 Thread John Garry
From: Xiang Chen There are some scenarios that we need to warm-rest to reset registers of SAS controller. During reset we disable interrupts/DQs/PHYs, and after reset we re-init the hardware and rescan the topology to see if anything changed. Signed-off-by: Xiang Chen

[PATCH 08/23] scsi: hisi_sas: modify error handling for v2 hw

2017-03-22 Thread John Garry
From: Xiang Chen For error codes which need abort-and-retry, simulate IO timeout and let SCSI+ATA layers process those errors. Previously for SSP, we should try to abort the IO in the LLDD and then pass back to upper layer, but sometimes this would also error. So

[PATCH 05/23] scsi: hisi_sas: remove hisi_sas_port_deformed()

2017-03-22 Thread John Garry
Currently when a root PHY is deformed from a asd_sas_port we try to release the slots in the LLDD, and fail. Regardless, it is not right to release this early. This patch removes the deformed function. As it was before, port deformation is still done in hisi_sas_phy_down(). It would be nice to

[PATCH 11/23] scsi: hisi_sas: check for SAS_TASK_STATE_ABORTED in slot complete

2017-03-22 Thread John Garry
Check in slot_complete_v2_hw() for whether a task has already been completed by upper layer. Signed-off-by: John Garry Reviewed-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 10 ++ 1 file changed, 10 insertions(+) diff

[PATCH 00/23] hisi_sas: error handling and other misc fixes and improvements

2017-03-22 Thread John Garry
This patchset introduces a range of error handling and other misc improvements for the HiSilicon SAS controller, including: - controller reset function - softreset for SATA error handling - fixes for slot free'ing - v2 hw error handling improvements - and other misc, more minor stuff John Garry

[PATCH 07/23] scsi: hisi_sas: only reset link for PHY_FUNC_LINK_RESET

2017-03-22 Thread John Garry
We currently do a hard reset for a link reset. Change this to do a link reset only. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[PATCH 18/23] scsi: hisi_sas: rename hisi_sas_link_timeout_{enable, disable}_link

2017-03-22 Thread John Garry
For consistency, remove the "hisi_sas_" prefix. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c

[PATCH 17/23] scsi: hisi_sas: handle PHY UP+DOWN simultaneous irq

2017-03-22 Thread John Garry
From: Xiaofei Tan Handle the situation that PHY UP and DOWN irq happen simultaneously. There is no mechanism of SoC HW to ensure this situation will never happen. So, we add this handle just in case. Signed-off-by: Xiaofei Tan Signed-off-by: John

[PATCH 14/23] scsi: hisi_sas: remove task free'ing for timeouts

2017-03-22 Thread John Garry
When a TMF or internal abort times-out, do not free slot. We expect this to be done upon later escalated error handling. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git

[Bug 176951] boot fails unless acpi=off Acer Travelmate X-349

2017-03-22 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=176951 Alan Welsh (itsallene...@gmail.com) changed: What|Removed |Added CC|

[PATCH 12/23] scsi: hisi_sas: free slots after hardreset

2017-03-22 Thread John Garry
From: Xiang Chen After hardreset, we clear up IOs of remote disks, so we need to free those slots in LLDD. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 11

[PATCH 13/23] scsi: hisi_sas: fix some sas_task.task_state_lock locking

2017-03-22 Thread John Garry
Some more locking needs to be added/modified for when read-modify-writing sas_task.task_state_flags. Note: since we can attempt to grab this lock in interrupt context we should use irq variant of spin_lock. Signed-off-by: John Garry Signed-off-by: Xiang Chen

[PATCH 20/23] scsi: hisi_sas: release SMP slot in lldd_abort_task

2017-03-22 Thread John Garry
From: Xiang Chen When an SMP task timeouts, it will call lldd_abort_task to release the associated slot, and then will release the sas_task. Currently in lldd_abort_task, if we fail to internally abort IO, then the slot of SMP IO is not released, but sas_task will

[PATCH 01/23] scsi: hisi_sas: add to_hisi_sas_port()

2017-03-22 Thread John Garry
Introduce function to get hisi_sas_port from asd_sas_port. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 17 +

Re: support ranges TRIM for libata

2017-03-22 Thread Christoph Hellwig
On Tue, Mar 21, 2017 at 02:59:01PM -0400, Tejun Heo wrote: > I do like the fact that this is a lot simpler than the previous > implementation but am not quite sure we want to deviate significantly > from what we do for other commands (command translation). Is it > because fixing the existing

RE: [PATCH v7 09/11] scsi: ufs: connect to RPMB subsystem

2017-03-22 Thread Winkler, Tomas
> > On Mon, Nov 07, 2016 at 07:27:38PM +, Winkler, Tomas wrote: > > I value your opinion but I'm not responsible for inventing RPMB > > and/or its implementation storage devices (eMMC, UFC, NVMe), it's pretty > much done deal out there in the wild. > > I'm just trying to provide common API

[PATCH] scsi: pm8001: build in relevant functions and code on PM8001_USE_MSIX

2017-03-22 Thread Colin King
From: Colin Ian King Currently the misx and intx variables of the interrupt enable/disable helper functions are built in no matter what the setting of the macro PM8001_USE_MSIX. Clean this up by just building in the necessary helper functions and calls to these

Re: [PATCH] scsi: fcoe: sanity check string size for store_ctrl_mode option

2017-03-22 Thread Colin Ian King
On 22/03/17 19:39, Dan Carpenter wrote: > On Wed, Mar 22, 2017 at 02:01:37PM +, Colin King wrote: >> From: Colin Ian King >> >> Reading and writing to mode[count - 1] implies the count should not >> be less than 1 so add a sanity check for this. >> >> Detected with

Re: [PATCH] scsi: fcoe: sanity check string size for store_ctrl_mode option

2017-03-22 Thread Dan Carpenter
On Wed, Mar 22, 2017 at 02:01:37PM +, Colin King wrote: > From: Colin Ian King > > Reading and writing to mode[count - 1] implies the count should not > be less than 1 so add a sanity check for this. > > Detected with CoverityScan, CID#1357345 ("Overflowed array

RE: [PATCH 1/1] fnic: Adding Check Condition counter to misc fnicstats

2017-03-22 Thread Satish Kharat (satishkh)
Hi Martin, Apologies for the delay. I was not able to verify this because of another fnic issue blocking this test. Just now submitted a fix for that 'fnic issue' (in the patch => [PATCH 1/1] fnic: bug fix for fip.fip_subcode in fnic_fcoe_send_vlan_req) Did some quick verification and basic

[PATCH 1/1] fnic: bug fix for fip.fip_subcode in fnic_fcoe_send_vlan_req

2017-03-22 Thread Satish Kharat
This is a bug introduced when they moved the fip subcodes to central place. Was sending FIP_SC_VL_NOTE in fip.fip_subcode for VLAN request in fnic_fcoe_send_vlan_req. Change is to use FIP_SC_VL_REQ instead. Signed-off-by: Satish Kharat Signed-off-by: Sesidhar Baddela

Re: [PATCH] scsi: lpfc: fix linking against modular NVMe support

2017-03-22 Thread Arnd Bergmann
On Wed, Mar 22, 2017 at 3:25 AM, James Smart wrote: > > On 3/21/2017 7:23 PM, James Smart wrote: >> >> Arnd, >> >> All of the build issues, including building as modules, should have been >> resolved by the following patch: >>

[PATCH] qla4xxx: drop redundant init_completion

2017-03-22 Thread Nicholas Mc Guire
y compile tested with: x86_64_defconfig + SCSI_LOWLEVEL=y, CONFIG_SCSI_QLA_ISCSI=m (...quite a few sparse and coccinelle errors/warnings during build-tests) Patch is against 4.11-rc3 (localversion-next is next-20170322) drivers/scsi/qla4xxx/ql4_os.c | 1 - 1 file changed, 1 deletion(-) diff --git a/driv