Re: [PATCH] scsi: csiostor: add support for Chelsio T6 adapters

2017-05-18 Thread Johannes Thumshirn
On 05/17/2017 05:00 PM, Varun Prakash wrote: > Signed-off-by: Varun Prakash > --- Please be a bit more verbose with the changelog. Thanks, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH] scsi: zero per-cmd driver data for each MQ I/O

2017-05-18 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] scsi: zero per-cmd driver data for each MQ I/O

2017-05-18 Thread Christoph Hellwig
On Wed, May 17, 2017 at 11:05:18PM +, Bart Van Assche wrote: > Thank you for the feedback. I'm working on a patch series that merges the > scsi-sq > and scsi-mq code paths for command initialization and that should fix the bug > you > encountered. While that sounds great (I tried it a while

Re: [PATCH 09/22] scsi: hisi_sas: retrieve SAS address for pci-based controller

2017-05-18 Thread John Garry
Hi Arnd, Currently there is no pci device listed in the ACPI tables. What I am doing is declaring a fake device in the root of the System bus tree of the ACPI tables, and in the kernel driver finding it by matching the name. It is not the ACPI companion for the pci device. So I think that we

Re: [PATCH] scsi: smartpqi: mark PM functions as __maybe_unused

2017-05-18 Thread Arnd Bergmann
On Thu, May 18, 2017 at 10:32 AM, Arnd Bergmann wrote: > The newly added suspend/resume support causes harmless warnings > when CONFIG_PM is disabled: > > smartpqi/smartpqi_init.c:5147:12: error: 'pqi_ctrl_wait_for_pending_io' > defined but not used [-Werror=unused-function] >

[PATCH] scsi: lpfc: make a couple of functions static

2017-05-18 Thread Colin King
From: Colin Ian King functions lpfc_nvmet_cleanup_io_context and lpfc_nvmet_setup_io_context can be made static as they do not need to be in global scope. Cleans up sparse warnings: "warning: symbol 'lpfc_nvmet_cleanup_io_context' was not declared. Should it be

blktests and /dev/sg syzkaller reproducers

2017-05-18 Thread Johannes Thumshirn
Hi Omar, I was thinking of adding some of the syszcaller reproducers I've collected, which have been crashing the SCSI generic driver. This would require blktests to have a build infrastructure (not a big deal I know). So my question is, are you comfortable with adding these tests (in a new

[PATCH] scsi: smartpqi: mark PM functions as __maybe_unused

2017-05-18 Thread Arnd Bergmann
The newly added suspend/resume support causes harmless warnings when CONFIG_PM is disabled: smartpqi/smartpqi_init.c:5147:12: error: 'pqi_ctrl_wait_for_pending_io' defined but not used [-Werror=unused-function] smartpqi/smartpqi_init.c:2019:13: error: 'pqi_wait_until_lun_reset_finished' defined

Re: [PATCH] scsi: csiostor: fix use after free in csio_hw_use_fwconfig()

2017-05-18 Thread Johannes Thumshirn
On 05/17/2017 05:00 PM, Varun Prakash wrote: > mbp pointer is passed to csio_hw_validate_caps() so call > mempool_free() after calling csio_hw_validate_caps(). > > Signed-off-by: Varun Prakash > --- Fixes: 541c571fa2fd ("csiostor:Use firmware version from

RE: [PATCH] scsi: zero per-cmd driver data for each MQ I/O

2017-05-18 Thread KY Srinivasan
> -Original Message- > From: Christoph Hellwig [mailto:h...@infradead.org] > Sent: Wednesday, May 17, 2017 11:55 PM > To: Bart Van Assche > Cc: j...@linux.vnet.ibm.com; linux-scsi@vger.kernel.org; linux- > ker...@vger.kernel.org; Long Li

RE: [PATCH] scsi: zero per-cmd driver data for each MQ I/O

2017-05-18 Thread Long Li
> -Original Message- > From: Bart Van Assche [mailto:bart.vanass...@sandisk.com] > Sent: Thursday, May 18, 2017 8:52 AM > To: h...@infradead.org > Cc: j...@linux.vnet.ibm.com; linux-scsi@vger.kernel.org; linux- > ker...@vger.kernel.org; Stephen Hemminger ; KY >

Re: Need help with handling failed ATA pass-through command and sense data

2017-05-18 Thread Ewan D. Milne
On Thu, 2017-05-18 at 11:34 -0400, Ewan D. Milne wrote: > On Thu, 2017-05-18 at 10:35 -0400, Alan Stern wrote: > > This is in reference to > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1351305 > > > > The problem is that some program (probably udisks2) periodically sends > > the

[PATCH 1/2] storvsc: use in place iterator function

2017-05-18 Thread Stephen Hemminger
In 4.12-rc1, new functions were added to support iterating over elements in the vmbus event ring. This patch uses them to simplify the ring buffer handling in virtual SCSI driver as well. Signed-off-by: Stephen Hemminger --- drivers/scsi/storvsc_drv.c | 44

[PATCH 0/2] storvsc: changes for scsi next

2017-05-18 Thread Stephen Hemminger
These are refactoring changes to the Hyper-V scsi driver. Stephen Hemminger (2): storvsc: use in place iterator function storvsc: remove unnecessary channel inbound lock drivers/hv/channel_mgmt.c | 1 - drivers/scsi/storvsc_drv.c | 52 --

[PATCH 2/2] storvsc: remove unnecessary channel inbound lock

2017-05-18 Thread Stephen Hemminger
In storvsc driver, inbound messages do not go through inbound lock. The only effect of this lock was is to provide a barrier for connect and remove logic. Signed-off-by: Stephen Hemminger --- drivers/hv/channel_mgmt.c | 1 - drivers/scsi/storvsc_drv.c | 8 +++-

Re: [PATCH v2 net-next] qed: Utilize FW 8.20.0.0

2017-05-18 Thread David Miller
From: Yuval Mintz Date: Thu, 18 May 2017 19:41:04 +0300 > This pushes qed [and as result, all qed* drivers] into using 8.20.0.0 > firmware. The changes are mostly contained in qed with minor changes > to qedi due to some HSI changes. > > Content-wise, the firmware

Re: Need help with handling failed ATA pass-through command and sense data

2017-05-18 Thread Alan Stern
On Thu, 18 May 2017, Ewan D. Milne wrote: > On Thu, 2017-05-18 at 11:34 -0400, Ewan D. Milne wrote: > > On Thu, 2017-05-18 at 10:35 -0400, Alan Stern wrote: > > > This is in reference to > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1351305 > > > > > > The problem is that some

Re: [PATCH] scsi: remove useless variable assignment

2017-05-18 Thread Gustavo A. R. Silva
Hi James, Quoting James Bottomley : On Wed, 2017-05-17 at 19:30 -0500, Gustavo A. R. Silva wrote: Remove this assignment once the value stored in variable _k_ is overwritten after a few lines. Addresses-Coverity-ID: 1226927 Signed-off-by: Gustavo A. R. Silva

Re: [PATCH] scsi: ufs: Clean up some rpm/spm level SysFS nodes upon remove

2017-05-18 Thread Subhash Jadavani
On 2017-05-11 23:36, Michal Potomski wrote: From: MichaƂ Potomski When reloading module these two attributes aren't cleaned up properly and they persist causing warnings when trying to load module again. Additionally they are not recreated properly due to that.

Re: [PATCH] scsi: zero per-cmd driver data for each MQ I/O

2017-05-18 Thread Bart Van Assche
On Wed, 2017-05-17 at 23:54 -0700, Christoph Hellwig wrote: > On Wed, May 17, 2017 at 11:05:18PM +, Bart Van Assche wrote: > > Thank you for the feedback. I'm working on a patch series that merges the > > scsi-sq > > and scsi-mq code paths for command initialization and that should fix the >

RE: [PATCH net-next] qed: Utilize FW 8.20.0.0

2017-05-18 Thread Mintz, Yuval
> >> This pushes qed [and as result, all qed* drivers] into using 8.20.0.0 > >> firmware. The changes are mostly contained in qed with minor changes > >> to qedi due to some HSI changes. > >> > >> Content-wise, the firmware contains fixes to various issues exposed > >> since the release of the

Need help with handling failed ATA pass-through command and sense data

2017-05-18 Thread Alan Stern
This is in reference to https://bugzilla.redhat.com/show_bug.cgi?id=1351305 The problem is that some program (probably udisks2) periodically sends the following ATA pass-through command to a USB-ATA bridge attached to a Western Digital drive: 85062000 e500

Re: [PATCH net-next] qed: Utilize FW 8.20.0.0

2017-05-18 Thread David Miller
From: David Miller Date: Thu, 18 May 2017 10:34:28 -0400 (EDT) > From: Yuval Mintz > Date: Wed, 17 May 2017 22:38:40 +0300 > >> This pushes qed [and as result, all qed* drivers] into using 8.20.0.0 >> firmware. The changes are mostly contained in

[PATCH v2] scsi: csiostor: add support for Chelsio T6 adapters

2017-05-18 Thread Varun Prakash
Enable probe for T6 adapters, add code to flash T6 firmware and firmware config file, use T6 specific macros. v2: updated commit message Signed-off-by: Varun Prakash --- drivers/scsi/csiostor/csio_hw.c | 79 ++--

Re: [PATCH blktests 0/3] Add SCSI generic test group

2017-05-18 Thread Johannes Thumshirn
On 05/18/2017 03:19 PM, Christoph Hellwig wrote: > All SG_IO test should also apply to block device nodes that support > the ioctl.. > But these are not necessarily SG_IO tests, are they? The test included is doesn't hit the SG_IO path in the sg driver, but the sg_read path. Of cause we can

Re: [PATCH] lpfc: Fix NULL pointer dereference during PCI error recovery

2017-05-18 Thread Guilherme G. Piccoli
On 05/17/2017 09:21 PM, Martin K. Petersen wrote: > > Guilherme, > >> Recent commit on patchset "lpfc updates for 11.2.0.14" fixed an issue >> about dereferencing a NULL pointer on port reset. The specific commit, >> named "lpfc: Fix system crash when port is reset.", is missing a check >>

Re: Need help with handling failed ATA pass-through command and sense data

2017-05-18 Thread Ewan D. Milne
On Thu, 2017-05-18 at 10:35 -0400, Alan Stern wrote: > This is in reference to > > https://bugzilla.redhat.com/show_bug.cgi?id=1351305 > > The problem is that some program (probably udisks2) periodically sends > the following ATA pass-through command to a USB-ATA bridge attached to > a

[Bug 195285] qla2xxx FW immediatly crashing after target start

2017-05-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=195285 --- Comment #7 from himanshu.madh...@cavium.com (himanshu.madh...@qlogic.com) --- Created attachment 256619 --> https://bugzilla.kernel.org/attachment.cgi?id=256619=edit Patch to address target configuration for ISP25xx -- You are receiving

Re: Need help with handling failed ATA pass-through command and sense data

2017-05-18 Thread Ewan D. Milne
On Thu, 2017-05-18 at 13:37 -0400, Alan Stern wrote: > > I had completely forgotten about this code. :-( > > Looks like you put your finger on the source of the problem. So if the > device sends back essentially empty sense data (SK = No Sense, ASC = > ASCQ = 0), but the USB transport

[Bug 195285] qla2xxx FW immediatly crashing after target start

2017-05-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=195285 --- Comment #6 from himanshu.madh...@cavium.com (himanshu.madh...@qlogic.com) --- Hi Anthony, Laurence, Can you try attached patch to see if it works for you? if Yes, I'll send out to SCSI mailing list to be included into upstream. Thanks,

[RFC v2 2/2] scsi: add rate limit to scsi sense code uevent

2017-05-18 Thread Song Liu
This patch adds rate limits to SCSI sense code uevets. Currently, the rate limit is hard-coded to 16 events per second. The code tracks nano second time of latest 16 events in a circular buffer. When a new event arrives, the time is compared against the latest time in the buffer. If the

[RFC v2 1/2] scsi: generate uevent for SCSI sense code

2017-05-18 Thread Song Liu
This patch adds capability for SCSI layer to generate uevent for SCSI sense code. The feature is gated by CONFIG_SCSI_SENSE_UEVENT. We can configure which sense keys generate uevent for each device through sysfs entry sense_event_filter, which is a bitmap of "sense keys to generate uevent" For

[RFC v2 0/2] generate uevent for SCSI sense code

2017-05-18 Thread Song Liu
This change is to follow up our discussion on event log for media management during LSF/MM 2017. I have included feedbacks from Hannes Reinecke, Ewan D. Milne, and Benjamin Block. Please kindly let me know your thoughts on this. Thanks, Song Song Liu (2): scsi: generate uevent for SCSI sense

Re: [PATCH blktests 2/3] tests/sg: add SCSI generic test grouop

2017-05-18 Thread Omar Sandoval
On Thu, May 18, 2017 at 02:06:20PM -0700, Omar Sandoval wrote: > On Thu, May 18, 2017 at 02:13:07PM +0200, Johannes Thumshirn wrote: > > Add a test group for tests of the SCSI generic driver and and > > functions common to the SCSI generic driver and it's test cases. > > > > Signed-off-by:

Re: [PATCH blktests 3/3] sg/001: add regression test for syzcaller generated GPF

2017-05-18 Thread Omar Sandoval
On Thu, May 18, 2017 at 02:13:08PM +0200, Johannes Thumshirn wrote: > Add a regression test for commit 48ae8484e9fc ("scsi: sg: don't return > bogus Sg_requests"). This is a general protection fault triggered by > syzcaller. > > Signed-off-by: Johannes Thumshirn > --- >

[PATCH v2] scsi: zero per-cmd private driver data for each MQ I/O

2017-05-18 Thread Long Li
From: Long Li In lower layer driver's (LLD) scsi_host_template, the driver may optionally ask SCSI to allocate its private driver memory for each command, by specifying cmd_size. This memory is allocated at the end of scsi_cmnd by SCSI. Later when SCSI queues a command,

Re: [PATCH blktests 2/3] tests/sg: add SCSI generic test grouop

2017-05-18 Thread Omar Sandoval
On Thu, May 18, 2017 at 02:13:07PM +0200, Johannes Thumshirn wrote: > Add a test group for tests of the SCSI generic driver and and > functions common to the SCSI generic driver and it's test cases. > > Signed-off-by: Johannes Thumshirn > --- > common/sg | 22

Re: [PATCH blktests 0/3] Add SCSI generic test group

2017-05-18 Thread Omar Sandoval
On Thu, May 18, 2017 at 03:29:45PM +0200, Johannes Thumshirn wrote: > On 05/18/2017 03:19 PM, Christoph Hellwig wrote: > > All SG_IO test should also apply to block device nodes that support > > the ioctl.. > > > > But these are not necessarily SG_IO tests, are they? > > The test included is

[Bug 195285] qla2xxx FW immediatly crashing after target start

2017-05-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=195285 --- Comment #8 from lober...@redhat.com --- - Original Message - > From: bugzilla-dae...@bugzilla.kernel.org > To: linux-s...@kernel.org > Sent: Thursday, May 18, 2017 2:09:51 PM > Subject: [Bug 195285] qla2xxx FW immediatly crashing

Re: [PATCH] scsi: libcxgbi: fix skb use after free

2017-05-18 Thread Martin K. Petersen
> skb->data is assigned to task->hdr in cxgbi_conn_alloc_pdu(), > skb gets freed after tx but task->hdr is still dereferenced in > iscsi_tcp_task_xmit() to avoid this call skb_get() after allocating > skb and free the skb in cxgbi_cleanup_task() or before allocating new > skb in

Re: [PATCH 0/2] storvsc: changes for scsi next

2017-05-18 Thread Martin K. Petersen
Stephen, > These are refactoring changes to the Hyper-V scsi driver. Applied to 4.13/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: ufs: Clean up some rpm/spm level SysFS nodes upon remove

2017-05-18 Thread Martin K. Petersen
Michal, > When reloading module these two attributes aren't cleaned up properly > and they persist causing warnings when trying to load module > again. Additionally they are not recreated properly due to that. Applied to 4.12/scsi-fixes, thanks! -- Martin K. Petersen Oracle Linux

Re: [PATCH] csiostor: Avoid content leaks and casts

2017-05-18 Thread Martin K. Petersen
Varun, You weren't CC:ed on this patch. Please review. Thanks! > When copying attributes, the len argument was padded out and the > resulting memcpy() would copy beyond the end of the source buffer. > Avoid this, and use size_t for val_len to avoid all the > casts. Similarly, avoid source

Re: [PATCH] scsi: csiostor: fix use after free in csio_hw_use_fwconfig()

2017-05-18 Thread Martin K. Petersen
Varun, > mbp pointer is passed to csio_hw_validate_caps() so call > mempool_free() after calling csio_hw_validate_caps(). Applied to 4.12/scsi-fixes. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: libiscsi: use kvzalloc for iscsi_pool_init

2017-05-18 Thread Martin K. Petersen
Kyle, > Use kvzalloc for iscsi_pool in iscsi_pool_init. Applied to 4.13/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2] scsi: zero per-cmd private driver data for each MQ I/O

2017-05-18 Thread Martin K. Petersen
Long, > In lower layer driver's (LLD) scsi_host_template, the driver may > optionally ask SCSI to allocate its private driver memory for each > command, by specifying cmd_size. This memory is allocated at the end > of scsi_cmnd by SCSI. Later when SCSI queues a command, the LLD can > use

Re: [PATCH] scsi: smartpqi: mark PM functions as __maybe_unused

2017-05-18 Thread Martin K. Petersen
Arnd, > I notice that today's linux-next no longer contains the patch that > introduced the warning. I had tagged my 4.12 fixes branch with for-next. It should be back to 4.13 material shortly. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v2] scsi: csiostor: add support for Chelsio T6 adapters

2017-05-18 Thread Martin K. Petersen
Varun, > Enable probe for T6 adapters, add code to flash T6 firmware and > firmware config file, use T6 specific macros. Applied to 4.13/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH blktests 0/3] Add SCSI generic test group

2017-05-18 Thread Christoph Hellwig
All SG_IO test should also apply to block device nodes that support the ioctl..

Re: [PATCH net-next] qed: Utilize FW 8.20.0.0

2017-05-18 Thread David Miller
From: Yuval Mintz Date: Wed, 17 May 2017 22:38:40 +0300 > This pushes qed [and as result, all qed* drivers] into using 8.20.0.0 > firmware. The changes are mostly contained in qed with minor changes > to qedi due to some HSI changes. > > Content-wise, the firmware

[PATCH blktests 3/3] sg/001: add regression test for syzcaller generated GPF

2017-05-18 Thread Johannes Thumshirn
Add a regression test for commit 48ae8484e9fc ("scsi: sg: don't return bogus Sg_requests"). This is a general protection fault triggered by syzcaller. Signed-off-by: Johannes Thumshirn --- tests/sg/001 | 48

[PATCH blktests 1/3] Add ability to build test-cases

2017-05-18 Thread Johannes Thumshirn
Add the ability to build test cases from C files. This is handy for things like syzcaller reproducers and all other kinds of test binaries. Signed-off-by: Johannes Thumshirn --- Makefile | 26 +++- src/.gitignore | 1 + src/Makefile | 14 ++ src/sg-001.c | 430

[PATCH blktests 0/3] Add SCSI generic test group

2017-05-18 Thread Johannes Thumshirn
Add a test group for the SCSI generic driver and one syzcaller reproducer for this group. The reprodcuer is distributed as a C program, so the makefile is amended to build C files to be used in the test. I didn't get the TIMEOUT to work (not even with block/001) so I decided to just require the

[PATCH blktests 2/3] tests/sg: add SCSI generic test grouop

2017-05-18 Thread Johannes Thumshirn
Add a test group for tests of the SCSI generic driver and and functions common to the SCSI generic driver and it's test cases. Signed-off-by: Johannes Thumshirn --- common/sg | 22 ++ tests/sg/group | 40 2