Message ID | 20230306225249.975495-1-eajames@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2120821wrd; Mon, 6 Mar 2023 15:02:44 -0800 (PST) X-Google-Smtp-Source: AK7set/R23xrKjRqbvvEtkfcbArTKZ6vdcLR3pc5aoLc8CNb9isithrvFVsSUbaSv78EHs4ECjzE X-Received: by 2002:a17:907:72c7:b0:889:d156:616d with SMTP id du7-20020a17090772c700b00889d156616dmr15762289ejc.27.1678143764621; Mon, 06 Mar 2023 15:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678143764; cv=none; d=google.com; s=arc-20160816; b=YnyjSKu4TCeyiD6kQrgQWYfD7vZzYgfV0ire6ptgeKrONXWutCepJmSWAmO6kdLV+C JW8juzVYFB7DA1ZlaQtBe440cWuIVhW6ZKYGymkDTDnK5MfGcT6Pmwemr2kz2tICGktM vBkbwf5XEVd7b5E0/0FwZqmmxM4L2BJ57DIkX6DDRP/FzhCzf+dKPimbJHN5bdZ3Rm6g tlnyFY/PP37HzwbHYe9fWs/8ZP6ivX6Wo+wkkbha+EhskKmz7Ye8yVPkC8cOXioGvxUd A11/XEs3jF6qVBvo2IWBEX6cYJqSvN2nLHPpsk36dnX6X008knrZL6VcHKWPmLBKSJPK y+8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=djCBPKOca684XWn8TXzeHHOoQQ07LLH1y4LsII6erYI=; b=0WkRGXivczQneHykeBrlPx0/KnfUhBGxxkvMrWDYqKXVYVGThwgFtZUlDW5bdjSs+9 QBRazjofHLdqysyFvOkbzyytZUL8oSZuurDczEGnxeJ8lvH1lmdqbAHoQjbgW2VD3UE0 kg/7964AZtFw3hDKyMdq8XNhtbQaj8k3e1qBt0VjlO3jtGZk8MaBtfOlmlUQsqcDI0ML l/m/LbvifTtxGs95bDhWGO8PFENZ74VA2OrQNrnENdo49ewj2BaJN3TAiYKMcIxp55ok DjCeHwDpGOjVNIKTQBm+OAYli9z2x18XJU1m30fJspYNViX84hO1WKssykMYeQWsPcPM 1YpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZtL7pMjM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a26-20020a1709064a5a00b008c8f575606csi10344535ejv.892.2023.03.06.15.01.57; Mon, 06 Mar 2023 15:02:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ZtL7pMjM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229984AbjCFWxi (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Mon, 6 Mar 2023 17:53:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbjCFWxd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 6 Mar 2023 17:53:33 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18B8D2FCE9 for <linux-kernel@vger.kernel.org>; Mon, 6 Mar 2023 14:53:11 -0800 (PST) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 326KlUIF013804; Mon, 6 Mar 2023 22:52:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=djCBPKOca684XWn8TXzeHHOoQQ07LLH1y4LsII6erYI=; b=ZtL7pMjMjENi68gRQeP7NR1sXyfEt/WqA2Ert5olXQTJkanpURI9qbjP3J6L8/YeKRN9 2+wYsGCeNdyeoHIsffugJU4zmISIuS50HUcsC4CQrRQ5CIIhPobgW9pzbfwn8VXKQjb2 ovezTfONYYFcxq/klnfCt8xRRdzSFF4PjO18eBKcRHCR9cYhuy4z4A6A4wjn7biu5+YE MUJf8ZUKz0E5FVDPcnk1Q9j7QuH+xewiFNcC0tpneL+7OxXHeJwEzK1uoEv0MoVuUz9T tg6JIKGYM/zTkk4r74B6jjJVLm2Fe6PEgzE9h55g8Lg++jGK0g3d/4fbzQGrs7TvMMVi 4Q== Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3p4uaeybx6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 22:52:57 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 326LkQOZ005407; Mon, 6 Mar 2023 22:52:56 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([9.208.129.117]) by ppma01dal.us.ibm.com (PPS) with ESMTPS id 3p4184unps-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 06 Mar 2023 22:52:55 +0000 Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 326MqsXi9241254 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Mar 2023 22:52:54 GMT Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 35DFB58043; Mon, 6 Mar 2023 22:52:54 +0000 (GMT) Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 45DA25805D; Mon, 6 Mar 2023 22:52:53 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.160.108.29]) by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 6 Mar 2023 22:52:53 +0000 (GMT) From: Eddie James <eajames@linux.ibm.com> To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, andrew@aj.id.au, alistair@popple.id.au, joel@jms.id.au, jk@ozlabs.org, Eddie James <eajames@linux.ibm.com> Subject: [PATCH] fsi: aspeed: Reset master errors after CFAM reset Date: Mon, 6 Mar 2023 16:52:49 -0600 Message-Id: <20230306225249.975495-1-eajames@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: I5r1NplQzNvhMLyWY14JZzQ6w6KbBDtW X-Proofpoint-ORIG-GUID: I5r1NplQzNvhMLyWY14JZzQ6w6KbBDtW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-06_14,2023-03-06_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 clxscore=1015 phishscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 spamscore=0 mlxscore=0 impostorscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303060196 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759661276356933357?= X-GMAIL-MSGID: =?utf-8?q?1759661276356933357?= |
Series |
fsi: aspeed: Reset master errors after CFAM reset
|
|
Commit Message
Eddie James
March 6, 2023, 10:52 p.m. UTC
It has been observed that sometimes the FSI master will return all 0xffs
after a CFAM has been taken out of reset, without presenting any error.
Resetting the FSI master errors resolves the issue.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
drivers/fsi/fsi-master-aspeed.c | 2 ++
1 file changed, 2 insertions(+)
Comments
On Mon, 6 Mar 2023 at 22:53, Eddie James <eajames@linux.ibm.com> wrote: > > It has been observed that sometimes the FSI master will return all 0xffs > after a CFAM has been taken out of reset, without presenting any error. > Resetting the FSI master errors resolves the issue. Eddie, you mentioned that Joachim was going to provide input on this change. Did you hear from him? Cheers, Joel > > Signed-off-by: Eddie James <eajames@linux.ibm.com> > --- > drivers/fsi/fsi-master-aspeed.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c > index 7cec1772820d..5eccab175e86 100644 > --- a/drivers/fsi/fsi-master-aspeed.c > +++ b/drivers/fsi/fsi-master-aspeed.c > @@ -454,6 +454,8 @@ static ssize_t cfam_reset_store(struct device *dev, struct device_attribute *att > gpiod_set_value(aspeed->cfam_reset_gpio, 1); > usleep_range(900, 1000); > gpiod_set_value(aspeed->cfam_reset_gpio, 0); > + usleep_range(900, 1000); Is the delay required? How did you arrive at this time? > + opb_writel(aspeed, ctrl_base + FSI_MRESP0, cpu_to_be32(FSI_MRESP_RST_ALL_MASTER)); > mutex_unlock(&aspeed->lock); > trace_fsi_master_aspeed_cfam_reset(false); > > -- > 2.31.1 >
On 3/8/23 23:38, Joel Stanley wrote: > On Mon, 6 Mar 2023 at 22:53, Eddie James <eajames@linux.ibm.com> wrote: >> It has been observed that sometimes the FSI master will return all 0xffs >> after a CFAM has been taken out of reset, without presenting any error. >> Resetting the FSI master errors resolves the issue. > Eddie, you mentioned that Joachim was going to provide input on this > change. Did you hear from him? Yes, he mentioned it's possibly an addressing issue, with absolute/relative/same-address-again type of access. The FSI master doesn't know the slave is reset in this case so it needs to go back to absolute addressing. Resetting the port on the master is a good solution here, though Joachim was surprised that the BREAK command to the master didn't clear out the addressing state. I collected some additional data that perhaps supports this theory: After the CFAM reset, I actually get back the data at CFAM address 0x00 when I read the previously used address. All other addresses return 0xff. I dumped the master state but there's nothing interesting, and no errors. # /tmp/fsimaster-aspeed cfam 0x9c CFAM09c: 00000000 # /tmp/fsimaster-aspeed dump master MMODE[000]: 70080210 MDLYR[004]: ffff0000 MCRSP0[008]: 00000000 MENP0[010]: 80000000 MLEVP0[018]: 80000000 MREFP0[020]: 00000000 MHPMP0[028]: 00000000 MSIEP0[030]: 00000000 MAESP0[050]: 00000000 MAEB[070]: 00000000 MVER[074]: e0050101 MBSYP0[078]: 00000000 MSTAP0[0d0]: 00000000 MSTAP1[0d4]: 00000000 MSTAP2[0d8]: 00000000 MSTAP3[0dc]: 00000000 MSTAP4[0e0]: 00000000 MSTAP5[0e4]: 00000000 MSTAP6[0e8]: 00000000 MSTAP7[0ec]: 00000000 MESRB0[1d0]: 00000000 MSCSB0[1d4]: 90000001 MATRB0[1d8]: 0040013b MDTRB0[1dc]: 00000000 MECTRL[2e0]: 0000c000 # echo 1 > /sys/class/fsi-master/fsi0/device/cfam_reset # /tmp/fsimaster-aspeed cfam 0x9c CFAM09c: c0020da6 # /tmp/fsimaster-aspeed cfam 0x0 CFAM000: ffffffff # /tmp/fsimaster-aspeed dump master MMODE[000]: 70080210 MDLYR[004]: ffff0000 MCRSP0[008]: 00000000 MENP0[010]: 80000000 MLEVP0[018]: 80000000 MREFP0[020]: 00000000 MHPMP0[028]: 00000000 MSIEP0[030]: 00000000 MAESP0[050]: 00000000 MAEB[070]: 00000000 MVER[074]: e0050101 MBSYP0[078]: 00000000 MSTAP0[0d0]: 00000000 MSTAP1[0d4]: 00000000 MSTAP2[0d8]: 00000000 MSTAP3[0dc]: 00000000 MSTAP4[0e0]: 00000000 MSTAP5[0e4]: 00000000 MSTAP6[0e8]: 00000000 MSTAP7[0ec]: 00000000 MESRB0[1d0]: 00000000 MSCSB0[1d4]: b0000001 MATRB0[1d8]: 00400003 MDTRB0[1dc]: ffffffff > > Cheers, > > Joel > >> Signed-off-by: Eddie James <eajames@linux.ibm.com> >> --- >> drivers/fsi/fsi-master-aspeed.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c >> index 7cec1772820d..5eccab175e86 100644 >> --- a/drivers/fsi/fsi-master-aspeed.c >> +++ b/drivers/fsi/fsi-master-aspeed.c >> @@ -454,6 +454,8 @@ static ssize_t cfam_reset_store(struct device *dev, struct device_attribute *att >> gpiod_set_value(aspeed->cfam_reset_gpio, 1); >> usleep_range(900, 1000); >> gpiod_set_value(aspeed->cfam_reset_gpio, 0); >> + usleep_range(900, 1000); > Is the delay required? How did you arrive at this time? > >> + opb_writel(aspeed, ctrl_base + FSI_MRESP0, cpu_to_be32(FSI_MRESP_RST_ALL_MASTER)); >> mutex_unlock(&aspeed->lock); >> trace_fsi_master_aspeed_cfam_reset(false); >> >> -- >> 2.31.1 >>
diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c index 7cec1772820d..5eccab175e86 100644 --- a/drivers/fsi/fsi-master-aspeed.c +++ b/drivers/fsi/fsi-master-aspeed.c @@ -454,6 +454,8 @@ static ssize_t cfam_reset_store(struct device *dev, struct device_attribute *att gpiod_set_value(aspeed->cfam_reset_gpio, 1); usleep_range(900, 1000); gpiod_set_value(aspeed->cfam_reset_gpio, 0); + usleep_range(900, 1000); + opb_writel(aspeed, ctrl_base + FSI_MRESP0, cpu_to_be32(FSI_MRESP_RST_ALL_MASTER)); mutex_unlock(&aspeed->lock); trace_fsi_master_aspeed_cfam_reset(false);