]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: ufs-pci: Force a full restore after suspend-to-disk
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 18 Oct 2021 15:10:04 +0000 (18:10 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 19 Oct 2021 03:19:44 +0000 (23:19 -0400)
commitbbe6e0941a9c66f52d8e65304d4c37a77eda6107
treeb4a3bf23af94be01af211abc75890b1d64706c89
parenta508fedfbd7951868ac7d0eacab9c811efd46abf
scsi: ufs: ufs-pci: Force a full restore after suspend-to-disk

Implement the ->restore() PM operation and set the link to off, which will
force a full reset and restore.  This ensures that Host Performance Booster
is reset after suspend-to-disk.

The Host Performance Booster feature caches logical-to-physical mapping
information in the host memory.  After suspend-to-disk, such information is
not valid, so a full reset and restore is needed.

A full reset and restore is done if the SPM level is 5 or 6, but not for
other SPM levels, so this change fixes those cases.

A full reset and restore also restores base address registers, so that code
is removed.

Link: https://lore.kernel.org/r/20211018151004.284200-2-adrian.hunter@intel.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufshcd-pci.c