From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 022133806AA for ; Mon, 27 Apr 2026 06:36:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777271763; cv=none; b=NTaLJFHFR4su1ax/XFdG0tHrwnI+QzWWiYzD13LG+k0Jg1tkYTdQSm1SrO2HTESFSQo+KVauDfZdpt5EoZ8sTAtySbqNW80f9qvngejJAAM13KpgJ5u6aOcyvck8LPss5Qugeww1uqVRzzoww9pGbS+rwn7KkL0rjE8NbH0fIQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777271763; c=relaxed/simple; bh=DoIRs2ewmXmKoxeu+LwDciZNxgzLEyxBy3ROzfHrEhM=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kU6AERuDAuo4pcjnRmeoLN45DY6BvZ3JMbGid0k/jIAWRpB7vBLMeVYfLjH0TW6L4yN6EMeavI8XuPoBogIvOpaPRE2f+p9gJ/aik+M+TdAPWFEU6TfNM15JI8nB7b1Fjs5MYaF4tvS4QB7eWllFQ6m6Zw6DbYaAwq0HApDKifY= 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=DCrrnBGQ; arc=none smtp.client-ip=209.85.167.43 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="DCrrnBGQ" Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-5a402dea4a5so9872584e87.2 for ; Sun, 26 Apr 2026 23:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777271760; x=1777876560; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=Ob6hAxn4b2XJbstB2WIYNRqhZDHJqLJB6rp2bFlZgjg=; b=DCrrnBGQZlmqii1jcrhEBQ1AmWiOgMsjDskG4yKdb2+p+TAnpVP8TVJiiOsmdOxZoS VczEHy7xxhZdiUlTZkzGMEkTL7cRbEtGaQadNzn6OozG9k//Ps5xdf51qYxcqOJx717t /q96bkCHL7QdLBwBTnXrJ0Xhn5dXs7tqSMLj2DJIiuUExhwYXVc/1c0UicaJNqXn3gqC yQAhtSWv2spmp4R1o+pOsSAuTV4RuFAXhBehFc/Uai6twFt4msZvXoFFfS5E0lasjksw 4eQUHVvIswPgzTdyyWGiNRCWcz08erDSqJbnP0qs2zI53ag1ftceIJmPMnpfuizk8jbc IA9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777271760; x=1777876560; h=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=Ob6hAxn4b2XJbstB2WIYNRqhZDHJqLJB6rp2bFlZgjg=; b=Xq+p+Qgk3IvmlB6ZjklJPKlxFrIGU9yqMdbE4IvE31G5To7Sntw2rlejlcReAwO0us APO2fvw7gF2vN44mEiq/RkAoFIZv9zXqyqR1gnSq4/mhP2XbQpeSaPJ/EjRwxj4jqc3M ySHIqrfbevIZYuq444LjfEfiXE7xc8L2GGoSWRpixvz1KelgjVimfrDYiIRBlFCJG7vB rNRv9gdz8r4ZQ1yH+xbqJC85ZvYq6SrqUkwpSXG0oslSszeQi/nc9XVC+iTvUrtjOtu+ SdFAl4PjBMbEjEiK9wNV7ZUqq3tN+2MkFhQhX8d+8a775Bg5a9E7EvWAcClPkomz9NcT D7sA== X-Forwarded-Encrypted: i=1; AFNElJ+MpfPKOG/52YJTbiQg8EakgTxq/hfsvQdGO6Zsj7QUQW5QGYvtb53GauCe3eBa/SbI2jFNtn9RYEM=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3TAw2l3PgZSvMMcBXUPv9kMhFG2YbEFydcV4PAIXf3drL+urm hO2pzS9vQvpejLVYSUZ/uFkKp0108+fsdWxBd0eNDFviayNI3Zkd2bed X-Gm-Gg: AeBDieutJ9IvOU5CYdBaWmhrsjkLxgNaavRVAhEPYZD2c82lxdkfl4VDPhsap8SkYRW bULYo+mCX+TyOyIkqWVbiS4utW8IDUOmLpSkaogMItk13bMdEuJsi4jJWJSe2abljRmtnOXl6/v HyZBUn86Zn105FQQrJiy/+4GUgOcfNtT+CSmc8gkIqLyFb3p7XN3+mMekLrKibudT1jypjGcdWV uvj6iPMJtk/wj4HRC5jT0QrPU8+noRwrvKsDp6iayDLO7tDq2bkX7gHJOmEPsWNrHzZF/CQL6WB 5NGFRILUjOkpr4QnlyUszHCXwnul9UuxACMd2K1LtCfnThKs3/MRaoewZzsTer0wHc62+XyqY6+ Ep0ZUJxQ2bfVbvYL7rxrUP1mQ+kqzChj7p6HKPRrPn2qk/FNO44BzDY10n3SoifNuyjX/KG4qup DdInZnd3WDX2gdq2Srh3lNSBzWUb8ERLMYyAmLQQUyPrM= X-Received: by 2002:a05:6512:3ca9:b0:5a1:3437:84ac with SMTP id 2adb3069b0e04-5a4172ee6b9mr13124133e87.31.1777271759755; Sun, 26 Apr 2026 23:35:59 -0700 (PDT) Received: from foxbook (bfh75.neoplus.adsl.tpnet.pl. [83.28.45.75]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-38ecb5f652asm64457991fa.12.2026.04.26.23.35.57 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 26 Apr 2026 23:35:58 -0700 (PDT) Date: Mon, 27 Apr 2026 08:35:53 +0200 From: Michal Pecio To: Jeffrey Hein Cc: Mathias Nyman , Ricardo Ribalda , Alan Stern , Laurent Pinchart , Hans de Goede , Greg Kroah-Hartman , linux-media@vger.kernel.org, linux-usb@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v5 2/3] media: uvcvideo: add UVC_QUIRK_CTRL_THROTTLE for fragile firmware Message-ID: <20260427083553.36ff4731.michal.pecio@gmail.com> In-Reply-To: <20260413100545.71796c66.michal.pecio@gmail.com> References: <20260331003806.212565-1-jp@jphein.com> <20260331003806.212565-3-jp@jphein.com> <20260409100247.7cfb62d1.michal.pecio@gmail.com> <20260409221749.5e6bccab.michal.pecio@gmail.com> <20260413100545.71796c66.michal.pecio@gmail.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/.OkknVOR4gOuo.3Taa06e1K" --MP_/.OkknVOR4gOuo.3Taa06e1K Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, 13 Apr 2026 10:05:45 +0200, Michal Pecio wrote: > Question: can you kill it by starting some video application to set > the camera up, closing it and then running this loop? > > while :; do v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=1; done Hi again, Any chance you could try it? And also the attached test program: cc -lusb-1.0 hammerint.c -o hammerint sudo ./hammerint 1532 0e05 0 85 Initial arguments are VID:PID of the device, next is the number of an interface containing some interrupt endpoint and then the endpoint address (including 8_ if IN). I tried with a variety of SuperSpeed devices (UVC, NICs, hubs) and this reliably breaks ASMedia HCs within seconds. If the same is the case on Intel then it's a bigger problem than just UVC. The video streaming loop breaks even more controllers. I have some general idea how the streaming case could be dealt with, but not so much the interrupt one. Maybe rate limiting. I found that avoiding Set TR Dequeue to Link TRBs reduces failure rate, but not to zero. Long ago I also looked at the issued command sequences and I haven't noticed obvious errors or spec violations. Looks like a HW bug. Regards, Michal --MP_/.OkknVOR4gOuo.3Taa06e1K Content-Type: text/x-c++src Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=hammerint.c #include #include #include void comp(struct libusb_transfer *t) { char c = t->status == LIBUSB_TRANSFER_CANCELLED ? '.' : t->status == LIBUSB_TRANSFER_COMPLETED ? ',' : '-'; fputc(c, stdout); fflush(stdout); } int hammer(int vid, int pid, int ifc, int ep) { struct libusb_device_handle *d; struct libusb_transfer *t; char bufi[1024] = {0}; char bufc[2]; int r; r = libusb_init(NULL); t = libusb_alloc_transfer(0); if (r || !t) return 1; d = libusb_open_device_with_vid_pid(NULL, vid, pid); if (!d) return 2; libusb_detach_kernel_driver(d, ifc); r = libusb_claim_interface(d, ifc); if (r) return 3; libusb_fill_interrupt_transfer(t, d, ep, bufi, sizeof(bufi), comp, NULL, 0); for (;;) { /* GET_STATUS(DEVICE) */ r = libusb_control_transfer(d, 0x80, 0, 0, 0, bufc, sizeof(bufc), 100); if (r != sizeof(bufc)) return 4; r = libusb_submit_transfer(t); if (r) return 5; r = libusb_cancel_transfer(t); if (r) return 6; r = libusb_handle_events(NULL); if (r) return 7; } } int main (int argc, char **argv) { int vid, pid, ifc, ep; int r; if (argc != 5) { fprintf(stderr, "USAGE: %s vid pid ifc ep\n", argv[0]); return 1; } vid = strtol(argv[1], NULL, 16); pid = strtol(argv[2], NULL, 16); ifc = strtol(argv[3], NULL, 16); ep = strtol(argv[4], NULL, 16); r = hammer(vid, pid, ifc, ep); printf("%d\n", r); } --MP_/.OkknVOR4gOuo.3Taa06e1K--