From nobody Thu Apr 28 06:42:39 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 627531AB60E2; Thu, 28 Apr 2022 06:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KpmJb2MK6z4WfF; Thu, 28 Apr 2022 06:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651128159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=unxJOFwiv1Xk3Y6Q2Bud5/Nl4QzU5e560axDJYQIyCI=; b=vcteOVffXx+MBWGa8uzEugodbXdTEXilOsTuCowZ4NLAqJjJSSM/85SvUGNxqpQuL/MCOm GuNGWQwzKZ+yJQpD3+4O6+Hh5Vyx5a8eqTLwlPQJ6CZkuOcUUcFD/ZOZirAzmq22v5IlXg mwa6O9LRLo39OUpa2+2KgF3nq2WCOr+s4AoCCizpqINCRmmXRBqy1BaMyx68qc6R10RE0x 1UkGtfDFhcc/xVZ7oSuKljNyk+j8pcDzHCIrgXj+y1fq198mpH9ILtV2ASXJdmnymlvFhw 1eGfgMeoqeoz2AU+FGvu0XdqvdfZrNFJZZzHaRTcDXwKyjjK0z2+P/m/bDsnzA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3108213CAE; Thu, 28 Apr 2022 06:42:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23S6gdmK066183; Thu, 28 Apr 2022 06:42:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23S6gdhj066182; Thu, 28 Apr 2022 06:42:39 GMT (envelope-from git) Date: Thu, 28 Apr 2022 06:42:39 GMT Message-Id: <202204280642.23S6gdhj066182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 3ee943868c74 - main - usb: Respect NO_INQUIRY quirk during device enumeration List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ee943868c74ce917820fe9ddbcfeab338704d90 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651128159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=unxJOFwiv1Xk3Y6Q2Bud5/Nl4QzU5e560axDJYQIyCI=; b=uRrSxwLTbrLjBlX/VjeMWFZcUa/31LeFzWbgl/ayVPE+TOuUs3pwWsf0xoa/Hrex5JYq2B HZSbSR4SmGTqiuLFzsz7zg8nHdi6/PC/0V9Pu2lBanmcGfpmmz/2mKw/ynSFmy6F4jq9tn sKkvrVPocb/8HR+YjkUOzFNTM4gj5Isyl0CzDxctmaQPGlCKRl1bDqJ2Db1duShJhfjgY7 w3goaTwVK/eHP7FU+UtZIDaEAwVk4kOcsYo4poNn6KWRz54hM3uxlXRRGTDbNdmCBmCLC4 L1ySlKzMCMUdOPJYKlBKrbC2ZHjw/cCRd7Z6Tvjpn7SbhOFwpHiiFIXeSpWwTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651128159; a=rsa-sha256; cv=none; b=ufGF9ot9o3//HOXifpPQAEKQl97i4TKRsk378RSSYWegH9mJLo03GgltcCXL66id3Jy66c wEnsSgbcs/Bu7ZJvpHh8qluotDSUJBneu7aChWpXyIZKaNNQKmtNR7A8L7jaPx9xp48oiO TsWd7cAcb5Tdps8u/YnyjIQ7q++PkmiAjObepvNXCKYu46ckKE4a8WAxFLyG2e5fVKEkYu APtZiqmo2YF4ZcoTtOZ96eKffema+0hep9iLo4d9rstDl00bfC5vxmX9vRq9MBSf0wl+UW CRE2+BJ7L7qjVS1J/FSf2nw9eSzTW8DVBv3VpKdMfj0UaeLm1oz2/og1gLrmmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=3ee943868c74ce917820fe9ddbcfeab338704d90 commit 3ee943868c74ce917820fe9ddbcfeab338704d90 Author: Kornel Duleba AuthorDate: 2022-04-26 12:07:21 +0000 Commit: Wojciech Macek CommitDate: 2022-04-28 06:42:26 +0000 usb: Respect NO_INQUIRY quirk during device enumeration Both usb_iface_is_cdrom and usb_msc_auto_quirk functions use SCSI INQUIRY command to probe various properties of usb mass storage devices. The problem here is that some very broken devices don't like this command. Check if UQ_MSC_NO_INQUIRY quirk is set and skip cdrom and quirk autodetection in that case. Sponsored by: Stormshield Obtained from: Semihalf Reviewed by: hps, wma Differential Revision: https://reviews.freebsd.org/D35075 --- sys/dev/usb/usb_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 6564182a97b0..b5e51cbdc7a7 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -2031,7 +2031,8 @@ repeat_set_config: goto repeat_set_config; } #if USB_HAVE_MSCTEST - if (config_index == 0) { + if (config_index == 0 && + usb_test_quirk(&uaa, UQ_MSC_NO_INQUIRY) == 0) { /* * Try to figure out if we have an * auto-install disk there: @@ -2051,7 +2052,8 @@ repeat_set_config: usb_test_quirk(&uaa, UQ_MSC_NO_PREVENT_ALLOW) == 0 && usb_test_quirk(&uaa, UQ_MSC_NO_SYNC_CACHE) == 0 && usb_test_quirk(&uaa, UQ_MSC_NO_TEST_UNIT_READY) == 0 && - usb_test_quirk(&uaa, UQ_MSC_NO_GETMAXLUN) == 0) { + usb_test_quirk(&uaa, UQ_MSC_NO_GETMAXLUN) == 0 && + usb_test_quirk(&uaa, UQ_MSC_NO_INQUIRY) == 0) { /* * Try to figure out if there are any MSC quirks we * should apply automatically: