[PATCH 3/3] hisi_sas: add v2 hw support for different refclk

2016-09-20 Thread John Garry
approach for DT and ACPI as ACPI does not support fixed-clock device type). 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 | 7 +++ drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 +++- 3 files changed, 12

[PATCH 2/3] hisi_sas: add device tree support for hip07

2016-09-20 Thread John Garry
Chipset hip07 incorporates v2 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c index 9825a3f

[PATCH 1/3] devicetree: bindings: scsi: hisi_sas hip07 support

2016-09-20 Thread John Garry
Add support for hip07 chipset to bindings. Chipset hip07 has v2 hw. The sas-v2 quirk amt is expanded to cover hip07. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- Documentation/devicetree/bindings/scsi/hisilicon-sas.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH 0/3] hisi_sas add hip07 support

2016-09-20 Thread John Garry
/ Once 4.9-rc1 is released, the D03 dts can be updated for the refclock. Note: there will be only 1 D03 dts, UEFI will update the refclock rate for that board in the fdt at boot time. John Garry (3): devicetree: bindings: scsi: hisi_sas add hip07 support hisi_sas: add device

Re: [PATCH 1/3] devicetree: bindings: scsi: hisi_sas hip07 support

2016-09-24 Thread John Garry
On 23/09/2016 19:36, Rob Herring wrote: On Tue, Sep 20, 2016 at 06:48:58PM +0800, John Garry wrote: Add support for hip07 chipset to bindings. Chipset hip07 has v2 hw. The sas-v2 quirk amt is expanded to cover hip07. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- Documentation

Re: [PATCH] [SCSI] wd719x: Avoid calling request_firmware under spinlock

2016-09-15 Thread John Garry
On 15/09/2016 14:48, Vaishali Thakkar wrote: It is preferrable to use request_firmware where sleeping is allowed. Using it under spinlock can cause blocking. Here, the function wd719x_chip_init calls request_firmware while holding a spinlock. So, let's access it outside the spinlock. Coccinelle

Re: [PATCH] [SCSI] wd719x: Avoid calling request_firmware under spinlock

2016-09-15 Thread John Garry
On 15/09/2016 15:08, John Garry wrote: On 15/09/2016 14:48, Vaishali Thakkar wrote: It is preferrable to use request_firmware where sleeping is allowed. Using it under spinlock can cause blocking. Here, the function wd719x_chip_init calls request_firmware while holding a spinlock. So, let&#

[PATCH v2 4/8] hisi_sas: add prep_abort_v2_hw()

2016-08-24 Thread John Garry
Add function to prepare the an internal abort for v2 hw. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 33 + 1 file changed, 33 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c

[PATCH v2 0/8] hisi_sas internal abort support

2016-08-24 Thread John Garry
supporting internal abort feature. Differences to v1 patchset: - Add MACRO for internal abort mode and description of internal abort API John Garry (8): hisi_sas: add internal abort main code hisi_sas: for internal abort in hisi_sas_dev_gone() hisi_sas: add internal abort to

[PATCH v2 2/8] hisi_sas: add internal abort in hisi_sas_dev_gone()

2016-08-24 Thread John Garry
Execute an internal abort for that device when it is removed, so that commands for that device are not processed. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi

[PATCH v2 7/8] hisi_sas: add TMF success check

2016-08-24 Thread John Garry
value was for failure. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 73f581f..85c73d3 100644 --- a/drivers/scsi/hisi_sas

[PATCH v2 1/8] hisi_sas: add internal abort main code

2016-08-24 Thread John Garry
still in the host. In HW the internal abort command is executed similar to any other sort of command, like SSP. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 8 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 163 ++ 2 files changed, 171

[PATCH v2 3/8] hisi_sas: add internal abort to hisi_sas_abort_task()

2016-08-24 Thread John Garry
Execute an internal abort for executing a task abort. This is for case of the command still being present in host when abort is executed. For a SATA internal abort, we set abort for all tasks associated with the device. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 16

[PATCH v2 6/8] hisi_sas: fail tmf task prep when port detached

2016-08-24 Thread John Garry
When the port is detached we cannot execute a TMF, as there can be no device attached to the port. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi

[PATCH v2 8/8] hisi_sas: update version to 1.6

2016-08-24 Thread John Garry
Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index 8311360..ca55ec2 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas

[PATCH v2 5/8] hisi_sas: add v2 hw slot complete internal abort support

2016-08-24 Thread John Garry
command has completed successfully for device or individual abort command - STAT_IO_NO_DEVICE: internal abort command has completed for device but cannot find any IO - STAT_IO_NOT_VALID: internal abort command has completed for single command but could not find the command Signed-off-by: John Garry

Re: [PATCH v2 5/8] hisi_sas: add v2 hw slot complete internal abort support

2016-08-24 Thread John Garry
On 24/08/2016 13:59, Hannes Reinecke wrote: On 08/24/2016 01:05 PM, John Garry wrote: Add code in slot_complete_v2_hw() to deal with the slots which have completed due to internal abort. The status codes have the following meaning: - STAT_IO_ABORTED: the IO has been aborted due to internal

RE: [PATCH v6 00/22] hisi_sas: hip08 support

2017-06-20 Thread John Garry
Thanks! -Original Message- From: Martin K. Petersen [mailto:martin.peter...@oracle.com] Sent: 20 June 2017 02:42 To: John Garry Cc: j...@linux.vnet.ibm.com; martin.peter...@oracle.com; Linuxarm; linux-s...@vger.kernel.org; linux-kernel@vger.kernel.org; a...@arndb.de; h...@infradead.org

Re: [PATCH v3 1/7] ACPI/PPTT: Add Processor Properties Topology Table parsing

2017-10-16 Thread John Garry
On 12/10/2017 20:48, Jeremy Linton wrote: ACPI 6.2 adds a new table, which describes how processing units are related to each other in tree like fashion. Caches are also sprinkled throughout the tree and describe the properties of the caches in relation to other caches and processing units. Add

Re: [PATCH 0/2] block/SCSI MQ: two RESTART related patches

2017-10-17 Thread John Garry
On 17/10/2017 06:12, Ming Lei wrote: On Tue, Oct 17, 2017 at 01:04:16PM +0800, Ming Lei wrote: Hi Jens, The 1st patch runs idle hctx after dealy in scsi_mq_get_budget(), so that we can keep same behaviour with before, and it can be thought as a fix. The 2nd patch cleans up RESTART, and removes

Re: [PATCH v2 07/22] scsi: hisi_sas: create hisi_sas_get_fw_info()

2017-05-29 Thread John Garry
is On 29/05/2017 11:53, Arnd Bergmann wrote: On Thu, May 25, 2017 at 2:04 PM, John Garry wrote: Move the functionality to retrieve the fw info into a dedicated device type-agnostic function, hisi_sas_get_fw_info(). The reasoning is that this function will be required for future pci-based

Re: [PATCH] scsi: sas: Convert timers to use timer_setup()

2017-10-31 Thread John Garry
k, as there isn't a link back from slow_task. Cc: John Garry Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Jack Wang Cc: lindar_...@usish.com Cc: Jens Axboe Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Benjamin Block Cc: Baoyou Xie Cc: Wei Yongjun

[PATCH 07/19] scsi: hisi_sas: fix NULL check in SMP abort task path

2017-10-24 Thread John Garry
From: Xiaofei Tan This patch adds a NULL check of task->lldd_task before freeing the slot in SMP path. This is to guard against the scenario of the slot being freed during the from the preceding internal abort. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers/scsi/hisi_

[PATCH 04/19] scsi: hisi_sas: grab hisi_hba.lock when processing slots

2017-10-24 Thread John Garry
From: Xiang Chen When adding/removing slots from device list, we need to lock this operation with hisi_hba lock for safety. This patch adds missing instances of this. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 5 - drivers/scsi

[PATCH 10/19] scsi: hisi_sas: report ECC errors in v2 hw to userspace

2017-10-24 Thread John Garry
: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 9 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 95 +- 2 files changed, 102 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index d2d384b..58bc69e

[PATCH 09/19] scsi: hisi_sas: use array for v2 hw AXI errors

2017-10-24 Thread John Garry
From: Shiju Jose The code to print AXI errors in v2 hw driver is repetitive. This patch condenses the code by looping an array of errors. Also, a formatting error in one_bit_ecc_errors[] and multi_bit_ecc_errors[] is fixed. Signed-off-by: Shiju Jose Signed-off-by: John Garry --- drivers

[PATCH 03/19] scsi: hisi_sas: use spin_lock_irqsave() for hisi_hba.lock

2017-10-24 Thread John Garry
From: Xiaofei Tan We used spin_lock() to grab hisi_hba.lock in two places where spin_lock_irqsave() should be used, as hisi_hba.lock can be taken in interrupt context. This patch is to fix this. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c

[PATCH 00/19] hisi_sas: misc fixes, improvements, and new features

2017-10-24 Thread John Garry
This patchset contains many misc fixes, improvements, and a few new features. Here is a list of the significant changes: - more fixes for hisi_hba.locking - v3 hw DFX feature - random error handling bugfixes - reporting v2 hw errors to userspace Shiju Jose (3): scsi: hisi_sas: use array for v2

[PATCH 02/19] scsi: hisi_sas: fix internal abort slot timeout bug

2017-10-24 Thread John Garry
From: Xiang Chen When an internal abort times out in hisi_sas_internal_task_abort(), goto the exit label in and not go through the other task status checks. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 1 + 1 file changed, 1 insertion

[PATCH 06/19] scsi: hisi_sas: us start_phy in PHY_FUNC_LINK_RESET

2017-10-24 Thread John Garry
-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- 5 files changed, 5 insertions(+), 5

[PATCH 08/19] scsi: hisi_sas: fix the risk of freeing slot twice

2017-10-24 Thread John Garry
his risk of freeing slot twice, as follows: 1. Check task->lldd_task in the hisi_sas_slot_task_free(), and give up freeing of this time if task->lldd_task is NULL. 2. Set slot->buf to NULL after it is freed. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers/scsi/

[PATCH 01/19] scsi: hisi_sas: delete get_ncq_tag_v3_hw()

2017-10-24 Thread John Garry
From: Xiang Chen We already relocated hisi_sas_get_ncq_tag() into common file main.c, so delete get_ncq_tag_v3_hw() and use hisi_sas_get_ncq_tag() instead. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 16 +--- 1 file changed, 1

[PATCH 05/19] scsi: hisi_sas: fix SATA breakpoint memory size

2017-10-24 Thread John Garry
hen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 8 ++-- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 +++--- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_

[PATCH 17/19] scsi: hisi_sas: complete all tasklets prior to host reset

2017-10-24 Thread John Garry
all CQ tasklets are complete. Besides, as the function hisi_sas_wait_tasklets_done() is added to do tasklet_kill(), this patch refactors some code where tasklet_kill() is used. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi

[PATCH 15/19] scsi: hisi_sas: add hisi_hba.rst_work init for v3 hw

2017-10-24 Thread John Garry
From: Xiaofei Tan Add init code of hisi_hba->rst_work for v3 hw. Because v3 hw also need it to recover controller when some hw errors occurs. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c

[PATCH 19/19] scsi: hisi_sas: add v3 hw port AXI error handling

2017-10-24 Thread John Garry
From: Xiaofei Tan Add support for servicing AXI errors handling. We do host a controller reset for such errors. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 42 ++ 1 file changed, 37 insertions(+), 5

[PATCH 16/19] scsi: hisi_sas: fix a bug when free device for v3 hw

2017-10-24 Thread John Garry
From: Xiang Chen Use completion to wait on ITCT CLR interrupt finishing before processing other things when freeing a device. This is safer than the pre-existing process of polling the register. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

[PATCH 14/19] scsi: hisi_sas: add v3 hw DFX feature

2017-10-24 Thread John Garry
From: Xiaofei Tan Realise get_events() to add DFX feature for v3 hw. Just like v2 hw, We support the following errors: - loss_of_dword_sync_count - invalid_dword_count - phy_reset_problem_count - running_disparity_error_count Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers

[PATCH 11/19] scsi: hisi_sas: report v2 hw AXI errors to userspace

2017-10-24 Thread John Garry
From: Shiju Jose This patch adds reporting of AXI errors in the SAS v2 hw driver to userspace as non-standard trace events. rasdaemon can be used to read and log these AXI errors in userspace. Signed-off-by: Shiju Jose Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c

[PATCH 13/19] scsi: hisi_sas: init connect cfg register for v3 hw

2017-10-24 Thread John Garry
From: Xiaofei Tan Add initialization of register CON_CFG_DRIVER for v3 hw, to limit number of the times of setup connection. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi

[PATCH 12/19] scsi: hisi_sas: check PHY state in get_wideport_bitmap_v3_hw()

2017-10-24 Thread John Garry
From: Xiaofei Tan We should check register PHY_STATE when getting the bitmap of a wideport, as, if the PHY is not ready, the value of register PHY_PORT_NUM_MA is not valid. V2 hw has done this check, and v3 hw should do this check too. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry

[PATCH 18/19] scsi: hisi_sas: add v3 hw support for AXI fatal error

2017-10-24 Thread John Garry
From: Xiaofei Tan Add support for processing AXI bus fatal errors. If AXI bus fatal error happen, do controller reset to recover. Signed-off-by: Xiaofei Tan Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 125 + 1 file changed, 125

Re: [PATCH] perf vendor events arm64: Add hip08 implementation defined PMU core events

2017-10-25 Thread John Garry
On 25/10/2017 11:06, Ganapatrao Kulkarni wrote: Hi John, On Thu, Oct 19, 2017 at 3:59 PM, John Garry wrote: #Family-model,Version,Filename,EventType 0x420f5160,v1,cavium,core 0x420f5161,v1,cavium,core certainly, there is Part number(PartNum, bits [15:4] ) change from

Re: [PATCH] scsi: hisi_sas: select CONFIG_RAS

2017-11-03 Thread John Garry
+ Shiju, who authored the original patch Hi Arnd, Thanks for this. On 02/11/2017 16:50, Arnd Bergmann wrote: The driver now uses the RAS infrastructure, and fails to link if that is disabled: drivers/scsi/hisi_sas/hisi_sas_v2_hw.o: In function `fatal_ecc_int_v2_hw': hisi_sas_v2_hw.c:(.text+0x

Re: [PATCH] scsi: hisi_sas: select CONFIG_RAS

2017-11-03 Thread John Garry
On 03/11/2017 10:19, Arnd Bergmann wrote: On Fri, Nov 3, 2017 at 11:14 AM, John Garry wrote: + Shiju, who authored the original patch index d42f29a5eb65..6ad8a6251d21 100644 --- a/drivers/scsi/hisi_sas/Kconfig +++ b/drivers/scsi/hisi_sas/Kconfig @@ -4,6 +4,7 @@ config SCSI_HISI_SAS

Re: [PATCH v9 0/5] Add support for ThunderX2 pmu events using json files

2017-11-06 Thread John Garry
On 18/10/2017 18:49, Ganapatrao Kulkarni wrote: Hi Arnaldo, Will, can this be queued to next? Is there any update on the status of this patchset? From searching the acme git, I can only assume that it has not been merged. So we'll have to work on top of this out-of-tree series. John On

Re: [PATCH] perf vendor events arm64: Add hip08 implementation defined PMU core events

2017-10-18 Thread John Garry
eacon Cc: Ganapatrao Kulkarni Cc: John Garry --- .../arch/arm64/hisilicon/hip08-imp-def.json| 176 + tools/perf/pmu-events/arch/arm64/mapfile.csv | 1 + 2 files changed, 177 insertions(+) create mode 100644 tools/perf/pmu-events/arch/arm64/hisilicon/hip0

Re: [PATCH] perf vendor events arm64: Add hip08 implementation defined PMU core events

2017-10-18 Thread John Garry
On 18/10/2017 11:49, Will Deacon wrote: On Wed, Oct 18, 2017 at 10:25:39AM +0100, John Garry wrote: On 17/10/2017 13:59, Will Deacon wrote: Hi Shaokun, Thanks for the patch. One comment below. On Tue, Oct 17, 2017 at 03:01:39PM +0800, Shaokun Zhang wrote: This is a short list of useful

Re: [PATCH] perf vendor events arm64: Add hip08 implementation defined PMU core events

2017-10-19 Thread John Garry
I am looking at this topic now. But I am doubting the folder structure again. Firstly, we still have this comment in the README: All the topic JSON files for a CPU model/family should be in a separate sub directory. Now, when thunderx3 or hip09 comes along, I assume that their jsons will similar

Re: [PATCH v3 1/7] ACPI/PPTT: Add Processor Properties Topology Table parsing

2017-10-19 Thread John Garry
On 19/10/2017 06:18, Tomasz Nowicki wrote: Summary: I'm not at all happy with this specification's attempt to leave out pieces of information which make parsing things more deterministic. In this case I'm happy to demote the message level, but not remove it entirely but I do think the obvious c

Re: [PATCH] perf vendor events arm64: Add hip08 implementation defined PMU core events

2017-10-19 Thread John Garry
#Family-model,Version,Filename,EventType 0x420f5160,v1,cavium,core 0x420f5161,v1,cavium,core certainly, there is Part number(PartNum, bits [15:4] ) change from thunderx2 to thunderx3. thunderx3 should have its own json file describing all its supported events. same applies to ot

Re: [PATCH 04/25] scsi: hisi_sas: add scsi host registration

2015-10-13 Thread John Garry
On 12/10/2015 16:21, Arnd Bergmann wrote: On Monday 12 October 2015 23:20:16 John Garry wrote: + + shost = scsi_host_alloc(&hisi_sas_sht, sizeof(void *)); + if (!shost) + return -ENOMEM; + + hisi_hba = hisi_sas_hba_alloc(pdev, shost, np); + if (!hisi

Re: [PATCH 12/25] scsi: hisi_sas: add v1 HW initialisation code

2015-10-13 Thread John Garry
On 12/10/2015 19:46, Arnd Bergmann wrote: On Monday 12 October 2015 23:20:24 John Garry wrote: @@ -387,6 +392,21 @@ static int hisi_sas_probe(struct platform_device *pdev) } hisi_sas_init_add(hisi_hba); + + rc = hw_init_v1_hw(hisi_hba); + if (rc

Re: [PATCH 13/25] scsi: hisi_sas: add path from phyup irq to SAS framework

2015-10-16 Thread John Garry
On 16/10/2015 13:55, Arnd Bergmann wrote: On Monday 12 October 2015 23:20:25 John Garry wrote: @@ -804,6 +818,16 @@ static irqreturn_t int_phyup_v1_hw(int irq_no, void *p) phy->identify.target_port_protocols = SAS_PROTOCOL_SMP; + wq = kmal

Re: [PATCH 00/25] HiSilicon SAS driver

2015-10-19 Thread John Garry
, John On 12/10/2015 16:20, John Garry wrote: 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.

Re: [PATCH 00/25] HiSilicon SAS driver

2015-10-19 Thread John Garry
On 19/10/2015 09:55, Hannes Reinecke wrote: On 10/19/2015 10:47 AM, John Garry wrote: Hi James, Could we please get a review for our driver? We have got some good input on changes we need to make, and we will produce another patchset in the coming days. However it would good to get a subsystem

Re: [PATCH 13/25] scsi: hisi_sas: add path from phyup irq to SAS framework

2015-10-19 Thread John Garry
On 16/10/2015 14:36, Arnd Bergmann wrote: On Friday 16 October 2015 14:29:55 John Garry wrote: It could be considered. A potential issue I see is with hisi_sas_control_phy() for PHY_FUNC_HARD_RESET: this allocates a hisi_sas_wq struct and processes the reset in the queue work. When we re

Re: [PATCH 13/25] scsi: hisi_sas: add path from phyup irq to SAS framework

2015-10-19 Thread John Garry
I'd have to review more closely, but I think that's fine, as this is how most work queues are used: you can queue the same function multiple times, and it's guaranteed to run at least once after the last queue, so if you queue it while it's already running, it will be called again, otherwise it wo

Re: [PATCH 13/25] scsi: hisi_sas: add path from phyup irq to SAS framework

2015-10-20 Thread John Garry
We could create a work_struct for each event, which would be fine. Yes, that would be the normal way to do it. You initialize the work structures from the initial probe function to have the right callbacks, and then you just queue the right one when you need to defer an event. How many differ

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

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

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

[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 index d7ad515..778fa22

[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 index 13e34cb..4f

[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 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 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 files changed, 475

[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: include/uapi/linux/if_hippi.h

[PATCH v2 00/32] HiSilicon SAS driver

2015-10-26 Thread John Garry
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): [SCSI] sas: centralise ssp frame information units devicetree: bindings: scsi: Hi

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

[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 index 8a9498e74

[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 + 3 files changed, 413

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

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

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

[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 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 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 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 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 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 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

[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 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 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 --

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 v3 1/4] ACPI / scan: Fix acpi_is_indirect_io_slave() always returning false

2018-08-07 Thread John Garry
s() Fixes: dfda4492322e ("ACPI / scan: Do not enumerate Indirect IO host children") Cc: sta...@vger.kernel.org Cc: John Garry Cc: Bjorn Helgaas Cc: Dann Frazier Signed-off-by: Hans de Goede --- drivers/acpi/scan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/a

Re: [PATCH v3 4/4] i2c: Add multi-instantiate pseudo driver

2018-08-07 Thread John Garry
On 07/08/2018 09:05, Hans de Goede wrote: On systems with ACPI instantiated i2c-clients, normally there is 1 fw_node per i2c-device and that fw-node contains 1 I2cSerialBus resource for that 1 i2c-device. But in some rare cases the manufacturer has decided to describe multiple i2c-devices in a s

[PATCH] ACPI / scan: Add static attribute to indirect_io_hosts[]

2018-08-07 Thread John Garry
de Goede Signed-off-by: John Garry diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 970dd87..199c8ea6 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1528,7 +1528,7 @@ static int acpi_check_serial_bus_slave(struct acpi_resource *ares, void *data) static bool

[PATCH] irqdesc: Delete irq_desc_get_msi_desc()

2018-06-22 Thread John Garry
Function irq_desc_get_msi_desc() is not referenced in the kernel (and does not seem to have been referenced since e39758e0ea76, 3 years ago), so delete it. Signed-off-by: John Garry diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 25b33b6..dd1e40d 100644 --- a/include/linux

[PATCH] serial: 8250_of: Fix for lack of interrupt support

2018-08-29 Thread John Garry
state that interrupts should be supported - not must. To fix, switch from irq_of_parse_and_map() to of_irq_get(), which does relay whether the IRQ host controller domain is not ready, i.e. defer probe, instead of assuming it. Fixes: c58caaab3bf8 ("serial: 8250: of: Defer probe on missing IRQ")

Re: [PATCH] serial: 8250_of: Fix for lack of interrupt support

2018-08-29 Thread John Garry
On 29/08/2018 16:07, John Garry wrote: In commit c58caaab3bf8 ("serial: 8250: of: Defer probe on missing IRQ"), a check was added for the UART driver being probed prior to the parent IRQ controller. Unfortunately this breaks certain boards which have no interrupt support, like

  1   2   3   4   5   6   7   8   9   10   >