Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4630101rwl; Tue, 28 Mar 2023 09:12:46 -0700 (PDT) X-Google-Smtp-Source: AKy350ahCBx5ZV2JngZs6U75QaouwhK9ZI4i6PzZFnEih0hQDYaVjXU8aHKIPpz+3ene5JPgeIwL X-Received: by 2002:a17:902:daca:b0:1a1:a5d9:146d with SMTP id q10-20020a170902daca00b001a1a5d9146dmr19802863plx.65.1680019966111; Tue, 28 Mar 2023 09:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680019966; cv=none; d=google.com; s=arc-20160816; b=gozqQbRP468ImKXQ8kJqIauOa4D4Ox3hftl2mmodaG4B/99ozZ2yu2+G+uMXsZ0JJG RGsKbk0GMesNZbpASS1D15WvmcAAy6Ie3fIoeVn/kTrxl11XuS7vurwwBjDC0rYtGVQX USpFCV+Lw+HtdBNCqNdKhXy2M9y/Gk4pXfEkH8AykBCDCwmeWUNmDyYdSqo9oa8RpgXO X1UUdPySXtJ7qr6bI0CmEFeYibFqFPX6WHwqiyrAlJERhBgRJ5beBxV4uYjTHfK3T+B2 j+ElRI8Wj35ie9ptiwtVte8HSc+Xn3QhgVDeObFZgjzz3ce9wII+2ZP8h5phola1oIsR lA0Q== 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=4Cd7FiiJO37CbrdHVr5t20E/qKeGVKmXVyF6KG0EpX8=; b=fBCsQnq5epPsEr5OAivGH64H6VOrCwWdU2AydnoUCSl6PY1dXe+7+ewox6qrQrLhp5 qe/U4om8AhxvooJ0ZN2KaXsnctSwKPcjVSwfWWA3+57qynmZpD18e4HXXIEVedrD1eVB KYOkfPljDS1Lat0t+oWCKrvZ9sh3/cwFwC0A75+MVOWKi0ICDWWyrEMfbH3EUn1CXuzG hyQC3KAai/OsSMdyKHiggoM2tjaTmU08PXxULsRIFwwj2N8GeFpwMr3oOLwPye5aBqIb 7HrbMsCbcpgYW/YlWQw5bvA6LPwLCGhunbhzvP8RhOGQJFU6bi6JHHxywQMyOkWdxegL AVqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=NXm2unGf; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jc10-20020a17090325ca00b001a183ade8f7si28901369plb.433.2023.03.28.09.12.33; Tue, 28 Mar 2023 09:12:46 -0700 (PDT) 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=NXm2unGf; 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 S231207AbjC1QI3 (ORCPT + 99 others); Tue, 28 Mar 2023 12:08:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232220AbjC1QI1 (ORCPT ); Tue, 28 Mar 2023 12:08:27 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46C35CA22; Tue, 28 Mar 2023 09:08:26 -0700 (PDT) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32SBGbDR006581; Tue, 28 Mar 2023 16:08:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=4Cd7FiiJO37CbrdHVr5t20E/qKeGVKmXVyF6KG0EpX8=; b=NXm2unGfOI8lYKgaLuM3OqSq2oPs791IHCeYvyRj4xgXfaXa+ZN/0wr0Zoqhxoi8EST3 RvXAsE4ED+Iio+eRfuzr4Tbw6ZAVB9zZ6dsEWlfsZAJ/4sGf1XPlWmvUnK0lnpKHgIQi sHeBS9FKTZxOq9JszNhcbTMzlC1sIs/1vBS3vUbXfouTdi5rNMohAZo5p2TYVw2/sAF2 kPtMZMrfwXO66b1/8wir9uQbiBD/qR6vbwfUVTkJijIIpz8LzStVNBxROqstJW6Z/ikM NIEW8U3EKAB64TW/2peJe0+7PbKG3rKQFSCYW89KBWEqO6s1x8R6R1/jvIU0vQxTP1wJ 3w== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pky700vtr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Mar 2023 16:08:11 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32SG8AqH030273 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 28 Mar 2023 16:08:10 GMT Received: from hu-kriskura-hyd.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.41; Tue, 28 Mar 2023 09:08:05 -0700 From: Krishna Kurapati To: Thinh Nguyen , Greg Kroah-Hartman , Alan Stern , "Geert Uytterhoeven" , Colin Ian King , Jiantao Zhang , "Rafael J . Wysocki" CC: , , , , , , Krishna Kurapati Subject: [PATCH v2 0/2] Handle core soft reset failure in pullup Date: Tue, 28 Mar 2023 21:37:54 +0530 Message-ID: <20230328160756.30520-1-quic_kriskura@quicinc.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: KYZHOfRS-zCUyEVqMpXipDBdacuBbk6u X-Proofpoint-GUID: KYZHOfRS-zCUyEVqMpXipDBdacuBbk6u X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-24_11,2023-03-28_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 suspectscore=0 mlxscore=0 mlxlogscore=858 priorityscore=1501 spamscore=0 phishscore=0 impostorscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2303280126 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 When core soft reset timeout happens, pullup doesn't check for the return value and proceeds setting up of event buffers and starts the controller. In this scneario, it is observed sometimes that the GEVTADDR LO/HI registers read zero while we are setting the run stop bit and we end up accessing address 0x00 leading to a crash. This series tries to address this issue by handling the timeout and return back appropriate error code to configfs for it to retry enumeration if it chooses to. Link to v1: https://lore.kernel.org/all/20230322092740.28491-1-quic_kriskura@quicinc.com/ changes in v2: Fixed comments addressing incomplete error handling in udc core Krishna Kurapati (2): usb: dwc3: gadget: Bail out in pullup if soft reset timeout happens usb: gadget: udc: Handle gadget_connect failure during bind operation drivers/usb/dwc3/gadget.c | 5 ++++- drivers/usb/gadget/udc/core.c | 20 ++++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) -- 2.40.0