lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4732005.Un0exgRK6O@linux-lqwf.site>
Date:	Thu, 26 Jul 2012 15:01:15 +0200
From:	Oliver Neukum <oneukum@...e.de>
To:	Aaron Lu <aaron.lu@....com>
Cc:	James Bottomley <James.Bottomley@...senpartnership.com>,
	Alan Stern <stern@...land.harvard.edu>,
	Jeff Garzik <jgarzik@...ox.com>, Lin Ming <minggr@...il.com>,
	Jeff Wu <jeff.wu@....com>, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-ide@...r.kernel.org, Aaron Lu <aaron.lwe@...il.com>
Subject: Re: [PATCH v3 2/7] scsi: pm: use autosuspend if device supports it

On Thursday 26 July 2012 20:43:32 Aaron Lu wrote:
> > What is the purpose of this approach?
> 
> The purpose is to let scsi layer driver(sd, sr, etc.) use the same pm
> api(scsi_autopm_put_device) to put the device to runtime suspended
> state.
> When the device is ready to be suspended, if it does not make use of
> autosuspend, call pm_runtime_put_sync for it; if it makes use of
> autosuspend, call the autosuspend runtime pm apis for it.
> 
> > You need a very good reason to have an API do two different things
> > based on this.
> 
> If you see the above reason not good, I'll prepare an updated version
> to create a new api to cover the autosuspend case, something like:
> void scsi_autopm_put_device_autosuspend(struct scsi_device *sdev)
> {
>         pm_runtime_mark_last_busy(&sdev->sdev_gendev);
>         pm_runtime_put_autosuspend(&sdev->sdev_gendev);
> }
> Does this look right?

Much better :-)

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ