#
057c3d1f |
| 08-Dec-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: do link reset for some CHL_INT2 ints
We should do link reset of PHY when identify timeout or STP link timeout. They are internal events of SOC and are notified to driver through inte
scsi: hisi_sas: do link reset for some CHL_INT2 ints
We should do link reset of PHY when identify timeout or STP link timeout. They are internal events of SOC and are notified to driver through interrupts of CHL_INT2.
Besides, we should add an delay work to do link reset as it needs sleep. So, this patch add an new PHY event HISI_PHYE_LINK_RESET for this.
Notes: v2 HW doesn't report the event of STP link timeout. So, we only need to handle event of identify timeout for v2 HW.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
e537b62b |
| 08-Dec-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: use an general way to delay PHY work
Use an general way to do delay work for a PHY. Then it will be easier to add new delayed work for a PHY in future.
Signed-off-by: Xiaofei Tan <t
scsi: hisi_sas: use an general way to delay PHY work
Use an general way to do delay work for a PHY. Then it will be easier to add new delayed work for a PHY in future.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
f1c88211 |
| 08-Dec-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: add some print to enhance debugging
Add some print at some places such as error info and cq of exception IO, device found etc, and also adjust some log levels.
All this to assist de
scsi: hisi_sas: add some print to enhance debugging
Add some print at some places such as error info and cq of exception IO, device found etc, and also adjust some log levels.
All this to assist debugging ability.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
1aaf81e0 |
| 08-Dec-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: add RAS feature for v3 hw
We use PCIe AER to support RAS feature for v3 hw. This driver should do following two things to support this:
1. Enable RAS interrupts, so that errors can
scsi: hisi_sas: add RAS feature for v3 hw
We use PCIe AER to support RAS feature for v3 hw. This driver should do following two things to support this:
1. Enable RAS interrupts, so that errors can be reported to RAS module.
2. Realize err_handler for sas_v3_pci_driver. Then if non-fatal error is detected, print error source and try to recover SAS controller.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
9f347b2f |
| 08-Dec-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: change ncq process for v3 hw
For v3 hw, each NCQ will return a CQ, so it is no need to acquire IPTT from ITCT, just acquire it from IPTT field of CQ.
Signed-off-by: Xiang Chen <chen
scsi: hisi_sas: change ncq process for v3 hw
For v3 hw, each NCQ will return a CQ, so it is no need to acquire IPTT from ITCT, just acquire it from IPTT field of CQ.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
0258141a |
| 08-Dec-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: relocate clearing ITCT and freeing device
In certain scenarios we may just want to clear the ITCT for a device, and not free other resources like the SATA bitmap using in v2 hw.
To
scsi: hisi_sas: relocate clearing ITCT and freeing device
In certain scenarios we may just want to clear the ITCT for a device, and not free other resources like the SATA bitmap using in v2 hw.
To facilitate this, this patch relocates the code of clearing ITCT from free_device() to a new hw interface clear_itct(). Then for some hw, we should not realise free_device() if there's nothing left to do for it.
[mkp: typo]
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
Revision tags: v4.13.16, v4.14, v4.13.5, v4.13 |
|
#
77570eed |
| 22-Aug-2017 |
Kees Cook <keescook@chromium.org> |
scsi: sas: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer()
scsi: sas: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer to hold the timer's target task, as there isn't a link back from slow_task.
Cc: John Garry <john.garry@huawei.com> Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Jack Wang <jinpu.wang@profitbricks.com> Cc: lindar_liu@usish.com Cc: Jens Axboe <axboe@fb.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Johannes Thumshirn <jthumshirn@suse.de> Cc: Benjamin Block <bblock@linux.vnet.ibm.com> Cc: Baoyou Xie <baoyou.xie@linaro.org> Cc: Wei Yongjun <weiyongjun1@huawei.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: John Garry <john.garry@huawei.com> # for hisi_sas part Tested-by: John Garry <john.garry@huawei.com> # basic sanity test for hisi_sas Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com>
show more ...
|
#
4a6125c5 |
| 24-Oct-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: add v3 hw port AXI error handling
Add support for servicing AXI errors handling. We do a host controller reset for such errors.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Si
scsi: hisi_sas: add v3 hw port AXI error handling
Add support for servicing AXI errors handling. We do a host controller reset for such errors.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
fa231408 |
| 24-Oct-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: add v3 hw support for AXI fatal error
Add support for processing AXI bus fatal errors.
If AXI bus fatal error happen, do controller reset to recover.
Signed-off-by: Xiaofei Tan <ta
scsi: hisi_sas: add v3 hw support for AXI fatal error
Add support for processing AXI bus fatal errors.
If AXI bus fatal error happen, do controller reset to recover.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
571295f8 |
| 24-Oct-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: complete all tasklets prior to host reset
The CQ event is handled in tasklet context, and it could be delayed if the system loading is high.
It is possible to run into some problems
scsi: hisi_sas: complete all tasklets prior to host reset
The CQ event is handled in tasklet context, and it could be delayed if the system loading is high.
It is possible to run into some problems when executing a host reset when cq_tasklet_vx_hw() is being executed.
So, prior to host reset, execute tasklet_kill() to ensure that 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 <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
13cd5ed6 |
| 24-Oct-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: fix a bug when free device for v3 hw
Use completion to wait on ITCT CLR interrupt finishing before processing other things when freeing a device.
This is safer than the pre-existing
scsi: hisi_sas: fix a bug when free device for v3 hw
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 <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
b4241f0f |
| 24-Oct-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: add hisi_hba.rst_work init for v3 hw
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: Xiaof
scsi: hisi_sas: add hisi_hba.rst_work init for v3 hw
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 <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
ffc8f149 |
| 24-Oct-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: add v3 hw DFX feature
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_rese
scsi: hisi_sas: add v3 hw DFX feature
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 <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
d40bfb0d |
| 24-Oct-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: init connect cfg register for v3 hw
Add initialization of register CON_CFG_DRIVER for v3 hw, to limit number of the times of setup connection.
Signed-off-by: Xiaofei Tan <tanxiaofei
scsi: hisi_sas: init connect cfg register for v3 hw
Add initialization of register CON_CFG_DRIVER for v3 hw, to limit number of the times of setup connection.
Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
0e3231fc |
| 24-Oct-2017 |
Xiaofei Tan <tanxiaofei@huawei.com> |
scsi: hisi_sas: check PHY state in get_wideport_bitmap_v3_hw()
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_N
scsi: hisi_sas: check PHY state in get_wideport_bitmap_v3_hw()
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 <tanxiaofei@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
1eb8eeac |
| 24-Oct-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: us start_phy in PHY_FUNC_LINK_RESET
When a PHY_FUNC_LINK_RESET is issued, we need to fill the transport identify_frame to SAS controller before the PHYs are enabled.
Without this, w
scsi: hisi_sas: us start_phy in PHY_FUNC_LINK_RESET
When a PHY_FUNC_LINK_RESET is issued, we need to fill the transport identify_frame to SAS controller before the PHYs are enabled.
Without this, we may find that if a PHY which belonged to a wideport before the reset may generate a new port id.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
3297ded1 |
| 24-Oct-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: fix SATA breakpoint memory size
Currently the size of memory we allocate for SATA breakpoint buffer is incorrect.
The breakpoint memory size should be as follows: 32 (NCQ tags) * 12
scsi: hisi_sas: fix SATA breakpoint memory size
Currently the size of memory we allocate for SATA breakpoint buffer is incorrect.
The breakpoint memory size should be as follows: 32 (NCQ tags) * 128 * 2048 (max #devs) = 8MB
Currently we only allocate 0.5MB, but get away with it as we never have SATA device index > 128 typically.
To conserve precious DMA memory (8MB may not be even available), limit the number of devices per HBA to 1024, which means 4MB of memory required for SATA breakpoint.
The 1024 device limit applied to all HW versions. For v3 hw, we need to configure this value.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
9feaf909 |
| 24-Oct-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: grab hisi_hba.lock when processing slots
When adding/removing slots from device list, we need to lock this operation with hisi_hba lock for safety.
This patch adds missing instances
scsi: hisi_sas: grab hisi_hba.lock when processing slots
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 <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
8ae6725d |
| 24-Oct-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: delete get_ncq_tag_v3_hw()
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:
scsi: hisi_sas: delete get_ncq_tag_v3_hw()
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 <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
30b67de3 |
| 10-Aug-2017 |
John Garry <john.garry@huawei.com> |
scsi: hisi_sas: remove driver versioning
The driver version is not updated with changes to the driver, so it has no value, so just get rid of it.
Signed-off-by: John Garry <john.garry@huawei.com> S
scsi: hisi_sas: remove driver versioning
The driver version is not updated with changes to the driver, so it has no value, so just get rid of it.
Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
76aae5f6 |
| 10-Aug-2017 |
John Garry <john.garry@huawei.com> |
scsi: hisi_sas: replace kfree with scsi_host_put
Instances of kfree(shost) should be replaced with scsi_host_put().
In addition, a missing scsi_host_put() is added for error path in hisi_sas_shost_
scsi: hisi_sas: replace kfree with scsi_host_put
Instances of kfree(shost) should be replaced with scsi_host_put().
In addition, a missing scsi_host_put() is added for error path in hisi_sas_shost_alloc_pci() and v3 driver removal.
Signed-off-by: Pan Bian <bianpan2016@163.com> # For main.c changes Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
5aec704f |
| 10-Aug-2017 |
John Garry <john.garry@huawei.com> |
scsi: hisi_sas: remove phy_down_v3_hw() res variable
Variable res only holds value 0, so remove it.
This cleans up a coccicheck warning.
Signed-off-by: John Garry <john.garry@huawei.com> Signed-of
scsi: hisi_sas: remove phy_down_v3_hw() res variable
Variable res only holds value 0, so remove it.
This cleans up a coccicheck warning.
Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
2400620c |
| 10-Aug-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: add phy_set_linkrate_v3_hw()
Add function to set linkrate for v3 hw.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-o
scsi: hisi_sas: add phy_set_linkrate_v3_hw()
Add function to set linkrate for v3 hw.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
056e4cc6 |
| 10-Aug-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: update some v3 register init settings
This patch updates some register setting according to recommendation from HW designer and experiment.
Signed-off-by: Xiang Chen <chenxiang66@hi
scsi: hisi_sas: update some v3 register init settings
This patch updates some register setting according to recommendation from HW designer and experiment.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|
#
a25d0d3d |
| 10-Aug-2017 |
Xiang Chen <chenxiang66@hisilicon.com> |
scsi: hisi_sas: add reset handler for v3 hw
Use ACPI "_RST" method to reset the controller, since FLR is not supported.
Function hisi_sas_stop_phys() is introduced to remove some code duplication.
scsi: hisi_sas: add reset handler for v3 hw
Use ACPI "_RST" method to reset the controller, since FLR is not supported.
Function hisi_sas_stop_phys() is introduced to remove some code duplication.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
show more ...
|