[PATCH v5 20/23] scsi: hisi_sas: add get_wideport_bitmap_v3_hw()

2017-06-09 Thread John Garry
From: Xiang Chen Add code for interface get_wideport_bitmap. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas

[PATCH v5 16/23] scsi: hisi_sas: add v3 code to send SMP frame

2017-06-09 Thread John Garry
From: Xiang Chen Add code to prepare SMP frame. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

[PATCH v5 19/23] scsi: hisi_sas: add v3 code to send internal abort command

2017-06-09 Thread John Garry
From: Xiang Chen Add code to prepare internal abort command. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b

[PATCH v5 15/23] scsi: hisi_sas: add v3 code to send SSP frame

2017-06-09 Thread John Garry
From: Xiang Chen Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 208 + 1 file changed, 208 insertions(+) diff --git a/drivers/scsi/hisi_sas

[PATCH v5 18/23] scsi: hisi_sas: add v3 code for itct setup and free

2017-06-09 Thread John Garry
From: Xiang Chen Add code to itct setup and free for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 114 + 1 file changed, 114 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b

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

2017-06-09 Thread John Garry
. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 340 + 1 file changed, 340 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 3065252..4869b73 100644

[PATCH v5 11/23] scsi: hisi_sas: add v3 hw init

2017-06-09 Thread John Garry
From: Xiang Chen Add code to initialise v3 hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 277 + 1 file changed, 277 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

[PATCH v5 00/23] hisi_sas: hip08 support

2017-06-09 Thread John Garry
rom device node DSD under PCI host bridge - add comment in fatal axi error patch commit log regarding controller reset - eliminate hisi_sas_pci_init.c, and move functionality into hisi_sas_v3_hw.c, eliminating one layer of indirection John Garry (5): scsi: hisi_s

[PATCH v5 04/23] scsi: hisi_sas: relocate get_ata_protocol()

2017-06-09 Thread John Garry
From: Xiang Chen Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 7 drivers/scs

[PATCH v5 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock

2017-06-09 Thread John Garry
locked in the delivery and completion stages with hisi_hba.lock. New element hisi_sas_device.dq is added to store the delivery queue for a device, so it does not need to be needlessly re-calculated for every task. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas

[PATCH v5 13/23] scsi: hisi_sas: add phy up/down/bcast and channel ISR

2017-06-09 Thread John Garry
From: Xiang Chen Add code to initialise interrupts and add some interrupt handlers. Also add function hisi_sas_v3_destroy_irqs() to clean-up irqs upon module unloading. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 283

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

2017-06-08 Thread John Garry
On 08/06/2017 08:34, Christoph Hellwig wrote: Hi John, sorry for dropping the ball, but your repost reminded me. On Thu, Jun 01, 2017 at 11:36:55AM +0100, John Garry wrote: In the command completion code we need to check for abnormal completion due to underflow, but ignore it when it occurs

[PATCH v4 23/23] scsi: hisi_sas: modify internal abort dev flow for v3 hw

2017-06-07 Thread John Garry
From: Xiang Chen There is a change for abort dev for v3 hw: add registers to configure unaborted iptt for a device, and then inform this to logic. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scsi/hisi_sas/hisi_sas_main.c

[PATCH v4 22/23] scsi: hisi_sas: add v3 code to fill some more hw function pointers

2017-06-07 Thread John Garry
From: Xiang Chen Add code to fill the interface of phy_hard_reset, phy_get_max_linkrate, and phy enable/disable. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 39 ++ 1 file changed, 39 insertions(+) diff

[PATCH v4 21/23] scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error

2017-06-07 Thread John Garry
From: Xiang Chen For ECC 1bit error, logic can recover it, so we only print a warning. For ECC multi-bit and AXI bus fatal error, we panic. Note: once v3 hw controller reset support is added, the panic will be replaced by a controller reset, like v2 hw. Signed-off-by: John Garry Signed

[PATCH v4 18/23] scsi: hisi_sas: add v3 code for itct setup and free

2017-06-07 Thread John Garry
From: Xiang Chen Add code to itct setup and free for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 114 + 1 file changed, 114 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b

[PATCH v4 04/23] scsi: hisi_sas: relocate get_ata_protocol()

2017-06-07 Thread John Garry
From: Xiang Chen Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 7 drivers/scs

[PATCH v4 11/23] scsi: hisi_sas: add v3 hw init

2017-06-07 Thread John Garry
From: Xiang Chen Add code to initialise v3 hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 277 + 1 file changed, 277 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

[PATCH v4 02/23] scsi: hisi_sas: define hisi_sas_device.device_id as int

2017-06-07 Thread John Garry
size, so, as a solution, just make as an int. Also, struct hisi_sas_device elements are re-ordered to improve packing efficiency. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 8 drivers/scsi/hisi_sas/hisi_sas_main.c | 10 +- 2 files changed, 9 insertions

[PATCH v4 13/23] scsi: hisi_sas: add phy up/down/bcast and channel ISR

2017-06-07 Thread John Garry
From: Xiang Chen Add code to initialise interrupts and add some interrupt handlers. Also add function hisi_sas_v3_destroy_irqs() to clean-up irqs upon module unloading. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 283

[PATCH v4 20/23] scsi: hisi_sas: add get_wideport_bitmap_v3_hw()

2017-06-07 Thread John Garry
From: Xiang Chen Add code for interface get_wideport_bitmap. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas

[PATCH v4 16/23] scsi: hisi_sas: add v3 code to send SMP frame

2017-06-07 Thread John Garry
From: Xiang Chen Add code to prepare SMP frame. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

[PATCH v4 08/23] scsi: hisi_sas: create hisi_sas_get_fw_info()

2017-06-07 Thread John Garry
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 platforms. Also add some debug logs for failure. Signed-off-by: John Garry --- drivers/scsi/hisi_sas

[PATCH v4 19/23] scsi: hisi_sas: add v3 code to send internal abort command

2017-06-07 Thread John Garry
From: Xiang Chen Add code to prepare internal abort command. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b

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

2017-06-07 Thread John Garry
From: Xiang Chen Add v3 cq interrupt handler slot_complete_v2_hw(). Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 365 + 1 file changed, 365 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

[PATCH v4 09/23] scsi: hisi_sas: add skeleton v3 hw driver

2017-06-07 Thread John Garry
v2 hw bugs are fixed (hopefully), so workarounds are not required -support for device deregistration -some interrupt modifications -configurable max device support Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/Kconfig | 10 +++- drivers/scsi/hisi_sas

[PATCH v4 12/23] scsi: hisi_sas: add v3 hw PHY init

2017-06-07 Thread John Garry
From: Xiang Chen Add code to configure PHYs for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 127 - 1 file changed, 126 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

[PATCH v4 07/23] scsi: hisi_sas: add pci_dev in hisi_hba struct

2017-06-07 Thread John Garry
. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 6 - drivers/scsi/hisi_sas/hisi_sas_main.c | 36 ++-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 28 +++--- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 44

[PATCH v4 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock

2017-06-07 Thread John Garry
locked in the delivery and completion stages with hisi_hba.lock. New element hisi_sas_device.dq is added to store the delivery queue for a device, so it does not need to be needlessly re-calculated for every task. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas

[PATCH v4 00/23] hisi_sas: hip08 support

2017-06-07 Thread John Garry
rror patch commit log regarding controller reset - eliminate hisi_sas_pci_init.c, and move functionality into hisi_sas_v3_hw.c, eliminating one layer of indirection John Garry (5): scsi: hisi_sas: define hisi_sas_device.device_id as int scsi: hisi_sas: add pci_dev in hisi_hba str

[PATCH v4 15/23] scsi: hisi_sas: add v3 code to send SSP frame

2017-06-07 Thread John Garry
From: Xiang Chen Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 208 + 1 file changed, 208 insertions(+) diff --git a/drivers/scsi/hisi_sas

[PATCH v4 10/23] scsi: hisi_sas: add initialisation for v3 pci-based controller

2017-06-07 Thread John Garry
sas address are read from the firmware, same as platform device-based controller. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 6 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 18 ++-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 154

[PATCH v4 01/23] scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort()

2017-06-07 Thread John Garry
From: Xiang Chen We need to check for timeout before task status, or the task will be mistook as completed internal abort command. Also add protection for sas_task.task_state_flags in hisi_sas_tmf_timedout(). Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas

[PATCH v4 05/23] scsi: hisi_sas: relocate sata_done_v2_hw()

2017-06-07 Thread John Garry
From: Xiang Chen Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scs

[PATCH v4 17/23] scsi: hisi_sas: add v3 code to send ATA frame

2017-06-07 Thread John Garry
From: Xiang Chen Add code to prepare ATA frame for v3 hw Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 106 + 1 file changed, 106 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers

[PATCH v4 06/23] scsi: hisi_sas: relocate get_ncq_tag_v2_hw()

2017-06-07 Thread John Garry
From: Xiang Chen Relocate get_ncq_tag_v2_hw() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scs

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

2017-06-01 Thread John Garry
On 01/06/2017 06:41, Christoph Hellwig wrote: + case SAS_PROTOCOL_SSP: + { + unsigned char op = task->ssp_task.cmd->cmnd[0]; + + if (op == READ_6 || op == WRITE_6 || + op == READ_10 || op == WRITE_10 || + op == RE

Re: [PATCH v3 13/23] scsi: hisi_sas: add phy up/down/bcast and channel ISR

2017-06-01 Thread John Garry
On 01/06/2017 06:41, Christoph Hellwig wrote: > +static int interrupt_init_v3_hw(struct hisi_hba *hisi_hba) > +{ > + struct device *dev = hisi_hba->dev; > + struct pci_dev *pdev = hisi_hba->pci_dev; > + int vectors, i, irq, rc; > + int max_msi = HISI_SAS_MSI_COUNT_V3_HW; > + int msi_vectors[

[PATCH v3 02/23] scsi: hisi_sas: define hisi_sas_device.device_id as int

2017-05-31 Thread John Garry
size, so, as a solution, just make as an int. Also, struct hisi_sas_device elements are re-ordered to improve packing efficiency. Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 8 drivers/scsi/hisi_sas/hisi_sas_main.c | 10 +- 2 files changed, 9 insertions

[PATCH v3 03/23] scsi: hisi_sas: optimise the usage of hisi_hba.lock

2017-05-31 Thread John Garry
locked in the delivery and completion stages with hisi_hba.lock. New element hisi_sas_device.dq is added to store the delivery queue for a device, so it does not need to be needlessly re-calculated for every task. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas

[PATCH v3 06/23] scsi: hisi_sas: relocate get_ncq_tag_v2_hw()

2017-05-31 Thread John Garry
From: Xiang Chen Relocate get_ncq_tag_v2_hw() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scs

[PATCH v3 07/23] scsi: hisi_sas: add pci_dev in hisi_hba struct

2017-05-31 Thread John Garry
. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 6 - drivers/scsi/hisi_sas/hisi_sas_main.c | 36 ++-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 28 +++--- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 44

[PATCH v3 04/23] scsi: hisi_sas: relocate get_ata_protocol()

2017-05-31 Thread John Garry
From: Xiang Chen Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scs

[PATCH v3 08/23] scsi: hisi_sas: create hisi_sas_get_fw_info()

2017-05-31 Thread John Garry
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 platforms. Also add some debug logs for failure. Signed-off-by: John Garry --- drivers/scsi/hisi_sas

[PATCH v3 01/23] scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort()

2017-05-31 Thread John Garry
From: Xiang Chen We need to check for timeout before task status, or the task will be mistook as completed internal abort command. Also add protection for sas_task.task_state_flags in hisi_sas_tmf_timedout(). Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas

[PATCH v3 09/23] scsi: hisi_sas: add skeleton v3 hw driver

2017-05-31 Thread John Garry
v2 hw bugs are fixed (hopefully), so workarounds are not required -support for device deregistration -some interrupt modifications -configurable max device support Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/Kconfig | 10 +++- drivers/scsi/hisi_sas

[PATCH v3 05/23] scsi: hisi_sas: relocate sata_done_v2_hw()

2017-05-31 Thread John Garry
From: Xiang Chen Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scs

[PATCH v3 23/23] scsi: hisi_sas: modify internal abort dev flow for v3 hw

2017-05-31 Thread John Garry
From: Xiang Chen There is a change for abort dev for v3 hw: add registers to configure unaborted iptt for a device, and then inform this to logic. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scsi/hisi_sas/hisi_sas_main.c

[PATCH v3 21/23] scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error

2017-05-31 Thread John Garry
From: Xiang Chen For ECC 1bit error, logic can recover it, so we only print a warning. For ECC multi-bit and AXI bus fatal error, we panic. Note: once v3 hw controller reset support is added, the panic will be replaced by a controller reset, like v2 hw. Signed-off-by: John Garry Signed

[PATCH v3 18/23] scsi: hisi_sas: add v3 code for itct setup and free

2017-05-31 Thread John Garry
From: Xiang Chen Add code to itct setup and free for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 114 + 1 file changed, 114 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b

[PATCH v3 15/23] scsi: hisi_sas: add v3 code to send SSP frame

2017-05-31 Thread John Garry
From: Xiang Chen Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 208 + 1 file changed, 208 insertions(+) diff --git a/drivers/scsi/hisi_sas

[PATCH v3 16/23] scsi: hisi_sas: add v3 code to send SMP frame

2017-05-31 Thread John Garry
From: Xiang Chen Add code to prepare SMP frame. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

[PATCH v3 11/23] scsi: hisi_sas: add v3 hw init

2017-05-31 Thread John Garry
From: Xiang Chen Add code to initialise v3 hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 277 + 1 file changed, 277 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

[PATCH v3 10/23] scsi: hisi_sas: add initialisation for v3 pci-based controller

2017-05-31 Thread John Garry
sas address are read from the firmware, same as platform device-based controller. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 6 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 18 ++-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 155

[PATCH v3 17/23] scsi: hisi_sas: add v3 code to send ATA frame

2017-05-31 Thread John Garry
From: Xiang Chen Add code to prepare ATA frame for v3 hw Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 106 + 1 file changed, 106 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers

[PATCH v3 13/23] scsi: hisi_sas: add phy up/down/bcast and channel ISR

2017-05-31 Thread John Garry
From: Xiang Chen Add code to initialise interrupts and add some interrupt handlers. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 281 + 1 file changed, 281 insertions(+) diff --git a/drivers/scsi/hisi_sas

[PATCH v3 12/23] scsi: hisi_sas: add v3 hw PHY init

2017-05-31 Thread John Garry
From: Xiang Chen Add code to configure PHYs for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 127 - 1 file changed, 126 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

[PATCH v3 20/23] scsi: hisi_sas: add get_wideport_bitmap_v3_hw()

2017-05-31 Thread John Garry
From: Xiang Chen Add code for interface get_wideport_bitmap. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas

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

2017-05-31 Thread John Garry
From: Xiang Chen Add v3 cq interrupt handler slot_complete_v2_hw(). Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 32 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 331

[PATCH v3 19/23] scsi: hisi_sas: add v3 code to send internal abort command

2017-05-31 Thread John Garry
From: Xiang Chen Add code to prepare internal abort command. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b

[PATCH v3 22/23] scsi: hisi_sas: add v3 code to fill some more hw function pointers

2017-05-31 Thread John Garry
From: Xiang Chen Add code to fill the interface of phy_hard_reset, phy_get_max_linkrate, and phy enable/disable. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 40 +- 1 file changed, 39 insertions(+), 1

[PATCH v3 00/23] hisi_sas: hip08 support

2017-05-31 Thread John Garry
host bridge - add comment in fatal axi error patch commit log regarding controller reset - eliminate hisi_sas_pci_init.c, and move functionality into hisi_sas_v3_hw.c, eliminating one layer of indirection John Garry (5): scsi: hisi_sas: define hisi_sas_device.device_id as int scsi: his

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

[PATCH v2 08/22] scsi: hisi_sas: add skeleton v3 hw driver

2017-05-25 Thread John Garry
v2 hw bugs are fixed (hopefully), so workarounds are not required -support for device deregistration -some interrupt modifications -configurable max device support Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/Kconfig | 10 +++- drivers/scsi/hisi_sas

[PATCH v2 11/22] scsi: hisi_sas: add v3 hw PHY init

2017-05-25 Thread John Garry
From: Xiang Chen Add code to configure PHYs for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 126 + 1 file changed, 126 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers

[PATCH v2 06/22] scsi: hisi_sas: add pci_dev in hisi_hba struct

2017-05-25 Thread John Garry
. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 6 - drivers/scsi/hisi_sas/hisi_sas_main.c | 36 ++-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 28 +++--- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 44

[PATCH v2 09/22] scsi: hisi_sas: add initialisation for v3 pci-based controller

2017-05-25 Thread John Garry
sas address are read from the firmware, same as platform device-based controller. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 6 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 18 ++-- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 157

[PATCH v2 02/22] scsi: hisi_sas: optimise the usage of hisi_hba.lock

2017-05-25 Thread John Garry
locked in the delivery and completion stages with hisi_hba.lock. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 8 ++--- drivers/scsi/hisi_sas/hisi_sas_main.c | 59 ++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 23

[PATCH v2 12/22] scsi: hisi_sas: add phy up/down/bcast and channel ISR

2017-05-25 Thread John Garry
From: Xiang Chen Add code to initialise interrupts and add some interrupt handlers. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 282 + 1 file changed, 282 insertions(+) diff --git a/drivers/scsi/hisi_sas

[PATCH v2 10/22] scsi: hisi_sas: add v3 hw init

2017-05-25 Thread John Garry
From: Xiang Chen Add code to initialise v3 hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 276 + 1 file changed, 276 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

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

2017-05-25 Thread John Garry
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 platforms. Also add some debug prints for failure. Signed-off-by: John Garry --- drivers/scsi

[PATCH v2 05/22] scsi: hisi_sas: relocate get_ncq_tag_v2_hw()

2017-05-25 Thread John Garry
From: Xiang Chen Relocate get_ncq_tag_v2_hw() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scs

[PATCH v2 15/22] scsi: hisi_sas: add v3 code to send SMP frame

2017-05-25 Thread John Garry
From: Xiang Chen Add code to prepare SMP frame. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 74 ++ 1 file changed, 74 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

[PATCH v2 01/22] scsi: hisi_sas: fix timeout check in hisi_sas_internal_task_abort()

2017-05-25 Thread John Garry
From: Xiang Chen We need to check for timeout before task status, or the task will be mistook as completed internal abort command. Also add protection for sas_task.task_state_flags in hisi_sas_tmf_timedout(). Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas

[PATCH v2 19/22] scsi: hisi_sas: add get_wideport_bitmap_v3_hw()

2017-05-25 Thread John Garry
From: Xiang Chen Add code for interface get_wide_port_bitmap_v3_hw(). Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

[PATCH v2 22/22] scsi: hisi_sas: modify internal abort dev flow for v3 hw

2017-05-25 Thread John Garry
From: Xiang Chen There is a change for abort dev for v3 hw: add registers to configure unaborted iptt for a device, and then inform this to logic. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scsi/hisi_sas/hisi_sas_main.c

[PATCH v2 04/22] scsi: hisi_sas: relocate sata_done_v2_hw()

2017-05-25 Thread John Garry
From: Xiang Chen Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 ++ drivers/scs

[PATCH v2 17/22] scsi: hisi_sas: add v3 code for itct setup and free

2017-05-25 Thread John Garry
From: Xiang Chen Add code to itct setup and free for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 115 + 1 file changed, 115 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b

[PATCH v2 21/22] scsi: hisi_sas: add v3 code to fill some more hw function pointers

2017-05-25 Thread John Garry
From: Xiang Chen Add code to fill the interface of phy_hard_reset, phy_get_max_linkrate, and phy enable/disable. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 39 ++ 1 file changed, 39 insertions(+) diff

[PATCH v2 14/22] scsi: hisi_sas: add v3 code to send SSP frame

2017-05-25 Thread John Garry
From: Xiang Chen Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 209 - 1 file changed, 208 insertions(+), 1 deletion(-) diff --git a/drivers/scsi

[PATCH v2 20/22] scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error

2017-05-25 Thread John Garry
From: Xiang Chen For ECC 1bit error, logic can recover it, so we only print a warning. For ECC multi-bit and AXI bus fatal error, we panic. Note: once v3 hw controller reset support is added, the panic will be replaced by a controller reset, like v2 hw. Signed-off-by: John Garry Signed

[PATCH v2 03/22] scsi: hisi_sas: relocate get_ata_protocol()

2017-05-25 Thread John Garry
From: Xiang Chen Relocate get_ata_protocol() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scs

[PATCH v2 13/22] scsi: hisi_sas: add v3 cq interrupt handler

2017-05-25 Thread John Garry
From: Xiang Chen Add v3 cq interrupt handler slot_complete_v2_hw(). Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 32 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 331

[PATCH v2 16/22] scsi: hisi_sas: add v3 code to send ATA frame

2017-05-25 Thread John Garry
From: Xiang Chen Add code to prepare ATA frame for v3 hw Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 106 + 1 file changed, 106 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers

[PATCH v2 18/22] scsi: hisi_sas: add v3 code to send internal abort command

2017-05-25 Thread John Garry
From: Xiang Chen Add code to prepare internal abort command. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b

[PATCH v2 00/22] hisi_sas: hip08 support

2017-05-25 Thread John Garry
er of indirection John Garry (4): scsi: hisi_sas: add pci_dev in hisi_hba struct scsi: hisi_sas: create hisi_sas_get_fw_info() scsi: hisi_sas: add skeleton v3 hw driver scsi: hisi_sas: add initialisation for v3 pci-based controller Xiang Chen (18): scsi: hisi_sas: fix timeout che

Re: [PATCH 2/2] libsas: Enhance libsas hotplug

2017-05-25 Thread John Garry
Hi, There are some comments, inline. In general, if it works, it looks ok. Other reviews would be greatly appreciated - Hannes, Christoph, Johannes, Dan - please. > Libsas complete a hotplug event notified by LLDD in several works, > for example, if libsas receive a PHYE_LOSS_OF_SIGNAL, we p

Re: [PATCH] scsi: hisi_sas: add null check before indirect pointer dereference

2017-05-23 Thread John Garry
Coverity-ID: 1373843 Signed-off-by: Gustavo A. R. Silva Reviewed-by: John Garry

Re: [PATCH 1/2] libsas: Don't process sas events in static works

2017-05-22 Thread John Garry
On 22/05/2017 06:54, wangyijing wrote: I also think for safety this should use a mempool that guarantees that > events can continue to be processed under system memory pressure. What I am worried about is it's would still fail if the mempool is used empty during memory pressure. > Also, have

Re: [PATCH 09/22] scsi: hisi_sas: retrieve SAS address for pci-based controller

2017-05-18 Thread John Garry
Hi Arnd, Currently there is no pci device listed in the ACPI tables. What I am doing is declaring a fake device in the root of the System bus tree of the ACPI tables, and in the kernel driver finding it by matching the name. It is not the ACPI companion for the pci device. So I think that we ca

Re: [PATCH 09/22] scsi: hisi_sas: retrieve SAS address for pci-based controller

2017-05-17 Thread John Garry
On 17/05/2017 15:13, Arnd Bergmann wrote: On Wed, May 17, 2017 at 3:37 PM, John Garry wrote: On 17/05/2017 13:37, Arnd Bergmann wrote: Since this uses the _DSD information that was introduced for compatibility between device tree and ACPI based data, why not write the code so that it can

Re: [PATCH 09/22] scsi: hisi_sas: retrieve SAS address for pci-based controller

2017-05-17 Thread John Garry
On 17/05/2017 13:37, Arnd Bergmann wrote: On Wed, May 17, 2017 at 12:49 PM, John Garry wrote: > For a pci-based controller, retrieve the SAS address from the > ACPI tables. > > The retrieval is based on the ACPI device node name. Sample is > as follows: > Scope(_SB) >

Re: [PATCH 07/22] scsi: hisi_sas: add the initialisation for pci-based controller

2017-05-17 Thread John Garry
On 17/05/2017 13:33, Arnd Bergmann wrote: On Wed, May 17, 2017 at 12:49 PM, John Garry wrote: > Add the code to initialise controller which is based on pci device > in hisi_sas_pci_init.c > > The main functionality added is for probing and initialisation of > the controller base

Re: [PATCH 20/22] scsi: hisi_sas: Add v3 code to support ECC and AXI bus fatal error

2017-05-17 Thread John Garry
On 17/05/2017 13:27, Arnd Bergmann wrote: On Wed, May 17, 2017 at 12:49 PM, John Garry wrote: > From: Xiang Chen > > For ECC 1bit error, logic can recover it, so we only print a warning. > For ECC multi-bit and AXI bus fatal error, we panic. > > Signed-off-by: John Garr

[PATCH 02/22] scsi: hisi_sas: optimise the usage of hisi_hba.lock

2017-05-17 Thread John Garry
locked in the delivery and completion stages with hisi_hba.lock. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 8 ++--- drivers/scsi/hisi_sas/hisi_sas_main.c | 59 ++ drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 23

[PATCH 10/22] scsi: hisi_sas: add v3 hw init

2017-05-17 Thread John Garry
From: Xiang Chen Add code to initialise v3 hardware. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 275 + 1 file changed, 275 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi

[PATCH 05/22] scsi: hisi_sas: relocate get_ncq_tag_v2_hw()

2017-05-17 Thread John Garry
From: Xiang Chen Relocate get_ncq_tag_v2_hw() to a common location, as future hw versions will require it. Also rename with "hisi_sas_" prefix for consistency. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scs

[PATCH 17/22] scsi: hisi_sas: add v3 code for itct setup and free

2017-05-17 Thread John Garry
From: Xiang Chen Add code for itct setup and free for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 115 + 1 file changed, 115 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b

[PATCH 11/22] scsi: hisi_sas: add v3 hw PHY init

2017-05-17 Thread John Garry
From: Xiang Chen Add code to configure PHYs for v3 hw. Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 126 + 1 file changed, 126 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers

[PATCH 08/22] scsi: hisi_sas: add bare v3 hw driver

2017-05-17 Thread John Garry
device support Not yet supported: - controller reset Signed-off-by: John Garry Signed-off-by: Xiang Chen --- drivers/scsi/hisi_sas/Makefile | 1 + drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 57 ++ 2 files changed, 58 insertions(+) create mode 100644 drivers

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