Re: [PATCH 2/2] qla2xxx: Fix logo flag for qlt_free_session_done()

2018-01-22 Thread Martin K. Petersen
Himanshu, > Commit 3515832cc61467bfb87191a30401de1700e9956a fixed the target > re-login after session relogin is complete, but missed out the > qlt_free_session_done() path. > > This patch clears send_els_logo flag in qlt_free_session_done() callback. Applied to 4.16/scsi-queue. And please run c

Re: [PATCH 1/2] qla2xxx: Fix warning reported for req_que_no in qla24xx_async_cmd()

2018-01-22 Thread Martin K. Petersen
Himanshu, > This patch fixes following sparse warning > > drivers/scsi/qla2xxx/qla_init.c:1570:44: sparse: incorrect type in assignment > (different base types) Amended the original commit. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-22 Thread Ming Lei
On Mon, Jan 22, 2018 at 04:49:54PM +, Bart Van Assche wrote: > On Mon, 2018-01-22 at 11:35 +0800, Ming Lei wrote: > > @@ -1280,10 +1282,18 @@ bool blk_mq_dispatch_rq_list(struct request_queue > > *q, struct list_head *list, > > * - Some but not all block drivers stop a queue befor

Re: [PATCH v2 0/4] fix dma_unmap_sg() parameter in some scsi drivers

2018-01-22 Thread Martin K. Petersen
Chenxiang, > does anyone notice and review this issue? It's a pretty crappy interface that has to have explanatory "notes" throughout the documentation saying "Don't use this the obvious way, do this instead". As evidenced by 5 drivers messing it up. Your change looks good to me. But before I a

Re: [PATCH] scsi: arcmsr: avoid do_gettimeofday

2018-01-22 Thread Martin K. Petersen
Arnd, > The arcmsr uses its own implementation of time_to_tm(), along with > do_gettimeofday() to read the current time. While the algoritm used > here is fine in principle, it suffers from two problems: Applied to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH 2/5] scsi: Add VENDOR_SPECIFIC sense code definitions

2018-01-22 Thread Martin K. Petersen
Hannes, > Some older devices will return vendor specific sense codes, so > we should be adding a definition for it. Applied to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] qedi: Drop cqe response during connection recovery

2018-01-22 Thread Martin K. Petersen
Manish, > We get stuck in the loop when firmware sends a cqe response > during connection recovery. Applied to 4.16/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2] scsi: sd: add new match array for cache_type

2018-01-22 Thread Martin K. Petersen
Hi Weiping, > currently, there are four combinations as following: "write through", > "none", "write back", "write back, no read (daft)" > > cache_type can control both write and read cache, but for "write > through" and "write back" we can not know clearly how to control the > read cache. That'

Re: [PATCH] scsi: remove extra white space at the end of the line

2018-01-22 Thread Xose Vazquez Perez
Jason Yan wrote: > My editor always try to remove the extra white space at the end of the > line when I make some changes. I'm tired of adjusting them manually. A real (trailing) clean up is done with: find -type f -exec sed -i 's/[[:cntrl:]]\+$//' {} + Trailing spaces, tabs and ^L were deleted

FC-NVMe fixes for qla2xxx

2018-01-22 Thread Madhani, Himanshu
Hi Christoph, I had submitted series for FC-NVME fixes in qla2xxx driver on Jan 19, 2018. http://lists.infradead.org/pipermail/linux-nvme/2018-January/015073.html The series was cut against Martin’s 4.16/scsi-queue tree and I would like his series to be merged via Martin’s tree. Please revi

[PATCH 2/2] qla2xxx: Fix logo flag for qlt_free_session_done()

2018-01-22 Thread Himanshu Madhani
From: Himanshu Madhani Commit 3515832cc61467bfb87191a30401de1700e9956a fixed the target re-login after session relogin is complete, but missed out the qlt_free_session_done() path. This patch clears send_els_logo flag in qlt_free_session_done() callback. Fixes: 3515832cc614 ("scsi: qla2xxx: Res

[PATCH 0/2] qla2xxx: fixes for the driver

2018-01-22 Thread Himanshu Madhani
Hi Martin, This series has small fixes for the driver. Please apply to 4.16/scsi-queue. Thanks, Himanshu Himanshu Madhani (2): qla2xxx: Fix warning reported for req_que_no in qla24xx_async_cmd() qla2xxx: Fix logo flag for qlt_free_session_done() drivers/scsi/qla2xxx/qla_init.c | 5 +++

[PATCH 1/2] qla2xxx: Fix warning reported for req_que_no in qla24xx_async_cmd()

2018-01-22 Thread Himanshu Madhani
This patch fixes following sparse warning drivers/scsi/qla2xxx/qla_init.c:1570:44: sparse: incorrect type in assignment (different base types) Fixes: 07a21872cf2b ("scsi: qla2xxx: Fix queue ID for async abort with Multiqueue") Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_init.c

Re: scsi: sg: assorted memory corruptions

2018-01-22 Thread Bart Van Assche
On Mon, 2018-01-22 at 20:06 +0100, Dmitry Vyukov wrote: > On Mon, Jan 22, 2018 at 7:57 PM, Douglas Gilbert > wrote: > > As far as I remember, Dmitry has not indicated in multiple reports > > over several years what /dev/sg0 is. > > That's because I know nothing about sg. If you give a command to

Re: scsi: sg: assorted memory corruptions

2018-01-22 Thread Dmitry Vyukov
On Mon, Jan 22, 2018 at 7:57 PM, Douglas Gilbert wrote: > On 2018-01-22 11:30 AM, Bart Van Assche wrote: >> >> On Mon, 2018-01-22 at 12:06 +0100, Dmitry Vyukov wrote: >>> >>> general protection fault: [#1] SMP KASAN >> >> >> How about the untested patch below? >> >> Thanks, >> >> Bart. >> >>

Re: scsi: sg: assorted memory corruptions

2018-01-22 Thread Douglas Gilbert
On 2018-01-22 11:30 AM, Bart Van Assche wrote: On Mon, 2018-01-22 at 12:06 +0100, Dmitry Vyukov wrote: general protection fault: [#1] SMP KASAN How about the untested patch below? Thanks, Bart. diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index cd9b6ebd7257..04a644b39d79 100644

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-22 Thread Bart Van Assche
On Mon, 2018-01-22 at 11:35 +0800, Ming Lei wrote: > @@ -1280,10 +1282,18 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, > struct list_head *list, >* - Some but not all block drivers stop a queue before >* returning BLK_STS_RESOURCE. Two exceptions are s

Re: [PATCH 1/5] blk-mq: introduce BLK_STS_DEV_RESOURCE

2018-01-22 Thread Christoph Hellwig
> - if (ret == BLK_STS_RESOURCE) { > + if ((ret == BLK_STS_RESOURCE) || (ret == BLK_STS_DEV_RESOURCE)) > { No need for the inner braces here. > + if ((ret == BLK_STS_RESOURCE) || (ret == BLK_STS_DEV_RESOURCE)) Same here. > +/* > + * This status is returned from driv

Re: scsi: sg: assorted memory corruptions

2018-01-22 Thread Bart Van Assche
On Mon, 2018-01-22 at 12:06 +0100, Dmitry Vyukov wrote: > general protection fault: [#1] SMP KASAN How about the untested patch below? Thanks, Bart. diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index cd9b6ebd7257..04a644b39d79 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @

Re: [PATCH 5/6] mpt3sas: Introduce function to clone mpi request.

2018-01-22 Thread Tomas Henzl
On 01/19/2018 01:37 PM, Suganath Prabu S wrote: > 1) Added function _base_clone_mpi_to_sys_mem to clone > MPI request into system BAR0 mapped region. > > 2) Seperate out MPI Endpoint IO submissions to function > _base_put_smid_mpi_ep_scsi_io. > > 3) MPI EP requests are submitted in two 32 bit MMIO

RE: [RFC 0/2] mpt3sas/megaraid_sas : irq poll and load balancing of reply queue

2018-01-22 Thread Kashyap Desai
> > In Summary, > CPU completing IO which is not contributing to IO submission, may cause cpu > lockup. > If CPUs count to MSI-X vector count ratio is X:1 (where X > 1) then using irq poll > interface, we can avoid the CPU lockups and by equally distributing the > interrupts among the enabled MSI-x

scsi: sg: assorted memory corruptions

2018-01-22 Thread Dmitry Vyukov
Hello, The following program triggers assorted memory corruptions on 4.15-rc9: // autogenerated by syzkaller (http://github.com/google/syzkaller) #include #include #include #include #include #define SG_NEXT_CMD_LEN 0x2283 int main() { int fd = open("/dev/sg0", O_RDWR); long len = 9;

Re: [PATCH] scsi: arcmsr: avoid do_gettimeofday

2018-01-22 Thread Ching Huang
On Mon, 2018-01-22 at 00:12 +0100, Arnd Bergmann wrote: > The arcmsr uses its own implementation of time_to_tm(), along with > do_gettimeofday() > to read the current time. While the algoritm used here is fine in principle, > it > suffers from two problems: > > - it assigns the seconds portion o