Editing 1

2018-09-11 Thread Aaron
one photo, we can send you the testing work. Thanks, Aaron Williams Email: hansre...@outlook.com

Re: [PATCH] scsi: remove useless acpi functions in the head file

2017-01-10 Thread Aaron Lu
On 01/11/2017 10:15 AM, Hanjun Guo wrote: > On 2017/1/11 9:50, Aaron Lu wrote: >> On 01/10/2017 07:44 PM, John Garry wrote: >>> On 10/01/2017 08:14, Hanjun Guo wrote: >>>> From: Hanjun Guo >>>> >>>> commit f1bc1e4c44b1 ("

Re: [PATCH] scsi: remove useless acpi functions in the head file

2017-01-10 Thread Aaron Lu
;> but forgot to remove them in the head file, do it now. >> >> Signed-off-by: Hanjun Guo Reviewed-by: Aaron Lu Just out of curiosity, did you find this by some tool? If so, can you please let me know the tool name so that I can avoid such problems in the future? Thanks. -Aaron &g

Re: [Update][PATCH] SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM

2014-12-09 Thread Aaron Lu
> depending on CONFIG_PM_RUNTIME may now be changed to depend on > CONFIG_PM. > > Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under > drivers/scsi/ and in include/scsi/scsi_device.h. > > Signed-off-by: Rafael J. Wysocki Reviewed-by: Aaron Lu Thanks, Aaron >

Re: [PATCH] SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM

2014-12-08 Thread Aaron Lu
efine scsi_runtime_idle NULL - -#endif /* CONFIG_PM_RUNTIME */ - const struct dev_pm_ops scsi_bus_pm_ops = { .prepare = scsi_bus_prepare, .suspend = scsi_bus_suspend, Thanks, Aaron -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-08 Thread Aaron Lu
On 01/09/2014 05:21 AM, Alan Stern wrote: > On Wed, 8 Jan 2014, Phillip Susi wrote: >> You issue a REQUEST SENSE command and that returns status indicating >> whether the drive is stopped, or in standby. See my patches. One of > > I never saw your patches. Where were they posted? > > If you is

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-07 Thread Aaron Lu
On 01/08/2014 01:24 PM, Phillip Susi wrote: > On 01/07/2014 09:36 PM, Aaron Lu wrote: >> Oh, of course, my stupid :-) Then I suddenly think my patches can >> kind of work - let's say we have done the hdparm setting thing >> before suspend and the disk will be spun up in

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-07 Thread Aaron Lu
On 01/08/2014 10:19 AM, Phillip Susi wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On 01/07/2014 09:11 PM, Aaron Lu wrote: >> I thought that feature is used to control if a disk should be spun >> up once powered from the host side. > > That *is*

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-07 Thread Aaron Lu
On 01/08/2014 09:53 AM, Phillip Susi wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On 01/07/2014 08:32 PM, Aaron Lu wrote: >> The ATA and SCSI devices are all resumed in my patches, notice >> there is a single pm_request_resume call in both ATA and

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-07 Thread Aaron Lu
On 01/08/2014 09:16 AM, Phillip Susi wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On 01/07/2014 08:03 PM, Aaron Lu wrote: >> You mean you want to leave the disk runtime suspended after a >> system resume and in the meantime make sure the disk is indeed

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-07 Thread Aaron Lu
On 01/07/2014 10:50 PM, Phillip Susi wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 1/7/2014 2:49 AM, Aaron Lu wrote: >> We can modify the device's system resume callback. To better >> illustrate the idea, I just made two patches to do this and

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-06 Thread Aaron Lu
On 01/06/2014 10:40 PM, Phillip Susi wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 1/6/2014 4:15 AM, Aaron Lu wrote: >> My guess why it doesn't work for you is that, when you call >> blk_pre_runtime_suspend in sd_resume_work, there are requests left

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-06 Thread Aaron Lu
gt;> REQ_TYPE_PM_RESUME are dispatched during suspend/resume. The >> following patch fixes the hang, but I'm not sure why it is needed or >> if it is generally appropriate: >> > > Adding Aaron Lu, author of block layer runtime PM. > I have seen similar issue and

Re: Disk wakeup on resume

2013-11-05 Thread Aaron Lu
On 11/06/2013 05:32 AM, Phillip Susi wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 11/5/2013 4:05 AM, Aaron Lu wrote: >> Are you using an ATA drive? Last time I checked, the spin up >> actually happened while the ata port is resumed(when it will be >

Re: Disk wakeup on resume

2013-11-05 Thread Aaron Lu
I checked, the spin up actually happened while the ata port is resumed(when it will be reset): https://lkml.org/lkml/2013/2/4/361 -Aaron > Oddly, if I unbind the sd driver ( echo 1 > > /sys/block/sdx/device/delete ), then after a resume the disk remains > off ( and spins up again on rescan

Re: [PATCH 1/2] libata: use sleep instead of standby command

2013-11-04 Thread Aaron Lu
On 11/05/2013 10:39 AM, Phillip Susi wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On 11/04/2013 09:23 PM, Aaron Lu wrote: >> I suppose this is mainly for runtime PM? Since for system >> suspend/hibernation, the disk and its controller will be powered >

Re: [PATCH 2/2] libata: avoid waking disk to check power

2013-11-04 Thread Aaron Lu
query. But if the disk entered sleep mode due to other reason, the patch may be necessary. So what's your scenario? Best regards, Aaron > > Signed-off-by: Phillip Susi > --- > drivers/ata/libata-core.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/driv

Re: [PATCH 1/2] libata: use sleep instead of standby command

2013-11-04 Thread Aaron Lu
ill be powered off anyway. Best regards, Aaron > > Signed-off-by: Phillip Susi > --- > drivers/ata/libata-scsi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c > index 97a0cef..79b75fd 100

[RESEND PATCH v3] scsi: sr: use block layer runtime PM

2013-10-28 Thread Aaron Lu
f the autosuspend delay is set longer than the polling interval then the device will never suspend. Signed-off-by: Aaron Lu Acked-by: Alan Stern --- v2: scsi_dev_type_suspend/resume should be covered by CONFIG_PM_SLEEP, suggested by Alan Stern. v3: Modify changelog as suggested by Alan Stern and

[PATCH] [SCSI] sd: call blk_pm_runtime_init before add_disk

2013-10-09 Thread Aaron Lu
_pm_runtime_init before add_disk so that all requests initiated there will all be counted. Signed-off-by: Aaron Lu Reported-and-tested-by: Sujit Reddy Thumma Cc: sta...@vger.kernel.org --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/dri

Re: block layer runtime pm and udisks

2013-10-09 Thread Aaron Lu
check power command, and fake the reply instead of resuming the device? > > Or does udisks just need to check the runtime pm status before trying > the check power command? I think the udisks can be modified to check if the drive is runtime suspended and if so, avoid poll the SM

Re: Race condition in block layer runtime PM init and scsi disk driver

2013-10-09 Thread Aaron Lu
On 10/09/2013 04:32 PM, sthu...@codeaurora.org wrote: >> Hi Aaron, >> >> I found a race condition with the block layer runtime PM due to which >> the q->nr_pending is decremented to less than zero (0x_ (-1)) >> and hence the blk pre-runtime suspend always r

[PATCH v3] scsi: sr: use block layer runtime PM

2013-09-08 Thread Aaron Lu
f the autosuspend delay is set longer than the polling interval then the device will never suspend. Signed-off-by: Aaron Lu Acked-by: Alan Stern --- v2: scsi_dev_type_suspend/resume should be covered by CONFIG_PM_SLEEP, suggested by Alan Stern. v3: Modify changelog as suggested by Alan Stern and

Re: [PATCH v2] scsi: sr: use block layer runtime PM

2013-09-07 Thread Aaron Lu
>> OK, let's now try for a descriptive changelog. All SCSI devices >> (including sr) are "request based". I think what you mean is "all SCSI >> devices which implement runtime PM have an exposed block device"? > > Actually Aaron means "

Re: [PATCH v2] scsi: sr: use block layer runtime PM

2013-09-07 Thread Aaron Lu
On 09/06/2013 11:00 PM, James Bottomley wrote: > On Fri, 2013-09-06 at 10:01 +0800, Aaron Lu wrote: >> Migrate SCSI Optical Disk Drive(ODD) > > I'm not very keen on this description because it's not quite accurate. > sr stands for SCSI ROM. You could say optical SCS

[PATCH v2] scsi: sr: use block layer runtime PM

2013-09-05 Thread Aaron Lu
happen, the autosuspend_delay can not be set to more than 2 seconds or the polling interval has to be increased. Signed-off-by: Aaron Lu --- v2: scsi_dev_type_suspend/resume should be covered by CONFIG_PM_SLEEP, suggested by Alan Stern. Make sure to use the util-linux utility of version 2.23.2

Re: [PATCH] scsi: sr: use block layer runtime PM

2013-09-05 Thread Aaron Lu
On 09/05/2013 10:25 PM, Alan Stern wrote: > On Thu, 5 Sep 2013, Aaron Lu wrote: > >> Migrate SCSI Optical Disk Drive(ODD) driver sr to make use of block >> layer runtime PM. Accordingly, the SCSI bus layer runtime PM callback is >> simplified as all SCSI devices that impl

[PATCH] scsi: sr: use block layer runtime PM

2013-09-04 Thread Aaron Lu
Migrate SCSI Optical Disk Drive(ODD) driver sr to make use of block layer runtime PM. Accordingly, the SCSI bus layer runtime PM callback is simplified as all SCSI devices that implement runtime PM are now request based. Signed-off-by: Aaron Lu --- Note that due to ODD will be polled every 2

Re: [RFC PATCH 2/2] ata: acpi: rework the ata acpi bind support

2013-08-23 Thread Aaron Lu
On 08/23/2013 03:02 PM, Dirk Griesbach wrote: > Hello Aaron, > > On Do, Aug 22, 2013 at 03:15:16 +0800, Aaron Lu wrote: >> Hi Drik, >> Can you please test the two patches regarding your ATA bay? Thanks. > > No problems with the bay. I applied the patches on top of 3.11

[PATCH 2/2] ata: acpi: rework the ata acpi bind support

2013-08-22 Thread Aaron Lu
On 08/23/2013 02:36 AM, Tejun Heo wrote: > Hello, Aaron. > > On Thu, Aug 22, 2013 at 03:15:16PM +0800, Aaron Lu wrote: >> The patch series has two patches and the first has been taken, shall I >> send the 2nd one again without the RFC tag in the patch subject? There >>

Re: [RFC PATCH 2/2] ata: acpi: rework the ata acpi bind support

2013-08-22 Thread Aaron Lu
On 08/15/2013 11:19 AM, Tejun Heo wrote: > Hello, Aaron. > > On Thu, Aug 15, 2013 at 09:33:28AM +0800, Aaron Lu wrote: >> This has been quiet for some time, may I know your opinion on this? > > Ooh, I like it. I was waiting for proper patch series w/o RFC tag and > hop

Re: [RFC PATCH 2/2] ata: acpi: rework the ata acpi bind support

2013-08-14 Thread Aaron Lu
On 07/25/2013 10:52 PM, Tejun Heo wrote: > On Thu, Jul 25, 2013 at 01:47:03PM +0800, Aaron Lu wrote: >> Binding ACPI handle to SCSI device has several drawbacks, namely: >> 1 During ATA device initialization time, ACPI handle will be needed >> while SCSI devices are not crea

Re: [RFC PATCH 2/2] ata: acpi: rework the ata acpi bind support

2013-07-25 Thread Aaron Lu
On 07/25/2013 10:52 PM, Tejun Heo wrote: > On Thu, Jul 25, 2013 at 01:47:03PM +0800, Aaron Lu wrote: >> Binding ACPI handle to SCSI device has several drawbacks, namely: >> 1 During ATA device initialization time, ACPI handle will be needed >> while SCSI devices are not crea

[RFC PATCH 1/2] ata: acpi: remove dead code for ata_acpi_(un)bind

2013-07-24 Thread Aaron Lu
Commit 7381fe737 "libata-acpi: remove redundent code for power resource handling" removed ata_acpi_(un)bind but left their prototypes in libata.h, so remove them. Signed-off-by: Aaron Lu --- drivers/ata/libata.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/ata/

[RFC PATCH 0/2] Rework ATA ACPI binding code

2013-07-24 Thread Aaron Lu
, but all ACPI handling are done in ATA with ATA transport devices. Tested on an Intel platform, ZPODD and runtime power off of a SATA disk works OK. More testing by other people is needed/appreciated. Aaron Lu (2): ata: acpi: remove dead code for ata_acpi_(un)bind ata: acpi: rework the ata acpi

[RFC PATCH 2/2] ata: acpi: rework the ata acpi bind support

2013-07-24 Thread Aaron Lu
ay is no longer needed. Signed-off-by: Aaron Lu --- drivers/ata/libata-acpi.c | 278 - drivers/ata/libata-core.c | 5 - drivers/ata/libata-scsi.c | 13 +- drivers/ata/libata-transport.c | 2 + drivers/ata/libata-zpodd.c | 12 +- dr

Re: Linux boot Support for 4KB sector drives ?

2013-07-02 Thread Aaron Lu
think. Linux has support for 4k sector drive, but if the boot loader doesn't, it can't fetch the kernel into memory and load Linux. Legacy grub makes use of BIOS interrupt service and thus shouldn't be able to support 4k sector drive, I don't know the status of grub2. Tha

Re: [PATCH] block: Fix possible sleep in invalid context

2013-07-01 Thread Aaron Lu
_autosuspend() in blk_post_runtime_resume(). Hi Sujit, Thanks for testing out block layer runtime PM! As for the problem here, it is already fixed by: commit c60855cdb976c632b3bf8922eeab8a0e78edfc04 Author: Aaron Lu Date: Fri May 17 15:47:20 2013 +0800 blkpm: avoid sleep when holding q

[PATCH] user_space_eject: unlock door before issuing CDROMEJECT command

2013-06-06 Thread Aaron Lu
d in case people there think it should be solved in another way. Here is the patch. >From d4202374d620bf72953a0b59f108521f94cefbd6 Mon Sep 17 00:00:00 2001 From: Aaron Lu Date: Thu, 6 Jun 2013 16:28:37 +0800 Subject: [PATCH] eject: unlock door before issuing CDROMEJECT command If user has ins

Re: [PATCH v12 0/5] block layer runtime pm

2013-03-28 Thread Aaron Lu
On 03/23/2013 12:23 PM, Jens Axboe wrote: > On Sat, Mar 23 2013, Aaron Lu wrote: >> In August 2010, Jens and Alan discussed about "Runtime PM and the block >> layer". http://marc.info/?t=12825910841&r=1&w=2 >> And then Alan has given a detailed imple

[PATCH v12 1/5] block: add a flag to identify PM request

2013-03-22 Thread Aaron Lu
runtime status unaffected. e.g. in SCSI disk's runtime suspend callback, the disk will be put into stopped power state, and this require sending a command to the device. Such command processing should not change the disk's runtime status. Signed-off-by: Lin Ming Signed-off-by: Aaron

[PATCH v12 2/5] scsi: use REQ_PM in sd's runtime suspend operation

2013-03-22 Thread Aaron Lu
ff-by: Aaron Lu Acked-by: Alan Stern --- drivers/scsi/scsi_lib.c| 9 - drivers/scsi/sd.c | 9 + include/scsi/scsi_device.h | 16 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c

[PATCH v12 0/5] block layer runtime pm

2013-03-22 Thread Aaron Lu
In August 2010, Jens and Alan discussed about "Runtime PM and the block layer". http://marc.info/?t=12825910841&r=1&w=2 And then Alan has given a detailed implementation guide: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 To test: # ls -l /sys/block/sda /sys/devices/pci:00/:00:

[PATCH v12 4/5] block: implement runtime pm strategy

2013-03-22 Thread Aaron Lu
is allowed to go. The idea and API is designed by Alan Stern and described here: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- block/blk-core.c | 39 +++ block/el

[PATCH v12 3/5] block: add runtime pm helpers

2013-03-22 Thread Aaron Lu
NDED. The idea and API is designed by Alan Stern and described here: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- block/blk-core.c | 144 + inclu

[PATCH v12 5/5] sd: change to auto suspend mode

2013-03-22 Thread Aaron Lu
From: Lin Ming Uses block layer runtime pm helper functions in scsi_runtime_suspend/resume for devices that take advantage of it. Remove scsi_autopm_* from sd open/release path and check_events path. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- drivers/scsi

Re: [PATCH RESEND v11 0/4] block layer runtime pm

2013-03-22 Thread Aaron Lu
On 03/22/2013 11:09 PM, Jens Axboe wrote: > On Fri, Mar 15 2013, Aaron Lu wrote: >> In August 2010, Jens and Alan discussed about "Runtime PM and the block >> layer". http://marc.info/?t=12825910841&r=1&w=2 >> And then Alan has given a detailed imple

[PATCH RESEND v11 1/4] block: add a flag to identify PM request

2013-03-15 Thread Aaron Lu
Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- drivers/scsi/scsi_lib.c| 9 - drivers/scsi/sd.c | 9 + include/linux/blk_types.h | 2 ++ include/scsi/scsi_device.h | 16 4 files changed, 23 insertions(+), 13 deletions(-)

[PATCH RESEND v11 0/4] block layer runtime pm

2013-03-15 Thread Aaron Lu
In August 2010, Jens and Alan discussed about "Runtime PM and the block layer". http://marc.info/?t=12825910841&r=1&w=2 And then Alan has given a detailed implementation guide: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 To test: # ls -l /sys/block/sda /sys/devices/pci:00/:00:

[PATCH RESEND v11 3/4] block: implement runtime pm strategy

2013-03-15 Thread Aaron Lu
is allowed to go. The idea and API is designed by Alan Stern and described here: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- block/blk-core.c | 39 +++ block/el

[PATCH RESEND v11 4/4] sd: change to auto suspend mode

2013-03-15 Thread Aaron Lu
From: Lin Ming Uses block layer runtime pm helper functions in scsi_runtime_suspend/resume for devices that take advantage of it. Remove scsi_autopm_* from sd open/release path and check_events path. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- drivers/scsi

[PATCH RESEND v11 2/4] block: add runtime pm helpers

2013-03-15 Thread Aaron Lu
NDED. The idea and API is designed by Alan Stern and described here: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- block/blk-core.c | 144 + inclu

Re: STANDBY IMMEDIATE failed on NVIDIA MCP5x controllers when system suspend

2013-03-12 Thread Aaron Lu
On 03/12/2013 08:10 PM, James Bottomley wrote: On Tue, 2013-03-12 at 10:53 +0800, Aaron Lu wrote: Hi James and Alan, On 03/11/2013 11:00 PM, Alan Stern wrote: On Mon, 11 Mar 2013, James Bottomley wrote: Oh, that seems to be the suspend order isn't careful enough. __device_suspend()

Re: STANDBY IMMEDIATE failed on NVIDIA MCP5x controllers when system suspend

2013-03-11 Thread Aaron Lu
r all of the ata_ports, and the ata_port waits for both scsi_host and ata_link. scsi_host waits for scsi_target, and scsi_target waits for scsi_device. So if scsi_device is not done, ata_port will not start. Doesn't look like a problem to me. And from the log: https://bugzilla.kernel.org/attachm

Re: STANDBY IMMEDIATE failed on NVIDIA MCP5x controllers when system suspend

2013-03-11 Thread Aaron Lu
On 2013-03-11 16:49, James Bottomley wrote: On Mon, 2013-03-11 at 11:42 +0800, Aaron Lu wrote: Hi all, I've seen some reports on STANDBY IMMEDIATE failed on NVIDIA MCP5x controllers when system goes to suspend(this command is sent by scsi sd driver on system suspend as a SCSI STOP co

[PATCH v11 4/4] sd: change to auto suspend mode

2013-03-04 Thread Aaron Lu
From: Lin Ming Uses block layer runtime pm helper functions in scsi_runtime_suspend/resume for devices that take advantage of it. Remove scsi_autopm_* from sd open/release path and check_events path. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- drivers/scsi

[PATCH v11 1/4] block: add a flag to identify PM request

2013-03-04 Thread Aaron Lu
Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- drivers/scsi/scsi_lib.c| 9 - drivers/scsi/sd.c | 9 + include/linux/blk_types.h | 2 ++ include/scsi/scsi_device.h | 16 4 files changed, 23 insertions(+), 13 deletions(-)

[PATCH v11 3/4] block: implement runtime pm strategy

2013-03-04 Thread Aaron Lu
is allowed to go. The idea and API is designed by Alan Stern and described here: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- block/blk-core.c | 39 +++ block/el

[PATCH v11 2/4] block: add runtime pm helpers

2013-03-04 Thread Aaron Lu
NDED. The idea and API is designed by Alan Stern and described here: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 Signed-off-by: Lin Ming Signed-off-by: Aaron Lu Acked-by: Alan Stern --- block/blk-core.c | 144 + inclu

[PATCH v11 0/4] block layer runtime pm

2013-03-04 Thread Aaron Lu
In August 2010, Jens and Alan discussed about "Runtime PM and the block layer". http://marc.info/?t=12825910841&r=1&w=2 And then Alan has given a detailed implementation guide: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 To test: # ls -l /sys/block/sda /sys/devices/pci:00/:00:

Re: [PATCH v10 0/4] block layer runtime pm

2013-02-21 Thread Aaron Lu
On Wed, Feb 20, 2013 at 10:43:50AM -0500, Alan Stern wrote: > On Wed, 20 Feb 2013, Aaron Lu wrote: > > > In August 2010, Jens and Alan discussed about "Runtime PM and the block > > layer". http://marc.info/?t=12825910841&r=1&w=2 > > And then Alan

[PATCH v10 0/4] block layer runtime pm

2013-02-19 Thread Aaron Lu
In August 2010, Jens and Alan discussed about "Runtime PM and the block layer". http://marc.info/?t=12825910841&r=1&w=2 And then Alan has given a detailed implementation guide: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 To test: # ls -l /sys/block/sda /sys/devices/pci:00/:00:

[PATCH v10 2/4] block: add runtime pm helpers

2013-02-19 Thread Aaron Lu
NDED. The idea and API is designed by Alan Stern and described here: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- block/blk-core.c | 144 + include/linux/blkdev.h | 27

[PATCH v10 1/4] block: add a flag to identify PM request

2013-02-19 Thread Aaron Lu
Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- drivers/scsi/scsi_lib.c| 9 - drivers/scsi/sd.c | 9 + include/linux/blk_types.h | 2 ++ include/scsi/scsi_device.h | 16 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/

[PATCH v10 3/4] block: implement runtime pm strategy

2013-02-19 Thread Aaron Lu
is allowed to go. The idea and API is designed by Alan Stern and described here: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- block/blk-core.c | 39 +++ block/elevato

[PATCH v10 4/4] sd: change to auto suspend mode

2013-02-19 Thread Aaron Lu
From: Lin Ming Uses block layer runtime pm helper functions in scsi_runtime_suspend/resume for devices that take advantage of it. Remove scsi_autopm_* from sd open/release path and check_events path. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- drivers/scsi/scsi_pm.c | 84

Re: [PATCH v9 3/4] block: implement runtime pm strategy

2013-02-18 Thread Aaron Lu
Hi Alan, On Tue, Feb 05, 2013 at 04:03:15PM +0800, Aaron Lu wrote: > From: Lin Ming > > When a request is added: > If device is suspended or is suspending and the request is not a > PM request, resume the device. > > When the last request finishes: > Call p

Re: [PATCH v9 4/4] sd: change to auto suspend mode

2013-02-17 Thread Aaron Lu
On Wed, Feb 06, 2013 at 10:51:19AM -0500, Alan Stern wrote: > On Wed, 6 Feb 2013, Aaron Lu wrote: > > > > The "if (err == -EAGAIN)" test and the call to pm_schedule_suspend seem > > > to have been dropped since v8 of this series. It looks like

Re: [PATCH v9 4/4] sd: change to auto suspend mode

2013-02-05 Thread Aaron Lu
On 02/06/2013 12:51 AM, Alan Stern wrote: > On Tue, 5 Feb 2013, Aaron Lu wrote: > >> From: Lin Ming >> >> Uses block layer runtime pm helper functions in >> scsi_runtime_suspend/resume for devices that take advantage of it. >> >> Remove scsi_autopm_*

[PATCH v9 1/4] block: add a flag to identify PM request

2013-02-05 Thread Aaron Lu
Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- drivers/scsi/scsi_lib.c| 9 - drivers/scsi/sd.c | 9 + include/linux/blk_types.h | 2 ++ include/scsi/scsi_device.h | 16 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/

[PATCH v9 3/4] block: implement runtime pm strategy

2013-02-05 Thread Aaron Lu
is allowed to go. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- block/blk-core.c | 39 +++ block/elevator.c | 26 ++ 2 files changed, 65 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index ce7d366..81f173e

[PATCH v9 0/4] block layer runtime pm

2013-02-05 Thread Aaron Lu
In August 2010, Jens and Alan discussed about "Runtime PM and the block layer". http://marc.info/?t=12825910841&r=1&w=2 And then Alan has given a detailed implementation guide: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 To test: # ls -l /sys/block/sda /sys/devices/pci:00/:00:

[PATCH v9 2/4] block: add runtime pm helpers

2013-02-05 Thread Aaron Lu
PENDED. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- block/blk-core.c | 144 + include/linux/blkdev.h | 27 ++ 2 files changed, 171 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 66d3168..ce7d366 100644

[PATCH v9 4/4] sd: change to auto suspend mode

2013-02-05 Thread Aaron Lu
From: Lin Ming Uses block layer runtime pm helper functions in scsi_runtime_suspend/resume for devices that take advantage of it. Remove scsi_autopm_* from sd open/release path and check_events path. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- drivers/scsi/scsi_pm.c | 79

Re: [PATCH 1/2] don't wait on disk to start on resume

2013-02-04 Thread Aaron Lu
of ata. I think it's that before we can send the command to spin up the disk, we need to wait for the ata host controller to come up. As Aaron Lu pointed out, it takes seconds for the ata port to resume. On the hand, I just did some more recording, the result is: host controller takes 1ms or

Re: [PATCH 1/2] don't wait on disk to start on resume

2013-02-04 Thread Aaron Lu
On 02/03/2013 02:23 PM, Aaron Lu wrote: > No, the modification is actually for disk. > With v8 of block layer runtime PM, it is no longer the case runtime > suspend is the same as system suspend for hard disk that utilize block > layer runtime PM: we quiesce the device and run its susp

Re: [PATCH 1/2] don't wait on disk to start on resume

2013-02-02 Thread Aaron Lu
On 02/02/2013 11:09 PM, Alan Stern wrote: > On Sat, 2 Feb 2013, Aaron Lu wrote: > >>>> An alternative way of possibly solving this problem from PM's point of >>>> view might be: >>>> 1 Set both ata port and scsi device's runtime status to R

Re: [PATCH 1/2] don't wait on disk to start on resume

2013-02-02 Thread Aaron Lu
On 02/01/2013 11:28 PM, Alan Stern wrote: > On Fri, 1 Feb 2013, Aaron Lu wrote: > >> Hi Derek, >> >> On 12/21/2012 12:35 PM, Derek Basehore wrote: >>> We no longer wait for the disk to spin up in sd_resume. It now enters the >>> request to spinup the dis

Re: [PATCH v8 4/4] sd: change to auto suspend mode

2013-01-31 Thread Aaron Lu
On Thu, Jan 31, 2013 at 10:13:05AM -0500, Alan Stern wrote: > On Thu, 31 Jan 2013, Aaron Lu wrote: > > > > > +static int scsi_blk_runtime_suspend(struct device *dev) > > > > +{ > > > > + struct scsi_device *sdev = to_scsi_device(dev); > > >

Re: [PATCH v8 4/4] sd: change to auto suspend mode

2013-01-30 Thread Aaron Lu
On Wed, Jan 30, 2013 at 10:38:26AM -0500, Alan Stern wrote: > On Wed, 30 Jan 2013, Aaron Lu wrote: > > > From: Lin Ming > > > > Uses block layer runtime pm helper functions in > > scsi_runtime_suspend/resume for devices that take advantage of it. > > &

Re: [PATCH v8 2/4] block: add runtime pm helpers

2013-01-30 Thread Aaron Lu
On Wed, Jan 30, 2013 at 10:54:53AM -0500, Alan Stern wrote: > On Wed, 30 Jan 2013, Aaron Lu wrote: > > > From: Lin Ming > > > > Add runtime pm helper functions: > > > > void blk_pm_runtime_init(struct request_queue *q, struct device *dev) > > - I

[PATCH v8 2/4] block: add runtime pm helpers

2013-01-30 Thread Aaron Lu
ff-by: Lin Ming Signed-off-by: Aaron Lu --- block/blk-core.c | 143 + include/linux/blkdev.h | 27 ++ 2 files changed, 170 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 66d3168..1ec09f6 100644 --- a/block/blk-cor

[PATCH v8 3/4] block: implement runtime pm strategy

2013-01-30 Thread Aaron Lu
is allowed to go. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- block/blk-core.c | 39 +++ block/elevator.c | 26 ++ 2 files changed, 65 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 1ec09f6..82cf678

[PATCH v8 4/4] sd: change to auto suspend mode

2013-01-30 Thread Aaron Lu
From: Lin Ming Uses block layer runtime pm helper functions in scsi_runtime_suspend/resume for devices that take advantage of it. Remove scsi_autopm_* from sd open/release path and check_events path. Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- drivers/scsi/scsi_pm.c | 79

[PATCH v8 0/4] block layer runtime pm

2013-01-30 Thread Aaron Lu
In August 2010, Jens and Alan discussed about "Runtime PM and the block layer". http://marc.info/?t=12825910841&r=1&w=2 And then Alan has given a detailed implementation guide: http://marc.info/?l=linux-scsi&m=133727953625963&w=2 To test: # ls -l /sys/block/sda /sys/devices/pci:00/:00:

[PATCH v8 1/4] block: add a flag to identify PM request

2013-01-30 Thread Aaron Lu
Signed-off-by: Lin Ming Signed-off-by: Aaron Lu --- drivers/scsi/scsi_lib.c| 9 - drivers/scsi/sd.c | 8 include/linux/blk_types.h | 2 ++ include/scsi/scsi_device.h | 16 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/

Re: [PATCH v7 3/4] block: implement runtime pm strategy

2013-01-28 Thread Aaron Lu
On Sat, Jan 19, 2013 at 01:11:45PM -0500, Alan Stern wrote: > On Sat, 19 Jan 2013, Aaron Lu wrote: > > Considering ODD's use case, I was thinking of moving the > > blk_pm_runtime_init call to sd.c, as sr will not use request based auto > > suspend. Probably right before w

Re: [PATCH v7 4/4] sd: change to auto suspend mode

2013-01-28 Thread Aaron Lu
On Fri, Jan 18, 2013 at 04:25:10PM -0500, Alan Stern wrote: > On Wed, 16 Jan 2013, Aaron Lu wrote: > > > From: Lin Ming > > > > Uses block layer runtime pm helper functions in > > scsi_runtime_suspend/resume. > > Remove scsi_autopm_* from sd open/release

Re: [PATCH v14 1/3] scsi: sr: support runtime pm

2013-01-27 Thread Aaron Lu
On Fri, Jan 25, 2013 at 03:37:28PM -0500, Jeff Garzik wrote: > On 01/23/2013 02:09 AM, Aaron Lu wrote: > >This patch adds runtime pm support for sr. > > > >It did this by increasing the runtime usage_count of the device when > >its block device is accessed. And decreas

[PATCH v14 3/3] scsi: remove can_power_off flag from scsi_device

2013-01-22 Thread Aaron Lu
needed, so remove it. Signed-off-by: Aaron Lu --- include/scsi/scsi_device.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index bb1371b..a7f9cba 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -157,7 +157,6

[PATCH v14 2/3] libata: scsi: no poll when ODD is powered off

2013-01-22 Thread Aaron Lu
evice, while values above 0 means media poll is not needed and should better be skipped. So we can increase its value when we are to power off the ODD in ATA layer and decrease its value when the ODD is powered on, effectively silence the media events poll. Signed-off-by: Aaron Lu --- drivers/ata/l

[PATCH v14 1/3] scsi: sr: support runtime pm

2013-01-22 Thread Aaron Lu
lways know if the ODD is being used or not. The idea is discussed here: http://thread.gmane.org/gmane.linux.acpi.devel/55243/focus=52703 and the restriction to check media inside is discussed here: http://thread.gmane.org/gmane.linux.ide/53665/focus=58836 Signed-off-by: Aaron Lu Acked-by: Alan

[PATCH v14 0/3] ZPODD Patches

2013-01-22 Thread Aaron Lu
evice back to full power state by setting its ACPI state to D0. The whole process is transparent to the end user. Aaron Lu (3): scsi: sr: support runtime pm libata: scsi: no poll when ODD is powered off scsi: remove can_power_off flag from scsi_device drivers/ata/libata-zpodd.c | 7

Re: [PATCH v13 8/9] libata: do not suspend port if normal ODD is attached

2013-01-22 Thread Aaron Lu
On Mon, Jan 21, 2013 at 03:42:55PM -0500, Jeff Garzik wrote: > On 01/15/2013 04:21 AM, Aaron Lu wrote: > >For ODDs, the upper layer will poll for media change every few > >seconds, which will make it enter and leave suspend state very > >often. And as each suspend will also ca

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-22 Thread Aaron Lu
On 01/22/2013 05:13 PM, Oliver Neukum wrote: > On Tuesday 22 January 2013 10:25:31 Aaron Lu wrote: >> On Mon, Jan 21, 2013 at 03:56:43PM +0100, Oliver Neukum wrote: >>> On Monday 21 January 2013 17:11:04 Aaron Lu wrote: >>>> It is not easy for the OS to tell if

Re: [RFC PATCH] scsi: sr: support runtime pm

2013-01-21 Thread Aaron Lu
On Mon, Jan 21, 2013 at 11:59:06AM -0500, Alan Stern wrote: > On Mon, 21 Jan 2013, Aaron Lu wrote: > > > On Sat, Jan 19, 2013 at 01:46:15PM -0500, Alan Stern wrote: > > > On Sat, 19 Jan 2013, Aaron Lu wrote: > > > > I don't think we should drop such suppor

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-21 Thread Aaron Lu
On Mon, Jan 21, 2013 at 03:56:43PM +0100, Oliver Neukum wrote: > On Monday 21 January 2013 17:11:04 Aaron Lu wrote: > > It is not easy for the OS to tell if the drive is being used or not > > sometimes > > > > Alan has reminded me it is possible for an app to open the

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-21 Thread Aaron Lu
On 01/20/2013 02:46 AM, Alan Stern wrote: On Sat, 19 Jan 2013, Aaron Lu wrote: Then we indeed have a problem. But I didn't find any such app in Fedora's repo or by searching the internet. http://rpm.pbone.net/index.php3/stat/4/idpl/2392183/dir/redhat_5.x/com/cdp-0.33-10.i386.rpm.

Re: [PATCH v7 4/4] sd: change to auto suspend mode

2013-01-21 Thread Aaron Lu
On 01/19/2013 05:25 AM, Alan Stern wrote: On Wed, 16 Jan 2013, Aaron Lu wrote: From: Lin Ming Uses block layer runtime pm helper functions in scsi_runtime_suspend/resume. Remove scsi_autopm_* from sd open/release path and check_events path. And remove the quiesce call in runtime suspend path

[RFC PATCH] scsi: sr: support runtime pm

2013-01-21 Thread Aaron Lu
On Sat, Jan 19, 2013 at 01:46:15PM -0500, Alan Stern wrote: > On Sat, 19 Jan 2013, Aaron Lu wrote: > > I don't think we should drop such support. > > And the safest way to avoid such break is we refine the suspend > > condition for ODD, and using what ZPODD defined condi

  1   2   3   4   5   >