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

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

[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

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

[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

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

[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

[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

Re: [PATCH v9 06/15] mlx5: Replace PCI pool old API

2017-05-25 Thread Romain Perier
Hello, Le 23/05/2017 à 17:26, David Miller a écrit : > From: Romain Perier > Date: Tue, 23 May 2017 10:53:36 +0200 > >> Hello, >> >> >> Le 23/05/2017 à 09:27, Leon Romanovsky a écrit : >>> On Mon, May 22, 2017 at 06:48:58PM +0200, Romain Perier wrote: The PCI

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

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

[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

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

2017-05-25 Thread wangyijing
Hi John, thanks for your review and comments! 在 2017/5/25 17:04, 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

[PATCH v2 00/22] hisi_sas: hip08 support

2017-05-25 Thread John Garry
This patchset adds support for the HiSilicon SAS controller in the hip08 chipset. The key difference compared to earlier chipsets is that the controller is an integrated PCI endpoint in hip08. As such, the controller is a pci device (not a platform device, like v2 hw in hip07). The driver is

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

2017-05-25 Thread John Garry
Add the code to initialise the controller which is based on pci device in hisi_sas_v3_hw.c The core controller routines are still in hisi_sas_main.c; some common initialisation functions are also exported from hisi_sas_main.c For pci-based controller, the device properties, like phy count and

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

2017-05-25 Thread John Garry
From: Xiang Chen Currently hisi_hba.lock is locked to deliver and receive a command to/from any hw queue. This causes much contention at high data-rates. To boost performance, lock on a per queue basis for sending and receiving commands to/from hw. Certain critical

[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

[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

[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

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

2017-05-25 Thread John Garry
Since hip08 SAS controller is based on pci device, add hisi_hba.pci_dev for hip08 (will be v3), and also rename hisi_hba.pdev to .platform_dev for clarity. In addition, for common code which wants to reference the controller device struct, add hisi_hba.dev, and change the common code to use it.

[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

[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

[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

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

2017-05-25 Thread John Garry
Add skeleton driver for v3 hw in hisi_sas_v3_hw.c File hisi_sas_v3_hw.c will serve 2 purposes: - probing and initialisation of the controller based on pci device - hw layer for v3-based controllers The controller design is quite similar to v2 hw in hip07. However key differences include: -All

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

[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

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

2017-05-25 Thread kbuild test robot
Hi Xiang, [auto build test ERROR on mkp-scsi/for-next] [also build test ERROR on v4.12-rc2 next-20170525] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/John-Garry/hisi_sas-hip08-support

[PATCH 3/6] blk-mq: fix blk_mq_quiesce_queue

2017-05-25 Thread Ming Lei
blk_mq_quiesce_queue() can not block dispatch in the following two cases: - direct issue or BLK_MQ_S_START_ON_RUN - in theory, new RCU read-side critical sections may begin while synchronize_rcu() was waiting, and end after returning of synchronize_rcu(). so a new flag of QUEUE_FLAG_QUIESCED is

[PATCH 1/6] blk-mq: introduce blk_mq_unquiesce_queue

2017-05-25 Thread Ming Lei
Now we use blk_mq_start_stopped_hw_queues() implictely as pair of blk_mq_quiesce_queue(), now we introduce blk_mq_unquiesce_queue() explictely. Also this function is introduced for fixing current quiescing mechanism, which will be done in the following patches. Signed-off-by: Ming Lei

[PATCH 5/6] blk-mq: don't stop queue for quiescing

2017-05-25 Thread Ming Lei
Now we use the QUIESCED flag to drain & block dispatching, not necessary to stop queue any more. Also queue can be started by other blk-mq APIs, this limits uses of blk_mq_quiesce_queue(). Now blk_mq_quiesce_queue() can be used safely and users won't worry about queue restart during quiescing.

[PATCH 4/6] blk-mq: update comments on blk_mq_quiesce_queue()

2017-05-25 Thread Ming Lei
Actually what we want to get from blk_mq_quiesce_queue() isn't only to wait for completion of all ongooing .queue_rq(). In the typical context of canceling requests, we need to make sure that the following is done in the dispatch path before starting to cancel requests: - failed

[PATCH 6/6] blk-mq: clarify dispatching may not be drained/blocked by stopping queue

2017-05-25 Thread Ming Lei
BLK_MQ_S_STOPPED may be not observed in other concurrent I/O paths, we can't guarantee that dispatching won't happen after queue is stopped. So clarify the fact and avoid potential misuse. Signed-off-by: Ming Lei --- block/blk-mq.c | 10 ++ 1 file changed, 10

[PATCH 0/6] blk-mq: fix & improve queue quiescing

2017-05-25 Thread Ming Lei
Hi, There are some issues in current blk_mq_quiesce_queue(): - in case of direct issue or BLK_MQ_S_START_ON_RUN, dispatch won't can't be prevented after blk_mq_quiesce_queue() is returned. - in theory, new RCU read-side critical sections may begin while synchronize_rcu() was

[PATCH 2/6] blk-mq: use the introduced blk_mq_unquiesce_queue()

2017-05-25 Thread Ming Lei
blk_mq_unquiesce_queue() is used for unquiescing the queue. Signed-off-by: Ming Lei --- drivers/md/dm-rq.c | 2 +- drivers/nvme/host/core.c | 2 +- drivers/scsi/scsi_lib.c | 5 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-rq.c

[PATCH 6/6] blk-mq: clarify dispatching won't be blocked by stopping queue

2017-05-25 Thread Ming Lei
BLK_MQ_S_STOPPED may be not observed in other concurrent I/O paths, we can't guarantee that dispatching won't happen after queue is stopped. So clarify the fact and avoid potential misuse. Signed-off-by: Ming Lei --- block/blk-mq.c | 10 ++ 1 file changed, 10

[PATCH] iscsi-target: Fix initial login PDU asynchronous socket close OOPs

2017-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a OOPs originally introduced by: commit bb048357dad6d604520c91586334c9c230366a14 Author: Nicholas Bellinger Date: Thu Sep 5 14:54:04 2013 -0700 iscsi-target: Add sk->sk_state_change to cleanup

[PATCH] qla2xxx: Fix extraneous ref on sp's after adapter break

2017-05-25 Thread Bill Kuzeja
Hung task timeouts can result if a qlogic board breaks unexpectedly while running I/O. These tasks become hung because command srb reference counts are not going to zero, hence the affected srbs and commands do not get freed. This fix accounts for this extra reference in the srbs in the case of