Re: [PATCH] scsi: restart list search after unlock in scsi_remove_target

2015-10-26 Thread Johannes Thumshirn
On Mon, 2015-10-19 at 16:35 +0200, Christoph Hellwig wrote: > When dropping a lock while iterating a list we must restart the > search > as other threads could have manipulated the list under us.  Without > this > we can get stuck in an endless loop. > > Reported-by: Johannes Thumshirn

Re: [PATCH v2 05/32] scsi: hisi_sas: scan device tree

2015-10-26 Thread kbuild test robot
Hi John, [auto build test ERROR on scsi/for-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/John-Garry/HiSilicon-SAS-driver/20151026-221717 config: x86_64-allmodconfig (attached as .config

[PATCH] qla2xxx: Fix rwlock recursion

2015-10-26 Thread Bart Van Assche
This patch fixes the following kernel bug: kernel:BUG: rwlock recursion on CPU#2, insmod/39333, 8803e998cb28 kernel: Call Trace: kernel: [] dump_stack+0x48/0x64 kernel: [] rwlock_bug+0x67/0x70 kernel: [] do_raw_write_lock+0x8a/0xa0 kernel: [] _raw_write_lock_irqsave+0x63/0x80 kernel: []

Re: [PATCH v2 17/17] scsi: ufs-qcom: fix compilation warnings

2015-10-26 Thread Stephen Boyd
On 10/26/2015 08:41 AM, Yaniv Gardi wrote: > Tnis patch fixes the following compilation warnings: > ...ufs-qcom.c:1201:40: > warning: incorrect type in argument 1 (different address spaces) > ...ufs-qcom.c:1201:40: > expected void const *ptr > ...ufs-qcom.c:1201:40: > got void

Re: [PATCH 2/2] qla2xxx: fix rwlock recursion

2015-10-26 Thread Himanshu Madhani
Hi Bart, On 10/14/15, 4:07 PM, "linux-scsi-ow...@vger.kernel.org on behalf of Himanshu Madhani" wrote: >Hi Bart, > >> On Oct 14, 2015, at 10:33 AM, Bart Van Assche >> wrote: >> >> On

Re: [PATCH] scsi_sysfs: Fix queue_ramp_up_period return code

2015-10-26 Thread Bart Van Assche
On 10/26/15 07:54, Peter Oberparleiter wrote: Writing a number to /sys/bus/scsi/devices//queue_ramp_up_period returns the value of that number instead of the number of bytes written. This behavior can confuse programs expecting POSIX write() semantics. Fix this by returning the number of bytes

Guten Tag.

2015-10-26 Thread zhongjun
Guten Tag, Ich brauche einen ausländischen Partner für einen gemeinsamen Geschäfts Vorschlag, der auf die Übertragung von einer großen Geldsumme an einem ausländischen Konto bezieht, als Empfänger der Mittel. Alles an dieser Transaktion rechtlich ohne Brücke der Finanzbehörde sowohl in meinem

Re: [PATCH 03/21] hpsa: abandon rescans on memory alloaction failures.

2015-10-26 Thread Tomas Henzl
On 26.10.2015 15:29, Don Brace wrote: > On 10/26/2015 09:24 AM, Tomas Henzl wrote: >> On 24.10.2015 21:52, Don Brace wrote: >>> Abandon and reschedule rescan process only if device inquiries >>> fail due to mem alloc failures, which are likely to occur for >>> all devices. >>> >>> Otherwise, skip

Re: [PATCH v1 02/17] scsi: ufs: add option to change default UFS power management level

2015-10-26 Thread ygardi
> 2015-09-13 23:52 GMT+09:00 Yaniv Gardi : >> UFS device and link can be put in multiple different low power modes >> hence UFS driver supports multiple different low power modes. >> By default UFS driver selects the default (optimal) low power mode >> (which gives moderate

Re: [PATCH v1 06/17] scsi :ufs: verify hba controller hce reg value

2015-10-26 Thread ygardi
> 2015-09-13 23:52 GMT+09:00 Yaniv Gardi : >> Sometimes due to hw issues it takes some time to the >> host controller register to update. In order to verify the register >> has updated, a polling is done until its value is set. >> >> In addition the functions

Re: [PATCH v1 07/17] scsi: ufs: separate device and host quirks

2015-10-26 Thread ygardi
> 2015-09-13 23:52 GMT+09:00 Yaniv Gardi : > >> diff --git a/drivers/scsi/ufs/ufs_quirks.c >> b/drivers/scsi/ufs/ufs_quirks.c >> new file mode 100644 >> index 000..b649bbf >> --- /dev/null >> +++ b/drivers/scsi/ufs/ufs_quirks.c >> @@ -0,0 +1,101 @@ >> +/* >> + *

Re: [PATCH v1 08/17] scsi: ufs: split broken LCC quirk

2015-10-26 Thread ygardi
> 2015-09-13 23:52 GMT+09:00 Yaniv Gardi : >> Currently when UFSHCD_BROKEN_LCC quirk is defined, LCC is getting >> disabled on both host and device side but there could be a need >> where we don't want to disable the LCC on both side hence this change >> splits the quirk in

[PATCH v2 07/32] scsi: hisi_sas: allocate memories and create pools

2015-10-26 Thread John Garry
Allocate DMA and non-DMA memories for the controller. Also create DMA pools. These include: - Delivery queues - Completion queues - Command status buffer - Command table - ITCT (For device context) - Host slot info - IO status - Breakpoint - host slot indexing - SG data - FIS - interrupts names

[PATCH v2 12/32] scsi: hisi_sas: set dev DMA mask

2015-10-26 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index a3bf682..e5ee1d5 100644 ---

[PATCH v2 02/32] devicetree: bindings: scsi: HiSi SAS

2015-10-26 Thread John Garry
Add devicetree bindings for HiSilicon SAS driver. Signed-off-by: John Garry --- .../devicetree/bindings/scsi/hisilicon-sas.txt | 70 ++ 1 file changed, 70 insertions(+) create mode 100644 Documentation/devicetree/bindings/scsi/hisilicon-sas.txt

[PATCH v2 13/32] scsi: hisi_sas: add hisi_hba workqueue

2015-10-26 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 8 2 files changed, 9 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 1cc1376..424d693 100644

[PATCH v2 11/32] scsi: hisi_sas: add phy SAS ADDR initialization

2015-10-26 Thread John Garry
The SAS address for the HBA comes from the device tree. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 12 2 files changed, 13 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h

Re: [PATCH 03/21] hpsa: abandon rescans on memory alloaction failures.

2015-10-26 Thread Don Brace
On 10/26/2015 09:24 AM, Tomas Henzl wrote: On 24.10.2015 21:52, Don Brace wrote: Abandon and reschedule rescan process only if device inquiries fail due to mem alloc failures, which are likely to occur for all devices. Otherwise, skip device if inquiry fails for other reasons, and continue

Re: [PATCH 04/21] hpsa: correct transfer length for 6 byte read/write commands

2015-10-26 Thread Tomas Henzl
On 24.10.2015 21:52, Don Brace wrote: > handle block counts of 0. Cleanup block and block count calculations. > > Reviewed-by: Scott Teel > Reviewed-by: Justin Lindley > Reviewed-by: Kevin Barnett > Signed-off-by: Don Brace

Re: [PATCH v2 02/32] devicetree: bindings: scsi: HiSi SAS

2015-10-26 Thread Mark Rutland
On Mon, Oct 26, 2015 at 10:14:33PM +0800, John Garry wrote: > Add devicetree bindings for HiSilicon SAS driver. > > Signed-off-by: John Garry > --- > .../devicetree/bindings/scsi/hisilicon-sas.txt | 70 > ++ > 1 file changed, 70 insertions(+) >

Re: [PATCH v2 02/32] devicetree: bindings: scsi: HiSi SAS

2015-10-26 Thread John Garry
On 26/10/2015 14:14, John Garry wrote: Add devicetree bindings for HiSilicon SAS driver. Signed-off-by: John Garry --- .../devicetree/bindings/scsi/hisilicon-sas.txt | 70 ++ 1 file changed, 70 insertions(+) create mode 100644

Re: [PATCH v1 16/17] scsi: ufs: add delay before putting UFS rails in low power modes

2015-10-26 Thread ygardi
> 2015-09-13 23:52 GMT+09:00 Yaniv Gardi : >> We put the UFS device in sleep state & UFS link in hibern8 state during >> runtime suspaned. After this we put all the UFS rails in low power >> modes immediately but it seems some devices may still draw more than >> sleep

Re: [PATCH 03/21] hpsa: abandon rescans on memory alloaction failures.

2015-10-26 Thread Tomas Henzl
On 24.10.2015 21:52, Don Brace wrote: > Abandon and reschedule rescan process only if device inquiries > fail due to mem alloc failures, which are likely to occur for > all devices. > > Otherwise, skip device if inquiry fails for other reasons, > and continue rescanning process for other devices.

Re: [PATCH v1 14/17] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2015-10-26 Thread ygardi
> 2015-09-13 23:52 GMT+09:00 Yaniv Gardi : >> Optimal values of local UniPro parameters like PA_Hibern8Time & >> PA_TActivate can help reduce the hibern8 exit latency. If both host and >> device supports UniPro ver1.6 or later, these parameters will be >> automatically tuned

Re: [PATCH 05/21] hpsa: fix hpsa_adjust_hpsa_scsi_table

2015-10-26 Thread Tomas Henzl
On 24.10.2015 21:52, Don Brace wrote: > Fix a NULL pointer issue in the driver when devices are removed > during a reset. > > Signed-off-by: Don Brace > --- > drivers/block/cciss.h |1 + > drivers/scsi/hpsa.c | 16 > drivers/scsi/hpsa.h |1 + >

[PATCH] scsi_sysfs: Fix queue_ramp_up_period return code

2015-10-26 Thread Peter Oberparleiter
Writing a number to /sys/bus/scsi/devices//queue_ramp_up_period returns the value of that number instead of the number of bytes written. This behavior can confuse programs expecting POSIX write() semantics. Fix this by returning the number of bytes written instead. Signed-off-by: Peter

Re: [PATCH v2 05/32] scsi: hisi_sas: scan device tree

2015-10-26 Thread John Garry
On 26/10/2015 14:48, Mark Rutland wrote: + sas_addr_prop = of_find_property(np, "sas-addr", NULL); + if (!sas_addr_prop || (sas_addr_prop->length != SAS_ADDR_SIZE)) + goto err_out; + memcpy(hisi_hba->sas_addr, sas_addr_prop->value, SAS_ADDR_SIZE); This was not

Re: [PATCH 02/21] hpsa: allow driver requested rescans

2015-10-26 Thread Tomas Henzl
On 24.10.2015 21:52, Don Brace wrote: > Reviewed-by: Scott Teel > Reviewed-by: Justin Lindley > Reviewed-by: Kevin Barnett > Signed-off-by: Don Brace Reviewed-by: Tomas Henzl Tomas

Re: [PATCH 03/21] hpsa: abandon rescans on memory alloaction failures.

2015-10-26 Thread Tomas Henzl
On 26.10.2015 15:32, Tomas Henzl wrote: > On 26.10.2015 15:29, Don Brace wrote: >> On 10/26/2015 09:24 AM, Tomas Henzl wrote: >>> On 24.10.2015 21:52, Don Brace wrote: Abandon and reschedule rescan process only if device inquiries fail due to mem alloc failures, which are likely to occur

Re: [PATCH v2 05/32] scsi: hisi_sas: scan device tree

2015-10-26 Thread Mark Rutland
> + sas_addr_prop = of_find_property(np, "sas-addr", NULL); > + if (!sas_addr_prop || (sas_addr_prop->length != SAS_ADDR_SIZE)) > + goto err_out; > + memcpy(hisi_hba->sas_addr, sas_addr_prop->value, SAS_ADDR_SIZE); This was not in the binding. What is this? Thanks, Mark.

Re: [PATCH v3 13/15] scsi: ufs: add missing memory barriers

2015-10-26 Thread ygardi
> 2015-10-25 23:40 GMT+09:00 : >>> 2015-09-02 19:13 GMT+09:00 Yaniv Gardi : Performing several writes to UFS host controller registers has no gurrantee of ordering, so we must make sure register writes to setup request list base address

Re: [PATCH 01/21] hpsa: correct calls to dev_printk

2015-10-26 Thread Tomas Henzl
On 24.10.2015 21:52, Don Brace wrote: > was seeing issues passing level into hpsa_show_dev_msg and then using > the level as an arguement to dev_printk. For now, switch to dev_warn. > > Signed-off-by: Don Brace > --- > drivers/scsi/hpsa.c | 41

Re: [PATCH 01/21] hpsa: correct calls to dev_printk

2015-10-26 Thread Don Brace
On 10/26/2015 07:52 AM, Tomas Henzl wrote: On 24.10.2015 21:52, Don Brace wrote: was seeing issues passing level into hpsa_show_dev_msg and then using the level as an arguement to dev_printk. For now, switch to dev_warn. Signed-off-by: Don Brace --- drivers/scsi/hpsa.c |

[PATCH v2 05/32] scsi: hisi_sas: scan device tree

2015-10-26 Thread John Garry
Scan the device tree for all properties. Also do this: - do ioremap for SAS registers - allocate memory for interrupt names Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 9 + drivers/scsi/hisi_sas/hisi_sas_main.c | 38

[PATCH v2 29/32] scsi: hisi_sas: add tmf methods

2015-10-26 Thread John Garry
Add function methods for tmf's. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 353 ++ 1 file changed, 353 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c

[PATCH v2 26/32] scsi: hisi_sas: add bcast interrupt handler

2015-10-26 Thread John Garry
This is for expander broadcast event. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c

[PATCH v2 15/32] scsi: hisi_sas: add phy and port init

2015-10-26 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 17 + drivers/scsi/hisi_sas/hisi_sas_main.c | 30 ++ 2 files changed, 47 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h

[PATCH v2 27/32] scsi: hisi_sas: add smp protocol support

2015-10-26 Thread John Garry
Add support for smp function, which allows devices attached by expander to be controlled Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 3 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 10 +++- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 93

[PATCH v2 25/32] scsi: hisi_sas: add abnormal irq handler

2015-10-26 Thread John Garry
Add abnormal irq handler. This handler is concerned with phy down event. Also add port formed and port deformed handlers. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 + drivers/scsi/hisi_sas/hisi_sas_main.c | 136

[PATCH v2 24/32] scsi: hisi_sas: add dev_found and port_formed

2015-10-26 Thread John Garry
Add functions to deal with lldd_dev_found and lldd_port_formed Signed-off-by: John Garry Conflicts: drivers/scsi/hisi_sas/hisi_sas_v1_hw.c --- drivers/scsi/hisi_sas/hisi_sas.h | 13 drivers/scsi/hisi_sas/hisi_sas_main.c | 106

[PATCH v2 09/32] scsi: hisi_sas: add slot init code

2015-10-26 Thread John Garry
Add functionality to init slot indexing. Slot indexing is for the host to track which slots (or tags) are free and which are used. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 4 drivers/scsi/hisi_sas/hisi_sas_main.c | 22

[PATCH v2 18/32] scsi: hisi_sas: add v1 hardware register definitions

2015-10-26 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 389 + 1 file changed, 389 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 011bfe3..d1c9c27 100644 ---

[PATCH v2 30/32] scsi: hisi_sas: add control phy handler

2015-10-26 Thread John Garry
Add method for lldd_control_phy. Currently link rate control and spinup hold is unsupported. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 3 +++ drivers/scsi/hisi_sas/hisi_sas_main.c | 37 ++

[PATCH v2 03/32] scsi: hisi_sas: add initial bare main driver

2015-10-26 Thread John Garry
This patch adds the initial bare main driver for the HiSilicon SAS HBA. This only introduces the changes to build and load the main driver module. The complete driver consists of the core main module and also a module platform driver for driving the hw. The HBA is a platform device.

[PATCH v2 10/32] scsi: hisi_sas: add cq structure initialization

2015-10-26 Thread John Garry
Each completion queue has a structure. This is mainly for passing to irq handler so we know which queue the irq occured on. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 7 +++ drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++ 2 files changed,

[PATCH v2 31/32] scsi: hisi_sas: add fatal irq handler

2015-10-26 Thread John Garry
Add handlers for fatal interrupts Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 122 + 1 file changed, 122 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c

[PATCH v2 16/32] scsi: hisi_sas: add timer and spinlock init

2015-10-26 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 04c2577..0a14994 100644 ---

[PATCH v2 06/32] scsi: hisi_sas: add HW DMA structures

2015-10-26 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 144 +++ 1 file changed, 144 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index ace4254..d93e55a 100644 ---

Re: [PATCH v3 05/15] scsi: ufs: increase fDeviceInit query response timeout

2015-10-26 Thread Akinobu Mita
2015-10-25 22:38 GMT+09:00 : >> 2015-09-02 19:13 GMT+09:00 Yaniv Gardi : >>> fDeviceInit query response time for some devices is too long that >>> default >>> query request timeout of 100ms may not be enough. Experiments show that >>> fDeviceInit

Re: [PATCH v3 13/15] scsi: ufs: add missing memory barriers

2015-10-26 Thread Akinobu Mita
2015-10-25 23:40 GMT+09:00 : >> 2015-09-02 19:13 GMT+09:00 Yaniv Gardi : >>> Performing several writes to UFS host controller registers has >>> no gurrantee of ordering, so we must make sure register writes >>> to setup request list base address etc.

Re: [PATCH 19/21] hpsa: enhance device messages

2015-10-26 Thread Don Brace
On 10/24/2015 03:19 PM, kbuild test robot wrote: Hi Don, [auto build test ERROR on scsi/for-next -- if it's inappropriate base, please suggest rules for selecting the more suitable base] url: https://github.com/0day-ci/linux/commits/Don-Brace/hpsa-updates/20151025-040012 config:

[PATCH v2 21/32] scsi: hisi_sas: add path from phyup irq to SAS framework

2015-10-26 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 49 ++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 15 +++ 3 files changed, 66 insertions(+) diff --git

Re: [PATCH v1 12/17] scsi: ufs: add retry for query descriptors

2015-10-26 Thread ygardi
> 2015-09-13 23:52 GMT+09:00 Yaniv Gardi : >> Query commands have 100ms timeout and it may timeout if they are >> issued in parallel to ongoing read/write SCSI commands, this change >> adds the retry (max: 10) in case command timeouts. >> >> Signed-off-by: Subhash Jadavani

[PATCH v2 22/32] scsi: hisi_sas: add ssp command function

2015-10-26 Thread John Garry
Add path to send ssp command to HW Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 29 drivers/scsi/hisi_sas/hisi_sas_main.c | 238 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 208 3

[PATCH v2 00/32] HiSilicon SAS driver

2015-10-26 Thread John Garry
This is the driver patchset for the HiSilicon SAS driver. The driver is a platform driver. The driver will support multiple revisions of HW. Currently only "v1" HW is supported. The driver uses libsas framework within the SCSI framework. The v1 HW supports SSP and SMP, but not STP/SATA.

[PATCH v2 28/32] scsi: hisi_sas: add scan finished and start

2015-10-26 Thread John Garry
Add functions for scsi host template scan_finished and scan_start methods Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 25 + 2 files changed, 26 insertions(+) diff --git

[PATCH v2 32/32] MAINTAINERS: add maintainer for HiSi SAS driver

2015-10-26 Thread John Garry
Add maintainer for HiSilicon SAS driver. Signed-off-by: John Garry --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ddc88c0..4ca8d79 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4951,6 +4951,13 @@ F:

[PATCH v2 14/32] scsi: hisi_sas: add hisi sas device type

2015-10-26 Thread John Garry
Include initialisation. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 12 drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++ 2 files changed, 18 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h

[PATCH v2 01/32] [SCSI] sas: centralise ssp frame information units

2015-10-26 Thread John Garry
The xfer_rdy, command, and task frame's iu structures are not available in , but only aic94xx driver folder. Add them to include/scsi/sas.h Signed-off-by: John Garry --- drivers/scsi/aic94xx/aic94xx_sas.h | 49 - include/scsi/sas.h

[PATCH v2 23/32] scsi: hisi_sas: add cq interrupt handler

2015-10-26 Thread John Garry
Add cq interrupt handler and also slot error handler function. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 9 + drivers/scsi/hisi_sas/hisi_sas_main.c | 47 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 357 +

[PATCH v2 17/32] scsi: hisi_sas: add v1 hw module init

2015-10-26 Thread John Garry
Add module init code for v1 hw. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/Makefile | 1 + drivers/scsi/hisi_sas/hisi_sas.h | 3 ++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 53 ++ 3 files changed, 57 insertions(+)

[PATCH v2 20/32] scsi: hisi_sas: add v1 hw interrupt init

2015-10-26 Thread John Garry
Add code for interrupt init, so now we can get a phy up interrupt when a disk is connected. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 5 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 162 + 2 files changed, 167

[PATCH v2 08/32] scsi: hisi_sas: add hisi_sas_remove

2015-10-26 Thread John Garry
This patch also includes relevant memory/pool free'ing and sas/scsi host removal Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 75 ++- 1 file changed, 74 insertions(+), 1 deletion(-) diff --git

[PATCH v2 19/32] scsi: hisi_sas: add v1 HW initialisation code

2015-10-26 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 4 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 331 + 3 files changed, 336 insertions(+) diff --git

[PATCH v2 04/32] scsi: hisi_sas: add scsi host registration

2015-10-26 Thread John Garry
Add functionality to register device as a scsi host. The SAS domain transport ops are empty at this point. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 34 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 116 ++

Re: [PATCH 05/21] hpsa: fix hpsa_adjust_hpsa_scsi_table

2015-10-26 Thread Don Brace
On 10/26/2015 09:55 AM, Tomas Henzl wrote: On 24.10.2015 21:52, Don Brace wrote: Fix a NULL pointer issue in the driver when devices are removed during a reset. Signed-off-by: Don Brace --- drivers/block/cciss.h |1 + drivers/scsi/hpsa.c | 16

[PATCH v2 06/17] scsi :ufs: verify hba controller hce reg value

2015-10-26 Thread Yaniv Gardi
Sometimes due to hw issues it takes some time to the host controller register to update. In order to verify the register has updated, a polling is done until its value is set. In addition the functions ufshcd_hba_stop() and ufshcd_wait_for_register() was updated with an additional input

[PATCH v2 00/17] add fixes, device quirks, error recovery,

2015-10-26 Thread Yaniv Gardi
V2: This series should be pushed on top of 15 patches series: "Big fixes, retries, handle a race condition" fixed and few comments. V1: This series should be pushed on top of 15 patches series: "Big fixes, retries, handle a race condition" Yaniv Gardi (17): scsi: ufs-qcom: add number of lanes

[PATCH v2 07/17] scsi: ufs: separate device and host quirks

2015-10-26 Thread Yaniv Gardi
Currently we use the host quirks mechanism in order to handle both device and host controller quirks. In order to support various of UFS devices we should separate handling the device quirks from the host controller's. Signed-off-by: Raviv Shvili Signed-off-by: Yaniv

[PATCH v2 01/17] scsi: ufs-qcom: add number of lanes per direction

2015-10-26 Thread Yaniv Gardi
Different platform may have different number of lanes for the UFS link. Add parameter to device tree specifying how many lanes should be configured for the UFS link. Signed-off-by: Gilad Broner Signed-off-by: Yaniv Gardi ---

[PATCH v2 17/17] scsi: ufs-qcom: fix compilation warnings

2015-10-26 Thread Yaniv Gardi
Tnis patch fixes the following compilation warnings: ...ufs-qcom.c:1201:40: warning: incorrect type in argument 1 (different address spaces) ...ufs-qcom.c:1201:40: expected void const *ptr ...ufs-qcom.c:1201:40: got void [noderef] *dev_ref_clk_ctrl_mmio

[PATCH v2 16/17] scsi: ufs-qcom: set PA_Local_TX_LCC_Enable before link startup

2015-10-26 Thread Yaniv Gardi
Some UFS devices (and may be host) have issues if LCC is enabled. So we are setting PA_Local_TX_LCC_Enable to 0 before link startup which will make sure that both host and device TX LCC are disabled once link startup is completed. This change also: - enables the device ref clock before changing

[PATCH v2 10/17] scsi: ufs: add error recovery after DL NAC error

2015-10-26 Thread Yaniv Gardi
Some vendor's UFS device sends back to back NACs for the DL data frames causing the host controller to raise the DFES error status. Sometimes such UFS devices send back to back NAC without waiting for new retransmitted DL frame from the host and in such cases it might be possible the Host UniPro

[PATCH v2 03/17] scsi: ufs: optimize system suspend handling

2015-10-26 Thread Yaniv Gardi
Consider following sequence of events: 1. UFS is runtime suspended, link_state = Hibern8, device_state = sleep 2. System goes into system suspend, ufshcd_system_suspend() brings both link and device to active state and then puts the device in Power_Down state and link in OFF state. 3. System

[PATCH v2 08/17] scsi: ufs: disable vccq if it's not needed by UFS device

2015-10-26 Thread Yaniv Gardi
Some UFS devices don't require VCCQ rail for device operations hence this change adds support to recognize such devices and remove vote for the unused VCCQ rail. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi ---

[PATCH v2 05/17] scsi: ufs: implement scsi host timeout handler

2015-10-26 Thread Yaniv Gardi
A race condition exists between request requeueing and scsi layer error handling: When UFS driver queuecommand returns a busy status for a request, it will be requeued and its tag will be freed and set to -1. At the same time it is possible that the request will timeout and scsi layer will start

[PATCH v2 02/17] scsi: ufs: add option to change default UFS power management level

2015-10-26 Thread Yaniv Gardi
UFS device and link can be put in multiple different low power modes hence UFS driver supports multiple different low power modes. By default UFS driver selects the default (optimal) low power mode (which gives moderate power savings and have relatively less enter and exit latencies) but we might

[PATCH v2 04/17] scsi: ufs: avoid spurious UFS host controller interrupts

2015-10-26 Thread Yaniv Gardi
When control reaches to Linux UFS driver during UFS boot mode, UFS host controller interrupt status/enable registers may have left over settings. In order to avoid any spurious interrupts due to these left overs, it's important to clear these interrupt status/enable registers before enabling UFS

[PATCH v2 15/17] scsi: ufs: add device quirk delay before putting UFS rails in LPM

2015-10-26 Thread Yaniv Gardi
We put the UFS device in sleep state & UFS link in hibern8 state during runtime suspaned. After this we put all the UFS rails in low power modes immediately but it seems some devices may still draw more than sleep current from UFS rails (especially from VCCQ rail) atleast for 500us. To avoid this

[PATCH v2 13/17] scsi: ufs: tune UniPro parameters to optimize hibern8 exit time

2015-10-26 Thread Yaniv Gardi
Optimal values of local UniPro parameters like PA_Hibern8Time & PA_TActivate can help reduce the hibern8 exit latency. If both host and device supports UniPro ver1.6 or later, these parameters will be automatically tuned during link startup itself. But if either host or device doesn't support

[PATCH v2 14/17] scsi: ufs: fix leakage during link off state

2015-10-26 Thread Yaniv Gardi
Currently when we try to put the link in off/disabled state during suspend, it seems link is not being kept in low power mode. This patch fixes the issue by putting the link in hibern8 first (so device also puts the link in low power mode) and then stop the host controller. Signed-off-by: Subhash

[PATCH v2 09/17] scsi: ufs: make error handling bit faster

2015-10-26 Thread Yaniv Gardi
UFS driver's error handler forcefully tries to clear all the pending requests. For each pending request in the queue, it waits 1 sec for it to get cleared. If we have multiple requests in the queue then it's possible that we might end up waiting for those many seconds before resetting the host.

[PATCH v2 11/17] scsi: ufs: add retry for query descriptors

2015-10-26 Thread Yaniv Gardi
Query commands have 100ms timeout and it may timeout if they are issued in parallel to ongoing read/write SCSI commands, this change adds the retry (max: 10) in case command timeouts. Signed-off-by: Subhash Jadavani Signed-off-by: Yaniv Gardi ---

[PATCH v2 12/17] scsi: ufs: handle non spec compliant bkops behaviour by device

2015-10-26 Thread Yaniv Gardi
We are seeing that some devices are raising the urgent bkops exception events even when BKOPS status doesn't indicate performace impacted or critical. Handle these device by determining their urgent bkops status at runtime. Signed-off-by: Subhash Jadavani Signed-off-by: