[PATCH] qla2xxx: Fix warnings reported by static checker.

2017-02-13 Thread Himanshu Madhani
From: Quinn Tran Fix following warning reported by static checker drivers/scsi/qla2xxx/qla_init.c:3910 qla2x00_alloc_fcport() warn: use 'flags' here instead of GFP_XXX? Fixes: b79414e ("qla2xxx: Add framework for async fabric discovery") Reported-by: Dan Carpenter

RE: [PATCH] scsi: aacraid: fix information leak on hbainfo.driver_name

2017-02-13 Thread Raghava Aditya Renukunta
Hello Colin, > -Original Message- > From: Colin King [mailto:colin.k...@canonical.com] > Sent: Tuesday, February 7, 2017 5:55 AM > To: dl-esc-Aacraid Linux Driver ; James E . J . > Bottomley ; Martin K . Petersen >

Re: [PATCH] scsi: lpfc: Add shutdown method for kexec

2017-02-13 Thread Brian King
On 02/12/2017 07:01 PM, Benjamin Herrenschmidt wrote: > On Mon, 2017-02-13 at 13:21 +1300, Eric W. Biederman wrote: >>> Good point, at the very least we should call remove if shutdown doesn't >>> exist. Eric: could we make the changes Ben suggests? >> >> Definitely. That was the original design

Re: [PATCH] scsi: lpfc: Add shutdown method for kexec

2017-02-13 Thread Benjamin Herrenschmidt
On Tue, 2017-02-14 at 15:45 +1300, Eric W. Biederman wrote: > The only difference ever that should exist between shutdown and remove > is do you clean up kernel data structures.  The shutdown method is > allowed to skip the cleanup up kernel data structures that the remove > method needs to make.

[PATCH] qedf: fix ifnullfree.cocci warnings

2017-02-13 Thread kbuild test robot
drivers/scsi/qedf/qedf_main.c:2742:2-7: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not

Re: [PATCH V4 2/2] qedf: Add QLogic FastLinQ offload FCoE driver framework.

2017-02-13 Thread kbuild test robot
Hi Chad, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Dupuis-Chad/qed-Add-support-for-hardware-offloaded-FCoE/20170214-040339 coccinelle warnings: (new ones prefixed by >>) >> drivers/scsi/qedf/qedf_main.c:2742:2-7: WARNING: NULL check before

Re: [PATCH] scsi: lpfc: Add shutdown method for kexec

2017-02-13 Thread Benjamin Herrenschmidt
On Mon, 2017-02-13 at 15:57 -0600, Brian King wrote: > If we do transition to use remove rather than shutdown, I think we > want > some way for a device driver to know whether we are doing kexec or > not. > A RAID adapter with a write cache is going to want to flush its write > cache on a PCI

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Damien Le Moal
Bart, On 2/14/17 03:57, Bart Van Assche wrote: > On Mon, 2017-02-13 at 14:11 +0900, Damien Le Moal wrote: >> The ZBC_IN command (REPORT ZONES) reply length is always a multiple of >> 64B and thus may not be aligned on the device LBA size. >> For this command, retry due to the unaligned completion

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Bart Van Assche
On Tue, 2017-02-14 at 12:45 +0900, Damien Le Moal wrote: > On 2/14/17 03:57, Bart Van Assche wrote: > > On Mon, 2017-02-13 at 14:11 +0900, Damien Le Moal wrote: > > > The ZBC_IN command (REPORT ZONES) reply length is always a multiple of > > > 64B and thus may not be aligned on the device LBA

Re: [PATCH] scsi: lpfc: Add shutdown method for kexec

2017-02-13 Thread Eric W. Biederman
Brian King writes: > On 02/12/2017 07:01 PM, Benjamin Herrenschmidt wrote: >> On Mon, 2017-02-13 at 13:21 +1300, Eric W. Biederman wrote: Good point, at the very least we should call remove if shutdown doesn't exist. Eric: could we make the changes Ben

Re: [PATCH] cdrom: Make device operations read-only

2017-02-13 Thread David Miller
From: Kees Cook Date: Mon, 13 Feb 2017 16:25:26 -0800 > diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c > index 9cbd217bc0c9..ab9232e1e16f 100644 > --- a/drivers/ide/ide-cd.c > +++ b/drivers/ide/ide-cd.c > @@ -1166,7 +1166,7 @@ void

[PATCH] cdrom: Make device operations read-only

2017-02-13 Thread Kees Cook
Since function tables are a common target for attackers, it's best to keep them in read-only memory. As such, this makes the CDROM device ops tables const. This drops additionally n_minors, since it isn't used meaningfully, and sets the only user of cdrom_dummy_generic_packet explicitly so the

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread h...@lst.de
On Tue, Feb 14, 2017 at 02:21:37PM +0900, Damien Le Moal wrote: > > I think we want to keep the knowledge of which requests have a request size > > that should be a multiple of the logical block size in the block layer core > > or in the SCSI core but not in the mpt3sas driver. But I'm not sure

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Damien Le Moal
Bart, On 2/14/17 12:59, Bart Van Assche wrote: >>> What software generated a ZBC_IN request with type REQ_TYPE_FS? Shouldn't >>> all ZBC_IN requests be assigned type REQ_TYPE_BLOCK_PC? >> >> Any application that issues a BLKREPORTZONE ioctl (e.g. mkfs.f2fs or >> libzbc tools) or kernel component

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Damien Le Moal
Christoph, On 2/14/17 15:18, h...@lst.de wrote: > On Tue, Feb 14, 2017 at 02:21:37PM +0900, Damien Le Moal wrote: >>> I think we want to keep the knowledge of which requests have a request size >>> that should be a multiple of the logical block size in the block layer core >>> or in the SCSI core

[bug report] scsi: ufs-qcom: dump additional testbus registers

2017-02-13 Thread Dan Carpenter
Hello Venkat Gopalakrishnan, The patch 9c46b8676271: "scsi: ufs-qcom: dump additional testbus registers" from Feb 3, 2017, leads to the following static checker warning: drivers/scsi/ufs/ufs-qcom.c:1531 ufs_qcom_testbus_cfg_is_ok() warn: impossible condition

Re: [PATCH RFC] target/user: Add double ring buffers support.

2017-02-13 Thread Xiubo Li
On 2017年02月14日 01:42, Andy Grover wrote: On 02/12/2017 05:38 PM, Xiubo Li wrote: On 2017年02月11日 02:02, Andy Grover wrote: 1. increase the region mmap()ed by userspace, TCMU_RING_SIZE, from 1MB to 1GB or larger 2. Don't vmalloc() the whole thing, instead vmalloc for the cmd ring portion, and

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Bart Van Assche
On Tue, 2017-02-14 at 13:42 +0900, Damien Le Moal wrote: > I think so. But my understanding of REQ_TYPE_BLOCK_PC is that it is the > type for requests issued internally (scsi_execute) of from things like > the SG driver, so in essence, all requests not derived from a BIO... Is > this correct ? If

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Damien Le Moal
Bart, On 2/14/17 14:11, Bart Van Assche wrote: > On Tue, 2017-02-14 at 13:42 +0900, Damien Le Moal wrote: >> I think so. But my understanding of REQ_TYPE_BLOCK_PC is that it is the >> type for requests issued internally (scsi_execute) of from things like >> the SG driver, so in essence, all

Re: [PATCH RFC] target/user: Add double ring buffers support.

2017-02-13 Thread Xiubo Li
Yes I think it's now clear we need more buffer space to avoid bottlenecks for high iops. The initial design kept it simple with the 1MB vmalloc'd space but anticipated greater would be needed. It should not be necessary to change userspace or the TCMU ABI to handle growing the buffer for fast

Re: [bug report] scsi: aacraid: Added support for hotplug

2017-02-13 Thread Dan Carpenter
On Mon, Feb 13, 2017 at 07:39:15PM +, Raghava Aditya Renukunta wrote: > Hi Don, > > > -Original Message- > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > > Sent: Monday, February 13, 2017 10:47 AM > > To: Raghava Aditya Renukunta > >

[PATCH] return valid data buffer length in scsi_bufflen() API using RQF_SPECIAL_PAYLOAD

2017-02-13 Thread Kashyap Desai
Regression due to commit f9d03f96b988002027d4b28ea1b7a24729a4c9b5 block: improve handling of the magic discard payload and HBA FW encounter FW fault in DMA operation while creating File system on SSDs. Below CDB cause FW fault. CDB: Write same(16) 93 08 00 00 00 00 00 00 00 00 00 00 80 00 00

Re: [PATCH v3 10/16] lpfc: NVME Target: Base modifications

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > NVME Target: Base modifications > > This set of patches adds the base modifications for NVME target support > > The base modifications consist of: > - Additional module parameters or configuration tuning > - Enablement of configuration mode for

Re: [PATCH v3 11/16] lpfc: NVME Target: Receive buffer updates

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > NVME Target: Receive buffer updates > > Allocates buffer pools and configures adapter interfaces to handle > receive buffer (asynchronous FCP CMD ius, first burst data) > from the adapter. Splits by protocol, etc. > > Signed-off-by: Dick Kennedy

Re: [PATCH v3 03/16] lpfc: minor code cleanups

2017-02-13 Thread Johannes Thumshirn
On 02/12/2017 10:52 PM, James Smart wrote: > > This contains code cleanups that were in the prior patch set. > This allows better review of real changes later. > > minor code cleanups: > fix indentation, punctuation, line length > addition/reduction of whitespace > remove unneeded parens,

Re: [PATCH v3 05/16] lpfc: refactor debugfs queue dump routines

2017-02-13 Thread Johannes Thumshirn
On 02/12/2017 10:52 PM, James Smart wrote: > > Create common wq, cq, eq, rq dump functions > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > --- Looks good, Reviewed-by: Johannes Thumshirn -- Johannes

Re: [PATCH v3 15/16] lpfc: Update copyrights

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > Update copyrights to 2017 for all files touched in this patch set > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Cheers, Hannes --

Re: [PATCH v3 04/16] lpfc: refactor debugfs queue prints

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > Create common wq, cq, eq, rq print functions > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > --- > drivers/scsi/lpfc/lpfc.h | 1 + > drivers/scsi/lpfc/lpfc_debugfs.c |

Re: [PATCH v3 05/16] lpfc: refactor debugfs queue dump routines

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > Create common wq, cq, eq, rq dump functions > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

Re: [PATCH v3 16/16] lpfc: Update lpfc version to 11.2.0.7

2017-02-13 Thread Johannes Thumshirn
On 02/12/2017 10:52 PM, James Smart wrote: > > Update lpfc version to 11.2.0.7 > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > --- Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH v3 15/16] lpfc: Update copyrights

2017-02-13 Thread Johannes Thumshirn
On 02/12/2017 10:52 PM, James Smart wrote: > > Update copyrights to 2017 for all files touched in this patch set > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > --- Reviewed-by: Johannes Thumshirn --

Re: [PATCH v3 04/16] lpfc: refactor debugfs queue prints

2017-02-13 Thread Johannes Thumshirn
On 02/12/2017 10:52 PM, James Smart wrote: > > Create common wq, cq, eq, rq print functions > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > --- Looks good, Reviewed-by: Johannes Thumshirn -- Johannes

Re: [PATCH v3 02/16] lpfc: use pci_irq_alloc_vectors and pci_irq_free_vectors

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > From: Christoph Hellwig > > This avoids having to store the msix_entries array and simpliefies the > shutdown and cleanup path a lot. > > Signed-off-by: Christoph Hellwig > Signed-off-by: James Smart

Re: [PATCH v3 03/16] lpfc: minor code cleanups

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > This contains code cleanups that were in the prior patch set. > This allows better review of real changes later. > > minor code cleanups: > fix indentation, punctuation, line length > addition/reduction of whitespace > remove unneeded parens,

Re: [PATCH v3 07/16] lpfc: NVME Initiator: Merge into FC discovery

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > NVME Initiator: Merge into FC discovery > > Adds NVME PRLI support and Nameserver registrations and Queries for NVME > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > ---

Re: [PATCH v3 06/16] lpfc: NVME Initiator: Base modifications

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > NVME Initiator: Base modifications > > This patch adds base modifications for NVME initiator support. > > The base modifications consist of: > - Formal split of SLI3 rings from SLI-4 WQs (sometimes referred to as > rings as well) as

Re: [PATCH v3 08/16] lpfc: NVME Initiator: bind to nvme_fc api

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > NVME Initiator: Tie in to NVME Fabrics nvme_fc LLDD initiator api > > Adds the routines to: > - register and deregister the FC port as a nvme-fc initiator localport > - register and deregister remote FC ports as a nvme-fc remoteport > - binding of

Re: [PATCH v3 09/16] lpfc: NVME Initiator: Add debugfs support

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > NVME Initiator: Add debugfs support > > Adds debugfs snippets to cover the new NVME initiator functionality > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart Reviewed-by: Hannes

Re: [PATCH v3 13/16] lpfc: NVME Target: bind to nvmet_fc api

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > NVME Target: Tie in to NVME Fabrics nvmet_fc LLDD target api > > Adds the routines to: > - register and deregister the FC port as a nvmet-fc targetport > - binding of nvme queues to adapter WQs > - receipt and passing of NVME LS's to transport,

Re: [PATCH v3 14/16] lpfc: NVME Target: Add debugfs support

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > NVME Target: Add debugfs support > > Adds debugfs snippets to cover the new NVME target functionality > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart Reviewed-by: Hannes Reinecke

Re: [PATCH v3 12/16] lpfc: NVME Target: Merge into FC discovery

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > NVME Target: Merge into FC discovery > > Adds NVME PRLI handling and Nameserver registrations for NVME > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart Reviewed-by: Hannes Reinecke

Re: [PATCH v3 16/16] lpfc: Update lpfc version to 11.2.0.7

2017-02-13 Thread Hannes Reinecke
On 02/12/2017 10:52 PM, James Smart wrote: > > Update lpfc version to 11.2.0.7 > > Signed-off-by: Dick Kennedy > Signed-off-by: James Smart > --- > drivers/scsi/lpfc/lpfc_version.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [PATCH RFC] target/user: Add double ring buffers support.

2017-02-13 Thread Andy Grover
On 02/13/2017 01:50 AM, Xiubo Li wrote: There is one new scheme in my mind: Yes I think it's now clear we need more buffer space to avoid bottlenecks for high iops. The initial design kept it simple with the 1MB vmalloc'd space but anticipated greater would be needed. It should not be

Re: [PATCH RFC] target/user: Add double ring buffers support.

2017-02-13 Thread Andy Grover
On 02/12/2017 05:38 PM, Xiubo Li wrote: On 2017年02月11日 02:02, Andy Grover wrote: 1. increase the region mmap()ed by userspace, TCMU_RING_SIZE, from 1MB to 1GB or larger 2. Don't vmalloc() the whole thing, instead vmalloc for the cmd ring portion, and dynamically alloc pages for the data area as

Re: [PATCH RFC] target/user: Add double ring buffers support.

2017-02-13 Thread Xiubo Li
Hi Andy, There is one new scheme in my mind: Yes I think it's now clear we need more buffer space to avoid bottlenecks for high iops. The initial design kept it simple with the 1MB vmalloc'd space but anticipated greater would be needed. It should not be necessary to change userspace or

RE: [bug report] scsi: aacraid: Added support for hotplug

2017-02-13 Thread Raghava Aditya Renukunta
Hi Don, > -Original Message- > From: Dan Carpenter [mailto:dan.carpen...@oracle.com] > Sent: Monday, February 13, 2017 10:47 AM > To: Raghava Aditya Renukunta > > Cc: linux-scsi@vger.kernel.org > Subject: [bug report] scsi: aacraid: Added support

[bug report] scsi: aacraid: Include HBA direct interface

2017-02-13 Thread Dan Carpenter
Hello Raghava Aditya Renukunta, The patch 423400e64d37: "scsi: aacraid: Include HBA direct interface" from Feb 2, 2017, leads to the following static checker warning: drivers/scsi/aacraid/commsup.c:762 aac_hba_send() error: double unlock 'sem:>event_wait'

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Bart Van Assche
On Mon, 2017-02-13 at 14:11 +0900, Damien Le Moal wrote: > The ZBC_IN command (REPORT ZONES) reply length is always a multiple of > 64B and thus may not be aligned on the device LBA size. > For this command, retry due to the unaligned completion length is > incorrect so do not check alignment of

[bug report] scsi: aacraid: Added support for hotplug

2017-02-13 Thread Dan Carpenter
Hello Raghava Aditya Renukunta, The patch 6223a39fe6fb: "scsi: aacraid: Added support for hotplug" from Feb 2, 2017, leads to the following static checker warning: drivers/scsi/aacraid/commsup.c:2243 aac_process_events() error: double unlock 'spin_lock:t_lock'

[PATCH V4 net-next 1/2] qed: Add support for hardware offloaded FCoE.

2017-02-13 Thread Dupuis, Chad
From: Arun Easi This adds the backbone required for the various HW initalizations which are necessary for the FCoE driver (qedf) for QLogic FastLinQ 4 line of adapters - FW notification, resource initializations, etc. Signed-off-by: Arun Easi

[PATCH V4 0/2] Add QLogic FastLinQ FCoE (qedf) driver

2017-02-13 Thread Dupuis, Chad
From: "Dupuis, Chad" Dave, please apply the qed patch to net-next at your earliest convenience. Martin, the qed patch needs to be applied first as the qedf patch is dependent on the FCoE bits in the first qed driver patch. This series introduces the hardware offload FCoE

Re: [PATCH v3 00/39] megaraid_sas: Updates for scsi-next

2017-02-13 Thread Martin K. Petersen
> "Shivasharan" == Shivasharan S > writes: Shivasharan> Changes in v3: Patch 21: Fix to pass rctx_g35 pointer to Shivasharan> set/get_num_sge() Move all v2 changelog descriptions beyond Shivasharan> actual commit message body Applied to

Re: [PATCH 00/10] mpt3sas: full mq support

2017-02-13 Thread Hannes Reinecke
On 02/13/2017 07:15 AM, Sreekanth Reddy wrote: > On Fri, Feb 10, 2017 at 12:29 PM, Hannes Reinecke wrote: >> On 02/10/2017 05:43 AM, Sreekanth Reddy wrote: >>> On Thu, Feb 9, 2017 at 6:42 PM, Hannes Reinecke wrote: On 02/09/2017 02:03 PM, Sreekanth Reddy wrote:

Re: [PATCH] return valid data buffer length in scsi_bufflen() API using RQF_SPECIAL_PAYLOAD

2017-02-13 Thread Christoph Hellwig
Hi Kashyap, can you try 4.10-rc8? It has "scsi: use blk_rq_payload_bytes" which initializeѕ sdb->length to blk_rq_payload_bytes(), which should fix your issue.