Re: [PATCH V8 5/5] libata: Align DMA buffer todma_get_cache_alignment()

2017-10-19 Thread 陈华才
Hi, Matt, I found that 4ee34ea3a12396f35b26d90a094c75db ("libata: Align ata_device's id on a cacheline") can resolve everything. Because the size of id[ATA_ID_WORDS] is already aligned and devslp_timing needn't to be aligned. So, In V9 of this series I will drop this patch. Why I had problems b

qla2xxx: New kernel warning

2017-10-19 Thread Bart Van Assche
Hello Himanshu, If I load the qla2xxx driver (git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git, 4.15/scsi-queue) then a new kernel warning appears. This did not happen with kernel v4.13. Can you have a look? qla2xxx [:00:00.0]-0005: : QLogic Fibre Channel HBA Driver: 10.00.00.02-k

Re: [PATCH V8 4/5] libsas: Align SMP req/resp to dma_get_cache_alignment()

2017-10-19 Thread kbuild test robot
Hi Huacai, [auto build test ERROR on linus/master] [also build test ERROR on v4.14-rc5 next-20171018] [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/Huacai-Chen/dma-mapping-Rework-dma_get_cache_

RE: [PATCH V2] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-19 Thread Long Li
> On Tue, Oct 17, 2017 at 01:35:21PM -0400, Cathy Avery wrote: > > + /* > > +* Set the error handler work queue. > > +*/ > > + snprintf(host_dev->work_q_name, sizeof(host_dev- > >work_q_name), > > +"storvsc_error_wq_%d", host->host_no); > > + host_dev->handle_error_wq = >

Re: [PATCH 9/9] bsg: split handling of SCSI CDBs vs transport requeues

2017-10-19 Thread Benjamin Block
Hey Christoph, better late than never I guess. On Tue, Oct 03, 2017 at 12:48:45PM +0200, Christoph Hellwig wrote: > The current BSG design tries to shoe-horn the transport-specific passthrough > commands into the overall framework for SCSI passthrough requests. This > has a couple problems: > >

Re: [PATCH V2] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-19 Thread Christoph Hellwig
On Tue, Oct 17, 2017 at 01:35:21PM -0400, Cathy Avery wrote: > + /* > + * Set the error handler work queue. > + */ > + snprintf(host_dev->work_q_name, sizeof(host_dev->work_q_name), > + "storvsc_error_wq_%d", host->host_no); > + host_dev->handle_error_wq = > +

Re: [PATCH V8 4/5] libsas: Align SMP req/resp to dma_get_cache_alignment()

2017-10-19 Thread Christoph Hellwig
On Tue, Oct 17, 2017 at 01:55:43PM +0200, Marek Szyprowski wrote: > If I remember correctly, kernel guarantees that each kmalloced buffer is > always at least aligned to the CPU cache line, so CPU cache can be > invalidated on the allocated buffer without corrupting anything else. Yes, from slab.h

Re: [PATCH V8 3/5] scsi: Align block queue to dma_get_cache_alignment()

2017-10-19 Thread Christoph Hellwig
On Tue, Oct 17, 2017 at 04:05:40PM +0800, Huacai Chen wrote: > In non-coherent DMA mode, kernel uses cache flushing operations to > maintain I/O coherency, so scsi's block queue should be aligned to > ARCH_DMA_MINALIGN. Otherwise, If a DMA buffer and a kernel structure > share a same cache line, an

Re: [PATCH V8 1/5] dma-mapping: Rework dma_get_cache_alignment()

2017-10-19 Thread Christoph Hellwig
On Wed, Oct 18, 2017 at 10:23:36AM -0700, Mark Greer wrote: > > #defineMPSC_RXR_ENTRIES32 > > -#defineMPSC_RXRE_SIZE dma_get_cache_alignment() > > +#defineMPSC_RXRE_SIZE dma_get_cache_alignment(dma_dev) > > I would much prefer that you add a parameter to the

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-19 Thread Laurent Pinchart
Hi Christoph, On Thursday, 19 October 2017 17:06:57 EEST Christoph Hellwig wrote: > > Now we have 9 const instances of the config_item_type structure that are > > identical, with only the .ct_owner field set. Should they be all merged > > into a single structure ? > > I think that's a good idea.

[PATCH] Added notes to scsi-parameters.txt to show how to pass parameters on kernel line

2017-10-19 Thread Laurence Oberman
--- Documentation/scsi/scsi-parameters.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/scsi/scsi-parameters.txt b/Documentation/scsi/scsi-parameters.txt index 8477655..5b87a11 100644 --- a/Documentation/scsi/scsi-parameters.txt +++ b/Documentation/scsi/scsi-parameter

Re: [PATCH v2 02/15] usb: gadget: make config_item_type structures const

2017-10-19 Thread Christoph Hellwig
> > Now we have 9 const instances of the config_item_type structure that are > identical, with only the .ct_owner field set. Should they be all merged into > a > single structure ? I think that's a good idea. But I'm about to slurp up this whole series into my tree, how about making that an i

Hello

2017-10-19 Thread Salif Mohammed
Hello, I need your partnership in this project that requires trust and confidentiality. An American, Mr. Charles Balassi who worked with the Egyptian General Petroleum Corporation (EGPC), made a fixed deposit of Twenty Two Million United States Dollars($22,000,000) for 17 Years in my bank(Dubai I

[PATCH 17/19] megaraid_sas: Do not limit queue_depth to 1k in non-RDPQ mode

2017-10-19 Thread Shivasharan S
Earlier, driver load fails if memory allocation for request frame pool fails due to the higher queue_depth requirement. Patch 0016 in this series allows dynamically reducing queue_depth if memory allocations fail rather than failing load. With this, there is no need to limit queue_depth to 1k now.

[PATCH 18/19] megaraid_sas: Add support for 64bit consistent DMA

2017-10-19 Thread Shivasharan S
The latest MegaRAID Firmware (for Invader series) have support for 64bit DMA for both streaming and consistent DMA buffers. All Ventura series controller FW always support 64 bit consistent DMA. Also on few architectures 32bit DMA is not supported. Current driver always prefers 32bit for consisten

[PATCH 15/19] megaraid_sas: Incorrect processing of IOCTL frames for SMP/STP commands

2017-10-19 Thread Shivasharan S
Code fix - cmd->frame->dcmd.opcode will be valid only for MFI_CMD_DCMD IOCTL frames. Currently driver check for cmd->frame->dcmd.opcode without checking cmd type. Ensure we check dcmd opcode only for MFI_CMD_DCMD commands. Separate handling of MFI_CMD_SMP/STP commands from MFI_CMD_DCMD in completio

[PATCH 19/19] megaraid_sas: driver version upgrade

2017-10-19 Thread Shivasharan S
Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index b34fc68c14c9..f5a36ccb8606 100644 --- a/drivers/scsi/megaraid/megaraid_s

[PATCH 16/19] megaraid_sas: Retry with reduced queue depth when alloc fails for higher QD

2017-10-19 Thread Shivasharan S
In certain cases, the host memory is limited and with FW supporting higher queue depths there are increasing chances of IO request frame allocation failures that we are seeing. In case of request frame allocation failures, retry allocation with reduced queue depth (in steps of 64) to continue to co

[PATCH 03/19] megaraid_sas: replace instance->ctrl_context checks with instance->adapter_type

2017-10-19 Thread Shivasharan S
Increase Code readability. No Functional Change Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 64 ++- 1 file changed, 37 insertions(+), 27 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c

[PATCH 04/19] megaraid_sas: Remove redundant checks for ctrl_context

2017-10-19 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index cd997ccf5ebf..340

[PATCH 06/19] megaraid_sas: reduce size of fusion_context and use kmalloc for allocation

2017-10-19 Thread Shivasharan S
fusion_context structure is very large around 180kB and most of the size is contributed by log_to_span array. Move log_to_span out of fusion context and have separate allocation for log_to_span. And use kmalloc to allocate fusion_context. Currently kmemleak reports 1000s of false positives for fusi

[PATCH 08/19] megaraid_sas: Create separate functions for allocating and freeing controller DMA buffers

2017-10-19 Thread Shivasharan S
Code refactoring - create separate functions to allocate and free controller DMA buffers Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 186 +- 1 file changed, 103 insertions(+), 83 deletions(-) diff --git a

[PATCH 14/19] megaraid_sas: Resize MFA frame used for IOC INIT to 4k

2017-10-19 Thread Shivasharan S
Older firmware version unconditionally pulls 4k frame for IOC INIT MFA frame. But driver allocates 1k or 4k max_chain_frame_sz based on FW capability. During boot time, this results in DMA read errors. Workaround fix in driver by allocating separate ioc_init frame of 4k size to support older firmwa

[PATCH 01/19] megaraid_sas: use adapter_type for all gen controllers

2017-10-19 Thread Shivasharan S
No functional change. Refactor adapter_type to set for all generation controllers, not just for fusion controllers. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 8 +++ drivers/scsi/megaraid/megaraid_sas_base.c | 88 ++

[PATCH 11/19] megaraid_sas: Move initialization of instance parameters inside newly created function megasas_init_ctrl_params

2017-10-19 Thread Shivasharan S
Code refactoring, no functional change - Create new function to initialize all the controller parameters during load time. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 119 +++--- 1 file changed, 61 insertions(

[PATCH 05/19] megaraid_sas: replace is_ventura with adapter_type checks

2017-10-19 Thread Shivasharan S
No functional change. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 1 - drivers/scsi/megaraid/megaraid_sas_base.c | 9 - drivers/scsi/megaraid/megaraid_sas_fp.c | 10 +- drivers/scsi/megaraid/megaraid_sas_fus

[PATCH 02/19] megaraid_sas: Add support for Crusader controllers

2017-10-19 Thread Shivasharan S
Add support for PCI VID/DID 0x1000/0x0015 based MegaRAID controllers. Since the DID 0x0015 conflicts with DELL PERC5 controllers, add vendor ID based check specific for DELL PERC5. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 1 + dr

[PATCH 07/19] megaraid_sas: Create separate functions to allocate ctrl memory

2017-10-19 Thread Shivasharan S
No functional change. Code refactoring to improve readability. Move the code to allocate and free controller memory into separate functions. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 122 +++--- 1 file chang

[PATCH 10/19] megaraid_sas: remove instance->ctrl_info

2017-10-19 Thread Shivasharan S
Re-use the pre-allocated ctrl_info DMA buffer. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h | 1 - drivers/scsi/megaraid/megaraid_sas_base.c | 43 ++- 2 files changed, 14 insertions(+), 30 deletions(-) diff

[PATCH 00/19] megaraid_sas: Updates for scsi-next

2017-10-19 Thread Shivasharan S
Shivasharan S (19): megaraid_sas: use adapter_type for all gen controllers megaraid_sas: Add support for Crusader controllers megaraid_sas: replace instance->ctrl_context checks with instance->adapter_type megaraid_sas: Remove redundant checks for ctrl_context megaraid_sas: replace is

[PATCH 09/19] megaraid_sas: Pre-allocate frequently used DMA buffers

2017-10-19 Thread Shivasharan S
Pre-allocate few of the frequently used DMA buffers during load time. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas.h| 13 +++ drivers/scsi/megaraid/megaraid_sas_base.c | 147 ++-- drivers/scsi/megaraid/megara

[PATCH 13/19] megaraid_sas: Update current host time to FW during IOC Init

2017-10-19 Thread Shivasharan S
Driver needs to send current host time to firmware during init. Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megara

[PATCH 12/19] megaraid_sas: Move controller memory allocations and DMA mask settings from probe to megasas_init_fw

2017-10-19 Thread Shivasharan S
Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_base.c | 43 --- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c ind

Re: [PATCH V8 5/5] libata: Align DMA buffer to dma_get_cache_alignment()

2017-10-19 Thread Matt Redfearn
On 18/10/17 14:03, Tejun Heo wrote: On Tue, Oct 17, 2017 at 04:05:42PM +0800, Huacai Chen wrote: In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so in ata_do_dev_read_id() the DMA buffer should be aligned to ARCH_DMA_MINALIGN. Otherwise, If a DMA buff