Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3572861pxb; Mon, 4 Oct 2021 05:21:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx34SbsD2QHo7OjZWl3gkA3nH8e9zjVjynyzZK3t4Is1Bm3ZWTSE9pOs3cTAEjGUGjE26a/ X-Received: by 2002:a62:2707:0:b0:44b:4870:770b with SMTP id n7-20020a622707000000b0044b4870770bmr24420288pfn.59.1633350063203; Mon, 04 Oct 2021 05:21:03 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 2si16182061pfg.197.2021.10.04.05.20.50; Mon, 04 Oct 2021 05:21:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b="M5nmCD5/"; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233038AbhJDLqv (ORCPT + 99 others); Mon, 4 Oct 2021 07:46:51 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:25765 "EHLO de-smtp-delivery-102.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229778AbhJDLqu (ORCPT ); Mon, 4 Oct 2021 07:46:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1633347900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6HJhGDSq7Qq3ZxqHEhSaEcPK3AccoB8ZDZ90soSKsV8=; b=M5nmCD5/TomJ+YPH2fNwjgKeiLJzVvHMdqOG9mgF1ogT4r6Yy57XHmenHeRYffbmBFq1JM 156CMw4HX9Z4OlKfDzSqdZ0kEdwic+nn9nm2+OpQBED3/J4Sa7RA0Hk2fdYYe1rOtQzSZx 2Qd2pRsl6NJhL/FbEfSxnxYZwCbviIU= Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-he1eur02lp2051.outbound.protection.outlook.com [104.47.5.51]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-11-DfE0Ghs0NJueObAAdyYh5Q-2; Mon, 04 Oct 2021 13:44:59 +0200 X-MC-Unique: DfE0Ghs0NJueObAAdyYh5Q-2 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EwvqVFxfyvUzvQc5We9xY1eYLkOVYetZJxLtE6hDkQp8EXzPBFli4/+h8YdC07wU4RLYHMCgxJMF/clFUs5RNGxClbtEOe3U9Kz+FSktQbgtBU3nmHBxwix2lRFCJOh88qZXQYHaij3tVinKSWwhpCyY9j8xHLUPSnhtmXcuF2bPYNR4pntKQnzLHcrJfCXssHh2T68uF627rDaykJsOZo8oKf0VG2lt4BU1iKHzbJShQe7LArcF2u/SNu+7Exf8dQxq4kOLYpMg3508L9WpZX/orG1biUM9izf1Fk58OoBxFIcg1MBnKntD1ohwkUqKcrEc/16AK78LjGzDhxcFOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=P5yWjQdy0GDPdICeCJdHGvyoKANhQNDpuJwXdpryihs=; b=ngPwPJcH1NoUKq2E/CtUB+LBeBc6AI8W3dJI5xdr/5nRx8SW9s/oZ67/Jr0ea7RQmftxd53Kr6Kq1AQGFkXIb49VAqFUqeW6XXEIdVMsSATl59voxtUUv7eqYHq6qppS50DG6lIcGGgi/DX6lI6GjKoBQ6CjKsBdXVV63VhOVSiKbwPSZ9IpF7C4xUj6mGbPwNa4vZiha7EANLn4Ls3PeYylD/ZX+FgtcjYoNIBm4PcqycYJlSjDmhbOQpFU5l2On0PUIFcMgVMcD79zpQLab4FhQrvITJTPTOBY/JgHkPIyLEGGGro8ZH3nhAtwmVFtQjrP04GH2YdQGto9zvNgVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: realtek.com; dkim=none (message not signed) header.d=none;realtek.com; dmarc=none action=none header.from=suse.com; Received: from DB7PR04MB5050.eurprd04.prod.outlook.com (2603:10a6:10:22::23) by DB7PR04MB4537.eurprd04.prod.outlook.com (2603:10a6:5:35::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.15; Mon, 4 Oct 2021 11:44:56 +0000 Received: from DB7PR04MB5050.eurprd04.prod.outlook.com ([fe80::61c5:2592:9e7f:a390]) by DB7PR04MB5050.eurprd04.prod.outlook.com ([fe80::61c5:2592:9e7f:a390%5]) with mapi id 15.20.4566.022; Mon, 4 Oct 2021 11:44:56 +0000 Subject: Re: [PATCH] r8152: stop submitting rx for -EPROTO To: Alan Stern , Hayes Wang CC: Oliver Neukum , Jason-ch Chen , "matthias.bgg@gmail.com" , "linux-usb@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , "Project_Global_Chrome_Upstream_Group@mediatek.com" , "hsinyi@google.com" , nic_swsd References: <20210929051812.3107-1-jason-ch.chen@mediatek.com> <4c2ad5e4a9747c59a55d92a8fa0c95df5821188f.camel@mediatek.com> <274ec862-86cf-9d83-7ea7-5786e30ca4a7@suse.com> <20210930151819.GC464826@rowland.harvard.edu> <3694347f29ed431e9f8f2c065b8df0a7@realtek.com> <5f56b21575dd4f64a3b46aac21151667@realtek.com> <20211001152226.GA505557@rowland.harvard.edu> From: Oliver Neukum Message-ID: <72573b91-11d7-55a0-0cd8-5afbc289b38c@suse.com> Date: Mon, 4 Oct 2021 13:44:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 In-Reply-To: <20211001152226.GA505557@rowland.harvard.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-ClientProxiedBy: AM6PR01CA0064.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::41) To DB7PR04MB5050.eurprd04.prod.outlook.com (2603:10a6:10:22::23) MIME-Version: 1.0 Received: from localhost.localdomain (2001:a61:3b0d:4601:21ab:d1da:15e9:ca07) by AM6PR01CA0064.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Mon, 4 Oct 2021 11:44:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03850ac4-310b-413d-2cdb-08d9872c6351 X-MS-TrafficTypeDiagnostic: DB7PR04MB4537: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SeYP5kUtIEwfTbgaf5+MheY8ud7LZaw01r79BTIj9jjK4hrsnA+R/A+xlPP0n6hFEGj0QfNp/9IPgDNpU9w0jGxUOqaO10FHJ5BIvMGct9f5oSfPSeYmVge/8ASjeKbYhfpGZu8+tOHlCFfeOPbUcPr0Y8G1hPB4vQN40RW2BnE/aft+VNeuWLrmOtwQkb+rymJ73ZqzKr+YkIH32DSSO0QRCAyzZS5mFQI/Db/9JC4C3YtjLt6t8w5h0+HLvz9xQWq1ycHc/KMjW/qj5nqLH/QaPbO1GUA3CsWoWjwv+7qeBwfPKqbu12Cox+wKnE6t84kmcQNum3L6vkPIqSUgOnBsptT1K2gw7mp1c4q2Qo+a5pqFTnj8qDnz16amL9e79Y4I1EzLHnGgrdiYKiqjpj5k0DWYbBwgBas0QC60fjewGZsHLK17N5ZKo0SN669xkftAirg/uAhYaG/68ZImKo/r1bV1dBxUG4LDqRrzMJNu2HmSst1YXFu0qufbxwGY0cEYttOLXkT66cRTOliUsT9zAofo6YboNfrnqXphnpQZSfozCUP71ZlvwOYf7n+DG1fsp/WX8UUCMW5F0ZdZG5RJJ3h6ljz7Dn97Qq9woEGk0GDEhglfFCxi/OiKdQSRuon4OtpGfNNz4S6irYWOnojxOKX2PdLcT+zvyG3RJVyZtCOtcxDHvD83Ww5QpfUqJcmisCSxzQRTMtIJ6peE8Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB5050.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(53546011)(6512007)(2906002)(316002)(110136005)(54906003)(6506007)(38100700002)(31686004)(36756003)(186003)(8676002)(83380400001)(6486002)(508600001)(66476007)(31696002)(66556008)(2616005)(7416002)(8936002)(86362001)(4326008)(66946007)(5660300002)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?uKPzfWzrP0Vnduti6RA2fdraCTibW4wCH9MnwaoZTGuyksHIZ/lIRrEcEfhq?= =?us-ascii?Q?WxLHmAhY7thAlI1qHfLFD764CkdTS2swJHBbOBnXjCpHMm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ehunBuTflAhY/rKn/wuKD1IJbiB2Mw7gD+9tVRsyNLXbsH2?= =?us-ascii?Q?TM01ivee4axvy/2TirdyJXMHd1+IRhjyhMiogT7nl3ild4Y5fvx9B/Rm7kjr?= =?us-ascii?Q?L7+RdhCe5AyWGagPGoVNIPTGO2P3t+YQDhXqhIwIHFqlU8iGkqf7ZyS9PVsP?= =?us-ascii?Q?c09rxxN6BMywt1an/GzTX1trZZB2CtbFhV8Myg5vDbh6eZU7y3Q//b12JARW?= =?us-ascii?Q?WaeO3XMeIjZ4b1hmJwXNh2G5fFNwXimj8BU/jRUjB/qwdm6ulhFGdoF6QF70?= =?us-ascii?Q?0kho9fI5mXEujTTGPF3F17MYfMUUSQB2QVyllUtmr6dAGFHJJSyGyq/fO6Fe?= =?us-ascii?Q?EPR6QeyD4DkDk3LLLkHgl5Fyt3Avu6j1xynvMRvFKGOy68FehCGog6RgMs35?= =?us-ascii?Q?Rw4CZCnnWh9d2ufdMyHqdmrDg4WD?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 03850ac4-310b-413d-2cdb-08d9872c6351 X-MS-Exchange-CrossTenant-AuthSource: DB7PR04MB5050.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2021 11:44:56.5919 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ogf5DAn4WV6+hRBj3A0WBBPCdi7PAtNaFAO9bDltvYnhpVfop20cyHroNluiwqNpLtCq/UpCjMYNM3VEby5Q9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4537 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01.10.21 17:22, Alan Stern wrote: > On Fri, Oct 01, 2021 at 03:26:48AM +0000, Hayes Wang wrote: >>> Alan Stern >>> [...] >>>> There has been some discussion about this in the past. >>>> >>>> In general, -EPROTO is almost always a non-recoverable error. >>> Excuse me. I am confused about the above description. >>> I got -EPROTO before, when I debugged another issue. >>> However, the bulk transfer still worked after I resubmitted >>> the transfer. I didn't do anything to recover it. That is why >>> I do resubmission for -EPROTO. >> I check the Linux driver and the xHCI spec. >> The driver gets -EPROTO for bulk transfer, when the host >> returns COMP_USB_TRANSACTION_ERROR. >> According to the spec of xHCI, USB TRANSACTION ERROR >> means the host did not receive a valid response from the >> device (Timeout, CRC, Bad PID, unexpected NYET, etc.). > That's right. If the device and cable are working properly, this=20 > should never happen. Or only extremely rarely (for example, caused=20 > by external electromagnetic interference). And the device. I am afraid the condition in your conditional statement is not as likely to be true as would be desirable for quite a lot setups. > >> It seems to be reasonable why resubmission sometimes works. > Did you ever track down the reason why you got the -EPROTO error=20 > while debugging that other issue? Can you reproduce it? Is that really the issue though? We are seeing this issue with EPROTO. But wouldn't we see it with any recoverable error? AFAICT we are running into a situation without progress because drivers retry * forever * immediately If we broke any of these conditions the system would proceed and the hotplug event be eventually be processed. We may ask whether drivers should retry forever, but I don't see that you can blame it on error codes. =C2=A0=C2=A0=C2=A0 Regards =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 Oliver