History log of /openbmc/linux/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c (Results 176 – 200 of 479)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# c63b88cc 11-Apr-2019 John Garry <john.garry@huawei.com>

scsi: hisi_sas: Fix for setting the PHY linkrate when disconnected

In commit efdcad62e7b8 ("scsi: hisi_sas: Set PHY linkrate when
disconnected"), we use the sas_phy_data.enable flag to track whether

scsi: hisi_sas: Fix for setting the PHY linkrate when disconnected

In commit efdcad62e7b8 ("scsi: hisi_sas: Set PHY linkrate when
disconnected"), we use the sas_phy_data.enable flag to track whether the
PHY was enabled or not, so that we know if we should set the PHY negotiated
linkrate at SAS_LINK_RATE_UNKNOWN or SAS_PHY_DISABLED.

However, it is not proper to use sas_phy_data.enable, since it is only set
when libsas attempts to set the PHY disabled/enabled; hence, it may not
even have an initial value.

As a solution to this problem, introduce hisi_sas_phy.enable to track
whether the PHY is enabled or not, so that we can set the negotiated
linkrate properly when the PHY comes down.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# a97fa586 11-Apr-2019 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: add host reset interface for test

Add host reset interface to make it easier for testing the host reset
feature.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by:

scsi: hisi_sas: add host reset interface for test

Add host reset interface to make it easier for testing the host reset
feature.

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


Revision tags: v5.0.7, v5.0.6, v5.0.5, v5.0.4, v5.0.3, v4.19.29, v5.0.2, v4.19.28, v5.0.1, v4.19.27, v5.0
# cf9efd5d 28-Feb-2019 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: Change SERDES_CFG init value to increase reliability of HiLink

With default value of register SERDES_CFG, the link is not stable for some
special disks when running IO. According to

scsi: hisi_sas: Change SERDES_CFG init value to increase reliability of HiLink

With default value of register SERDES_CFG, the link is not stable for some
special disks when running IO. According to HW guys' suggestion, need to
make the bit10~19 value of register SERDES_CFG the max value to increase
the reliability of the HiLink.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Reviewed-by: Yupeng Zhou <zhouyupeng1@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# aaeb8232 28-Feb-2019 Xiaofei Tan <tanxiaofei@huawei.com>

scsi: hisi_sas: print PHY RX errors count for later revision of v3 hw

The later revision of v3 hw has added an function of interrupt coalesce
according to time for PHY RX errors. We set the coalesce

scsi: hisi_sas: print PHY RX errors count for later revision of v3 hw

The later revision of v3 hw has added an function of interrupt coalesce
according to time for PHY RX errors. We set the coalesce time to 1s. Then
we print PHY RX errors count when PHY RX errors happen, and don't need to
worry that there may be too much log prints.

Besides, we use hisi_sas_phy.lock to protect error count value. Because we
update them by calling phy_get_events_v3_hw(), which is also used by core
driver (for get PHY events function).

We relocate phy_get_events_v3_hw() to avoid a further declaration.

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


# fba770c6 28-Feb-2019 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: Change return variable type in phy_up_v3_hw()

According to the tool fortify, phy_up_v3_hw() returns signed value, while
it should return an unsigned value.

So change variable "res"

scsi: hisi_sas: Change return variable type in phy_up_v3_hw()

According to the tool fortify, phy_up_v3_hw() returns signed value, while
it should return an unsigned value.

So change variable "res" from int to irq_return_t.

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


Revision tags: v4.19.26, v4.19.25, v4.19.24
# d9a00459 18-Feb-2019 Hannes Reinecke <hare@suse.de>

scsi: hisi_sas: fix calls to dma_set_mask_and_coherent()

The change to use dma_set_mask_and_coherent() incorrectly made a second
call with the 32 bit DMA mask value when the call with the 64 bit DMA

scsi: hisi_sas: fix calls to dma_set_mask_and_coherent()

The change to use dma_set_mask_and_coherent() incorrectly made a second
call with the 32 bit DMA mask value when the call with the 64 bit DMA
mask value succeeded.

[mkp: fixed commit message]

Fixes: e4db40e7a1a2 ("scsi: hisi_sas: use dma_set_mask_and_coherent")
Cc: <stable@vger.kernel.org>
Suggested-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


Revision tags: v4.19.23, v4.19.22, v4.19.21, v4.19.20
# 4a8bec88 06-Feb-2019 John Garry <john.garry@huawei.com>

scsi: hisi_sas: Do some more tidy-up

Do some very minor tidy-up, for things like needlessly initing variable and
not leaving whitespace before quote endings.

Originally-from: Xiang Chen <chenxiang6

scsi: hisi_sas: Do some more tidy-up

Do some very minor tidy-up, for things like needlessly initing variable and
not leaving whitespace before quote endings.

Originally-from: Xiang Chen <chenxiang66@hisilicon.com>
Originally-from: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# 4fefe5bb 06-Feb-2019 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: Use pci_irq_get_affinity() for v3 hw as experimental

For auto-control irq affinity mode, choose the dq to deliver IO according
to the current CPU.

Then it decreases the performance

scsi: hisi_sas: Use pci_irq_get_affinity() for v3 hw as experimental

For auto-control irq affinity mode, choose the dq to deliver IO according
to the current CPU.

Then it decreases the performance regression that fio and CQ interrupts are
processed on different node.

For user control irq affinity mode, keep it as before.

To realize it, also need to distinguish the usage of dq lock and sas_dev
lock.

We mark as experimental due to ongoing discussion on managed MSI IRQ
during hotplug:
https://marc.info/?l=linux-scsi&m=154876335707751&w=2

We're almost at the point where we can expose multiple queues to the upper
layer for SCSI MQ, but we need to sort out the per-HBA tags performance
issue.

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


# 795f25a3 06-Feb-2019 John Garry <john.garry@huawei.com>

scsi: hisi_sas: Issue internal abort on all relevant queues

To support queue mapped to a CPU, it needs to be ensured that issuing an
internal abort is safe, in that it is guaranteed that an internal

scsi: hisi_sas: Issue internal abort on all relevant queues

To support queue mapped to a CPU, it needs to be ensured that issuing an
internal abort is safe, in that it is guaranteed that an internal abort is
processed for a single IO or a device after all the relevant command(s)
which it is attempting to abort have been processed by the controller.

Currently we only deliver commands for any device on a single queue to
solve this problem, as we know that commands issued on the same queue will
be processed in order, and we will not have a scenario where the internal
abort is racing against a command(s) which it is trying to abort.

To enqueue commands on queue mapped to a CPU, choosing a queue for an
command is based on the associated queue for the current CPU, so this is
not safe for internal abort since it would definitely not be guaranteed
that commands for the command devices are issued on the same queue.

To solve this issue, we take a bludgeoning approach, and issue a separate
internal abort on any queue(s) relevant to the command or device, in that
we will be guaranteed that at least one of these internal aborts will be
received last in the controller.

So, for aborting a single command, we can just force the internal abort to
be issued on the same queue as the command which we are trying to abort.

For aborting all commands associated with a device, we issue a separate
internal abort on all relevant queues. Issuing multiple internal aborts in
this fashion would have not side affect.

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# b3cce125 06-Feb-2019 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: Add support for DIX feature for v3 hw

This patch adds support for DIX to v3 hw driver.

For this, we build upon support for DIF, most significantly is adding new
DMA map and unmap pa

scsi: hisi_sas: Add support for DIX feature for v3 hw

This patch adds support for DIX to v3 hw driver.

For this, we build upon support for DIF, most significantly is adding new
DMA map and unmap paths.

Some pre-existing macro precedence issues are also tidied. They were
detected by checkpatch --strict.

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


Revision tags: v4.19.19, v4.19.18
# e1ba0b0b 25-Jan-2019 John Garry <john.garry@huawei.com>

scsi: hisi_sas: Fix to only call scsi_get_prot_op() for non-NULL scsi_cmnd

A NULL-pointer dereference was introduced for TMF SSP commands from the
upstreaming reworking.

Fix this by relocating the

scsi: hisi_sas: Fix to only call scsi_get_prot_op() for non-NULL scsi_cmnd

A NULL-pointer dereference was introduced for TMF SSP commands from the
upstreaming reworking.

Fix this by relocating the scsi_get_prot_op() callsite.

Fixes: d6a9000b81be ("scsi: hisi_sas: Add support for DIF feature for v2 hw")
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# b6c9b15e 25-Jan-2019 Xiaofei Tan <tanxiaofei@huawei.com>

scsi: hisi_sas: Fix losing directly attached disk when hot-plug

Hot-plugging SAS wire of direct hard disk backplane may cause disk lost. We
have done this test with several types of SATA disk from d

scsi: hisi_sas: Fix losing directly attached disk when hot-plug

Hot-plugging SAS wire of direct hard disk backplane may cause disk lost. We
have done this test with several types of SATA disk from different venders,
and only two models from Seagate has this problem, ST4000NM0035-1V4107 and
ST3000VM002-1ET166.

The root cause is that the disk doesn't send D2H frame after OOB finished.
SAS controller will issue phyup interrupt only when D2H frame is received,
otherwise, will be waiting there all the time.

When this issue happen, we can find the disk again with link reset. To fix
this issue, we setup an timer after OOB finished. If the PHY is not up in
20s, do link reset. Notes: the 20s is an experience value.

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


# ae68b566 25-Jan-2019 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: Remove unused parameter of function hisi_sas_alloc()

In function hisi_sas_alloc(), parameter shost is not used, so remove it.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
S

scsi: hisi_sas: Remove unused parameter of function hisi_sas_alloc()

In function hisi_sas_alloc(), parameter shost is not used, so remove it.

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


# 5c31b0c6 25-Jan-2019 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: shutdown axi bus to avoid exception CQ returned

When injecting 2 bit ECC error, it will cause fatal AXI interrupts. Before
the recovery of SAS controller reset, the internal of SAS c

scsi: hisi_sas: shutdown axi bus to avoid exception CQ returned

When injecting 2 bit ECC error, it will cause fatal AXI interrupts. Before
the recovery of SAS controller reset, the internal of SAS controller is in
error. If CQ interrupts return at the time, actually it is exception CQ
interrupt, and it may cause resource release in disorder.

To avoid the exception situation, shutdown AXI bus after fatal AXI
interrupt. In SAS controller reset, it will restart AXI bus. For later
version of v3 hw, hardware will shutdown AXI bus for this situation, so
just fix current ver of 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 ...


# 569eddcf 25-Jan-2019 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: send primitive NOTIFY to SSP situation only

Send primitive NOTIFY to SSP situation only, or it causes underflow issue
when sending IO. Also rename hisi_sas_hw.sl_notify() to hisi_sas

scsi: hisi_sas: send primitive NOTIFY to SSP situation only

Send primitive NOTIFY to SSP situation only, or it causes underflow issue
when sending IO. Also rename hisi_sas_hw.sl_notify() to hisi_sas_hw.
sl_notify_ssp().

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


Revision tags: v4.19.17, v4.19.16, v4.19.15
# 7bb25a89 10-Jan-2019 John Garry <john.garry@huawei.com>

scsi: hisi_sas: Set protection parameters prior to adding SCSI host

Currently we set the protection parameters after calling scsi_add_host()
for v3 hw.

They should be set beforehand, so make this c

scsi: hisi_sas: Set protection parameters prior to adding SCSI host

Currently we set the protection parameters after calling scsi_add_host()
for v3 hw.

They should be set beforehand, so make this change.

Appearantly this fixes our DIX issue (not mainline yet) also, but more
testing required.

Fixes: d6a9000b81be ("scsi: hisi_sas: Add support for DIF feature for v2 hw")
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


Revision tags: v4.19.14, v4.19.13, v4.19.12, v4.19.11
# 61a6ebf3 19-Dec-2018 Luo Jiaxing <luojiaxing@huawei.com>

scsi: hisi_sas: Add debugfs for port registers

This patch create debugfs file for port register and add file operations.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry

scsi: hisi_sas: Add debugfs for port registers

This patch create debugfs file for port register and add file operations.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# caefac19 19-Dec-2018 Luo Jiaxing <luojiaxing@huawei.com>

scsi: hisi_sas: Debugfs global register create file and add file operations

This patch create debugfs file for global register and add file
operations.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei

scsi: hisi_sas: Debugfs global register create file and add file operations

This patch create debugfs file for global register and add file
operations.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# 49159a5e 19-Dec-2018 Luo Jiaxing <luojiaxing@huawei.com>

scsi: hisi_sas: Take debugfs snapshot for all regs

This patch takes snapshot for global regs, port regs, CQ, DQ, IOST, ITCT.

Add code for snapshot trig and generate dump directory.

Signed-off-by:

scsi: hisi_sas: Take debugfs snapshot for all regs

This patch takes snapshot for global regs, port regs, CQ, DQ, IOST, ITCT.

Add code for snapshot trig and generate dump directory.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# eb1c2b72 19-Dec-2018 Luo Jiaxing <luojiaxing@huawei.com>

scsi: hisi_sas: Alloc debugfs snapshot buffer memory for all registers

This patch allocates snapshot memory for global reg, port regs, CQ, DQ,
IOST, ITCT.

When we fail to allocate memory for some r

scsi: hisi_sas: Alloc debugfs snapshot buffer memory for all registers

This patch allocates snapshot memory for global reg, port regs, CQ, DQ,
IOST, ITCT.

When we fail to allocate memory for some registers, we free the memory
and set hisi_sas_debugfs_enable as 0 to stop loading debugfs from running.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# ef63464b 19-Dec-2018 Luo Jiaxing <luojiaxing@huawei.com>

scsi: hisi_sas: Create root and device debugfs directories

This patch creates root directory at hisi_sas_init() and generates device
directory when we probe device driver.

And we remove the root di

scsi: hisi_sas: Create root and device debugfs directories

This patch creates root directory at hisi_sas_init() and generates device
directory when we probe device driver.

And we remove the root directory at hisi_sas_exit(), but recursively
delete device directory when we remove device driver.

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


# d6a9000b 17-Dec-2018 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: Add support for DIF feature for v2 hw

For v3 hw, we support DIF operation for SAS, but not SATA.

In addition, DIF CRC16 is supported.

This patchset adds the SW support for the desc

scsi: hisi_sas: Add support for DIF feature for v2 hw

For v3 hw, we support DIF operation for SAS, but not SATA.

In addition, DIF CRC16 is supported.

This patchset adds the SW support for the described features. The main
components are as follows:

- Get protection mask from module param
- Fill PI fields
- Fill related to DIF in DQ and protection iu memories

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


Revision tags: v4.19.10
# 2a3d4eb8 13-Dec-2018 Christoph Hellwig <hch@lst.de>

scsi: flip the default on use_clustering

Most SCSI drivers want to enable "clustering", that is merging of
segments so that they might span more than a single page. Remove the
ENABLE_CLUSTERING def

scsi: flip the default on use_clustering

Most SCSI drivers want to enable "clustering", that is merging of
segments so that they might span more than a single page. Remove the
ENABLE_CLUSTERING define, and require drivers to explicitly set
DISABLE_CLUSTERING to disable this feature.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


Revision tags: v4.19.9, v4.19.8
# 6db831f4 06-Dec-2018 Xiang Chen <chenxiang66@hisilicon.com>

scsi: hisi_sas: Make sg_tablesize consistent value

Sht->sg_tablesize is set in the driver, and it will be assigned to
shost->sg_tablesize in SCSI mid-layer. So it is not necessary to assign
shost->s

scsi: hisi_sas: Make sg_tablesize consistent value

Sht->sg_tablesize is set in the driver, and it will be assigned to
shost->sg_tablesize in SCSI mid-layer. So it is not necessary to assign
shost->sg_table one more time in the driver.

In addition to the change, change each scsi_host_template.sg_tablesize
to HISI_SAS_SGE_PAGE_CNT instead of SG_ALL.

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


# 735bcc77 06-Dec-2018 John Garry <john.garry@huawei.com>

scsi: hisi_sas: Fix warnings detected by sparse

This patchset fixes some warnings detected by the sparse tool, like these:
drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52: warning: incorrect type in a

scsi: hisi_sas: Fix warnings detected by sparse

This patchset fixes some warnings detected by the sparse tool, like these:
drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52: warning: incorrect type in assignment (different base types)
drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52: expected unsigned short [unsigned] [assigned] [usertype] tag_of_task_to_be_managed
drivers/scsi/hisi_sas/hisi_sas_main.c:1469:52: got restricted __le16 [usertype] <noident>
drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52: warning: incorrect type in assignment (different base types)
drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52: expected unsigned short [unsigned] [assigned] [usertype] tag_of_task_to_be_managed
drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52: got restricted __le16 [usertype] <noident>

Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

show more ...


12345678910>>...20