From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A75483822AE for ; Sun, 29 Mar 2026 16:46:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774802783; cv=none; b=jlKVp5AUh1h7C/2YfeAUv0Ku/3DftQ+fkjjaQyto9zxfWO48/22oOrevUlvIorJzOZiGhFrvdS87t119iQAB3hCMYb+pjwPgVPQDuTN+odascPj3vVQxmttoS5A7K8Y781BVOM1W2o8TC3Bg8bOlWtRyT4hxtAy5UXdyZIm2L0Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774802783; c=relaxed/simple; bh=uFMCjtjlVnGaOFvRNOA0uD/zTbacRy+2/gQZeG+XP9I=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=imbUJeV1tJN0X+qzhCUKEe/kQaPNx4+uXTSIEPsvpEua7aUiuxbdmzoUhqwtvGrtvtHqvRv63xUmm1Xco9Sd1uuwfIDJtBhbPzX5ue1wcwFVX+mLtzZFaRsdG19jrr0iG9KwtYhcoQCWKmbnEadSUaRo2psXB7oUhnuRQ9j9Bn0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jXn6+4I2; arc=none smtp.client-ip=209.85.218.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jXn6+4I2" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b9841aecf72so427087466b.2 for ; Sun, 29 Mar 2026 09:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774802777; x=1775407577; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=NnmXj3NfRJi3UhC1vJIDVcNt8l/y48d9IxJ0hWK5iiw=; b=jXn6+4I2+iRojAukWw4MinqtO8KSYP8gbF/YIO7Zi61eTH0gcJ0J9vMMFZ7cbw3ILL AcaEqwN3INXfDjs+Kq6Y5GPRc+rwyOn2xVvgxKctctcVjZnbctAujdIF7IdIVGWvW3PP wfCiX8wPJXGgdMSAlgHwKZJj5f0Amql81MN3r++Hxt/9yB8XdXQ9eEWHuaGzKliC/t4T kOXVZgqh9mvwJpexxs3SzKCiLnc8ImB2+j2O+9RuZjoQspMwB6JS0S+EwRa5H4H0pZEu T04UpdxWbJPWeOiYE1lhdHLjP0GXxK6mriOGD+BTOGjHnzr134OEs/OJPcC4jtCtTe26 HK+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774802777; x=1775407577; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NnmXj3NfRJi3UhC1vJIDVcNt8l/y48d9IxJ0hWK5iiw=; b=FtspcWnGoh8pFXBT4PpbjrieRoyuDhUVIDH2CeZ/lp3LSl8XwEgTfScwdjxZUi2ptj oyOQx4id8jQn8Kg4asvf9+BLvr79ez+IieU+FAnrZ51PbCQw2p/4f0QLxtPInlEsfBxu t8pWVmt0ruipYAe6iSsyBKLzoHJLZb5J7xthnU8z2Vy7YsbUsooqQZECXqX1AtlppWAw CGmvN7Ahxvztd3zOwV8jEBSMiH5uK1KSpGwsjMWOTkrwHbhbmhymzdGOzFohtRsZ2770 zXys0hUO/jjEBrtGevOu2MBqSvsZyIVtF9e/lWJbYCiO05xU9BREOi41tL3euYAHP0oI jWvw== X-Forwarded-Encrypted: i=1; AJvYcCW73e98rgI6smbMP0LrQ+LicW1Et2KcytkQZMxEjNnWkr8w2nAB5YYaoegR8zVUZHDX5DJYP8YLXvE=@vger.kernel.org X-Gm-Message-State: AOJu0Ywv9/6XSWD6M1ubV4/nfrw6TkuZX8Jxybv/dB6LUWi8cwOy27ex w043zyRgKCigA2xwhRMar6SE7WkL9dhUk9Pb1QoYexWwskN9q8XQw4Jo X-Gm-Gg: ATEYQzxmbmzslUE7z41hKa9Rc8PQPlPM5vsT8K4HYSq4BX3F1Mb/98S01egLcHWGl0v z1But/pQY/y6OIluzP3U8D1w8fW3sqjIuMbLKagBLmRm1k+hlj/IBUr5X/FqU+C1pdbxFjA69Aa 8Wqux4csfAaVMVvs5IqfObuyj+NslReN1joPhD6EDxXrEjGFqCbevnBnOGgVPJD+qP9BXB9UrFn aQU93gStcyaH7vmFRUnY6x7R1lldToVVqff2joq4ZA0YcNJ7+BryV4zqJ6/CUj7ZKntc8fGQRRx dX+HPzCn57warJLEP8iTbCqWke59Ah5+nJpPfHNFcS0ltknYy3TuN8BPQkVwQQzV38iyJ0kFH7c N+bZssXoHuOOySdBqPMXCQDIjl9glnZ+bYVODyYgSE84eA4feXba18s8aotmfOip9eDxY7gW72k 62bTf+ioG4UPFiR06H/WHeVqX/9Fs6kr9u X-Received: by 2002:a17:907:61a7:b0:b98:6177:2eff with SMTP id a640c23a62f3a-b9b509141afmr436531066b.41.1774802777008; Sun, 29 Mar 2026 09:46:17 -0700 (PDT) Received: from foxbook (bfi53.neoplus.adsl.tpnet.pl. [83.28.46.53]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b9b7ae52064sm175908566b.23.2026.03.29.09.46.16 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 29 Mar 2026 09:46:16 -0700 (PDT) Date: Sun, 29 Mar 2026 18:46:11 +0200 From: Michal Pecio To: Alan Stern Cc: Thinh Nguyen , Oliver Neukum , =?UTF-8?B?QmrDuHJu?= Mork , USB list Subject: Re: correctly handling EPROTO Message-ID: <20260329184611.0afa92c7.michal.pecio@gmail.com> In-Reply-To: <22c70ca7-57dc-4328-a5cc-d46c4f73556f@rowland.harvard.edu> References: <20260318223851.1f6d07d7.michal.pecio@gmail.com> <20260318235920.ioek26hdr25rkksp@synopsys.com> <1eaf4cf3-4278-4d04-87aa-8b6069d544e1@rowland.harvard.edu> <20260319231620.3ukqxsrwqikp5zbd@synopsys.com> <2929d47c-fc02-49d2-873e-758f24c43071@rowland.harvard.edu> <20260321021439.7pmcdrpb5oxbivct@synopsys.com> <20260321065424.76a80508.michal.pecio@gmail.com> <20260328222217.297200bd.michal.pecio@gmail.com> <22c70ca7-57dc-4328-a5cc-d46c4f73556f@rowland.harvard.edu> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 28 Mar 2026 21:52:37 -0400, Alan Stern wrote: > Storage is not a good example. It's so obviously critical that a > huge amount of effort has gone into making it exceptionally robust. > Very few of the other drivers do as good a job of error recovery. I though it's a good example because all the effort is in vain if xhci runs subsequent URBs before the driver even knows about it. > Other drivers that might be affected include things like HID HID doesn't submit multiple URBs so there is nothing to restart after an error, but it's affected by the unilateral toggle reset issue. And by the way, is there any chance that ohci-hcd also clears host toggle on errors? I'm doing simple test with a keyboard (low speed interrupt in): disconnect D+ which causes some ETIME errors, connect it back, press and hold 'u'. Half the time uuuuu shows up, half the time only when I later add shift does UUUUU show up. Looks like the first packet is dropped due to toggle. I see it on xhci (known bug) and also on ohci, but never on ehci with a TT hub. > various serial protocols If you mean usbserial, they are pretty boring. On completion they just submit the next URB, except for EPIPE, ENODEV etc. There is data loss on OUT endpoints, there can be more data loss due to toggle mismatch, and throwing out already queued URBs would probably add more loss. It seems usbserial won't care whether we restart instantly or not. > network drivers, video & audio And I suspect they are similar, because higher layers can tolerate loss so why bother recovering from USB errors. I may play with them later. BTW, I think audio only runs over isochronous. But I should have a bulk video device somethere. Regards, Michal