[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 --- a/drivers/scsi/hisi_sas

[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 ++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 23

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

2015-10-26 Thread John Garry
-by: John Garry --- drivers/scsi/Kconfig | 1 + drivers/scsi/Makefile | 1 + drivers/scsi/hisi_sas/Kconfig | 6 + drivers/scsi/hisi_sas/Makefile| 1 + drivers/scsi/hisi_sas/hisi_sas.h | 26 + drivers/scsi/hisi_sas

[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, 13 insertions(+) diff

[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 --- a/drivers/scsi/hisi_sas/hisi_sas.h

[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 --- a/drivers/scsi/hisi_sas

[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 a/drivers/scsi/hisi_sas/hisi_sas_main

[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 a/drivers/scsi/hisi_sas/hisi_sas.h b

[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 ++ 2 files changed, 150

[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(+) create mode 100644

[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 insertions(+) diff

[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 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers

[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 diff --git a

[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 --- a/drivers/scsi

[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 b/drivers/scsi/hisi_sas

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 in

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 Documentation/devicetree/bindings/scsi

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

2015-10-27 Thread John Garry
On 26/10/2015 14:45, Mark Rutland wrote: 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-27 Thread John Garry
The syscon block is a general subsystem control block, and it is not specifically only for controlling reset and enabling clocks (other functions include serdes control, for example). It is also shared with other peripherals. So we can remove the ctrl-reg property (since it is not part of the S

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

2015-10-30 Thread John Garry
On 30/10/2015 13:53, Arnd Bergmann wrote: On Monday 26 October 2015 22:14:58 John Garry wrote: + /* + * DMA-map SMP request, response buffers + */ + /* req */ + sg_req = &task->smp_task.smp_req; + elem = dma_map_sg(dev, sg_req, 1, DMA_TO_DEVICE); +

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

2015-10-30 Thread John Garry
On 30/10/2015 14:10, Arnd Bergmann wrote: On Monday 26 October 2015 22:14:56 John Garry wrote: 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 I noticed a couple more coding style issues in

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

2015-11-02 Thread John Garry
On 30/10/2015 16:22, John Garry wrote: On 30/10/2015 13:53, Arnd Bergmann wrote: On Monday 26 October 2015 22:14:58 John Garry wrote: + /* + * DMA-map SMP request, response buffers + */ + /* req */ + sg_req = &task->smp_task.smp_req; + elem = dma_map

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

2015-11-03 Thread John Garry
On 02/11/2015 20:29, Arnd Bergmann wrote: On Monday 02 November 2015 17:03:58 John Garry wrote: Can do. Actually sg_req seems only ever has one element: expander.c, smp_execute_task() sg_init_one(&task->smp_task.smp_req, req, req_size); I tried replacing with dma_map_single, but I f

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

2015-11-09 Thread John Garry
Add code to interrupts, 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 insertions(+) diff --git a

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

2015-11-09 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 | 29 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 23

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

2015-11-09 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 index 925c454..8f66d06

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

2015-11-09 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 7af7f4a..cb10581 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5007,6 +5007,13 @@ F: include/uapi/linux/if_hippi.h

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

2015-11-09 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 | 35 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 347 + 3 files changed, 391

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

2015-11-09 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 | 71 ++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main

[PATCH v3 24/32] scsi: hisi_sas: add dev_found and dev_gone

2015-11-09 Thread John Garry
Add functions to deal with lldd_dev_found and lldd_dev_gone. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 13 + drivers/scsi/hisi_sas/hisi_sas_main.c | 88 ++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 41 3 files

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

2015-11-09 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 | 337 + 3 files changed, 342 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b

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

2015-11-09 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 --- a/drivers/scsi/hisi_sas

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

2015-11-09 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(+) create mode 100644

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

2015-11-09 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 131 +++ 1 file changed, 131 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 87f4b61..19d40b7 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h

[PATCH v3 00/32] HiSilicon SAS driver

2015-11-09 Thread John Garry
phy struct - process control phy in caller context - fix port->port_attached issue for rmmod [1] http://www.spinics.net/lists/arm-kernel/msg452833.html John Garry (32): [SCSI] sas: centralise ssp frame information units devicetree: bindings: scsi: HiSi SAS scsi: hisi_sas: add initial bare main

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

2015-11-09 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 30 +++ drivers/scsi/hisi_sas/hisi_sas_main.c | 94 +++ 2 files changed, 124 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 19d40b7

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

2015-11-09 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 | 118 + drivers/scsi

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

2015-11-09 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 a/drivers/scsi/hisi_sas

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

2015-11-09 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 index 3f27a5c..1759c58

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

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

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

2015-11-09 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 | 9 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 88

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

2015-11-09 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 b/drivers/scsi/hisi_sas

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

2015-11-09 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 b/drivers/scsi/hisi_sas/hisi_sas.h index 62bc6f3

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

2015-11-09 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 ++ 2 files changed, 150

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

2015-11-09 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 e04fd67..146a236 100644 --- a/drivers/scsi/hisi_sas

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

2015-11-09 Thread John Garry
Scan the device tree for all properties. Also do this: - do ioremap for SAS registers - allocate memor for interrupt names Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 10 drivers/scsi/hisi_sas/hisi_sas_main.c | 45 ++- 2 files

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

2015-11-09 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 9e6eebe..f78c2a9 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers

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

2015-11-09 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 c50384f..62bc6f3 100644 --- a/drivers/scsi

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

2015-11-09 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, 13 insertions(+) diff

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

2015-11-09 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 a/drivers/scsi/hisi_sas/hisi_sas.h

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

2015-11-09 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 17 + drivers/scsi/hisi_sas/hisi_sas_main.c | 31 +++ 2 files changed, 48 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index

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

2015-11-09 Thread John Garry
Add path to send ssp command to HW Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 30 + drivers/scsi/hisi_sas/hisi_sas_main.c | 234 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 194 +++ 3 files changed, 458

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

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

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

2015-11-09 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 | 23 +++ 2 files changed

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

2015-11-09 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 v3 03/32] scsi: hisi_sas: add initial bare main driver

2015-11-09 Thread John Garry
-by: John Garry Signed-off-by: Zhangfei Gao --- drivers/scsi/Kconfig | 1 + drivers/scsi/Makefile | 1 + drivers/scsi/hisi_sas/Kconfig | 6 + drivers/scsi/hisi_sas/Makefile| 1 + drivers/scsi/hisi_sas/hisi_sas.h | 26

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

2015-11-09 Thread John Garry
On 09/11/2015 16:28, Arnd Bergmann wrote: On Tuesday 10 November 2015 00:32:16 John Garry wrote: } +static void hisi_sas_init_add(struct hisi_hba *hisi_hba) +{ + int i; + + for (i = 0; i < hisi_hba->n_phy; i++) + memcpy(&hisi_hba->phy[i]

Re: [PATCH v3 08/32] scsi: hisi_sas: add hisi_sas_remove

2015-11-10 Thread John Garry
+int hisi_sas_remove(struct platform_device *pdev) +{ + struct sas_ha_struct *sha = platform_get_drvdata(pdev); + struct hisi_hba *hisi_hba = sha->lldd_ha; + + sas_unregister_ha(sha); + sas_remove_host(sha->core.shost); + scsi_remove_host(sha->core.shost); scsi ho

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

2015-11-10 Thread John Garry
On 09/11/2015 18:01, Rob Herring wrote: On Tue, Nov 10, 2015 at 12:32:07AM +0800, John Garry wrote: Add devicetree bindings for HiSilicon SAS driver. Signed-off-by: John Garry Signed-off-by: Zhangfei Gao --- .../devicetree/bindings/scsi/hisilicon-sas.txt | 81 ++ 1

[PATCH v4 00/32] HiSilicon SAS driver

2015-11-16 Thread John Garry
e ctrl reg access - get SAS address from device tree - do not set cmd_per_lun to 1 - remove remove controller id - use static wq in phy struct - process control phy in caller context - fix port->port_attached issue for rmmod [1] http://www.spinics.net/lists/arm-kernel/msg452833.html John Garry (32):

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

2015-11-16 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 v4 22/32] scsi: hisi_sas: add ssp command function

2015-11-16 Thread John Garry
Add path to send ssp command to HW Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 30 + drivers/scsi/hisi_sas/hisi_sas_main.c | 234 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 194 +++ 3 files changed, 458

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

2015-11-16 Thread John Garry
Include initialisation. Signed-off-by: John Garry Conflicts: drivers/scsi/hisi_sas/hisi_sas_main.c --- 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

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

2015-11-16 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 | 10 drivers/scsi/hisi_sas/hisi_sas_main.c | 45 ++- 2 files

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

2015-11-16 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(+) create mode 100644

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

2015-11-16 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 131 +++ 1 file changed, 131 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 87f4b61..19d40b7 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h

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

2015-11-16 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 15 +++ drivers/scsi/hisi_sas/hisi_sas_main.c | 31 +++ 2 files changed, 46 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 5ac5a82

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

2015-11-16 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 | 71 ++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main

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

2015-11-16 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 30 +++ drivers/scsi/hisi_sas/hisi_sas_main.c | 94 +++ 2 files changed, 124 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 19d40b7

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

2015-11-16 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 3a2400e..3749c46 100644 --- a/drivers/scsi/hisi_sas

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

2015-11-16 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 ++ 2 files changed, 150

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

2015-11-16 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, 13 insertions(+) diff

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

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

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

2015-11-16 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 b/drivers/scsi/hisi_sas

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

2015-11-16 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 | 9 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 88

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

2015-11-16 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 a/drivers/scsi/hisi_sas/hisi_sas.h

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

2015-11-16 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 | 337 + 3 files changed, 342 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b

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

2015-11-16 Thread John Garry
Add code to interrupts, 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 | 161 + 2 files changed, 166 insertions(+) diff --git a

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

2015-11-16 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 c50384f..62bc6f3 100644 --- a/drivers/scsi

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

2015-11-16 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 e9caa4b..c7081bd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5035,6 +5035,13 @@ F: include/uapi/linux/if_hippi.h

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

2015-11-16 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 | 118 + drivers/scsi

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

2015-11-16 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 | 23 +++ 2 files changed

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

2015-11-16 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 8cd1b55..d7d9516 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers

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

2015-11-16 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 | 29 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 23

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

2015-11-16 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 | 35 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 345 + 3 files changed, 389

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

2015-11-16 Thread John Garry
-by: John Garry Signed-off-by: Zhangfei Gao --- drivers/scsi/Kconfig | 1 + drivers/scsi/Makefile | 1 + drivers/scsi/hisi_sas/Kconfig | 6 + drivers/scsi/hisi_sas/Makefile| 1 + drivers/scsi/hisi_sas/hisi_sas.h | 26

[PATCH v4 24/32] scsi: hisi_sas: add dev_found and dev_gone

2015-11-16 Thread John Garry
Add functions to deal with lldd_dev_found and lldd_dev_gone. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 13 + drivers/scsi/hisi_sas/hisi_sas_main.c | 88 ++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 41 3 files

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

2015-11-16 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 index 1723dd4..ad50aed

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

2015-11-16 Thread John Garry
Add handlers for fatal interrupts Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 119 + 1 file changed, 119 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index a95259c..e29b7c7

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

2015-11-16 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 a/drivers/scsi/hisi_sas

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

2015-11-16 Thread John Garry
Add function methods for tmf's. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 309 ++ 1 file changed, 309 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 63ebaf3..4e

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

2015-11-16 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 e9aebce..9fe89bb 100644 --- a/drivers/scsi/hisi_sas

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

2015-11-17 Thread John Garry
6/11/2015 17:35, kbuild test robot wrote: Hi John, [auto build test ERROR on scsi/for-next] [also build test ERROR on v4.4-rc1 next-20151116] url:https://github.com/0day-ci/linux/commits/John-Garry/HiSilicon-SAS-driver/20151116-215304 base:https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git

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

2015-11-17 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 | 23 +++ 2 files changed

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

2015-11-17 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, 13 insertions(+) diff

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

2015-11-17 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 e9aebce..9fe89bb 100644 --- a/drivers/scsi/hisi_sas

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

2015-11-17 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 | 29 + drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 23

[PATCH v5 24/32] scsi: hisi_sas: add dev_found and dev_gone

2015-11-17 Thread John Garry
Add functions to deal with lldd_dev_found and lldd_dev_gone. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 13 + drivers/scsi/hisi_sas/hisi_sas_main.c | 88 ++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 41 3 files

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

2015-11-17 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 | 9 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 88

<    1   2   3   4   5   6   7   8   9   10   >