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

2017-06-07 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 208 ++

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

2017-06-07 Thread John Garry
and sas address are read from the firmware, same as platform device-based controller. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 6 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 18 +

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

2017-06-07 Thread John Garry
licon.com> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas_main.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index f720d

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

2017-06-07 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-06-07 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare ATA frame for v3 hw Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 106 + 1

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

2017-06-07 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

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

2017-05-31 Thread John Garry
in 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 <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 8 drivers/scsi/hisi_sas/hisi_sas_main.c | 10 +--

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

2017-05-31 Thread John Garry
m> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 9 ++--- drivers/scsi/hisi_sas/hisi_sas_main.c | 61 +++--- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 23 + drivers/scsi/hisi_sas/his

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-05-31 Thread John Garry
it. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 6 - drivers/scsi/hisi_sas/hisi_sas_main.c | 36 ++-- drivers/scsi/hisi_sas/hisi_sas_

[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 <john.ga...@huawei.

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

2017-05-31 Thread John Garry
licon.com> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas_main.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index f720d

[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 <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/s

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry <john.ga...@huawei.com>

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

2017-05-31 Thread John Garry
Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 402 - 1 file changed, 400 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to itct setup and free for v3 hw. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 114 + 1

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 208 ++

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare SMP frame. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 74 ++ 1 file chan

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to initialise v3 hardware. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 277 + 1

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

2017-05-31 Thread John Garry
and sas address are read from the firmware, same as platform device-based controller. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 6 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 18 +

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare ATA frame for v3 hw Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 106 + 1

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to initialise interrupts and add some interrupt handlers. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to configure PHYs for v3 hw. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 127 - 1

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code for interface get_wideport_bitmap. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 14 ++ 1 file changed, 14 i

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add v3 cq interrupt handler slot_complete_v2_hw(). Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_s

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

2017-05-31 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare internal abort command. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 38 ++

[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 <chenxian...@hisilicon.com> Add code to fill the interface of phy_hard_reset, phy_get_max_linkrate, and phy enable/disable. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/his

[PATCH v3 00/23] hisi_sas: hip08 support

2017-05-31 Thread John Garry
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: hisi_sas

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 <john.ga...@huawei.com> 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 re

[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 <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/s

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to configure PHYs for v3 hw. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 126 + 1

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

2017-05-25 Thread John Garry
it. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 6 - drivers/scsi/hisi_sas/hisi_sas_main.c | 36 ++-- drivers/scsi/hisi_sas/hisi_sas_

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

2017-05-25 Thread John Garry
and sas address are read from the firmware, same as platform device-based controller. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 6 ++ drivers/scsi/hisi_sas/hisi_sas_main.c | 18 +

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

2017-05-25 Thread John Garry
itical regions still need to be locked in the delivery and completion stages with hisi_hba.lock. Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 8 ++--- drivers/scsi/hisi_sas/his

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to initialise interrupts and add some interrupt handlers. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to initialise v3 hardware. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 276 + 1

[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 <john.ga...@huawei.

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare SMP frame. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 74 ++ 1 file chan

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

2017-05-25 Thread John Garry
licon.com> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas_main.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index f720d

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code for interface get_wide_port_bitmap_v3_hw(). Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 + 1 file chan

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry <john.ga...@huawei.com>

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to itct setup and free for v3 hw. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 115 + 1

[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 <chenxian...@hisilicon.com> Add code to fill the interface of phy_hard_reset, phy_get_max_linkrate, and phy enable/disable. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/his

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 209 ++

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

2017-05-25 Thread John Garry
Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 401 - 1 file changed, 399 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add v3 cq interrupt handler slot_complete_v2_hw(). Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_s

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare ATA frame for v3 hw Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 106 + 1

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

2017-05-25 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare internal abort command. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 38 ++

[PATCH v2 00/22] hisi_sas: hip08 support

2017-05-25 Thread John Garry
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 check

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

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

2017-05-23 Thread John Garry
ity-ID: 1373843 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> Reviewed-by: John Garry <john.ga...@huawei.com>

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

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 <john.ga...@huawei.com> 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

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 <john.ga...@huawei.com> 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

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 <john.ga...@huawei.com> 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

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 <john.ga...@huawei.com> wrote: > From: Xiang Chen <chenxian...@hisilicon.com> > > For ECC 1bit error, logic can recover it, so we only print a warning. > For ECC multi-bit and AXI b

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

2017-05-17 Thread John Garry
itical regions still need to be locked in the delivery and completion stages with hisi_hba.lock. Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 8 ++--- drivers/scsi/hisi_sas/his

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to initialise v3 hardware. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 275 + 1

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code for itct setup and free for v3 hw. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 115 +++

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to configure PHYs for v3 hw. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 126 + 1

[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 <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/Makefile | 1 + drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 57 +++

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare SMP frame. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 74 ++ 1 file chan

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare SSP frame and deliver it to hardware. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 209 ++

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to initialise interrupts and add some interrupt handlers. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry <john.ga...@huawei.com>

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare internal abort command. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 38 ++

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to fill the interface of phy_hard_reset, phy_get_max_linkrate, and phy enable/disable. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/his

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code to prepare ATA frame for v3 hw Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 106 + 1

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

2017-05-17 Thread John Garry
and structures are also exported from hisi_sas_main.c for pci init. For platform device-based controller, controller properties - like phy count - were read from the firmware. For pci-based controller this information is hard-coded in the driver, in new struct hisi_sas_pci_hw. Signed-off-by: John Garry

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add v3 cq interrupt handler. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_main.c | 32

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> Add code for interface get_wide_port_bitmap_v3_hw(). Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 + 1 file chan

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

2017-05-17 Thread John Garry
then we fall back on a default address. Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 2 + drivers/scsi/hisi_sas/hisi_sas_pci_init.c | 104 ++ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c| 2 +- 3 files changed, 10

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com>

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

2017-05-17 Thread John Garry
From: Xiang Chen <chenxian...@hisilicon.com> 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 <chenxian...@hisilicon.com> Signed-off-by: John Garry

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

2017-05-17 Thread John Garry
licon.com> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas_main.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index d622d

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

2017-05-17 Thread John Garry
it. Signed-off-by: John Garry <john.ga...@huawei.com> Signed-off-by: Xiang Chen <chenxian...@hisilicon.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 6 - drivers/scsi/hisi_sas/hisi_sas_main.c | 36 ++-- drivers/scsi/hisi_sas/hisi_sas_

[PATCH 00/22] hisi_sas: hip08 support

2017-05-17 Thread John Garry
is added for pci device-based controller in subsequent patches. And then hip08 support is added in the final patches. John Garry (4): scsi: hisi_sas: add pci_dev in hisi_hba struct scsi: hisi_sas: add the initialisation for pci-based controller scsi: hisi_sas: add bare v3 hw driver scsi: hisi_sas

Re: [PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-24 Thread John Garry
On 24/04/2017 11:09, John Garry wrote: On 21/04/2017 13:11, Johannes Thumshirn wrote: Move scsi_remove_host call into sas_remove_host and remove it from SAS HBA drivers, so we don't mess up the ordering. This solves an issue with double deleting sysfs entries that was introduced by the change

Re: [PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-24 Thread John Garry
("sysfs: make __sysfs_remove_dir() recursive"). Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Suggested-by: Christoph Hellwig <h...@lst.de> Cc: Hannes Reinecke <h...@suse.de> Cc: James Bottomley <j...@linux.vnet.ibm.com> Cc: Jinpu Wang <jinpu.w...@prof

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread John Garry
On 21/04/2017 12:20, Christoph Hellwig wrote: On Fri, Apr 21, 2017 at 09:57:37AM +0100, John Garry wrote: On 21/04/2017 09:39, Johannes Thumshirn wrote: wangyijing already sent an RFC for fixing this issue (mentioned above), which was a signifiagnt rewrite of some of libsas. I am hoping

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread John Garry
On 21/04/2017 09:39, Johannes Thumshirn wrote: wangyijing already sent an RFC for fixing this issue (mentioned above), > which was a signifiagnt rewrite of some of libsas. > I am hoping that he would retry, and that community would support/shepherd > this activity, or at least say it will be

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread John Garry
Thanks Johannes. @wangyijing, can you test this patchset please (specifically 3/5)? I know that you have the modified version of libsas which you dabbled with upstreaming. On 21/04/2017 09:04, Johannes Thumshirn wrote: This series re-orders the calls to scsi_remove_host() and

[PATCH 3/6] scsi: hisi_sas: workaround SoC about abort timeout bug

2017-04-10 Thread John Garry
mizing the flow of disabling a PHY. Signed-off-by: Xiaofei Tan <tanxiao...@huawei.com> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 127 - 1 file changed, 126 insertions(+), 1 deletion(-) diff --

[PATCH 0/6] hisi_sas: v2 hw SoC bug workarounds

2017-04-10 Thread John Garry
not include these bugs, so it is better not pollute the driver main layer with workarounds This patchset also includes 2 other patches, one for a possible NULL pointer deference and another for resetting the controller for fatal AXI/ECC errors. John Garry (2): scsi: hisi_sas: add v2 hw internal abort

[PATCH 1/6] scsi: hisi_sas: workaround STP link SoC bug

2017-04-10 Thread John Garry
wei.com> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas.h | 1 + drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 60 +- 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/driv

[PATCH 4/6] scsi: hisi_sas: add v2 hw internal abort timeout workaround

2017-04-10 Thread John Garry
. Then internal abort command will timeout. As this issue is only in v2 hw, we deal with it in the hw layer. Our workaround solution is: If abort is not finished within a certain period of time, we will check HOLD status. If HOLD has been sending, we will send break command. Signed-off-by: John Garry

[PATCH 5/6] scsi: hisi_sas: fix NULL deference when TMF timeouts

2017-04-10 Thread John Garry
task. Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/hisi_sas_main.c | 60 +++ 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index a

Re: [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister

2017-03-29 Thread John Garry
On 29/03/2017 12:29, Johannes Thumshirn wrote: On Wed, Mar 29, 2017 at 12:15:44PM +0100, John Garry wrote: On 29/03/2017 10:41, Johannes Thumshirn wrote: In the advent of an SAS device unregister we have to wait for all destruct works to be done to not accidently delay deletion of a SAS rphy

Re: [PATCH 1/2] scsi: sas: flush destruct workqueue on device unregister

2017-03-29 Thread John Garry
On 29/03/2017 10:41, Johannes Thumshirn wrote: In the advent of an SAS device unregister we have to wait for all destruct works to be done to not accidently delay deletion of a SAS rphy or it's children to the point when we're removing the SCSI or SAS hosts. Signed-off-by: Johannes Thumshirn

Re: [PATCH] scsi: hisi_sas: fix SATA dependency

2017-03-28 Thread John Garry
is better. Fixes: 7c594f0407de ("scsi: hisi_sas: add softreset function for SATA disk") Signed-off-by: Arnd Bergmann <a...@arndb.de> Signed-off-by: John Garry <john.ga...@huawei.com> --- drivers/scsi/hisi_sas/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 d

<    1   2   3   4   5   6   7   8   >