From nobody Sun Apr 30 06:57:46 2023 X-Original-To: dev-commits-src-all@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 4Q8HGg19Nnz48rsh; Sun, 30 Apr 2023 06:57:47 +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 4Q8HGf5hZcz3MRl; Sun, 30 Apr 2023 06:57:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837866; 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=8VhrkGqIyE7teG8jbJibes47XxHacqsaWgxd0uC4pSY=; b=aPEuYDnHGag7aMr8nrlTJIFY1zKMaItEPjizbdnmA8KEAU5rxdXRgoaV0B+eKNQoNekPUw XD/ZO2czjVrHrRSAi0u5Nd3Hgt9ryE5lNQMQJ1qZrPcYQ8DNyOqcXRxgUViDwWIDxc1fOJ d4ODAKWpHZXm6AscwxJUTMy3Vcn9MmP4rDz5sOz0EHTY136SMsLbptDKp1JSOcSOecmWPY Z0zRThYaUoyZBELx2BzCbTEkcIRwEA148mJMGJu1j9ZSDEL/XweW8me3U7auOAKe1C14mN 7Bnwh2Ua3Smxhr17uiYc27fTARXOSw4TO4qUEtdNSt5CXAIvun9jxrfeqZL3dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682837866; 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=8VhrkGqIyE7teG8jbJibes47XxHacqsaWgxd0uC4pSY=; b=cKqZpKY4domzJrvW2aAIfbEsgdbaBBZDwBOaOVuyqCMeLGz6VH/D/Xk+pnFjpdgHt2Mmgc UcESax6bSGGL8sLBMHys8PIhEw1wc6Kae56LiOzI3u6HSnpctIWGcLN+8IqQnJoA87U/f7 QW50W372WyiZAxc9W/W9q9b9tJQMsx2f+P6KiyMuAue+Nr+lkmy0CZAQ38SGhvvCNSv7je MjcmrLhHsVr6VEjlrEqM+a1i7aMVdVvV8Qn0yjl9/3h3Ww1eyDNZ84xk0u/Gf4bcWsnpUd BYFYpz1N++teOaRerq14zAh78rrXsSmvEa/MNHdXFwquGiFXCau1H1A1E3PK7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682837866; a=rsa-sha256; cv=none; b=BdxFeAxBtPboNyIs0mQtsAcAzCiFbTt5FB/0KWGcVBn5e4Q0f9VAzy5t1GR8dQ4eJoSYk9 c4kPntgUrOzGBND3bOmTmiGgX976woRpOdELhhzotm6qsdIOqFRueBF4ol9A1NL82jPvJr kb0dIcMOW3Zzm1ZGw8tdCVpNBkydQcsmaLMjzYi3eL35R3cd3F4w9wQ4vzmrbOgurUJGDb yUX51sUPrwvHi8x3hDo4QGv0EqDu3Svj2Vn/B+T3RxfIlzJYkpyoLFpe3INM4xtkYHA/V8 KeQXScuFya36SosLOniHo2pEqsMdxKxcE7c+5FuhUQdnVvO82Li0ObtY+8JaZA== 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 4Q8HGf4fpxzDr7; Sun, 30 Apr 2023 06:57:46 +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 33U6vkAS071404; Sun, 30 Apr 2023 06:57:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33U6vkrL071403; Sun, 30 Apr 2023 06:57:46 GMT (envelope-from git) Date: Sun, 30 Apr 2023 06:57:46 GMT Message-Id: <202304300657.33U6vkrL071403@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: cb68867ec7bb - stable/13 - usb: Respect NO_INQUIRY quirk during device enumeration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cb68867ec7bba4d296cedb73c09f4256086cff32 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=cb68867ec7bba4d296cedb73c09f4256086cff32 commit cb68867ec7bba4d296cedb73c09f4256086cff32 Author: Kornel Duleba AuthorDate: 2022-04-26 12:07:21 +0000 Commit: Hans Petter Selasky CommitDate: 2023-04-30 06:56:16 +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 (cherry picked from commit 3ee943868c74ce917820fe9ddbcfeab338704d90) --- 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: