From nobody Tue Apr 12 23:04:20 2022 X-Original-To: freebsd-hackers@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 CD15F1AF9FE3 for ; Tue, 12 Apr 2022 23:04:23 +0000 (UTC) (envelope-from bakul@iitbombay.org) Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KdLrk43myz3jDd for ; Tue, 12 Apr 2022 23:04:22 +0000 (UTC) (envelope-from bakul@iitbombay.org) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-d6e29fb3d7so296984fac.7 for ; Tue, 12 Apr 2022 16:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20210112.gappssmtp.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gNv6Wb2AKsrwylq6a3hab7/OHxdcG2B+g3JYT8Ifs84=; b=UoThEGYbz5LSMqxsq/j+bVh7pnSwBSCeVstVbZQxmVFTsDMfEfpjUz1quUgHymGzlc W5QgrDGisvSrct04My6M8dzTl2Ev2AiD0mn0lh+OGM1tfz+zrcxlxLRtbc8mNzJJm4vf xnfZTAfFfyUlATGHYc8zFxAf9OMFapDpoYuphL82pUQyOVWl7YA7Qjhb4NGV1rhvBKBv 6fPUSHgPFQQ0yiRLrehLm/AcYadfNbZSqRpTgz5tSdcFmcpHp/qrca6Km/8htGoaN0se mH7OPxFc5xPt+CAtMIOLwT7Zj/QjOlrlz37XT2Vd2IL6Tkw3998q9LFp+2/yPRKTgGje 9s/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=gNv6Wb2AKsrwylq6a3hab7/OHxdcG2B+g3JYT8Ifs84=; b=XKnRhSnc5xVy+xi1s7w2tvSHwSGyvdotKEzbSR1g+CuDyD+tNKWcT9gS24qfEUilrr 8lf9xy/8geGC97uaNnklKvFJRC6dWihXtr+TxLfLPRB7lXXfCZQyJMQBrKem7BRWS+hO MRTK8w2+qunpazgsJnSnACZafnPuHRbZrR5LI4DpGT8xR7LB1f09ylY+nC6vOuVzZgWJ z+0r9RJbv2yJWTRm8lL6Ewl4CtvlyaQiAQEAnNV+XJ2kcOCpzZmdSflFNY3jGxOyvZBx aueZTc+AcLjnmJq5qyAVcpsgxS/UzKb4hBPfn+LHsa6l5pFfi2Tb+4vnSHoZuVVD3KWM K5oQ== X-Gm-Message-State: AOAM5318nI/ESntz22IeaVSnMRQhLundv686AQWPwJJEoAm+THhYOrr2 lITRmRo5fbmDw+3c8xVHUYlbxCmQYGaARA== X-Google-Smtp-Source: ABdhPJx0HPgIYa5snuZlOR/N/0HnbIFFBUfrDYT/xipT2wMOGoPCLcI9lGKr72xO/nSN5noJck83OQ== X-Received: by 2002:a05:6870:c109:b0:d9:e74e:d09a with SMTP id f9-20020a056870c10900b000d9e74ed09amr3085020oad.142.1649804661848; Tue, 12 Apr 2022 16:04:21 -0700 (PDT) Received: from smtpclient.apple (107-215-223-229.lightspeed.sntcca.sbcglobal.net. [107.215.223.229]) by smtp.gmail.com with ESMTPSA id f44-20020a056871072c00b000e2b638a925sm4005864oap.49.2022.04.12.16.04.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Apr 2022 16:04:21 -0700 (PDT) Content-Type: text/plain; charset=us-ascii List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: xhci USB transaction error and subsequent recovery mechanism on Freebsd stable/12 From: Bakul Shah In-Reply-To: <1524993805.98701.1649776236883@mail.yahoo.com> Date: Tue, 12 Apr 2022 16:04:20 -0700 Cc: "freebsd-hackers@freebsd.org" Content-Transfer-Encoding: 7bit Message-Id: <1EA26D91-EBA0-4043-BC29-06B7578AAE05@iitbombay.org> References: <1524993805.98701.1649776236883.ref@mail.yahoo.com> <1524993805.98701.1649776236883@mail.yahoo.com> To: mahesh mv X-Mailer: Apple Mail (2.3696.80.82.1.1) X-Rspamd-Queue-Id: 4KdLrk43myz3jDd X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=iitbombay-org.20210112.gappssmtp.com header.s=20210112 header.b=UoThEGYb; dmarc=none; spf=pass (mx1.freebsd.org: domain of bakul@iitbombay.org designates 2001:4860:4864:20::2f as permitted sender) smtp.mailfrom=bakul@iitbombay.org X-Spamd-Result: default: False [-2.96 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:4860:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[iitbombay-org.20210112.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.96)[-0.958]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[iitbombay-org.20210112.gappssmtp.com:s=20210112]; FREEFALL_USER(0.00)[bakul]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[iitbombay.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2001:4860:4864:20::2f:from]; MLMMJ_DEST(0.00)[freebsd-hackers]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Apr 12, 2022, at 8:10 AM, mahesh mv wrote: > > This issue was never observed with Linux kernel 5.4.2 on the same HW. On an external SSD I have, Linux was using UAS (USB Attached SCSI), while FreeBSD used the older BOT (Bulk Only Transport) protocol. See if your disk supports both. You can try usbconfig -d genN.M dump_all_desc # N = unit, M=device index to dump all the descriptors and see what all it supports. You should see something like this: # !! | grep Protocol bDeviceProtocol = 0x0000 bInterfaceProtocol = 0x0050 -- BOT bInterfaceProtocol = 0x0062 -- UAS Likely a remote possibility but could it be that it has a bug in the disk's BOT implementation? At any rate you can check if anyone else with the exact disk model has similar issues. Alternately, see if the problem disappears with a different disk. Another thing to check is whether the disk has any updated firmware. Note: I am not a USB expert so apologies in advance if this leads you astray! My main point being that the issue may not necessarily be a FreeBSD bug. Do share the USB traces.