Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp476218lqo; Thu, 16 May 2024 11:28:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUa3snz2CJ8kuTi/CathMDJssOA2ot8WJ23TNMg56ft4lCObGOcioHbQNVdby76d5VmUbG8N+tAWCZud1TnCyR4kG9IR+C7N/nFR7SHpg== X-Google-Smtp-Source: AGHT+IFv3qBPB+A2GOeMScHq0Uo9t3+BnVEjETJQH1sBPwMIYGLzH82jTznt/zLvpi+UgJ5fOKFB X-Received: by 2002:a05:6102:291e:b0:47f:1f49:45d1 with SMTP id ada2fe7eead31-48077de5712mr22293651137.17.1715884126242; Thu, 16 May 2024 11:28:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715884126; cv=pass; d=google.com; s=arc-20160816; b=b+8vz1vo3ozTo6tLVposdbP8fEYf0GzI9A8CkuKCNOzCBo2O0uBuL6N4+6CQVlBJSf /kkkVwb3cD9qfCS12bumRums8GAVxdx5ACs7bWD790lT8VxAxdnqxtGsfyL1lZAh4bde +a16IwVWX/L51worRbkjBq+37tDV2g96h8ilGhec1ChACkzMaD2Qs7iFS4Kn6JjLxRS8 fAOjxY4U/BHZt6MKxLtf4bbp8dQbhapX6aYVRzASnNXcmTB4XaXIy7eIyL8R4X0Bmv/M FPCRHJkAD7qkj6v0sEMr2oV/eFtuHKcTbTChsqkzPJ8Hu/ThzrRmsN76TPBJJEv5/J0j sB2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=OPNP/V+K9oIptQxupTBJOpz2/GhP+4OrRNDg7xLMAPk=; fh=r7jucx4EDwcx4QmKdJY/B/BWs7eG+xdxvoZ3FO/I2uA=; b=RGty6RK7S4tpeyr0TqvCD/qNaLLqzFvT06AxkkZLGa+S3AIpMMPekAMtANFmLkEClf eG6/OS3d+Sny8KPWDswPIV15wd1Gmno8+035KFdLI9tryCZrzqG/0reCvTf9a3URfsSf EA2W8BoD17Qv0ALVbprzmtqz3M4NlnhOdKd6WCqRpig84LUXYyKfpSP+gW7ZxKxixfdM zk8uEaXNCQe89RW3CsrBQlHewx4K2nHAdeHlgyl9ra3sbB8A6q72nDiN/JRlT33erYrT 9WddnGyXh5A17Qacb8ColwInV07Is0tt+f/TpxDPJJz3HLjGgIhIw76XaNvad70LCV4j xKaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=jazRzuW5; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-181466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f20d404si134813926d6.171.2024.05.16.11.28.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 11:28:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=jazRzuW5; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-181466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E29D01C210CF for ; Thu, 16 May 2024 18:28:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DF61415FCEB; Thu, 16 May 2024 18:19:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="jazRzuW5" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4E3515F41F; Thu, 16 May 2024 18:19:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715883593; cv=none; b=gTU2b5Z1iqg0875QzynK4GASL3BoMOKc9RDHmL4Zj50YP+raUamN5JRMPPprLx0oijG/eTUtTPhGcFHizen0qmYojVsrH9wzBEDx5epfetykASrH/8fvoxCvaDpgZzrzQyG81AYWsgcN5fAefTePPyfMWHTuxVQ04e0ELqy1tP0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715883593; c=relaxed/simple; bh=vOYsMk7mrSYUToVE3TW3d0+j9nsQ/udu6UXMoY2sLm8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Fo5oOw81cAUL4kQ0A0GkxQPUCU8NiRleKUqGuMmOADcDzJtoK7qRwX1lshnjkGTdK4Jw/Uy7emmCyPcYCPZj+HSp78fV+71LYIRWIrd3vIOVi5JpNhYPkRHVUDJT6wYNIbcAJDbQsz9vDp+4ulxoJv9EwcHHOydn4OEMYf+jcgs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=jazRzuW5; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44GFtB2d023416; Thu, 16 May 2024 18:19:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=OPNP/V+K9oIptQxupTBJOpz2/GhP+4OrRNDg7xLMAPk=; b=jazRzuW5qxaEpz+JtUR/AN207x3hJSvKEwXgDGDQn9eMAbWWBJ7G2xMg3U+o9uZsE1sC ACQVJ1h2v2/V0s14ZMRVU1aPXjW2v7XJm05ktywyFaLwefX9BmLnSPK6aWFMlmGHJ1u/ slo4qH7ecdICvtRYvJZ2YYHDeuqaH6aXz4/+Sl8I9FtSB8yAImAygmpcPTO/BNqtQBey VuSmyZMP5MGb+v4npLoRgzgFEWEkLkjNs6YoKScHlJ4zEoF3FKQQeIrCaHl1qRtF1mit NuXjiceBmMiThwOSbklWsW1MEDOGh1GLO6Jr9OeVGDYKNtHzmPeUqet4vNLhy7ZMsbDU 7w== Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y5mce8fru-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 May 2024 18:19:20 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 44GI2MgB002273; Thu, 16 May 2024 18:19:20 GMT Received: from smtprelay01.wdc07v.mail.ibm.com ([172.16.1.68]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3y2m0pkfus-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 May 2024 18:19:20 +0000 Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104]) by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 44GIJHn539846334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 May 2024 18:19:19 GMT Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 66EB15806F; Thu, 16 May 2024 18:19:17 +0000 (GMT) Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 28F375806A; Thu, 16 May 2024 18:19:17 +0000 (GMT) Received: from slate16.aus.stglabs.ibm.com (unknown [9.61.107.19]) by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 16 May 2024 18:19:17 +0000 (GMT) From: Eddie James To: linux-fsi@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-spi@vger.kernel.org, broonie@kernel.org, andi.shyti@kernel.org, joel@jms.id.au, alistair@popple.id.au, jk@ozlabs.org, andrew@codeconstruct.com.au, linux-aspeed@lists.ozlabs.org, eajames@linux.ibm.com Subject: [PATCH v3 33/40] fsi: hub master: Reset hub master after errors Date: Thu, 16 May 2024 13:19:00 -0500 Message-Id: <20240516181907.3468796-34-eajames@linux.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240516181907.3468796-1-eajames@linux.ibm.com> References: <20240516181907.3468796-1-eajames@linux.ibm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 7q38jETbYYQUbopbcmLQUqSA_hw5T1g_ X-Proofpoint-ORIG-GUID: 7q38jETbYYQUbopbcmLQUqSA_hw5T1g_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 phishscore=0 adultscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 bulkscore=0 mlxscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405160132 The hub master driver wasn't clearing errors after accessing remote slaves. Perform the standard master reset procedure to clear errors to fully recover. Signed-off-by: Eddie James --- drivers/fsi/fsi-master-hub.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/fsi/fsi-master-hub.c b/drivers/fsi/fsi-master-hub.c index 4dbc542500bbd..1bd53b1e52a91 100644 --- a/drivers/fsi/fsi-master-hub.c +++ b/drivers/fsi/fsi-master-hub.c @@ -49,24 +49,34 @@ static int hub_master_read(struct fsi_master *master, int link, uint8_t id, uint32_t addr, void *val, size_t size) { struct fsi_master_hub *hub = to_fsi_master_hub(master); + int rc; if (id != 0) return -EINVAL; addr += hub->addr + (link * FSI_HUB_LINK_SIZE); - return fsi_slave_read(hub->upstream->slave, addr, val, size); + rc = fsi_slave_read(hub->upstream->slave, addr, val, size); + if (rc) + fsi_master_error(master, link); + + return rc; } static int hub_master_write(struct fsi_master *master, int link, uint8_t id, uint32_t addr, const void *val, size_t size) { struct fsi_master_hub *hub = to_fsi_master_hub(master); + int rc; if (id != 0) return -EINVAL; addr += hub->addr + (link * FSI_HUB_LINK_SIZE); - return fsi_slave_write(hub->upstream->slave, addr, val, size); + rc = fsi_slave_write(hub->upstream->slave, addr, val, size); + if (rc) + fsi_master_error(master, link); + + return rc; } static int hub_master_break(struct fsi_master *master, int link) -- 2.39.3