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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 12 Sep 2014 09:30:28 +0800 From: <micky_ching@...lsil.com.cn> To: <sameo@...ux.intel.com>, <lee.jones@...aro.org> CC: <devel@...uxdriverproject.org>, <linux-kernel@...r.kernel.org>, <gregkh@...uxfoundation.org>, <rogerable@...ltek.com>, <wei_wang@...lsil.com.cn>, Micky Ching <micky_ching@...lsil.com.cn> Subject: [PATCH v2 2/2] mfd: rtsx: fix PM suspend for 5249 From: Micky Ching <micky_ching@...lsil.com.cn> Fix rts5249 failed send buffer cmd after suspend, PM_CTRL3 should reset before send any buffer cmd after suspend. Otherwise, buffer cmd will failed, this will lead resume fail. Signed-off-by: Micky Ching <micky_ching@...lsil.com.cn> --- drivers/mfd/rts5249.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/mfd/rts5249.c b/drivers/mfd/rts5249.c index 573de7b..5dd7dc0 100644 --- a/drivers/mfd/rts5249.c +++ b/drivers/mfd/rts5249.c @@ -126,10 +126,27 @@ static int rts5249_extra_init_hw(struct rtsx_pcr *pcr) return rtsx_pci_send_cmd(pcr, 100); } +static int rts5249_pm_reset(struct rtsx_pcr *pcr) +{ + int err; + + /* init aspm */ + err = rtsx_pci_update_cfg_byte(pcr, LCTLR, 0xFC, 0); + if (err < 0) + return err; + + /* reset PM_CTRL3 before send buffer cmd */ + return rtsx_pci_write_register(pcr, PM_CTRL3, 0x10, 0x00); +} + static int rts5249_optimize_phy(struct rtsx_pcr *pcr) { int err; + err = rts5249_pm_reset(pcr); + if (err < 0) + return err; + err = rtsx_pci_write_phy_register(pcr, PHY_REG_REV, PHY_REG_REV_RESV | PHY_REG_REV_RXIDLE_LATCHED | PHY_REG_REV_P1_EN | PHY_REG_REV_RXIDLE_EN | -- 1.7.9.5 -- 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