From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 586C1C43217 for ; Fri, 14 Oct 2022 13:09:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5FJfp5vOQjGDx6H+8ncE9irr3K10vXV5E0UHDVfuqFM=; b=3Pi/18CEg9Mhin GW7fOEbTX8ULbOl3ODKF1UC0hrz9/FbOVDxUGT/m0RLTMszu3ncJALIs+LIOqpVnJ7CICnJYjrbDl GpqJvHPW4Ofj8oiUY2h6mr7Ivw0mjUy7Rc0z9yiRj/O3aO4MNgOIKQ8Vr5A/prR7xC64saDcE6AHR SFi/Dsfes8bkQfsjy4aY2U966u/9KeGTwbosx4liTaCPyamTR2uGT0/zsH31aVC5EHHAyxOl8+gUt EXwp4SZ1Yh9w4LzjT15kRyMTaEiYywdREbRDOCpEoItGACoJ/tn8pmYpaMKwA5CA3HovJ8+oy47uR OP5lVNq/5x+L14JYi27w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojKQK-00Eiws-PV; Fri, 14 Oct 2022 13:08:24 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ojKQH-00Eivr-It for linux-arm-kernel@lists.infradead.org; Fri, 14 Oct 2022 13:08:23 +0000 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29E8xCev031628; Fri, 14 Oct 2022 13:07:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=L4qGYHDlMyemRnk6qneB5Mk1RKKg2MqEDpuZh5iMKjk=; b=lNQ1DdUvAy+iUmzajdiLGMDPb+LxCM/5ZDwO+te98TCqyHTYfATE+IvtqKGWzTr/5l2F 5uM4xtAyQSPJPctDeulUfjR+I2YkaqMGea6ZA2uT0xe9nOWyCa378/HhofJA7nnNc0te bFH/b9QNUd9emLzPpvFOvIXrwjZkk7AUCrOIbJeVPU981I4WRH748nqvLwwTcVBPR9IN PoHELHWLtYUJKUpuIdOlC6C3Fx+K34azO5qsujr96BE0ygbK0Z1ncnNHldIdO2z6lfia kUKVSeuo7aMa4cynD9qfYjUE0Q13DHkKZlGzcyGs3sRpDZg8rvY7BQeTvaLd/9QBf1ri 9g== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3k73h6gyx6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Oct 2022 13:07:53 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 29ED7qhv012825 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 14 Oct 2022 13:07:52 GMT Received: from quicinc.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Fri, 14 Oct 2022 06:07:52 -0700 Date: Fri, 14 Oct 2022 14:05:17 +0100 From: Graeme Gregory To: Quan Nguyen CC: , Randy Dunlap , , Corey Minyard , Andrew Jeffery , , , Phong Vo , , Wolfram Sang , Brendan Higgins , Rob Herring , Joel Stanley , Krzysztof Kozlowski , , Open Source Submission , , Subject: Re: [PATCH v10 1/3] ipmi: ssif_bmc: Add SSIF BMC driver Message-ID: <20221014130517.y4mdinylnwfrg6u2@ggregory-linuxws> References: <20221004093106.1653317-1-quan@os.amperecomputing.com> <20221004093106.1653317-2-quan@os.amperecomputing.com> <5fbc5a54-60f2-fc0d-a4a1-839f28a4d8ba@quicinc.com> <48a5e252-9a1e-65e6-e8bf-add3d39a0286@os.amperecomputing.com> <72c8a5bc-830d-25a9-0528-5d428dd9f163@quicinc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <72c8a5bc-830d-25a9-0528-5d428dd9f163@quicinc.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: GhBJVq-FaNrcr7G3ZBgPGC6CUcLwXHeR X-Proofpoint-GUID: GhBJVq-FaNrcr7G3ZBgPGC6CUcLwXHeR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-14_06,2022-10-14_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 suspectscore=0 mlxscore=0 impostorscore=0 spamscore=0 mlxlogscore=894 lowpriorityscore=0 phishscore=0 priorityscore=1501 adultscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210140075 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221014_060821_647568_6D40BAEB X-CRM114-Status: GOOD ( 32.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 10, 2022 at 12:08:24PM +0100, Graeme Gregory wrote: > > On 10/10/2022 02:28, Quan Nguyen wrote: > > > > > > On 07/10/2022 20:26, Graeme Gregory wrote: > > > > > > On 04/10/2022 10:31, Quan Nguyen wrote: > > > > The SMBus system interface (SSIF) IPMI BMC driver can be used to > > > > perform > > > > in-band IPMI communication with their host in management (BMC) side. > > > > > > > > Thanks Dan for the copy_from_user() fix in the link below. > > > > > > > > Link: https://lore.kernel.org/linux-arm-kernel/20220310114119.13736-4-quan@os.amperecomputing.com/ > > > > Signed-off-by: Quan Nguyen > > > > > > I have been testing this on our hardware and I don't seem to be able > > > to get this driver working. I was using an older version. > > > > > > I have hacked ssifbridged to deal with the change in len from u8 to > > > unsigned int. > > > > > > It works as long as I only ever send SSIF commands, any attempt to > > > read a response crashes the state machine and the driver never > > > recovers. No further SSIF comms is possible! (slave doesnt even ACK > > > writes). > > > > > > A couple of comments below on possible state machine errors. > > > > > > Its possible I am doing something wrong! > > > > > > > Thanks Graeme for the test and the comments. > > > > What's your testing hardware? > > > > This was tested with Aspeed ast2500 and ast2600 with the patch series > > [1] below applied. > > > > If you use the same hw, could you pick the series and see if any thing > > improve ? > > > > [1] https://lore.kernel.org/all/20210616031046.2317-1-quan@os.amperecomputing.com/ > > > Thanks, that patch series does stop the state machine crashing. > > I am testing on AST2600EVB with A1 rev, but we also have our own DC-SCM with > A3 chip. > > Responses are still not working for me, but I think that may be an error in > my ssifbridged hacks. > > Oct 10 10:54:55 qcom-evb-proto-ccf37d18ea0c ssifbridged[335]: Read ssif > request message with len=13 netfn=44 lun=0 cmd=2 > > Oct 10 10:54:55 qcom-evb-proto-ccf37d18ea0c ipmid[312]: BootCode: > 000000000000000000 > > Oct 10 10:54:55 qcom-evb-proto-ccf37d18ea0c ssifbridged[335]: Send ssif > respond message with len=4 netfn=45 lun=0 cmd=2 cc=0 > > Oct 10 10:54:55 qcom-evb-proto-ccf37d18ea0c kernel: ipmi-ssif-host 0-0010: > Warn: on_read_requested_event unexpected READ REQUESTED in state=SSIF_READY > > Oct 10 10:54:55 qcom-evb-proto-ccf37d18ea0c kernel: ipmi-ssif-host 0-0010: > Warn: on_stop_event unexpected SLAVE STOP in state=SSIF_ABORTING > Just to close the loop on this, I have now fully tested this driver on our setup internally. Final hitch turned out to be an aardvark not issuing STOP events between reads/writes. Thanks for the work. Graeme _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel