[PATCH V9 4/4] libsas: Align sata_device's rps_resp on a cacheline

2017-10-23 Thread Huacai Chen
The rps_resp buffer in ata_device is a DMA target, but it isn't explicitly cacheline aligned. Due to this, adjacent fields can be overwritten with stale data from memory on non-coherent architectures. As a result, the kernel is sometimes unable to communicate with an SATA device behind a SAS expand

[PATCH V9 2/4] MIPS: Implement dma_map_ops::get_cache_alignment()

2017-10-23 Thread Huacai Chen
Currently, MIPS is an architecture which support coherent & noncoherent devices co-exist. So implement get_cache_alignment() function pointer in 'struct dma_map_ops' to return different dma alignments. Cc: sta...@vger.kernel.org Signed-off-by: Huacai Chen --- arch/mips/cavium-octeon/dma-octeon.c

[PATCH V9 3/4] scsi: Align block queue to dma_get_cache_alignment()

2017-10-23 Thread Huacai Chen
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, and if the kernel structure has dirty data, cache_invalidate (no writeb

[PATCH V9 1/4] dma-mapping: Rework dma_get_cache_alignment()

2017-10-23 Thread Huacai Chen
Make dma_get_cache_alignment() to accept a 'dev' argument. As a result, it can return different alignments due to different devices' I/O cache coherency. Currently, ARM/ARM64 and MIPS support coherent & noncoherent devices co-exist. This may be extended in the future, so add a new function pointer

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

2017-10-23 Thread Martin K. Petersen
Christoph, >> Yes, I expected the bsg bits to go through Jens' tree. > > Ok, then I misremembered it, and we'll have to delay the remaining > patches until the next merge window, as they depend on the previous > ones. I don't mind taking them through SCSI if Jens agrees. -- Martin K. Petersen

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

2017-10-23 Thread Martin K. Petersen
Laurence, I ended up going a slightly different route. Instead of adding your clarifying paragraph, I fixed the places where the module parameter was incorrectly written (i.e. missing the scsi_mod. prefix). -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] Suppress a kernel warning in case the prep function returns BLKPREP_DEFER

2017-10-23 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG N

Re: [PATCH] smartpqi: correct spelling error in documentation

2017-10-23 Thread Martin K. Petersen
Don, > Correct spelling error. Applied to 4.15/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 00/12] hpsa updates

2017-10-23 Thread Martin K. Petersen
Don, > hpsa: update discovery polling > - Correct corner case for RBODs with no initial volumes. [...] Series applied to 4.15/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 1/1] qla2xxx: Fix oops in qla2x00_probe_one error path

2017-10-23 Thread Martin K. Petersen
Douglas, > On error, kthread_create() returns an errno-encoded pointer, not NULL. > The routine qla2x00_probe_one() detects the error case and jumps > to probe_failed, but has already assigned the return value from > kthread_create() to ha->dpc_thread. Then probe_failed checks to see > if ha->dp

Re: [PATCH] Suppress a kernel warning in case the prep function returns BLKPREP_DEFER

2017-10-23 Thread Martin K. Petersen
Bart, > This patch avoids that the following warning is triggered when using > the legacy block layer: Applied to 4.14/scsi-fixes. Thank you! -- Martin K. Petersen Oracle Linux Engineering

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

2017-10-23 Thread Martin K. Petersen
Shivasharan, > 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: rep

Re: [PATCH v2] linux/types.h: Restore the ability to disable sparse endianness checks

2017-10-23 Thread Leon Romanovsky
On Mon, Oct 16, 2017 at 09:26:36PM +, Bart Van Assche wrote: > On Mon, 2017-10-16 at 22:57 +0300, Michael S. Tsirkin wrote: > > On Mon, Oct 16, 2017 at 10:26:33AM -0700, Bart Van Assche wrote: <...> > > > > Examples are drivers/scsi/qla2xxx and drivers/infiniband/hw/nes. > > > > These seem to

Re: [PATCH 02/12] hpsa: cleanup sas_phy structures in sysfs when unloading

2017-10-23 Thread James Bottomley
On Fri, 2017-10-20 at 16:51 -0500, Don Brace wrote: > From: Martin Wilck > > I am resubmitting this patch on behalf of Martin Wilck > with his permission. > > The original patch can be found here: > https://www.spinics.net/lists/linux-scsi/msg102083.html > > This patch did not help until Hannes

[PATCH V2] scsi: aacraid: Fix some error code

2017-10-23 Thread Christophe JAILLET
If 'scsi_host_alloc', 'kzalloc' or '(*aac_drivers[index].init)' fail, the function will return 0, because 'error' is known to be 0 at this point. Return -ENOMEM in the 2 first cases and -ENODEV in the third one. This patch also removes a useless 'error = -ENODEV'. Signed-off-by: Christophe JAILL