[PATCH v2 4/7] scsi: sr: runtime pm when ODD is open/closed

2012-07-24 Thread Aaron Lu
The ODD can either be runtime resumed by the user or by a software request. And for the latter part, we only support runtime resume the ODD when the eject request is received. We did this in sr's block ioctl function, this looks ugly. Change this by runtime resuming the ODD in its open function

[PATCH v2 5/7] scsi: sr: block events when runtime suspended

2012-07-24 Thread Aaron Lu
When the ODD is runtime suspended, there is no need to poll it for events, so block events poll for it and unblock when resumed. Signed-off-by: Aaron Lu aaron...@amd.com --- block/genhd.c | 2 ++ drivers/scsi/sr.c | 7 --- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v2 0/7] Fix for ZPODD

2012-07-24 Thread Aaron Lu
V2: Bug fix for V1; Use scsi_autopm_* in sr driver instead of pm_runtime_*; V1: Here are some patches to make ZPODD easier to use for end users and a fix for using ZPODD with system suspend. Aaron Lu (7): scsi: sr: fix for sr suspend and resume scsi: pm: use autosuspend if device supports it

[PATCH v2 6/7] scsi: pm: use runtime resume callback if available

2012-07-24 Thread Aaron Lu
When runtime resume a scsi device, if the device's driver has implemented runtime resume callback, use that instead of the resume callback. sr driver needs this to properly do different things for system resume and runtime resume. Signed-off-by: Aaron Lu aaron...@amd.com --- V2: Check if the

[PATCH v2 1/7] scsi: sr: fix for sr suspend and resume

2012-07-24 Thread Aaron Lu
In sr_suspend, we do not need to do anything if it is not a runtime pm request, so just return by checking the PM_IS_AUTO macro. And in sr_resume, only reset the suspend_count back to 1 if the ODD is waken up by the user, or the usage count of the scsi device will not balance. Signed-off-by:

[PATCH v2 3/7] scsi: sr: use scsi layer autopm in sr driver

2012-07-24 Thread Aaron Lu
Use scsi_autopm_* whenever possible instead of the pm_runtime_* in sr driver as suggested by Alan Stern. The reason pm_runtime_get_noresume in sr_suspend is used is that we can't do sync resume call in suspend callback, or rpm_resume will wait forever for the suspend request to finish.

[PATCH v2 2/7] scsi: pm: use autosuspend if device supports it

2012-07-24 Thread Aaron Lu
If the device is using autosuspend, when scsi_autopm_put_device is called for it, use autosuspend runtime pm calls instead of the sync call. Signed-off-by: Aaron Lu aaron...@amd.com --- drivers/scsi/scsi_pm.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-24 Thread Greg Kroah-Hartman
On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org As requested by Anthony, here is a patch against target-pending/for-next-merge to expose an ABI version to userspace via a new VHOST_SCSI_GET_ABI_VERSION ioctl operation.

Re: scsi_requeue_command and dropping reference to sdev_gendev

2012-07-24 Thread Ani Sinha
commit 940f5d47e2f2e1fa00443921a0abf4822335b54d Author: Bart Van Assche bvanass...@acm.org Date: Fri Jun 29 15:34:26 2012 + [SCSI] Avoid dangling pointer in scsi_requeue_command() James Thanks James. We have been only looking at Torvalds' tree and I think this fix hasn't been

Re: [PATCH 5/5] block: genhd: add an interface to set disk's poll interval

2012-07-24 Thread Betty Dall
Hi Aaron, On Tue, 2012-07-24 at 07:52 +0800, Aaron Lu wrote: On Mon, Jul 23, 2012 at 12:43:34PM -0600, Betty Dall wrote: Hi Aaron, Hi, On Mon, 2012-07-23 at 14:49 +0800, Aaron Lu wrote: Set the ODD's in kernel poll interval to 2s for the user in case the user is using an old

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-24 Thread Nicholas A. Bellinger
On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org As requested by Anthony, here is a patch against target-pending/for-next-merge to expose an ABI version to

Re: 'Device not ready' issue on mpt2sas since 3.1.10

2012-07-24 Thread Matthias Prager
Hello everyone, I retested with a new firmware (P14 - released today), since it contains a bunch of sata and SATL fixes (according to the changelog). Unfortunately the observed behavior is unchanged (tested on a 3.4.5 kernel). Just wanted to let everyone know. Cheers Matthias -- To unsubscribe

Re: [PATCH 5/5] block: genhd: add an interface to set disk's poll interval

2012-07-24 Thread Aaron Lu
Hi Betty, On Tue, Jul 24, 2012 at 12:55:06PM -0600, Betty Dall wrote: diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 2f159aa..78c4226 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -869,6 +869,7 @@ static int sr_probe(struct device *dev)

Re: [resend PATCH 1/5] libata: reset once

2012-07-24 Thread Jeff Garzik
On 07/10/2012 12:05 AM, Dan Williams wrote: Hotplug testing with libsas currently encounters a 55 second wait for link recovery to give up. In the case where the user trusts the response time of their devices permit the recovery attempts to be limited to one. Signed-off-by: Dan Williams

Re: [resend PATCH 2/5] libata: export ata_port suspend/resume infrastructure for sas

2012-07-24 Thread Jeff Garzik
On 07/10/2012 12:05 AM, Dan Williams wrote: Reuse ata_port_{suspend|resume}_common for sas. This path is chosen over adding coordination between ata-tranport and sas-transport because libsas wants to revalidate the domain at resume-time at the host level. It can not validate links have resumed