Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-12-07 Thread Jason Yan
On 2017/12/8 6:57, Cong Wang wrote: On Thu, Dec 7, 2017 at 5:37 AM, John Garry wrote: On 28/11/2017 17:04, Cong Wang wrote: I don't understand, the only caller of sas_unregister_domain_devices() is sas_deform_port(). And sas_deform_port() may be called from another

Re: [PATCH] scsi_debug: Add support for injecting SCSI_MLQUEUE_HOST_BUSY

2017-12-07 Thread Martin K. Petersen
Bart, > Although it is important to be able to trigger the code in the SCSI > core for SCSI_MLQUEUE_HOST_BUSY handling, currently it is > nontrivial to trigger that code. Hence this patch that adds a new > error injection option to the scsi_debug driver for making the > .queue_rq()

Re: [PATCH v2 1/3] scsi: Fix a scsi_show_rq() NULL pointer dereference

2017-12-07 Thread Martin K. Petersen
Ming, > As I explained in [1], the use-after-free is inevitable no matter if > clearing 'SCpnt->cmnd' before mempool_free() in sd_uninit_command() or > not, so we need to comment the fact that cdb may point to garbage > data, and this function(especially __scsi_format_command() has to > survive

Re: [PATCH] scsi_debug: Add support for injecting SCSI_MLQUEUE_HOST_BUSY

2017-12-07 Thread Douglas Gilbert
On 2017-12-07 09:12 PM, Martin K. Petersen wrote: Bart, Although it is important to be able to trigger the code in the SCSI core for SCSI_MLQUEUE_HOST_BUSY handling, currently it is nontrivial to trigger that code. Hence this patch that adds a new error injection option to the scsi_debug

Re: [PATCH try #2] scsi_devinfo: apply to HP-rebranded the same flags as Hitachi

2017-12-07 Thread Martin K. Petersen
Xose, > 627511e3e modified some Hitachi entries: > > Four models, OPEN-/DF400/DF500/DISK-SUBSYSTEM, can handle REPORT_LUN, > and the BLIST_REPORTLUN2 flag needs to be set. And DF600 doesn't require > any flags because it returns ANSI 03h (SPC). > ~~~ > > The same should have been

Re: [PATCH] scsi: scsi_devinfo: replace "Dell PV 650F" with "EMC CLARiiON"

2017-12-07 Thread Martin K. Petersen
Xose, > The Dell PV650F is a re-branded CLARiiON FC5700. > And DGC/RAID,DISK identifies all CLARiiON family. Applied to 4.16/scsi-queue. Thank you! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi_dh: add new rdac devices

2017-12-07 Thread Martin K. Petersen
Xose, > Add IBM 3542 and 3552, arrays: FAStT200 and FAStT500. > Add full STK OPENstorage family, arrays: 9176, D173, D178, D210, D220, D240 > and D280. > Add STK BladeCtlr family, arrays: B210, B220, B240 and B280. > > These changes were done in multipath-tools time ago. Applied to

Re: [PATCH] scsi_devinfo: apply to HP XP the same flags as Hitachi VSP

2017-12-07 Thread Martin K. Petersen
Xose, > 56f3d383f modified some Hitachi entries: > >HITACHI is always supporting VPD pages, even though it's claiming to >support SCSI Revision 3 only. > ~~~ > > The same should have been done also for HP-rebranded. Applied to 4.16/scsi-queue. -- Martin K. Petersen Oracle Linux

Re: [PATCH] scsi: pmcraid: use correct size unit when calling find_first_zero_bit()

2017-12-07 Thread Martin K. Petersen
Niklas, > find_first_zero_bit()'s parameter 'size' is defined in bits, > not in bytes. Applied to 4.16/scsi-queue, thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: fusion: clean up some indentations

2017-12-07 Thread Martin K. Petersen
Colin, > There are several places where the source is not indented correctly > with either too many or too few levels of intentation. Fix these. Applied to 4.16/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] Remove scsi_dh_remove_device()

2017-12-07 Thread Martin K. Petersen
Bart, > Remove this function since it has an empty body. Applied to 4.16/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi_debug: Add support for injecting SCSI_MLQUEUE_HOST_BUSY

2017-12-07 Thread Martin K. Petersen
Bart, > Although it is important to be able to trigger the code in the SCSI > core for SCSI_MLQUEUE_HOST_BUSY handling, currently it is nontrivial > to trigger that code. Hence this patch that adds a new error injection > option to the scsi_debug driver for making the .queue_rq() >

Re: [PATCH] Unexport scsi_initialize_rq()

2017-12-07 Thread Martin K. Petersen
Bart, > Commit 651a01364994 ("scsi: scsi_transport_sas: switch to bsg-lib for > SMP passthrough") removed the only call to scsi_initialize_rq() from > outside the SCSI core. Hence unexport scsi_initialize_rq(). Applied to 4.16/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux

Re: [PATCH v2 1/3] scsi: Fix a scsi_show_rq() NULL pointer dereference

2017-12-07 Thread Ming Lei
On Tue, Dec 05, 2017 at 04:57:51PM -0800, Bart Van Assche wrote: > Avoid that scsi_show_rq() triggers a NULL pointer dereference if > called after sd_uninit_command(). Swap the NULL pointer assignment > and the mempool_free() call in sd_uninit_command() to make it less > likely that scsi_show_rq()

答复: [PATCH v6 1/5] scsi: ufs: add Hisilicon ufs driver code

2017-12-07 Thread liwei (CM)
Hi,Philippe, Thank you for your suggestion, and I'll consider that next patch. -邮件原件- 发件人: Philippe Ombredanne [mailto:pombreda...@nexb.com] 发送时间: 2017年12月7日 18:34 收件人: liwei (CM) 抄送: Rob Herring; Mark Rutland; xuwei (O); Catalin Marinas; Will Deacon; vinholika...@gmail.com; James E.J.

Re: [PATCH 0/3] SCSI device blacklist handling improvements

2017-12-07 Thread Martin K. Petersen
Bart, > Are you perhaps referring to the five __force casts? If so, do you > have a suggestion for avoiding that sparse reports false positive > warnings on the conversions between int and blist_flags_t? The only > approach I can think of to reduce the number of __force casts is to > embed these

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-12-07 Thread Cong Wang
On Thu, Dec 7, 2017 at 4:40 PM, Cong Wang wrote: > On Thu, Dec 7, 2017 at 2:57 PM, Cong Wang wrote: >> On Thu, Dec 7, 2017 at 5:37 AM, John Garry wrote: >>> On 28/11/2017 17:04, Cong Wang wrote: I don't

Re: linux-next: build failure after merge of the scsi-mkp tree

2017-12-07 Thread Martin K. Petersen
> I'm perfectly OK with taking it through the SCSI tree. Probably the > path of least resistance. Applied to 4.16/scsi-queue and rebased so it sits before Bart's patch. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: bfa: fix type conversion warning

2017-12-07 Thread Martin K. Petersen
Arnd, > This changes the code back to shost_priv() once more, but encapsulates > it in an inline function to document the rather unusual way of using > the private data only as a pointer to the previously allocated > structure. Applied to 4.15/scsi-fixes, thank you! -- Martin K. Petersen

Re: [PATCH] SCSI: run queue if SCSI device queue isn't ready and queue is idle

2017-12-07 Thread Martin K. Petersen
Ming, > Jens, Martin, would any of you mind making this patch in V4.15? Since > it fixes real use cases and this way is exact what we do before > 0df21c86bdbf("scsi: implement .get_budget and .put_budget for blk-mq"). Applied to 4.15/scsi-fixes, thank you! -- Martin K. Petersen Oracle

Re: [PATCH] SCSI: run queue if SCSI device queue isn't ready and queue is idle

2017-12-07 Thread Ming Lei
On Thu, Dec 07, 2017 at 09:06:58PM +, Bart Van Assche wrote: > On Wed, 2017-12-06 at 00:28 +0800, Ming Lei wrote: > > On Tue, Dec 05, 2017 at 04:08:20PM +, Bart Van Assche wrote: > > > On Tue, 2017-12-05 at 15:52 +0800, Ming Lei wrote: > > > > diff --git a/drivers/scsi/scsi_lib.c

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-12-07 Thread Cong Wang
On Thu, Dec 7, 2017 at 2:57 PM, Cong Wang wrote: > On Thu, Dec 7, 2017 at 5:37 AM, John Garry wrote: >> On 28/11/2017 17:04, Cong Wang wrote: >>> >>> I don't understand, the only caller of sas_unregister_domain_devices() >>> is sas_deform_port().

Re: [PATCH] SCSI: run queue if SCSI device queue isn't ready and queue is idle

2017-12-07 Thread Ming Lei
On Thu, Dec 07, 2017 at 09:11:54PM +, Bart Van Assche wrote: > On Thu, 2017-12-07 at 09:31 +0800, Ming Lei wrote: > > But if you always call blk_mq_sched_mark_restart_hctx() before a new > > dispatch, that may affect performance on NVMe which may never trigger > > BLK_STS_RESOURCE. > > Hmm

[PATCH] qla2xxx: Suppress gcc 7 fall-through warnings

2017-12-07 Thread Bart Van Assche
Avoid that building with gcc 7 and W=1 triggers warnings similar to the following: drivers/scsi/qla2xxx/qla_isr.c:1189:27: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Bart Van Assche Cc: Himanshu Madhani

[PATCH] Remove scsi_dh_remove_device()

2017-12-07 Thread Bart Van Assche
Remove this function since it has an empty body. Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn --- drivers/scsi/scsi_priv.h | 1 - drivers/scsi/scsi_sysfs.c | 3 --- 2

[PATCH] Unexport scsi_initialize_rq()

2017-12-07 Thread Bart Van Assche
Commit 651a01364994 ("scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough") removed the only call to scsi_initialize_rq() from outside the SCSI core. Hence unexport scsi_initialize_rq(). Signed-off-by: Bart Van Assche Cc: Christoph Hellwig Cc:

Re: [PATCH v6 2/5] dt-bindings: scsi: ufs: add document for hisi-ufs

2017-12-07 Thread Rob Herring
On Thu, Dec 07, 2017 at 06:20:23PM +0800, Li Wei wrote: > add ufs node document for Hisilicon. > > Signed-off-by: Li Wei > --- Version history? > Documentation/devicetree/bindings/ufs/ufs-hisi.txt | 38 > ++ > 1 file changed, 38 insertions(+) >

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-12-07 Thread Cong Wang
On Thu, Dec 7, 2017 at 5:37 AM, John Garry wrote: > On 28/11/2017 17:04, Cong Wang wrote: >> >> I don't understand, the only caller of sas_unregister_domain_devices() >> is sas_deform_port(). >> > > And sas_deform_port() may be called from another worker on the same queue,

[PATCH] scsi_debug: Add support for injecting SCSI_MLQUEUE_HOST_BUSY

2017-12-07 Thread Bart Van Assche
Although it is important to be able to trigger the code in the SCSI core for SCSI_MLQUEUE_HOST_BUSY handling, currently it is nontrivial to trigger that code. Hence this patch that adds a new error injection option to the scsi_debug driver for making the .queue_rq() implementation of this driver

Re: [PATCH] drivers/scsi/qla2xxx: fix double free bug after firmware timeout

2017-12-07 Thread Max Kellermann
On 2017/12/07 21:38, "Madhani, Himanshu" wrote: > NACK > > These calls are asynchronous calls and free should be called by > completion. I don't understand the NACK, and your text doesn't explain it. It only describes a second bug that is orthogonal to mine.

[PATCH] scsi: libiscsi: Allow sd_shutdown on bad transport

2017-12-07 Thread Rafael David Tinoco
If, for any reason, userland shuts down iscsi transport interfaces before proper logouts - like when logging in to LUNs manually, without logging out on server shutdown, or when automated scripts can't umount/logout from logged LUNs - kernel will hang forever on its sd_sync_cache() logic, after

[Bug 197875] Processes hang on attempted access of WDC WD30-EZRX 3TB HDD on HP Z420 Workstation

2017-12-07 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=197875 --- Comment #9 from Bart Van Assche (bvanass...@acm.org) --- My hope was that the list of PCI devices would show a PCI HBA of which the driver has been modified recently. Since that's not the case I'm out of ideas about what could be the root

Re: linux-next: build failure after merge of the scsi-mkp tree

2017-12-07 Thread Martin K. Petersen
Stephen, >> I have to defer to you guys on that one. Left to myself, I will just >> push it into the next merge window (as opposed to using my normal >> process, which at this point would get it into the one following). >> >> So please let me know how you would like to proceed. > > Clearly, it

Re: [PATCH] SCSI: run queue if SCSI device queue isn't ready and queue is idle

2017-12-07 Thread Bart Van Assche
On Thu, 2017-12-07 at 09:31 +0800, Ming Lei wrote: > But if you always call blk_mq_sched_mark_restart_hctx() before a new > dispatch, that may affect performance on NVMe which may never trigger > BLK_STS_RESOURCE. Hmm ... only the SCSI core implements .get_budget() and .put_budget() and I

Re: linux-next: build failure after merge of the scsi-mkp tree

2017-12-07 Thread Paul E. McKenney
On Fri, Dec 08, 2017 at 07:34:39AM +1100, Stephen Rothwell wrote: > Hi all, > > On Thu, 7 Dec 2017 09:40:38 -0800 "Paul E. McKenney" > wrote: > > > > On Thu, Dec 07, 2017 at 05:30:03PM +, Bart Van Assche wrote: > > > However, what's not clear to me is through

Re: [PATCH] SCSI: run queue if SCSI device queue isn't ready and queue is idle

2017-12-07 Thread Bart Van Assche
On Wed, 2017-12-06 at 00:28 +0800, Ming Lei wrote: > On Tue, Dec 05, 2017 at 04:08:20PM +, Bart Van Assche wrote: > > On Tue, 2017-12-05 at 15:52 +0800, Ming Lei wrote: > > > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > > > index db9556662e27..1816dd8259b3 100644 > > > ---

Re: [PATCH] drivers/scsi/qla2xxx: fix double free bug after firmware timeout

2017-12-07 Thread Madhani, Himanshu
Hi Max, > On Dec 7, 2017, at 6:46 AM, Max Kellermann wrote: > > When the qla2xxx firmware is unavailable, eventually > qla2x00_sp_timeout() is reached, which calls the timeout function and > frees the srb_t instance. > > The timeout function always resolves to

Re: linux-next: build failure after merge of the scsi-mkp tree

2017-12-07 Thread Stephen Rothwell
Hi all, On Thu, 7 Dec 2017 09:40:38 -0800 "Paul E. McKenney" wrote: > > On Thu, Dec 07, 2017 at 05:30:03PM +, Bart Van Assche wrote: > > However, what's not clear to me is through which tree this patch should be > > sent to Linus? Should the above patch be sent

Re: linux-next: build failure after merge of the scsi-mkp tree

2017-12-07 Thread Paul E. McKenney
On Thu, Dec 07, 2017 at 05:30:03PM +, Bart Van Assche wrote: > On Wed, 2017-12-06 at 20:42 -0800, Paul E. McKenney wrote: > > On Thu, Dec 07, 2017 at 03:25:21PM +1100, Stephen Rothwell wrote: > > > On Thu, 7 Dec 2017 03:59:30 + Bart Van Assche > > > wrote: [ . .

Re: [PATCH 0/3] SCSI device blacklist handling improvements

2017-12-07 Thread Bart Van Assche
On Wed, 2017-12-06 at 21:03 -0500, Martin K. Petersen wrote: > > These three patches is what I came up with after having reviewed > > recent changes in the code for handling blacklist flags > > handling. Please consider these patches for kernel v4.16. > > I applied 1 and 3 to 4.16/scsi-queue. I

Re: linux-next: build failure after merge of the scsi-mkp tree

2017-12-07 Thread Bart Van Assche
On Wed, 2017-12-06 at 20:42 -0800, Paul E. McKenney wrote: > On Thu, Dec 07, 2017 at 03:25:21PM +1100, Stephen Rothwell wrote: > > On Thu, 7 Dec 2017 03:59:30 + Bart Van Assche > > wrote: > > > On Thu, 2017-12-07 at 14:57 +1100, Stephen Rothwell wrote: > > > > After

Re: [PATCH v3 0/2] Ensure that the SCSI error handler gets woken up

2017-12-07 Thread Bart Van Assche
On Thu, 2017-12-07 at 12:02 +, John Garry wrote: > On 07/12/2017 01:55, Martin K. Petersen wrote: > > > > Bart, > > > > > As reported by Pavel Tikhomirov it can happen that the SCSI error > > > handler does not get woken up. This is very annoying because it > > > results in a queue stall.

[PATCH] drivers/scsi/qla2xxx: fix double free bug after firmware timeout

2017-12-07 Thread Max Kellermann
When the qla2xxx firmware is unavailable, eventually qla2x00_sp_timeout() is reached, which calls the timeout function and frees the srb_t instance. The timeout function always resolves to qla2x00_async_iocb_timeout(), which invokes another callback function called "done". All of these

Re: [PATCH] libsas: flush pending destruct work in sas_unregister_domain_devices()

2017-12-07 Thread John Garry
On 28/11/2017 17:04, Cong Wang wrote: On Tue, Nov 28, 2017 at 3:18 AM, John Garry wrote: On 28/11/2017 08:20, Johannes Thumshirn wrote: On Mon, Nov 27, 2017 at 04:24:45PM -0800, Cong Wang wrote: We saw dozens of the following kernel waring: WARNING: CPU: 0 PID: 705

Re: [PATCH v3 0/2] Ensure that the SCSI error handler gets woken up

2017-12-07 Thread John Garry
On 07/12/2017 01:55, Martin K. Petersen wrote: Bart, As reported by Pavel Tikhomirov it can happen that the SCSI error handler does not get woken up. This is very annoying because it results in a queue stall. The two patches in this series address this issue without acquiring the SCSI host

[PATCH v2] scsi: libsas: fix length error in sas_smp_handler()

2017-12-07 Thread Jason Yan
The bsg_job_done() requires the length of payload received, but we give it the untransferred residual. Fixes: 651a01364994 ("scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough") Reported-and-tested-by: chenqilin Signed-off-by: Jason Yan

Re: [PATCH v6 1/5] scsi: ufs: add Hisilicon ufs driver code

2017-12-07 Thread Philippe Ombredanne
Dear Li, On Thu, Dec 7, 2017 at 11:20 AM, Li Wei wrote: > add Hisilicon ufs driver code. > > Signed-off-by: Li Wei > Signed-off-by: Geng Jianfeng > Signed-off-by: Zang Leigang > Signed-off-by: Yu

Re: [PATCH] scsi: libsas: fix length error in sas_smp_handler()

2017-12-07 Thread Jason Yan
On 2017/12/7 17:27, John Garry wrote: On 07/12/2017 01:41, Jason Yan wrote: Can anybody review this patch? Our test of SG_IO all failed because of this bug. On 2017/12/5 17:39, Jason Yan wrote: The bsg_job_done() requires the length of payload received, but we give it the untransferred

[PATCH v6 0/5] scsi: ufs: add ufs driver code for Hisilicon Hi3660 SoC

2017-12-07 Thread Li Wei
This patchset adds driver support for UFS for Hi3660 SoC. It is verified on HiKey960 board. Li Wei (5): scsi: ufs: add Hisilicon ufs driver code dt-bindings: scsi: ufs: add document for hisi-ufs arm64: dts: add ufs dts node arm64: defconfig: enable configs for Hisilicon ufs arm64:

[PATCH v6 4/5] arm64: defconfig: enable configs for Hisilicon ufs

2017-12-07 Thread Li Wei
This enable configs for Hisilicon Hi UFS driver. Signed-off-by: Li Wei Signed-off-by: Zhangfei Gao Signed-off-by: Guodong Xu --- arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH v6 2/5] dt-bindings: scsi: ufs: add document for hisi-ufs

2017-12-07 Thread Li Wei
add ufs node document for Hisilicon. Signed-off-by: Li Wei --- Documentation/devicetree/bindings/ufs/ufs-hisi.txt | 38 ++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/ufs/ufs-hisi.txt diff --git

[PATCH v6 1/5] scsi: ufs: add Hisilicon ufs driver code

2017-12-07 Thread Li Wei
add Hisilicon ufs driver code. Signed-off-by: Li Wei Signed-off-by: Geng Jianfeng Signed-off-by: Zang Leigang Signed-off-by: Yu Jianfeng --- drivers/scsi/ufs/Kconfig| 9 +

[PATCH v6 5/5] arm64: defconfig: enable f2fs and squashfs

2017-12-07 Thread Li Wei
Partitions in HiKey960 are formatted as f2fs and squashfs. f2fs is for userdata; squashfs is for system. Both partitions are required by Android. Signed-off-by: Li Wei Signed-off-by: Zhangfei Gao Signed-off-by: Guodong Xu ---

[PATCH v6 3/5] arm64: dts: add ufs dts node

2017-12-07 Thread Li Wei
arm64: dts: add ufs node for Hisilicon. Signed-off-by: Li Wei --- arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi index

Re: [PATCH] scsi: libsas: fix length error in sas_smp_handler()

2017-12-07 Thread John Garry
On 07/12/2017 01:41, Jason Yan wrote: Can anybody review this patch? Our test of SG_IO all failed because of this bug. On 2017/12/5 17:39, Jason Yan wrote: The bsg_job_done() requires the length of payload received, but we give it the untransferred residual. Fixes: 651a01364994 ("scsi:

Re: [PATCH] scsi: bfa: fix type conversion warning

2017-12-07 Thread Hannes Reinecke
On Wed, 6 Dec 2017 15:14:18 +0100 Arnd Bergmann wrote: > A regression fix introduced a harmless type mismatch warning: > > drivers/scsi/bfa/bfad_bsg.c: In function 'bfad_im_bsg_vendor_request': > drivers/scsi/bfa/bfad_bsg.c:3137:35: error: initialization of 'struct >

Re: [PATCH] scsi: bfa: fix type conversion warning

2017-12-07 Thread Johannes Thumshirn
Thanks Arnd, 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