From patchwork Thu Sep 12 03:35:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xu Yang X-Patchwork-Id: 13801342 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2089.outbound.protection.outlook.com [40.107.20.89]) (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 89F62155C88 for ; Thu, 12 Sep 2024 03:35:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.89 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726112103; cv=fail; b=OllcKF5CmR6V7MSrZFutr4/Qs3AogdncdHMf1wdQ5HaNA7l9EEMQ3QCr+otlreAxhIvBChzTX42wDiOago5YU1Hyx+RRkFV1LCrsSWYdYg099/LU6LYiceIgatsnLqK6EWGYonAH3DXhnycBv5aJReBmwXkERhlKOccRdPfEjcw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726112103; c=relaxed/simple; bh=t9AInFr91FjWEB8V754C8w5Tg/5D5f9TBxLi/syHsbQ=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=BikTUz1Yg9GrE71k/EBppmTwaF6QRp68QYscZsKofJCdm1CiVkB2D4CPNRZX5xOBj6MFlxyhZvlsQjttLe9DMAf/HnIOpBOyt5ptIkhtQ+v5F5E6bba6TBTi81AWUZMiE3VqM85ImxUeYsRqr0IWefWCDA/dWuep4EwG+/bLytg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=jluQUyKL; arc=fail smtp.client-ip=40.107.20.89 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="jluQUyKL" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BHR1OVdFWIP/CsOzdfixWZiOXHKY+teO6rncGFAXyeLG23hE3VbEVK6UhVr15HFWV8q+o+HUzwTgSUW4JBQgW2VujdlLXB2GSAWJ10O19bPtMZk+sz5t77poUQdLhFR78zzdwFM/AKrcVr8y5Xy7yhtUUVLny+4AHLPJisH2bFZRMrgRik2ZVTuWO5MAyeHh2UXGfVKWkxPN6rb2fML+WFBYo1O4mMtvZ9VdJtF0lonPxv00MUUp6mN45Op4yFfHkl5pHgx+901qfm5NyDyMe56/dBzAImU8fF3DpVUkMIXi1Cawdt8b87aMgY9ubSpuCjD8zNnKL75Dt9GGWmlTuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kiGVfhcHylTJHVkfsZhZdatHpJw/Zk8U7gSVAgBCHLE=; b=uALd7y9bXZc8fKtAWjzArAUGfn5u6GWUfK1oAxaA+k4zS+IOBDuBgk3LfVLGBFubwNMwY3WWnI92f5ebmrMBqGnZiOCPw8JG9zBqRtvbv4jbcLHd+3wWUEWwx8RAa9PW7L/7inmxM5TLS4Wxch/CSkclYFyG2EiLax38DlQXJ0qgd08d+C0ajOqJP2t7HLXBna6dUiWz3jCHOXs4MGl3TUFEYo+RVoQUKx7UVEfYcO85HE8AVpj3kqWZUz6+6IXHnifDG/AZuAgyh4n3S3L++4XaQx1qPqy1KdyqungqqYbYKZaq7VkuxDVUroVa7h/iec+3wzwVyze6tSDRpW4t2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kiGVfhcHylTJHVkfsZhZdatHpJw/Zk8U7gSVAgBCHLE=; b=jluQUyKLVzBrX2n93bkymY3GzPIzV9/EeHgcZyZLg0Lx2Yubdb1F3w0pWZ9TP/8J6auT0Y1fjczdU5Nz5oRjmgWcsCJfweU2sQh47IE3QatQ0dcFbXJhUy+uYihMDSbwyJPOl1z4hAzzZbWrPIWXpKVw4os5YduyVrVeNo2Une62jrNJeS/YCsGpigsS8rBI50Z4gp6NQwvG/NuUKEyrJ6Iv9K6PKBKhQrPA8gzLHEsD6+OhgqCs7Cvg7h4lsrQpH422EEaIGMeHDheIbRA3yn7OJtONRLhJZD6BKn74dTpOWE09bB+XY+t45V2Xw2HpzlNyf8+PuO7l135RVk7XXg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) by VI2PR04MB10953.eurprd04.prod.outlook.com (2603:10a6:800:271::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.17; Thu, 12 Sep 2024 03:34:58 +0000 Received: from DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7]) by DU2PR04MB8822.eurprd04.prod.outlook.com ([fe80::4e24:c2c7:bd58:c5c7%4]) with mapi id 15.20.7918.024; Thu, 12 Sep 2024 03:34:57 +0000 From: Xu Yang To: peter.chen@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, imx@lists.linux.dev, jun.li@nxp.com Subject: [PATCH 1/3] usb: chipidea: udc: handle USB Error Interrupt if IOC not set Date: Thu, 12 Sep 2024 11:35:49 +0800 Message-Id: <20240912033551.910337-1-xu.yang_2@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2PR04CA0153.apcprd04.prod.outlook.com (2603:1096:4::15) To DU2PR04MB8822.eurprd04.prod.outlook.com (2603:10a6:10:2e1::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8822:EE_|VI2PR04MB10953:EE_ X-MS-Office365-Filtering-Correlation-Id: 4285f1dc-cb8d-409b-c94a-08dcd2dbdfc9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: AeFckC9C6EHQTVvCpFJmn7BPKnqAjt91/578gjAkbKDlDyQdmFuebnRPjNWUsLFjqx+hfs0/+j7yA7dR7tXz7CwDOyymncl3BN9PF6JG0Ko5i3rL1vrg0SJDFR5ZCQMSCBsSVhe7SUQuGTSFS/n2/jNB3KXapBPEyfBQC8bROOFWRyrz7ZoI/xgc+bewms3xHkYMl2SbGoda+MYbi6RvpHD4X4+/EVlJLV+QtUunCFW6j6n/SsSPxZMtu731s0I8KeawqQII1l3tU47MkJbTNGWx+vqCo1yEJiS1fUaMxXy/3kQ9Frqtz4s2poAsktuFAnKUNqH2zoXK3VvXKTTlmfQAgK8cRzoLzCexVFkExJ397FvrOipSDFWk4J3h+0DTQgY2DD/NEPiGypjxGQ3+I58X+VQoZsa3bYxv6/QPUNjBTmwAt5KCkT4O12NeSXcNIYxLdWxFD1ElSiQgWUO364QD1PJHV68Zi68mI4qp780s/RJt2YoxLMpJQmyYzKB9UAhF63uniB/yy1rvpaYG+NByGDzBYXsZdYsjp85rYd7kdxQz4iDaJwdoebxsw/yNFt15Zx3pmbvFrjoVxKhIFjlheH6j82nuX+8JN2UabOhFJxNfLY1h25EXqChHkX4Exge+nuVoZce8ME0K9EZGUWJaoP33wOpAtRsoSrfwz821mxA5iXOr0QysaiNlnrjxnJX7XFjzqYZVN1CR6XmfW8RWUZ8sJRUQrREW5poQtyjqiiyO+yXUitdJrcWFsbmulsqm7CtO3eNUZ+xEMHABDzgonjUb2ZOIJiLxozaP2Wtt4Nojc4fuxA7lotoLN/NTP645z602j0B22NLv4VLLjr7jRfAsxzwWPcygSGRW/6XZn3OSdeI/32LnF5tEbXGsMyf6KafpIxxFLPeHLTsbgpqXDmnr6fplTdrt0izuF11SVU5CRNs7dT1YHekp877cVCbvJfvi2q5tqMlUQzgszXSqnZGX27qkhHZYqjEKr/Pw168BYKPvk2/sNBbxY7dX5g/Qr0P0LArSKSZ0jVczqKEs/39tWo2QFBoz4PrPOUlJsOxhH0Fwd+DzPPBO809nRTX33PEzZcUDExN1k//ynmyOWf4uvSPi8ha0QJHtW4SzcmxDZbzZZzpJkGLY8mX/F22kxiPg9AvYYfOWAzcrf92gaUAoVp5p2XMjL79xd7ZqxLtQB07lPy0c6AoAH4ljnbeASlBbj33ewNAySnzaccJFsW3ZkaJEnBzt12QPorAvQEAZM+WtLldeUNf1MefC79vqu5Uh1ScBM3E98/yYzKRG3OVyIH+Axht0ww0WwUrDe6tOzuxCUsjRDHJiS46MYQPWuh6NCuFszPGURNkxjEorG1LQDEnoYTY3ZpMNoT3vvJn+TNS8Pxy0wOywS0BFS1YnhDGQHRLK1YUk87YKag== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8822.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-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TiHLPPnwdTzOiD5W4aqYHYNlJ/3Cnz0EYuh+fLHPj93SFP2Cn2xVEPPY1kPBCvahP/QAZ7wcGWZ6grrkW1k9v1uzK3Dwb13KADMWjyTpQLxToFa2tqAqYE+HoiwI38gPP1BrR/69RRczRz6MxOFOtOXAHDQ0ax0DB/fJ1aR9hLbnUhV3oI75/meJU7b3FPQyobuCSwighqDnoHHwp9j+WLwjS2IjC7RhNKFW6PgzgyaNcYCUE/lPf+jX0tpNyaPj36qFN1JMVjnUEoKdLG4pZVbkWaRXSKSvIhwUcFHKEszTD0HyTTXjF9iFPtZHsf/DVraA0uG5GBlIh5OzDGAEZnzkwZ09YXkuOoc4bxZWNPXUR9FUVuFxgMI2oPrLJ9tmtSiSja8/trGKO8LOsxaK4LEe9m7dz8fvCXduiBcu5gIsWSMtHVENFD6jQiWkklt2amkL8B4QSwpjlUeyZxdmQ0SUB7ApAL4FUxbxLRDmdf+c11hoGgX+c/Hs23/66kITNpdBSxfsJAxQcbDtMK0oup3fjNA7NmDT4B X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4285f1dc-cb8d-409b-c94a-08dcd2dbdfc9 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8822.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Sep 2024 03:34:57.6933 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TT/caJzMWbklDaS+XZyXnxnmqJyYDBv8xWy+bmfzPZ5aVjWYCORbMv5YJVzsmFKvXo8cH2J63qkVAUBUh7nN5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10953 As per USBSTS register description about UEI: When completion of a USB transaction results in an error condition, this bit is set by the Host/Device Controller. This bit is set along with the USBINT bit, if the TD on which the error interrupt occurred also had its interrupt on complete (IOC) bit set. Currently, device controller will do nothing when endpoints met transfer error if IOC didn't set on that error dTD since UI didn't assert too. This will also handle UEI event as same as USBSTS.UI for such cases. Signed-off-by: Xu Yang Acked-by: Peter Chen --- drivers/usb/chipidea/udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 69ef3cd8d4f8..b9ccf62e0a50 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -2063,7 +2063,7 @@ static irqreturn_t udc_irq(struct ci_hdrc *ci) } } - if (USBi_UI & intr) + if ((USBi_UI | USBi_UEI) & intr) isr_tr_complete_handler(ci); if ((USBi_SLI & intr) && !(ci->suspended)) {