Linux-SCSI Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] scsi: allow auto suspend override by low-level driver
@ 2019-09-12  6:35 Stanley Chu
  2019-09-12  6:35 ` [PATCH v2 1/3] scsi: core: " Stanley Chu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stanley Chu @ 2019-09-12  6:35 UTC (permalink / raw)
  To: linux-scsi, martin.petersen, avri.altman, alim.akhtar,
	pedrom.sousa, sthumma, jejb, bvanassche
  Cc: linux-mediatek, linux-arm-kernel, matthias.bgg, evgreen, beanhuo,
	marc.w.gonzalez, subhashj, vivek.gautam, kuohong.wang,
	peter.wang, chun-hung.wu, andy.teng, Stanley Chu

Until now the scsi mid-layer forbids runtime suspend till userspace
enables it. This is mainly to quarantine some disks with broken
runtime power management or have high latencies executing suspend
resume callbacks. If the userspace doesn't enable the runtime suspend
the underlying hardware will be always on even when it is not doing
any useful work and thus wasting power.

Some low-level drivers for the controllers can efficiently use runtime
power management to reduce power consumption and improve battery life.

This patchset allows runtime suspend parameters override within the LLD itself
instead of waiting for userspace to control the power management, and
make UFS as the first user of this capability.

v1 => v2:
- Allow "zero" sdev->rpm_autosuspend_delay (Avri)
- Fix format of some lines (Avri)

Stanley Chu (3):
  scsi: core: allow auto suspend override by low-level driver
  scsi: ufs: override auto suspend tunables for ufs
  scsi: ufs-mediatek: enable auto suspend capability

 drivers/scsi/scsi_scan.c        |  6 ++++++
 drivers/scsi/scsi_sysfs.c       |  3 ++-
 drivers/scsi/sd.c               |  4 ++++
 drivers/scsi/ufs/ufs-mediatek.c |  7 +++++++
 drivers/scsi/ufs/ufshcd.c       |  8 ++++++++
 drivers/scsi/ufs/ufshcd.h       | 10 ++++++++++
 include/scsi/scsi_device.h      |  2 +-
 7 files changed, 38 insertions(+), 2 deletions(-)

-- 
2.18.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-12  6:35 [PATCH v2] scsi: allow auto suspend override by low-level driver Stanley Chu
2019-09-12  6:35 ` [PATCH v2 1/3] scsi: core: " Stanley Chu
2019-09-12 13:43   ` Bart Van Assche
2019-09-16  6:38     ` Stanley Chu
2019-09-12  6:35 ` [PATCH v2 2/3] scsi: ufs: override auto suspend tunables for ufs Stanley Chu
2019-09-12  6:35 ` [PATCH v2 3/3] scsi: ufs-mediatek: enable auto suspend capability Stanley Chu
2019-09-12 13:46   ` Bart Van Assche
2019-09-16  6:29     ` Stanley Chu

Linux-SCSI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-scsi/0 linux-scsi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-scsi linux-scsi/ https://lore.kernel.org/linux-scsi \
		linux-scsi@vger.kernel.org
	public-inbox-index linux-scsi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-scsi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git