Re: [PATCH 0/7] SCSI: cleanup debugfs usage

2019-01-23 Thread John Garry
On 22/01/2019 15:08, Greg Kroah-Hartman wrote: When calling debugfs code, there is no need to ever check the return value of the call, as no logic should ever change if a call works properly or not. Fix up a bunch of x86-specific code to not care about the results of debugfs. Greg Kroah-Hartman

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-16 Thread John Garry
On 16/01/2019 02:54, Martin K. Petersen wrote: Hi John, Hi Martin, So in this case I think that accessor functions are actually better because they allow us to print a big fat warning when you twiddle something you shouldn't post-initialization. So that's something I think we could--and sho

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-14 Thread John Garry
On 12/01/2019 02:34, Martin K. Petersen wrote: John, So how about just drop these APIs and let the user set the shost protection parameters directly, like other shost parameters, The protection interfaces here obviously predate the block layer allocation changes that made this particular iss

[PATCH] scsi: hisi_sas: Set protection parameters prior to adding SCSI host

2019-01-10 Thread John Garry
e for v2 hw") Signed-off-by: John Garry diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index b780b52..18d1f2cb 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -2675,6 +2675,12 @@ s

Re: [PATCH] scsi: isci: initialize shost fully before calling scsi_add_host()

2019-01-10 Thread John Garry
On 09/01/2019 18:41, Christoph Hellwig wrote: This looks good. I wonder if there is any good way to prevent other drivers from picking up this bug byt using a better interface, but that should not delay your fix. . I noticed that hisi_sas has this same problem but I forgot to fix it. So how

[PATCH] scsi: hisi_sas: Use scsi lld debugfs folder

2019-01-09 Thread John Garry
Since we now have a dedicated folder for scsi llds in the debugfs tree, relocate the root of the driver debugfs folder to that same location. Signed-off-by: John Garry --- This patch depends on https://www.spinics.net/lists/linux-scsi/msg126764.html diff --git a/drivers/scsi/hisi_sas/hisi_sas.h

Re: [PATCH v5] scsi: add debugfs directories

2019-01-09 Thread John Garry
On 09/01/2019 09:17, John Garry wrote: On 08/01/2019 04:00, Douglas Gilbert wrote: Add a top level "scsi" directory in debugfs (usually at /sys/kernel/debug/scsi) with two subdirectories: "uld" and "lld". The idea is to place mid-level related 'knobs' i

Re: [PATCH v5] scsi: add debugfs directories

2019-01-09 Thread John Garry
i_debugfs_uld and scsi_debugfs_lld in include/scsi/scsi_dbg.h . So ULDs and LLDs now need to include to use this facility - clean-up whitespaces and redundant code [John Garry] Changes since v3: - re-arrange as per scsi netlink interface [James Bottomley] - make all debugfs code condi

[PATCH v2] scsi: sd: Make protection lookup tables static and relocate functions

2019-01-08 Thread John Garry
same c file. The inline specifier is dropped also, since gcc should be able to make the decision to inline. Signed-off-by: John Garry --- Differences v1->v2: - relocate functions to sd.c and drop inline specifier diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 3bb2b33..e7dcc02 100

Re: [PATCH] scsi: sd: Make protection lookup tables static

2019-01-07 Thread John Garry
On 07/01/2019 16:57, Bart Van Assche wrote: On Mon, 2019-01-07 at 22:41 +0800, John Garry wrote: Currently the protection lookup tables in sd_prot_flag_mask() and sd_prot_op() are declared non-static. As such, they will be rebuilt for each respective function call. Optimise by making them

Re: [PATCH v4] scsi: add debugfs directories

2019-01-07 Thread John Garry
on CONFIG_BLK_DEBUG_FS Changes since v2: - export symbols so other driver can use them [John Garry] - make prior code conditional on CONFIG_BLK_DEBUG_FS Changes since v1: - tweak Makefile to keep kbuild test robot happier Signed-off-by: Douglas Gilbert --- My intention is to add a /sys/kerne

[PATCH] scsi: sd: Make protection lookup tables static

2019-01-07 Thread John Garry
filename 254031024 16 26443674b drivers/scsi/sd.o After: text data bss dec hex filename 252991024 16 2633966e3 drivers/scsi/sd.o Signed-off-by: John Garry diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 1d63f3a..89e6d42 100644 --- a/drivers

Re: [PATCH] scsi/mvsas/mv_init.c: Use dma_zalloc_coherent

2019-01-07 Thread John Garry
On 04/01/2019 19:49, Souptick Joarder wrote: On Fri, Jan 4, 2019 at 9:34 PM John Garry wrote: On 04/01/2019 15:11, Sabyasachi Gupta wrote: On Fri, Jan 4, 2019 at 6:43 PM John Garry wrote: On 04/01/2019 12:48, Sabyasachi Gupta wrote: On Wed, Dec 19, 2018 at 6:49 PM Sabyasachi Gupta wrote

Re: [PATCH v3] scsi: add debugfs directories

2019-01-04 Thread John Garry
l related 'knobs' in the "scsi" directory, and for the ULDs to make subsirectories like "scsi/uld/sd" and "scsi/uld/st" as required. LLDs could follow a similar pattern. Changes since v2: - export symbols so other driver can use them [John Garry] - make prio

Re: [PATCH] scsi/mvsas/mv_init.c: Use dma_zalloc_coherent

2019-01-04 Thread John Garry
On 04/01/2019 15:11, Sabyasachi Gupta wrote: On Fri, Jan 4, 2019 at 6:43 PM John Garry wrote: On 04/01/2019 12:48, Sabyasachi Gupta wrote: On Wed, Dec 19, 2018 at 6:49 PM Sabyasachi Gupta wrote: On Sat, Dec 1, 2018 at 6:40 PM Sabyasachi Gupta wrote: On Wed, Nov 21, 2018 at 7:18 PM

[PATCH 0/3] libsas: SATA PHY connection rate matching during disovery

2019-01-04 Thread John Garry
the latter is much more complicated, and will be done as follow-up to this series. A minor tidy-up to libsas.h is also included. John Garry (3): scsi: libsas: Fix some indentation in libsas.h scsi: libsas: Check SMP PHY control function result scsi: libsas: Support SATA PHY connection rate

[PATCH 2/3] scsi: libsas: Check SMP PHY control function result

2019-01-04 Thread John Garry
ensure the function result is accepted, so add a check for this. Tested-by: Jian Luo Signed-off-by: John Garry --- drivers/scsi/libsas/sas_expander.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas

[PATCH 3/3] scsi: libsas: Support SATA PHY connection rate unmatch fixing during discovery

2019-01-04 Thread John Garry
leave alone for now. Tested-by: Jian Luo Signed-off-by: John Garry --- drivers/scsi/libsas/sas_expander.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index 8817b8e..83e3715 100644 --- a/drivers/

[PATCH 1/3] scsi: libsas: Fix some indentation in libsas.h

2019-01-04 Thread John Garry
ier names). All libsas code can be audited for checkpatch issues later. Signed-off-by: John Garry --- include/scsi/libsas.h | 56 +-- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h in

Re: [PATCH] scsi/mvsas/mv_init.c: Use dma_zalloc_coherent

2019-01-04 Thread John Garry
On 04/01/2019 12:48, Sabyasachi Gupta wrote: On Wed, Dec 19, 2018 at 6:49 PM Sabyasachi Gupta wrote: On Sat, Dec 1, 2018 at 6:40 PM Sabyasachi Gupta wrote: On Wed, Nov 21, 2018 at 7:18 PM Sabyasachi Gupta wrote: Replace dma_alloc_coherent + memset with dma_zalloc_coherent If you're go

Re: [PATCH v2] scsi: add debugfs directories

2019-01-04 Thread John Garry
On 01/01/2019 17:43, Douglas Gilbert wrote: Add a top level "scsi" directory in debugfs (usually at /sys/kernel/debugfs/scsi) with two subdirectories: "uld" and "lld". The idea is to place mid-level related 'knobs' in the "scsi" directory, and for the ULDs to make subsirectories like "scsi/uld/sd

[PATCH 0/8] hisi_sas: debugfs support

2018-12-19 Thread John Garry
This patchset adds debugfs support for capturing driver state for particular times when the HW has malfunctioned (and we must reset the HW). Every controller HW version has had bugs. These bugs have been very painful to debug. One useful tool to debug these is being able to capture and export HW r

[PATCH 5/8] scsi: hisi_sas: Add debugfs for port registers

2018-12-19 Thread John Garry
From: Luo Jiaxing This patch create debugfs file for port register and add file operations. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 43 ++ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 55

[PATCH 3/8] scsi: hisi_sas: Take debugfs snapshot for all regs

2018-12-19 Thread John Garry
From: Luo Jiaxing This patch take snapshot for global regs, port regs, CQ, DQ, IOST, ITCT. Then, Add code for snapshot trig and generate dump directory. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 15 +++- drivers/scsi/hisi_sas

[PATCH 2/8] scsi: hisi_sas: Alloc debugfs snapshot buffer memory for all registers

2018-12-19 Thread John Garry
: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 15 +++ drivers/scsi/hisi_sas/hisi_sas_main.c | 76 ++ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 8 3 files changed, 99 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi

[PATCH 8/8] scsi: hisi_sas: Add debugfs IOST file and add file operations

2018-12-19 Thread John Garry
From: Luo Jiaxing This patch create debugfs file for IOST and add file operations. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/drivers/scsi/hisi_sas

[PATCH 4/8] scsi: hisi_sas: Debugfs global register create file and add file operations

2018-12-19 Thread John Garry
From: Luo Jiaxing This patch create debugfs file for global register and add file operations. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 8 drivers/scsi/hisi_sas/hisi_sas_main.c | 64 +++ drivers/scsi

[PATCH 1/8] scsi: hisi_sas: Create root and device debugfs directories

2018-12-19 Thread John Garry
: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 9 + drivers/scsi/hisi_sas/hisi_sas_main.c | 27 +++ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 5 + 3 files changed, 41 insertions(+) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi

[PATCH 7/8] scsi: hisi_sas: Add debugfs DQ file and add file operations

2018-12-19 Thread John Garry
From: Luo Jiaxing This patch create debugfs file for DQ and add file operations Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 52 +++ 1 file changed, 52 insertions(+) diff --git a/drivers/scsi/hisi_sas

[PATCH 6/8] scsi: hisi_sas: Add debugfs CQ file and add file operations

2018-12-19 Thread John Garry
From: Luo Jiaxing This patch create debugfs file for CQ and add file operations. Signed-off-by: Luo Jiaxing Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 70 +++ 1 file changed, 70 insertions(+) diff --git a/drivers/scsi/hisi_sas

Re: [PATCH v5 1/2] scsi: hisi_sas: Add support for DIF feature for v2 hw

2018-12-19 Thread John Garry
On 19/12/2018 04:35, Martin K. Petersen wrote: John, From: Xiang Chen 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

Re: [PATCH v4 4/5] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-17 Thread John Garry
On 13/12/2018 13:35, John Garry wrote: to set your controller flags. +if (prot_op == SCSI_PROT_WRITE_INSERT) { +unsigned int interval = scsi_prot_interval(scsi_cmnd); +unsigned int ilog2_interval = ilog2(interval); + +len = (task->total_xfer_

[PATCH v5 0/2] hisi_sas: DIF support

2018-12-17 Thread John Garry
This patchset introduces support to the driver for DIF/DIX. We are making DIX support as RFC for now, based on issues discussed in the following: https://marc.info/?l=linux-scsi&m=154357719329297&w=4 and https://marc.info/?l=linux-scsi&m=154406987703456&w=2 We will only support PI in v3 hw at the

[RFC PATCH v5 2/2] scsi: hisi_sas: Add support for DIX feature for v3 hw as experimental

2018-12-17 Thread John Garry
support itself, we build upon support for DIF, most significantly is adding new DMA map and unmap paths. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 22 +++- drivers/scsi/hisi_sas/hisi_sas_main.c | 97 ++ driv

[PATCH v5 1/2] scsi: hisi_sas: Add support for DIF feature for v2 hw

2018-12-17 Thread John Garry
DQ and protection iu memories Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 8 ++ drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 132 - 2 files changed, 137 insertions(+), 3 deletions(-) diff --git a/drivers/scsi

Re: Question on t10_pi_ref_tag()

2018-12-14 Thread John Garry
On 14/12/2018 12:43, Martin K. Petersen wrote: John, What would we be missing that this is unset? 60a89a3ce0cc scsi: t10-pi: Return correct ref tag when queue has no integrity profile Hi Martin, D'oh, we actually reported the issue related to this patch. But it's not in your 4.21 queue

Question on t10_pi_ref_tag()

2018-12-14 Thread John Garry
Hi, I have a question on this function in the $subject. In https://marc.info/?l=linux-kernel&m=154466776014573&w=2, Martin recommended using this function. However, for our driver, we find it returns 0 always, as rq->q->integrity.interval_exp = 0. Our host is advertised DIF capable only. I

Re: [PATCH v4 4/5] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-13 Thread John Garry
On 13/12/2018 02:20, Martin K. Petersen wrote: John, Hi Martin, +static void fill_prot_v3_hw(struct scsi_cmnd *scsi_cmnd, + struct hisi_sas_protect_iu_v3_hw *prot) +{ + u8 prot_type = scsi_get_prot_type(scsi_cmnd); + u8 prot_op = scsi_get_prot_op(scsi_

Re: [PATCH v4 2/5] scsi: hisi_sas: Relocate some code to reduce complexity

2018-12-07 Thread John Garry
On 06/12/2018 16:20, Johannes Thumshirn wrote: On 06/12/2018 16:37, John Garry wrote: which is important. Let me know if you disagree and I can change it. Sure, it's your driver. It was just because the patch is even titled "Relocate some code to reduce complexity", so I thou

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-12-06 Thread John Garry
On 06/12/2018 04:22, Martin K. Petersen wrote: Hi Martin, John, I'll have to go revisit the archives for your exact fio bits. Your fio test case ran to completion on all my test systems. But I successfully ran our DIX/T10 PI qualification tooling without any errors on the latest SCSI t

Re: [PATCH v4 2/5] scsi: hisi_sas: Relocate some code to reduce complexity

2018-12-06 Thread John Garry
On 06/12/2018 14:17, Johannes Thumshirn wrote: On 06/12/2018 14:34, John Garry wrote: [...] +static void hisi_sas_dma_unmap(struct hisi_hba *hisi_hba, + struct sas_task *task, int n_elem, + int n_elem_req, int n_elem_resp

[PATCH v4 3/5] scsi: hisi_sas: Make sg_tablesize consistent value

2018-12-06 Thread John Garry
lesize to HISI_SAS_SGE_PAGE_CNT instead of SG_ALL. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 1 - drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +-- 4 files changed, 3 i

[RFC PATCH v4 5/5] scsi: hisi_sas: Add support for DIX feature for v3 hw as experimental

2018-12-06 Thread John Garry
e of the issue, we cannot confirm. As for DIX support itself, we build upon support for DIF, most significantly is adding new DMA map and unmap paths. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 17 ++ drivers/scsi/hisi_sas/hisi_sas_main

[PATCH v4 2/5] scsi: hisi_sas: Relocate some code to reduce complexity

2018-12-06 Thread John Garry
From: Xiang Chen Relocate the codes related to dma_map/unmap in hisi_sas_task_prep() to reduce complexity, with a view to add DIF/DIX support. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 146 +- 1 file

[PATCH v4 1/5] scsi: hisi_sas: Fix warnings detected by sparse

2018-12-06 Thread John Garry
] [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52:got restricted __le16 [usertype] Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++-- drivers/scsi/hisi_sas

[PATCH v4 4/5] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-06 Thread John Garry
-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 + drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 122 - 2 files changed, 121 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas

[PATCH v4 0/5] hisi_sas: DIF support

2018-12-06 Thread John Garry
-add DIX support as RFC - do not commit please! - also DIX support is labelled experimental in the driver v2->v3: - fix sparse warnings - drop DIX support v1->v2: - drop scsi_prot_op_normal() John Garry (1): scsi: hisi_sas: Fix warnings detected by sparse Xiang Chen (4): scsi: hisi_s

Re: [PATCH] scsi: t10-pi: Return correct ref tag when queue has no integrity profile

2018-12-06 Thread John Garry
On 06/12/2018 04:17, Martin K. Petersen wrote: + Bart, Had you considered to use lower_32_bits() instead of "0x"? That would to avoid that reviewers have to count the 'f'-s to verify correctness of t10_pi_ref_tag(). I hadn't. I guess I tend to think of lower_32_bits() as something

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-12-05 Thread John Garry
On 05/12/2018 02:22, Martin K. Petersen wrote: Hi Martin, John, OK, great. Happy to help. So far we have hisi_sas fio issue to go on plus knowledge that this issue seems to be exposed/triggered by enabling SCSI MQ. I'll have to go revisit the archives for your exact fio bits. But I succ

Re: [PATCH v3 4/4] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-05 Thread John Garry
On 05/12/2018 02:14, Martin K. Petersen wrote: John, Hi Martin, Are you happy for us to make DIX support in this driver "hisi_sas DIX experimental" short term? That's entirely your call, it's your driver/controller. I just want the experimental tag to be due to reasons on *your* end.

Re: [PATCH v3 4/4] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-04 Thread John Garry
On 04/12/2018 04:12, Martin K. Petersen wrote: John, Hi Martin, Thanks for checking. +static int hisi_sas_dif_dma_map(struct hisi_hba *hisi_hba, + int *n_elem_dif, struct sas_task *task) +{ + struct device *dev = hisi_hba->dev; + struct sas_ssp_tas

[PATCH v3 3/4] scsi: hisi_sas: Make sg_tablesize consistent value

2018-12-03 Thread John Garry
lesize to HISI_SAS_SGE_PAGE_CNT instead of SG_ALL. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 1 - drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +-- 4 files changed, 3 i

[PATCH v3 4/4] scsi: hisi_sas: Add support for DIF feature for v3 hw

2018-12-03 Thread John Garry
protection iu memories DIX support seems to have some issue when enabled with SCSI MQ, so we'll omit support for now. This was discusse here: https://marc.info/?l=linux-scsi&m=154357719329297&w=2 Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.

[PATCH v3 1/4] scsi: hisi_sas: Fix warnings detected by sparse

2018-12-03 Thread John Garry
] [assigned] [usertype] tag_of_task_to_be_managed drivers/scsi/hisi_sas/hisi_sas_main.c:1723:52:got restricted __le16 [usertype] Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 2 +- drivers/scsi/hisi_sas/hisi_sas_main.c | 6 ++-- drivers/scsi/hisi_sas

[PATCH v3 2/4] scsi: hisi_sas: Relocate some code to reduce complexity

2018-12-03 Thread John Garry
From: Xiang Chen Relocate the codes related to dma_map/unmap in hisi_sas_task_prep() to reduce complexity, with a view to add DIF/DIX support. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 146 +- 1 file

[PATCH v3 0/3] hisi_sas: DIF support

2018-12-03 Thread John Garry
parse warnings - drop DIX support John Garry (1): scsi: hisi_sas: Fix warnings detected by sparse Xiang Chen (3): scsi: hisi_sas: Relocate some code to reduce complexity scsi: hisi_sas: Make sg_tablesize consistent value scsi: hisi_sas: Add support for DIF feature for v3 hw drivers

Re: DIF/DIX issue related to config CONFIG_SCSI_MQ_DEFAULT

2018-11-30 Thread John Garry
+ On 30/11/2018 01:19, Ming Lei wrote: On Wed, Nov 28, 2018 at 10:50:11AM +0800, chenxiang (M) wrote: Hi Lei Ming, 在 2018/11/27 21:08, Ming Lei 写道: On Tue, Nov 27, 2018 at 05:55:45PM +0800, chenxiang (M) wrote: Hi all, There is a issue which may be related to CONFIG_SCSI_MQ_DEFAULT: before

Re: [PATCH] scsi: libsas: Add missing license and update to SPDX license identifier

2018-11-29 Thread John Garry
On 29/11/2018 15:49, James Bottomley wrote: On Thu, 2018-11-29 at 11:52 +, John Garry wrote: [...] Hi Greg, I also note that currently we have an inconsistency in license of sas_init.c: /* * Serial Attached SCSI (SAS) Transport Layer initialization * * Copyright (C) 2005 Adaptec

Re: [PATCH] scsi: libsas: Add missing license and update to SPDX license identifier

2018-11-29 Thread John Garry
On 29/11/2018 12:13, Greg KH wrote: ... > > > > MODULE_AUTHOR("Luben Tuikov "); > > MODULE_DESCRIPTION("SAS Transport Layer"); > > MODULE_LICENSE("GPL v2"); > > > > So the license specifies v2+ but module license states v2. > > > > I could not find a docment for guidance on this. I also note that

Re: [PATCH] scsi: libsas: Add missing license and update to SPDX license identifier

2018-11-29 Thread John Garry
On 27/11/2018 15:23, John Garry wrote: On 27/11/2018 14:43, Greg KH wrote: Hi Greg, On Tue, Nov 27, 2018 at 10:15:32PM +0800, John Garry wrote: Currently sas_task.c has no license specifier, so add SPDX license identifier for GPL-2.0+. As mentioned in commit b24413180f56 ("License cl

Re: [PATCH] scsi: libsas: Add missing license and update to SPDX license identifier

2018-11-27 Thread John Garry
On 27/11/2018 14:43, Greg KH wrote: Hi Greg, On Tue, Nov 27, 2018 at 10:15:32PM +0800, John Garry wrote: Currently sas_task.c has no license specifier, so add SPDX license identifier for GPL-2.0+. As mentioned in commit b24413180f56 ("License cleanup: add SPDX GPL-2.0 license identifi

[PATCH] scsi: libsas: Add missing license and update to SPDX license identifier

2018-11-27 Thread John Garry
I'm at it, all other libsas source code files are updated to use SPDX license identifier for GPL-2.0+. Signed-off-by: John Garry diff --git a/drivers/scsi/libsas/Kconfig b/drivers/scsi/libsas/Kconfig index 13739bfa..bdc6bce 100644 --- a/drivers/scsi/libsas/Kconfig +++ b/drivers/scsi

Re: [PATCH 4/4] scsi: hisi_sas: Add support for DIF/DIX feature for v3 hw

2018-11-26 Thread John Garry
note to help improve the system] url: https://github.com/0day-ci/linux/commits/John-Garry/hisi_sas-DIF-DIX-support/20181123-202805 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next config: x86_64-allmodconfig (attached as .config) compiler: gcc-7 (Debian 7.3.0-1

[PATCH v2 1/3] scsi: hisi_sas: Relocate some code to reduce complexity

2018-11-21 Thread John Garry
From: Xiang Chen Relocate the codes related to dma_map/unmap in hisi_sas_task_prep() to reduce complexity, with a view to add DIF/DIX support. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 146 +- 1 file

[PATCH v2 0/3] hisi_sas: DIF/DIX support

2018-11-21 Thread John Garry
This patchset introduces support to the driver for DIF/DIX (or PI - protection information). We will only support PI in v3 hw at the moment, even though previous hw versions also support it. The series is broken down as follows: - Tidy sg table size config - Some tidy-up to accept PI support - Ad

[PATCH v2 2/3] scsi: hisi_sas: Make sg_tablesize consistent value

2018-11-21 Thread John Garry
lesize to HISI_SAS_SGE_PAGE_CNT instead of SG_ALL. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 1 - drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +-- 4 files changed, 3 i

[PATCH v2 3/3] scsi: hisi_sas: Add support for DIF/DIX feature for v3 hw

2018-11-21 Thread John Garry
protection iu memories Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 18 drivers/scsi/hisi_sas/hisi_sas_main.c | 99 ++--- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 189 - 3 files changed, 289

Re: [PATCH 3/4] scsi: hisi_sas: Make sg_tablesize consistent value

2018-11-21 Thread John Garry
On 21/11/2018 11:08, Steffen Maier wrote: On 11/21/2018 12:02 PM, Steffen Maier wrote: On 11/20/2018 03:59 PM, John Garry wrote: From: Xiang Chen 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

Re: [PATCH] scsi/lpfc/lpfc_sli.c: Use dma_zalloc_coherent

2018-11-20 Thread John Garry
On 20/11/2018 21:52, James Smart wrote: On 11/20/2018 1:40 AM, John Garry wrote: please ensure that you maintain alignment with opening brackets I don't think this is a requirement. From the rules I've read preference is tabs-only indentation. This is the only rule (enforcem

Re: [PATCH 1/4] scsi: Add scsi_prot_op_normal()

2018-11-20 Thread John Garry
On 20/11/2018 16:19, Christoph Hellwig wrote: +static inline bool scsi_prot_op_normal(struct scsi_cmnd *scmd) +{ + return scmd->prot_op == SCSI_PROT_NORMAL; +} This "wrapper" just obsfucates the check being performed, please drop it. . ok, if you think so. I just thought that was bet

[PATCH 4/4] scsi: hisi_sas: Add support for DIF/DIX feature for v3 hw

2018-11-20 Thread John Garry
protection iu memories Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 18 drivers/scsi/hisi_sas/hisi_sas_main.c | 99 ++--- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 189 - 3 files changed, 289

[PATCH 2/4] scsi: hisi_sas: Relocate some code to reduce complexity

2018-11-20 Thread John Garry
From: Xiang Chen Relocate the codes related to dma_map/unmap in hisi_sas_task_prep() to reduce complexity, with a view to add DIF/DIX support. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 146 +- 1 file

[PATCH 3/4] scsi: hisi_sas: Make sg_tablesize consistent value

2018-11-20 Thread John Garry
lesize to HISI_SAS_SGE_PAGE_CNT instead of SG_ALL. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_main.c | 1 - drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 +-- 4 files changed, 3 i

[PATCH 1/4] scsi: Add scsi_prot_op_normal()

2018-11-20 Thread John Garry
It is a common pattern to check if a Scsi command protection option is "normal", i.e. regular IO. Add a common simple wrapper for this. Signed-off-by: John Garry --- include/scsi/scsi_cmnd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/scsi/scsi_cmnd.h b/in

[PATCH 0/4] hisi_sas: DIF/DIX support

2018-11-20 Thread John Garry
- Some tidy-up to accept PI support - Add components for PI support for main and v3 driver John Garry (1): scsi: Add scsi_prot_op_normal() Xiang Chen (3): scsi: hisi_sas: Relocate some code to reduce complexity scsi: hisi_sas: Make sg_tablesize consistent value scsi: hisi_sas: Add support for

Re: [PATCH] scsi/lpfc/lpfc_sli.c: Use dma_zalloc_coherent

2018-11-20 Thread John Garry
On 18/11/2018 14:38, Sabyasachi Gupta wrote: Replaced dma_alloc_coherent + memset with dma_zalloc_coherent Signed-off-by: Sabyasachi Gupta --- drivers/scsi/lpfc/lpfc_sli.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpf

[PATCH v2 2/5] scsi: libsas: Use pr_fmt(fmt)

2018-11-15 Thread John Garry
In preparation for dropping the libsas printk wrappers, use pr_fmt(fmt) declaration to add the framework log prefix - "sas". Suggested-by: Joe Perches Signed-off-by: John Garry --- drivers/scsi/libsas/sas_ata.c | 2 +- drivers/scsi/libsas/sas_internal.h | 13 +++-- dr

[PATCH v2 3/5] scsi: libsas: Drop sas_printk()

2018-11-15 Thread John Garry
The printk wrapper sas_printk() adds little value now that libsas logs already have the "sas" prefix through pr_fmt(fmt), so just use pr_notice() directly. In addition, strings which span multiple lines are reunited. Originally-from: Joe Perches Signed-off-by: John Garry --- dr

[PATCH v2 4/5] scsi: libsas: Drop SAS_DPRINTK() and revise logs levels

2018-11-15 Thread John Garry
ges across multiple lines are also fixed. Finally, all other references to printk() [apart from special formatting in sas_ata.c] are removed and replaced with appropriate pr_xxx(). Suggested-by: Joe Perches Signed-off-by: John Garry --- drivers/scsi/libsas/Makefile| 2 + drivers/scsi/libsas

[PATCH v2 1/5] scsi: libsas: Delete sas_dump.{c, h}

2018-11-15 Thread John Garry
The code in these files is not longer referenced, so delete them. Signed-off-by: John Garry --- drivers/scsi/libsas/Makefile| 1 - drivers/scsi/libsas/sas_dump.c | 63 - drivers/scsi/libsas/sas_dump.h | 29 --- drivers/scsi/libsas

[PATCH v2 5/5] scsi: libsas: Remove pcidev reference

2018-11-15 Thread John Garry
Not all host drivers are PCI drivers - like hisi_sas, which supports a platform driver - so remove reference to "pcidev". Signed-off-by: John Garry --- drivers/scsi/libsas/sas_discover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/libsas/sas_dis

[PATCH v2 0/5] libsas: Some logging tidy-up

2018-11-15 Thread John Garry
re deleted. Differences v1->v2: - Reunited strings to a single line - fixed "sas: sas:" prefix in messages John Garry (5): scsi: libsas: Delete sas_dump.{c, h} scsi: libsas: Use pr_fmt(fmt) scsi: libsas: Drop sas_printk() scsi: libsas: Drop SAS_DPRINTK() and revise logs levels

Re: [PATCH 4/5] scsi: libsas: Drop SAS_DPRINTK() and revise logs levels

2018-11-14 Thread John Garry
On 14/11/2018 16:39, Joe Perches wrote: On Wed, 2018-11-14 at 15:12 +, John Garry wrote: On 14/11/2018 14:53, Joe Perches wrote: On Wed, 2018-11-14 at 21:47 +0800, John Garry wrote: Like sas_printk() did previously, SAS_DPRINTK() offers little value now that libsas logs already have the

Re: [PATCH 4/5] scsi: libsas: Drop SAS_DPRINTK() and revise logs levels

2018-11-14 Thread John Garry
On 14/11/2018 14:53, Joe Perches wrote: On Wed, 2018-11-14 at 21:47 +0800, John Garry wrote: Like sas_printk() did previously, SAS_DPRINTK() offers little value now that libsas logs already have the "sas" prefix through pr_fmt(fmt). So it can be dropped. However, after reviewing so

[PATCH 0/5] libsas: Some logging tidy-up

2018-11-14 Thread John Garry
re deleted. John Garry (5): scsi: libsas: Delete sas_dump.{c, h} scsi: libsas: Use pr_fmt(fmt) scsi: libsas: Drop sas_printk() scsi: libsas: Drop SAS_DPRINTK() and revise logs levels scsi: libsas: Remove pcidev reference drivers/scsi/libsas/Makefile| 3 +- drivers/scsi/libsas

[PATCH 5/5] scsi: libsas: Remove pcidev reference

2018-11-14 Thread John Garry
Not all host drivers are PCI drivers - like hisi_sas, which supports a platform driver - so remove reference to "pcidev". Signed-off-by: John Garry --- drivers/scsi/libsas/sas_discover.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/libsas/sas_dis

[PATCH 4/5] scsi: libsas: Drop SAS_DPRINTK() and revise logs levels

2018-11-14 Thread John Garry
ges across multiple lines are untouched. Finally, all other references to printk() are removed and replaced with appropriate pr_xxx(). Suggested-by: Joe Perches Signed-off-by: John Garry --- drivers/scsi/libsas/Makefile| 2 + drivers/scsi/libsas/sas_ata.c | 24 ++-- drivers/s

[PATCH 3/5] scsi: libsas: Drop sas_printk()

2018-11-14 Thread John Garry
The printk wrapper sas_printk() adds little value now that libsas logs already have the "sas" prefix through pr_fmt(fmt), so just use pr_notice() directly. Originally-from: Joe Perches Signed-off-by: John Garry --- drivers/scsi/libsas/sas_expander.c | 22 +++--- dr

[PATCH 1/5] scsi: libsas: Delete sas_dump.{c, h}

2018-11-14 Thread John Garry
The code in these files is not longer referenced, so delete them. Signed-off-by: John Garry --- drivers/scsi/libsas/Makefile| 1 - drivers/scsi/libsas/sas_dump.c | 63 - drivers/scsi/libsas/sas_dump.h | 29 --- drivers/scsi/libsas

[PATCH 2/5] scsi: libsas: Use pr_fmt(fmt)

2018-11-14 Thread John Garry
In preparation for dropping the libsas printk wrappers, use pr_fmt(fmt) declaration to add the framework log prefix - "sas". Suggested-by: Joe Perches Signed-off-by: John Garry --- drivers/scsi/libsas/sas_internal.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-)

Re: [PATCH] drivers/scsi/fnic/fnic_trace.c: Use vzalloc

2018-11-13 Thread John Garry
On 13/11/2018 15:08, Sabyasachi Gupta wrote: Replaced vmalloc + memset with vzalloc Signed-off-by: Sabyasachi Gupta --- drivers/scsi/fnic/fnic_trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/fnic/fnic_trace.c b/drivers/scsi/fnic/fnic_trace.c index 8

Re: [PATCH] scsi: libsas: Remove pcidev reference

2018-11-13 Thread John Garry
On 12/11/2018 19:52, Joe Perches wrote: On Mon, 2018-11-12 at 19:31 +, John Garry wrote: On 12/11/2018 18:58, Joe Perches wrote: +#define pr_fmt(fmt) "sas: " fmt Some other subsystem may try to include this header, and gets its message prefix overwritten. Just a consequence

Re: [PATCH] scsi: libsas: Remove pcidev reference

2018-11-12 Thread John Garry
On 12/11/2018 18:58, Joe Perches wrote: +#define pr_fmt(fmt) "sas: " fmt > > Some other subsystem may try to include this header, and gets its > message prefix overwritten. Just a consequence for doing something bad, > right? Right. And as this file is internal to drivers/scsi/libsas that seem

Re: [PATCH] scsi: libsas: Remove pcidev reference

2018-11-12 Thread John Garry
On 12/11/2018 18:30, Joe Perches wrote: On Mon, 2018-11-12 at 17:55 +, John Garry wrote: On 12/11/2018 17:49, John Garry wrote: On 12/11/2018 17:32, Joe Perches wrote: On Tue, 2018-11-13 at 01:28 +0800, John Garry wrote: Not all host drivers are PCI drivers - like hisi_sas, which

[PATCH v2] scsi: libsas: Remove pcidev reference

2018-11-12 Thread John Garry
Not all host drivers are PCI drivers - like hisi_sas, which supports a platform driver - so remove reference to "pcidev". In addition, we change the printk() call to pr_warn() which is an appropriate level for this message. Signed-off-by: John Garry --- Change in v1->v2: - chan

Re: [PATCH] scsi: libsas: Remove pcidev reference

2018-11-12 Thread John Garry
On 12/11/2018 17:49, John Garry wrote: On 12/11/2018 17:32, Joe Perches wrote: On Tue, 2018-11-13 at 01:28 +0800, John Garry wrote: Not all host drivers are PCI drivers - like hisi_sas, which supports a platform driver - so remove reference to "pcidev". The debug level is also dow

Re: [PATCH] scsi: libsas: Remove pcidev reference

2018-11-12 Thread John Garry
On 12/11/2018 17:32, Joe Perches wrote: On Tue, 2018-11-13 at 01:28 +0800, John Garry wrote: Not all host drivers are PCI drivers - like hisi_sas, which supports a platform driver - so remove reference to "pcidev". The debug level is also downgraded to KERN_ERR for the same message.

[PATCH] scsi: libsas: Remove pcidev reference

2018-11-12 Thread John Garry
Not all host drivers are PCI drivers - like hisi_sas, which supports a platform driver - so remove reference to "pcidev". The debug level is also downgraded to KERN_ERR for the same message. Signed-off-by: John Garry diff --git a/drivers/scsi/libsas/sas_discover.c b/drivers/s

Re: [PATCH v4 2/9] dmapool: remove checks for dev == NULL

2018-11-12 Thread John Garry
On 12/11/2018 15:42, Tony Battersby wrote: dmapool originally tried to support pools without a device because dma_alloc_coherent() supports allocations without a device. But nobody ended up using dma pools without a device, so the current checks in dmapool.c for pool->dev == NULL are both insuff

[PATCH 0/5] hisi_sas: Interrupt aggregation support

2018-11-09 Thread John Garry
This patchset adds 2 forms of interrupt aggregation support to the driver: - Interrupt converge: Interrupts from all completion queues can be reported through completion queue #0 interrupt only. - Interrupt coalesce: Ability to set timeout period at which we report

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