scsi/NCR5380: Suppress SDTR and WDTR message logging

2017-10-25 Thread Finn Thain
The 5380 drivers only support asynchronous transfers and the 5380 controllers only have narrow busses. Hence, the core driver will reject any SDTR and WDTR messages from target devices. Don't log this, it's expected behaviour. Also, fix the off-by-one array indices in the arguments to

[PATCH v2.2] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-25 Thread Douglas Gilbert
The sd_setup_read_write_cmnd() function is on the "fast path" for block system access to SCSI devices (logical units). Rewrite this function to improve speed and readability. version 2.2: - remove empty branch from condition (review comment) - remove redundant log message - introduce lb_size

Re: [PATCH v2 0/5] qla2xxx: Patches for scsi-misc

2017-10-25 Thread Madhani, Himanshu
Hi Martin, > On Oct 16, 2017, at 8:08 PM, Martin K. Petersen > wrote: > > > Madhani, > >> This series adds support for INTx mode for qla2xxx driver. Also, adds >> support for N2N login for FC-NVMe. >> >> Please apply to 4.15/scsi-queue at your earliest

Re: [PATCH 0/2] qla2xxx: Couple bug fixes for FC-NVMe

2017-10-25 Thread Madhani, Himanshu
Hi Martin, > On Oct 16, 2017, at 8:09 PM, Martin K. Petersen > wrote: > > > Himanshu, > >> This series has couple bug fixes for FC-NVMe code path. Please apply >> them to 4.15/scsi-queue at your earliest convenience. > > Applied to 4.15/scsi-queue. > > PS. You

Re: [PATCH 1/1] qla2xxx: Initialize Work element before requesting IRQs

2017-10-25 Thread Madhani, Himanshu
Hello Bart, > On Oct 17, 2017, at 9:12 PM, Bart Van Assche wrote: > > On Mon, 2017-10-16 at 11:26 -0700, Madhani, Himanshu wrote: >> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c >> index 937209805baf..3bd956d3bc5d 100644 >> ---

Re: qla2xxx: New kernel warning

2017-10-25 Thread Madhani, Himanshu
Hi Bart, > On Oct 19, 2017, at 6:13 PM, Bart Van Assche wrote: > > 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

[PATCH 3/3] cxlflash: Derive pid through accessors

2017-10-25 Thread Uma Krishnan
From: "Matthew R. Ochs" The cxlflash driver tracks process IDs alongside contexts to validate context ownership. Currently, the process IDs are derived by directly accessing values from the 'current' task pointer. While this method of access is fine for the current

[PATCH 1/3] cxlflash: Use derived maximum write same length

2017-10-25 Thread Uma Krishnan
From: "Matthew R. Ochs" The existing write same routine within the cxlflash driver uses a statically defined value for the maximum write same transfer length. While this is close to the value reflected by the original device that was supported by cxlflash, newer

[PATCH 2/3] cxlflash: Allow cards without WWPN VPD to configure

2017-10-25 Thread Uma Krishnan
From: "Matthew R. Ochs" Currently, all adapters that cxlflash supports must have WWPN VPD keywords to complete configuration. This was required as cards with external FC ports needed to be programmed with WWPNs. Newer supported cards do not have an external FC

[PATCH 0/3] cxlflash: Miscellaneous fixes

2017-10-25 Thread Uma Krishnan
This patch series contains miscellaneous fixes. All three patches resolve minor issues. This series is intended for 4.15 and is bisectable. Matthew R. Ochs (3): cxlflash: Use derived maximum write same length cxlflash: Allow cards without WWPN VPD to configure cxlflash: Derive pid through

Re: [PATCH v2.1] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-25 Thread Douglas Gilbert
On 2017-10-25 03:28 AM, Hannes Reinecke wrote: On 10/25/2017 05:52 AM, Douglas Gilbert wrote: The sd_setup_read_write_cmnd() function is on the "fast path" for block system access to SCSI devices (logical units). Rewrite this function to improve speed and readability: - use put_unaligned_be

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

2017-10-25 Thread Madhani, Himanshu
> On Oct 20, 2017, at 6:17 AM, Douglas Miller > wrote: > > 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 >

Re: [PATCH] iscsi-target: Convert timers to use timer_setup()

2017-10-25 Thread Bart Van Assche
On Wed, 2017-10-25 at 16:10 +0200, Kees Cook wrote: > However, maintainers: sorry to send this one -- it can't be merged > yet, this uses timer_setup_on_stack() which is only in -next right > now. If it looks okay, though, I can carry this in the timer tree. Hello Kees, Can you have a look at

Re: [PATCH] ata: fixes kernel crash while tracing ata_eh_link_autopsy event

2017-10-25 Thread Tejun Heo
Hello, On Wed, Oct 25, 2017 at 03:52:56PM +0530, Rameshwar Prasad Sahu wrote: > @@ -288,8 +289,8 @@ > ), > > TP_fast_assign( > - __entry->ata_port = dev->link->ap->print_id; > - __entry->ata_dev= dev->link->pmp + dev->devno; > +

Re: [PATCH] iscsi-target: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
On Wed, Oct 25, 2017 at 2:41 PM, Jason A. Donenfeld wrote: > On Wed, Oct 25, 2017 at 12:01 PM, Kees Cook wrote: >> sess->time2retain_timer.expires = >> (get_jiffies_64() + sess->sess_ops->DefaultTime2Retain * HZ); >>

Re: [PATCH] iscsi-target: Convert timers to use timer_setup()

2017-10-25 Thread Jason A. Donenfeld
On Wed, Oct 25, 2017 at 12:01 PM, Kees Cook wrote: > sess->time2retain_timer.expires = > (get_jiffies_64() + sess->sess_ops->DefaultTime2Retain * HZ); > add_timer(>time2retain_timer); > cmd->dataout_timer.expires = (get_jiffies_64() +

Re: [PATCH 2/2] scsi: megaraid: Track the page allocations for struct fusion_context

2017-10-25 Thread Martin K. Petersen
Yisheng, > I have get many kmemleak reports just similar to commit 70c54e210ee9 > (scsi: megaraid_sas: fix memleak in megasas_alloc_cmdlist_fusion) > on v4.14-rc6, however it seems have a different stroy: Do you still see leaks reported with the megaraid driver update recently merged into

Re: [PATCH 00/19] hisi_sas: misc fixes, improvements, and new features

2017-10-25 Thread Martin K. Petersen
John, > This patchset contains many misc fixes, improvements, and a few new > features. > > Here is a list of the significant changes: > - more fixes for hisi_hba.locking > - v3 hw DFX feature > - random error handling bugfixes > - reporting v2 hw errors to userspace Applied to 4.15/scsi-queue.

[PATCH] ata: fixes kernel crash while tracing ata_eh_link_autopsy event

2017-10-25 Thread Rameshwar Prasad Sahu
When tracing ata link error event, the kernel crashes when the disk is removed due to NULL pointer access by trace_ata_eh_link_autopsy API. This occurs as the dev is NULL when the disk disappeared. Given that the trace routine requires only the link info, pass the link info instead of passing dev

[PATCH 1/2] scsi: megaraid: Remove redundant code in megasas_alloc_cmds

2017-10-25 Thread Yisheng Xie
megasas_alloc_cmds is to alloc cmd_list of instance instead of fusion, and fusion is useless in this function. Just remove it. Signed-off-by: Yisheng Xie --- drivers/scsi/megaraid/megaraid_sas_base.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH] scsi: cxgbi: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Karen Xie Cc: "James E.J. Bottomley" Cc: "Martin K.

[PATCH 2/2] scsi: megaraid: Track the page allocations for struct fusion_context

2017-10-25 Thread Yisheng Xie
I have get many kmemleak reports just similar to commit 70c54e210ee9 (scsi: megaraid_sas: fix memleak in megasas_alloc_cmdlist_fusion) on v4.14-rc6, however it seems have a different stroy: unreferenced object 0x8b5139d9d2c0 (size 192): comm "kworker/0:0", pid 3, jiffies 4294689182 (age

[PATCH] scsi: csiostor: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "Martin K. Petersen" Cc: "James E.J. Bottomley"

[PATCH] scsi: lpfc: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: James Smart Cc: Dick Kennedy Cc: "James E.J.

[PATCH] scsi: qla2xxx: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: qla2xxx-upstr...@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K.

[PATCH] scsi: qla4xxx: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: qlogic-storage-upstr...@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K.

[PATCH] scsi: pmcraid: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen"

[PATCH] scsi: sas: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. This requires adding a pointer to hold the timer's target task, as there isn't a link back from slow_task.

[PATCH] scsi: megaraid: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Also consolidates the timer setup functions arguments, which are all identical, and corrects on-stack timer

[PATCH] scsi: ibmvscsi: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: "Martin K. Petersen" Cc: Tyrel Datwyler Cc:

[PATCH] scsi: ipr: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: Brian King Cc: "James E.J. Bottomley" Cc: "Martin K.

[PATCH] scsi: fcoe: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Cc: qlogic-storage-upstr...@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K.

[PATCH] scsi: aic7xxx: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
stat_timer only ever assigns the same function and data, so consolidate to using timer_setup(), adjust callback, drop everything else used to pass things around, and remove needless typedefs. reset_timer is unused; remove it. Cc: Hannes Reinecke Cc: "James E.J. Bottomley"

Re: [drivers/scsi/sg.c] general protection fault in sg_read

2017-10-25 Thread idaifish
You are right. I've tested on 4.14-rc6, and it cannot be reproducible. On Wed, Oct 25, 2017 at 4:01 PM, Johannes Thumshirn wrote: > idaifish writes: > >> Hi, >> >> I've got the following report while fuzzing the kernel with syzkaller. >> (on 4.9.58) > >

[PATCH] iscsi-target: Convert timers to use timer_setup()

2017-10-25 Thread Kees Cook
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Includes a fix for correcting an on-stack timer usage. Cc: "Nicholas A. Bellinger"

Re: [PATCH] scsi: .gitignore: Add scsi_devinfo_tbl.c

2017-10-25 Thread Martin K. Petersen
Jeffy, > Add generated scsi_devinfo_tbl.c into .gitignore. Applied to 4.15/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: .gitignore: Add scsi_devinfo_tbl.c

2017-10-25 Thread Hannes Reinecke
On 10/25/2017 09:39 AM, Jeffy Chen wrote: > Add generated scsi_devinfo_tbl.c into .gitignore. > > Signed-off-by: Jeffy Chen > --- > > drivers/scsi/.gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/scsi/.gitignore b/drivers/scsi/.gitignore >

Re: [drivers/scsi/sg.c] general protection fault in sg_read

2017-10-25 Thread Johannes Thumshirn
idaifish writes: > Hi, > > I've got the following report while fuzzing the kernel with syzkaller. > (on 4.9.58) Can you test if this is already fixed on 4.14-rcX? There have been a number of syzkaller related fixes between 4.9 and now. Probably we just missed to back-port it

Re: [PATCHv6,2/5] scsi: Export blacklist flags to sysfs

2017-10-25 Thread jeffy
Hi Hannes, On 10/25/2017 03:22 PM, Hannes Reinecke wrote: On 10/25/2017 03:48 AM, jeffy wrote: Hi guys, maybe we need to add the generated scsi_devinfo_tbl.c into drivers/scsi/.gitignore :) Indeed, maybe. So here's your chance to get a patch upstream :-) Ok, will do that :) Cheers,

[PATCH] scsi: .gitignore: Add scsi_devinfo_tbl.c

2017-10-25 Thread Jeffy Chen
Add generated scsi_devinfo_tbl.c into .gitignore. Signed-off-by: Jeffy Chen --- drivers/scsi/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/.gitignore b/drivers/scsi/.gitignore index c89ae9a04399..e2956741fbd1 100644 ---

Re: [PATCH v2.1] sd: Micro-optimize READ / WRITE CDB encoding

2017-10-25 Thread Hannes Reinecke
On 10/25/2017 05:52 AM, Douglas Gilbert wrote: > The sd_setup_read_write_cmnd() function is on the "fast path" for > block system access to SCSI devices (logical units). Rewrite this > function to improve speed and readability: > - use put_unaligned_be family of functions to save lots of shifts >

Re: [PATCHv6,2/5] scsi: Export blacklist flags to sysfs

2017-10-25 Thread Hannes Reinecke
On 10/25/2017 03:48 AM, jeffy wrote: > Hi guys, > > maybe we need to add the generated scsi_devinfo_tbl.c into > drivers/scsi/.gitignore :) > Indeed, maybe. So here's your chance to get a patch upstream :-) Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking

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

2017-10-25 Thread Marek Szyprowski
Hi Huacai, On 2017-10-25 03:22, 陈华才 wrote: Hi, Marek Patch3 is needed for stable, but Patch3 depend on Patch1 and Patch2. Then patch #3 has to be reworked. First change scsi to align the block queue to dma_get_cache_alignment(). This will be safe in all cases and it will not hurt memory