From patchwork Tue Jan 24 21:57:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffrey Hugo X-Patchwork-Id: 47913 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2394264wrn; Tue, 24 Jan 2023 14:06:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXuWcjxnn1Fe9SEPXTmdvtR7ksiMF+sZE6F5P9WFSqZIULxs8EaR7Tu/UWQoUgSsLdoI59WD X-Received: by 2002:a17:906:b24c:b0:869:236c:ac41 with SMTP id ce12-20020a170906b24c00b00869236cac41mr34165632ejb.24.1674597961036; Tue, 24 Jan 2023 14:06:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674597961; cv=none; d=google.com; s=arc-20160816; b=Vl8ShmTvD1fQnNq2YhaRCYWI0KjIi35dRoNSOT+8eC4wVMRI1Vh/m/kgWPDGiWwdIP aB1sx8FYDdDdha8I8SKSBkI6bWyZ/VCK1jvz1kZoInAXR1tnycrS5wVEVGiQ+zhtO9lV KuQiCelfkliZshAR+b+/l+ojN4RE6WgYqt2rzSogmO6VDLr/Wk0up+/4kZ3DGFCf1tbi jnDlfC8IZyJstUc0jJ0uW8kIUQKjfSkAS+N4GjWt9TNnnKtlm0sjXYh4RLKDKkfF90/H rYgSTB1loeGPJ1S0gZNOeqVFhXZ7lj5PLlLPMiHiW4jChgwjmaB+v8aWCzbQYvszDn6a lqTA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ypZ9PLozKHoHoFozXNB0v4MPqqzSGqjIZ9hr3UgvSMM=; b=W3/UcPsIOuYr9pIGhDITA1MzRPJsHZda/AyjmhTA3MzN84LjLfpJcp/w8hYBmPLzBV 06EOzReaL1OnoYpzUXe8//ItTzw81kJX11qw9HrS6vBOosxoBK+845Hfd6PwK2Mpd569 bKHtDGJ3ljHd9UVfcer8my4sA4wPw7SVUKK6DhL250ej8LzS8Ai3oEicMv2dhhZQljMw POD/pE7Pe1xrhxOI5J0VTHVy6JgXU1r+q9axqiTzPtGjFEyRqa4xmH/GIMQUFKMr7+pe FEbDuv+5l9UwerEe3WdNroEMnido9J3ea4Vyylw65r1y4GYMTO2qmwjtWgD348HJ551B YHCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=X6HIoIuT; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 10-20020a170906020a00b007c19a5b7697si4466020ejd.233.2023.01.24.14.05.37; Tue, 24 Jan 2023 14:06:01 -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=@quicinc.com header.s=qcppdkim1 header.b=X6HIoIuT; 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=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234976AbjAXV6G (ORCPT + 99 others); Tue, 24 Jan 2023 16:58:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234187AbjAXV6A (ORCPT ); Tue, 24 Jan 2023 16:58:00 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 233814FCC6; Tue, 24 Jan 2023 13:57:57 -0800 (PST) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30OLvlNp008559; Tue, 24 Jan 2023 21:57:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=ypZ9PLozKHoHoFozXNB0v4MPqqzSGqjIZ9hr3UgvSMM=; b=X6HIoIuTxIEuG+2nlNgqTE61L3+tT8IdEdh76VQpArc6ec+CRof+7zWndAHmLzIxclw/ 0o0Gs9OhoH+xI4+h5AyDZMk+29Tvz4yIy4RDKR+UDcbXNaLozFB+4SF1oDnIdm1LQMHe oMKm0WffT31TqGf5VERCKDzEoW2c/9pq3TEJ7vaUVQ+wamNBNgS/8zQp+nDhS4q+w/nj ICUPWkGAi/CAJDa8N8NhY4FX7e5xx0VjPYeD60/E7RXSr64CUHlJ8cZaR1JYr1mLjXKa STaDoxJCRwEa0gRDW4FvB9pBsf8LB05GhVU2LqDkVciYeqzIXSkzyz5a2H8OqzJbeOtV QA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3najkh8pxv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Jan 2023 21:57:47 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30OLvk0l017003 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Jan 2023 21:57:46 GMT Received: from jhugo-lnx.qualcomm.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.36; Tue, 24 Jan 2023 13:57:45 -0800 From: Jeffrey Hugo To: CC: , , , Jeffrey Hugo Subject: [PATCH 1/2] bus: mhi: host: Remove duplicate ee check for syserr Date: Tue, 24 Jan 2023 14:57:23 -0700 Message-ID: <1674597444-24543-2-git-send-email-quic_jhugo@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1674597444-24543-1-git-send-email-quic_jhugo@quicinc.com> References: <1674597444-24543-1-git-send-email-quic_jhugo@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: SVJaJMfQqqmiwAOJmizGYY9DQ6eVSyhP X-Proofpoint-GUID: SVJaJMfQqqmiwAOJmizGYY9DQ6eVSyhP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-24_15,2023-01-24_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 adultscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 lowpriorityscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301240202 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755943231692344481?= X-GMAIL-MSGID: =?utf-8?q?1755943231692344481?= If we detect a system error via intvec, we only process the syserr if the current ee is different than the last observed ee. The reason for this check is to prevent bhie from running multiple times, but with the single queue handling syserr, that is not possible. The check can cause an issue with device recovery. If PBL loads a bad SBL via BHI, but that SBL hangs before notifying the host of an ee change, then issuing soc_reset to crash the device and retry (after supplying a fixed SBL) will not recover the device as the host will observe a PBL->PBL transition and not process the syserr. The device will be stuck until either the driver is reloaded, or the host is rebooted. Instead, remove the check so that we can attempt to recover the device. Signed-off-by: Jeffrey Hugo Reviewed-by: Carl Vanderlip Reviewed-by: Manivannan Sadhasivam --- drivers/bus/mhi/host/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/mhi/host/main.c b/drivers/bus/mhi/host/main.c index df0fbfe..0c3a009 100644 --- a/drivers/bus/mhi/host/main.c +++ b/drivers/bus/mhi/host/main.c @@ -503,7 +503,7 @@ irqreturn_t mhi_intvec_threaded_handler(int irq_number, void *priv) } write_unlock_irq(&mhi_cntrl->pm_lock); - if (pm_state != MHI_PM_SYS_ERR_DETECT || ee == mhi_cntrl->ee) + if (pm_state != MHI_PM_SYS_ERR_DETECT) goto exit_intvec; switch (ee) {