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

2018-11-20 Thread John Garry
ent) I see: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20181120&id=d1fe9c099cecc6e49324355f1b15573e9dbbe0f9 Spacing (less than a tab), after tabs, for open brace alignment is allowed, thus is coder's choice. It seems that alignment was being impleme

Re: [PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-11-20 Thread Xiubo Li
On 2018/11/21 11:19, Mike Christie wrote: On 10/17/2018 02:54 AM, xiu...@redhat.com wrote: From: Xiubo Li [...] diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 9cd404a..00ed7bb 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/targ

Re: [PATCH v5] target: add emulate_pr backstore attr to toggle PR support

2018-11-20 Thread Mike Christie
On 11/07/2018 07:11 AM, David Disseldorp wrote: > The new emulate_pr backstore attribute allows for Persistent Reservation > and SCSI2 RESERVE/RELEASE support to be completely disabled. This can be > useful for scenarios such as: > - Ensuring ATS (Compare & Write) usage on recent VMware ESXi initia

Re: [PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-11-20 Thread Mike Christie
On 10/17/2018 02:54 AM, xiu...@redhat.com wrote: > From: Xiubo Li > > Currently there has one cmd timeout timer and one qfull timer for > each udev, and whenever there has any new coming cmd it will update > the cmd timer or qfull timer. And for some corner case the timers > are always working on

[PATCH] libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset

2018-11-20 Thread fred . herard
From: Fred Herard This commit addresses NULL pointer dereference in iscsi_eh_session_reset. Reference should not be made to session->leadconn when session->state is set to ISCSI_STATE_TERMINATE. Signed-off-by: Fred Herard Reviewed-by: Konrad Rzeszutek Wilk --- drivers/scsi/libiscsi.c | 4 ++--

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

2018-11-20 Thread James Smart
On 11/18/2018 6:38 AM, 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

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

2018-11-20 Thread James Smart
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.  Spacing (less than a tab), after tabs, for open brace alignment is allowed, thus is c

Re: [PATCH 7/8] qedi: Move LL2 producer index processing in BH.

2018-11-20 Thread kbuild test robot
Hi Manish, Thank you for the patch! Yet something to improve: [auto build test ERROR on mkp-scsi/for-next] [also build test ERROR on v4.20-rc3 next-20181120] [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

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-20 Thread Bart Van Assche
On Tue, 2018-11-20 at 19:00 +0100, David Disseldorp wrote: > I tend to agree that it's dangerous, but chose to stay somewhat > consistent with the other t10_wwn strings that are treated as though > they may not be NULL terminated. > > If you're in favour adding an extra terminator byte here, then

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-20 Thread David Disseldorp
On Tue, 20 Nov 2018 09:24:39 -0800, Bart Van Assche wrote: > On Mon, 2018-11-19 at 22:06 +0100, David Disseldorp wrote: > > /* > > + * STANDARD and VPD page 0x80 T10 Vendor Identification > > + */ > > +static ssize_t target_wwn_vendor_id_show(struct config_item *item, > > + char *page)

Re: [PATCH v3 2/4] target: don't assume t10_wwn.vendor is null terminated

2018-11-20 Thread David Disseldorp
On Tue, 20 Nov 2018 08:49:24 -0800, Christoph Hellwig wrote: > This could use a little more explanation, the code doesn't just > add a little if but also changes the existing case. Also where > can't it be null currently? I'll add an explanation in the next round. This patch shouldn't cause any

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-20 Thread Bart Van Assche
On Mon, 2018-11-19 at 22:06 +0100, David Disseldorp wrote: > /* > + * STANDARD and VPD page 0x80 T10 Vendor Identification > + */ > +static ssize_t target_wwn_vendor_id_show(struct config_item *item, > + char *page) > +{ > + return sprintf(page, "T10 Vendor Identification: %." > +

Re: [PATCH v3 1/4] target: use consistent left-aligned ASCII INQUIRY data

2018-11-20 Thread Bart Van Assche
On Mon, 2018-11-19 at 22:06 +0100, David Disseldorp wrote: > diff --git a/drivers/target/target_core_spc.c > b/drivers/target/target_core_spc.c > index f459118bc11b..c37dd36ec77d 100644 > --- a/drivers/target/target_core_spc.c > +++ b/drivers/target/target_core_spc.c > @@ -108,12 +108,17 @@ spc_em

Re: [PATCH v3 2/4] target: don't assume t10_wwn.vendor is null terminated

2018-11-20 Thread Christoph Hellwig
This could use a little more explanation, the code doesn't just add a little if but also changes the existing case. Also where can't it be null currently?

Re: [PATCH v3 1/4] target: use consistent left-aligned ASCII INQUIRY data

2018-11-20 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

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

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

2018-11-20 Thread Christoph Hellwig
> +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.

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

2018-11-20 Thread John Garry
From: Xiang Chen For v3 hw, we support DIF/DIX 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: - Allocate memory for PI - Fill PI fields - Fill related to DIF/DIX in DQ and pr

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

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

2018-11-20 Thread John Garry
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 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

[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/include/scsi/scsi_cm

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

2018-11-20 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. The series is broken down as follows: - Add a generic helper for checking Scsi command normal operation - Som

Re: kobject lifetime issues in blk-mq

2018-11-20 Thread Ming Lei
On Tue, Nov 20, 2018 at 01:53:47PM +0100, Dmitry Vyukov wrote: > On Tue, Nov 20, 2018 at 1:05 PM, Greg Kroah-Hartman > wrote: > > On Tue, Nov 20, 2018 at 12:34:40PM +0100, Dmitry Vyukov wrote: > >> On Thu, Nov 15, 2018 at 1:56 AM, Greg Kroah-Hartman > >> wrote: > >> > On Thu, Nov 15, 2018 at 08:3

Re: kobject lifetime issues in blk-mq

2018-11-20 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 01:53:47PM +0100, Dmitry Vyukov wrote: > On Tue, Nov 20, 2018 at 1:05 PM, Greg Kroah-Hartman > wrote: > > On Tue, Nov 20, 2018 at 12:34:40PM +0100, Dmitry Vyukov wrote: > >> On Thu, Nov 15, 2018 at 1:56 AM, Greg Kroah-Hartman > >> wrote: > >> > On Thu, Nov 15, 2018 at 08:3

Re: kobject lifetime issues in blk-mq

2018-11-20 Thread Dmitry Vyukov
On Tue, Nov 20, 2018 at 1:05 PM, Greg Kroah-Hartman wrote: > On Tue, Nov 20, 2018 at 12:34:40PM +0100, Dmitry Vyukov wrote: >> On Thu, Nov 15, 2018 at 1:56 AM, Greg Kroah-Hartman >> wrote: >> > On Thu, Nov 15, 2018 at 08:36:17AM +0800, Ming Lei wrote: >> >> > So even if you think the kernel is no

Re: kobject lifetime issues in blk-mq

2018-11-20 Thread Greg Kroah-Hartman
On Tue, Nov 20, 2018 at 12:34:40PM +0100, Dmitry Vyukov wrote: > On Thu, Nov 15, 2018 at 1:56 AM, Greg Kroah-Hartman > wrote: > > On Thu, Nov 15, 2018 at 08:36:17AM +0800, Ming Lei wrote: > >> > So even if you think the kernel is not going to do this, remember, you > >> > have no control over it.

Re: kobject lifetime issues in blk-mq

2018-11-20 Thread Dmitry Vyukov
On Thu, Nov 15, 2018 at 1:56 AM, Greg Kroah-Hartman wrote: > On Thu, Nov 15, 2018 at 08:36:17AM +0800, Ming Lei wrote: >> > So even if you think the kernel is not going to do this, remember, you >> > have no control over it. Reference counted objects are done this way >> > for a reason, you reall

[PATCH 6/8] qedi: Add packet filter in light L2 Rx path.

2018-11-20 Thread Nilesh Javali
From: Manish Rangankar Add packet filter to avoid unnecessary packet processing in iscsiuio. Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_main.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_ma

[PATCH 8/8] qedi: Update driver version to 8.33.0.21

2018-11-20 Thread Nilesh Javali
Signed-off-by: Nilesh Javali --- drivers/scsi/qedi/qedi_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qedi/qedi_version.h b/drivers/scsi/qedi/qedi_version.h index 8a0e523..41bcbba 100644 --- a/drivers/scsi/qedi/qedi_version.h +++ b/drivers/scsi/qed

[PATCH 4/8] qedi: Allocate IRQs based on msix_cnt

2018-11-20 Thread Nilesh Javali
The driver load on some systems failed with error, [0004:01:00.5]:[qedi_request_msix_irq:2524]:8: request_irq failed. Allocate the IRQs based on MSIX count obtained from qed module instead of number of queues. Signed-off-by: Nilesh Javali --- drivers/scsi/qedi/qedi_main.c | 2 +- 1 file changed

[PATCH 3/8] qedi: Replace PAGE_SIZE with QEDI_PAGE_SIZE

2018-11-20 Thread Nilesh Javali
Use QEDI_PAGE_SIZE for enablement of module on systems with 64K page size. Signed-off-by: Nilesh Javali --- drivers/scsi/qedi/qedi_main.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/qedi/qedi_main.c b/drivers/scsi/qedi/qedi_main.c index 0f8eb

[PATCH 2/8] qedi: Fix spelling mistake "OUSTANDING" -> "OUTSTANDING"

2018-11-20 Thread Nilesh Javali
Fix trivial spelling mistake within macro definition. Signed-off-by: Nilesh Javali --- drivers/scsi/qedi/qedi.h | 4 ++-- drivers/scsi/qedi/qedi_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qedi/qedi.h b/drivers/scsi/qedi/qedi.h index e966855..6

[PATCH 1/8] qedi: Cleanup redundant QEDI_PAGE_SIZE macro definition

2018-11-20 Thread Nilesh Javali
Remove redundant macro definition. Signed-off-by: Nilesh Javali --- drivers/scsi/qedi/qedi.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/qedi/qedi.h b/drivers/scsi/qedi/qedi.h index a6f96b3..e966855 100644 --- a/drivers/scsi/qedi/qedi.h +++ b/drivers/scsi/qedi/qedi.h @@ -64

[PATCH 7/8] qedi: Move LL2 producer index processing in BH.

2018-11-20 Thread Nilesh Javali
From: Manish Rangankar 1. Removed logic to update HW producer index in interrupt context. 2. Update HW producer index after UIO ring and buffer gets initialized. Signed-off-by: Manish Rangankar --- drivers/scsi/qedi/qedi_main.c | 31 +++ 1 file changed, 19 insertion

[PATCH 5/8] qedi: Check for session online before getting iSCSI TLV data.

2018-11-20 Thread Nilesh Javali
From: Manish Rangankar The kernel panic was observed after switch side perturbation, BUG: unable to handle kernel NULL pointer dereference at (null) IP: [] strcmp+0x20/0x40 PGD 0 Oops: [#1] SMP CPU: 8 PID: 647 Comm: kworker/8:1 Tainted: GW OE 3.10.0-693.e

[PATCH 0/8] qedi bug fixes

2018-11-20 Thread Nilesh Javali
Martin, Please consider below patch set for next 'scsi-fixes' submission. Thanks, Nilesh Manish Rangankar (3): qedi: Check for session online before getting iSCSI TLV data. qedi: Add packet filter in light L2 Rx path. qedi: Move LL2 producer index processing in BH. Nilesh Javali (5): qed

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