Re: 答复: Re: [Patch] scsi_error: should not get sense for timeout IO in scsi error handler

2015-08-01 Thread Hannes Reinecke
On 08/01/2015 04:26 AM, jiang.bi...@zte.com.cn wrote: > Hannes Reinecke 写于 2015/07/31 21:17:33: > >> Hannes Reinecke >> 2015/07/31 21:17 >> >> 收件人 >> >> jiang.bi...@zte.com.cn, linux-scsi@vger.kernel.org, jbottom...@odin.com, > >> >> 抄送 >> >> 主题 >> >> Re: [Patch] scsi_error: should not get se

[Patch] scsi_ioctl: support persistent reserve commands through ioctl for non-root user.

2015-08-01 Thread jiang . biao2
scsi_ioctl: support persistent reserve commands through ioctl for non-root user. Scsi persistent reserve commands need to be used for non-root user in many scenarios. EPERM error will be returned by sg_io() when PERSISTENT_RESERVE_OUT or PERSISTENT_RESERVE_IN command is sent through ioctl() for no

[PATCH v2 1/6] scsi: ufs: avoid using hostdata after scsi_host_put()

2015-08-01 Thread Akinobu Mita
The hostdata array, which is denoted by 'hba' in ufs driver, should not be accessed after calling scsi_host_put(). Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: "James E.J. Bottomley" Cc: Christoph Hellwig Cc: Dolev Raviv Cc: Sujit Reddy Thumma Cc: Subhash Jadavani Cc: Hannes Reinec

[PATCH v2 3/6] scsi: ufs: fix unbalanced power.disable_depth after reloading driver

2015-08-01 Thread Akinobu Mita
Every time the driver is reloaded, the warning message "Unbalanced pm_runtime_enable!" is triggered due to unbalanced power.disable_depth. This is because pm_runtime_enable() is called during driver probe but pm_runtime_disable() is missed on driver remove. This also restores the device's runtime

[PATCH v2 0/6] scsi: ufs: fix several issues caused by driver reloading

2015-08-01 Thread Akinobu Mita
This patch set addresses several issues caused by driver reloading in ufs driver. The first version of this series was sent on March 28. This version gained three more fixes. * Changes from v1 - Call pm_runtime_put_noidle() where idle callback shouldn't be called - Prevent IRQ handler accessing a

[PATCH v2 2/6] scsi: ufs: fix unbalanced power.usage_count after reloading driver

2015-08-01 Thread Akinobu Mita
On driver removal, pm_runtime_get_sync() is called, but pm_runtime_put_*() is missed. So once the driver is reloaded, the device's power.usage_count is unbalanced and the idle callback for the device will never be called. Signed-off-by: Akinobu Mita Cc: Vinayak Holikatti Cc: "James E.J. Bottoml

[PATCH v2 4/6] scsi: ufs: prevent IRQ handler accessing already freed hostdata

2015-08-01 Thread Akinobu Mita
As UFS driver registers IRQ handler as a shared IRQ, when CONFIG_DEBUG_SHIRQ=y, an extra call will be made while unregistering the IRQ handler. Unfortunately, the extra call will accesses already freed hostdata. This is because devm_request_irq() is used to register IRQ handler so that it will be

[PATCH v2 6/6] scsi: ufs: fix module reference for scsi host

2015-08-01 Thread Akinobu Mita
While accessing a UFS device, the module reference count for core driver (ufshcd) is incremented but not incremented for the actual glue driver (ufshcd-pci or ufshcd-pltfrm). Because these drivers allocate scsi hosts with scsi_host_template defined in ufshcd module. So these drivers always can be

[PATCH v2 5/6] scsi: ufs: fix unloading module while runtime suspended

2015-08-01 Thread Akinobu Mita
The ufs driver calls scsi_device_get() in ufshcd_set_dev_pwr_mode() in order to avoid manual delete of UFS device W-LUN by holding the reference. But scsi_device_get() has been changed to fail when the LLD module is in the process of being unloaded. So it no longer doesn't work if the module is u

Re: [PATCH 0/3] IB/srp patches for Linux kernel v4.3

2015-08-01 Thread Doug Ledford
On 07/31/2015 05:12 PM, Bart Van Assche wrote: > Hello Doug, > > Please apply the following three patches at your earliest convenience: > > 0001-IB-srp-Constify-a-function-argument.patch > 0002-IB-srp-Handle-partial-connection-success-correctly.patch > 0003-IB-srp-Bump-driver-version-and-release-