From owner-freebsd-hackers@freebsd.org Fri Aug 2 16:38:36 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D0DFB6B2B for ; Fri, 2 Aug 2019 16:38:36 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 460Xsl1HDGz4FKS for ; Fri, 2 Aug 2019 16:38:34 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-pg1-f193.google.com with SMTP id n4so1058593pgv.2 for ; Fri, 02 Aug 2019 09:38:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=NYlhYX4fp/3xb1Mensv0kb1E0VQrVpVttRT8RaTgTgo=; b=MZ1boQYcRHGhXxj1zx1INf4dlH4UbeQ73Rl9lUq6zRkne2PTxUmjM67wWFB6vhRi+k j81lH1/uDtJ+2muNOvMrsdZGzS70fUS3XlP8bJghTeK4DmDtdXPdy2Et+R2gh7fljJod 7Isa78V8/kzVoIjG2nGHm9yhED6o4yjqh7T5F2QWLctT+eWwsEJUgBlLs6Je0QxqLCuA BgOkuY5FveI9RBYXaq2DDjaob+OzciwI6B7XdRyl6SCHNANU1Sv9zd1zLJSpctHvoAli xk5ObKwgeXB0PxJouJQf4K0DOQBj1SNpRXeLGcsSCfXfU0nkcgg3UZtmoFJK0nMnYKoN QjJw== X-Gm-Message-State: APjAAAUayVUrpugU8Puqh7/PoEv360jvjv1m96W3Je+5Wdq6cjhaOB8g i+Q7ob5kuRzTc53JbmLtzw20QDAOxkQ= X-Google-Smtp-Source: APXvYqziQeASk2nHSskKIc/Iyhtp9tvrX8dUoIYJf0rz9M6WzRuxHcD1j/HMu6Jahiah2B098Qi9Ew== X-Received: by 2002:a63:ec13:: with SMTP id j19mr43532487pgh.369.1564763913441; Fri, 02 Aug 2019 09:38:33 -0700 (PDT) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com. [209.85.210.170]) by smtp.gmail.com with ESMTPSA id y128sm95032030pgy.41.2019.08.02.09.38.32 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 02 Aug 2019 09:38:33 -0700 (PDT) Received: by mail-pf1-f170.google.com with SMTP id b13so36307574pfo.1 for ; Fri, 02 Aug 2019 09:38:32 -0700 (PDT) X-Received: by 2002:a17:90a:3225:: with SMTP id k34mr5066041pjb.31.1564763912656; Fri, 02 Aug 2019 09:38:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Gleb Popov Date: Fri, 2 Aug 2019 20:38:06 +0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: A bounty of $100 for rtsx SD card reader driver. To: freebsd-hackers X-Rspamd-Queue-Id: 460Xsl1HDGz4FKS X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.215.193 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [0.13 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[193.215.85.209.rep.mailspike.net : 127.0.0.18]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; SUBJECT_HAS_CURRENCY(1.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; URI_COUNT_ODD(1.00)[3]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[4]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.69)[-0.687,0]; RCVD_IN_DNSWL_NONE(0.00)[193.215.85.209.list.dnswl.org : 127.0.5.0]; IP_SCORE(-1.18)[ipnet: 209.85.128.0/17(-3.40), asn: 15169(-2.47), country: US(-0.05)]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; DMARC_NA(0.00)[freebsd.org]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; RCVD_TLS_ALL(0.00)[]; TO_DOM_EQ_FROM_DOM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2019 16:38:36 -0000 On Wed, Jun 19, 2019 at 10:22 AM Gleb Popov wrote: > Hello hackers@ > > I've posted a bounty for this bug: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204521 > > I invite anyone interested in using this driver on FreeBSD to either add > some money to the bounty, or take up the task and implement it. This > shouldn't be very hard, as there an OpenBSD implementation already. > > Thanks for your attention. > Bumping this thread, because I've added more and there is $175 bounty as of now. From owner-freebsd-hackers@freebsd.org Sat Aug 3 14:27:14 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25167B2915 for ; Sat, 3 Aug 2019 14:27:14 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4615vj5x9Bz4M6S for ; Sat, 3 Aug 2019 14:27:13 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id C9A52B2913; Sat, 3 Aug 2019 14:27:13 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9697B2912 for ; Sat, 3 Aug 2019 14:27:13 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4615vj0cKtz4M6R for ; Sat, 3 Aug 2019 14:27:12 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mail-wm1-x331.google.com with SMTP id 207so70737176wma.1 for ; Sat, 03 Aug 2019 07:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GOHqlyzRPTxtTMsvYVR5p9Mrps8L6op9+MNQEc4XWZw=; b=EQQUUE9Ib+al9CW9AsZsLW4SYplk5Qt0Kl8LMbQo2Oqn4AYOOsVnmyTscKRfPYWgTD 5bCgfFzU/mNTUD4gr/4naBt0oox0H5B9vT3njHIMtBwmq/TZAu6Qd1OPVEpeHFy2qFCr 8UxsnYN+tYfe4+NEUaWpb4KPoY4p9iL5Y9eWn3wk6upGG1WpfKDdW2kqW7IR0haFAzT2 DHsDMW5FWDkcdk0f0am4KCwdFnf7eEjWReF7t3d8IOhzFPP1axSxEYb2OMlDwsaddAC4 eUx+dwytTf9gq4MsgAtdAGs8Ha4rtMV/Ug0jBJAmSQZRImQSt59RghW30+yT95zIib3Z qVsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GOHqlyzRPTxtTMsvYVR5p9Mrps8L6op9+MNQEc4XWZw=; b=tDlCgbqzHpYnBEOhlfF2eRNCfm3pAvlbW0MAcu9dPiecXESHALsSpr+qAKYA8CnWSg Jve9ZQu3MghdVJ6lprw5HaKifQUlhOUU+omc5UgKcyb5EhIn4lJQ7a9XwZRFyrpV7FYp ZBpkyFaCbgKFWPl9zmDtMmJwbwkM0D0QhcNU1Ja14xyyC6GjdbEGhPOhiAwvbvernuPh 973PlULzzJ1bVZAz275aZQf4ilsfDcFWitYo5Y5D1/TTmpdVphzKvOJHU9BMPNU6Mg4O JlJ4xoFc3QRPtQITcfSHcIxoMeGEn4d6xVntQd7LMQbrbySzHr9MOTLur2T5gEd8DHgm 3kkw== X-Gm-Message-State: APjAAAX7Iyx1LS6bAzFDCyKxYf3VYoJxUS1VZJgRIL6pKdqWtY/4Avh1 Mtny0vUfbgxwIKHKcv5J+B0lpGf6 X-Google-Smtp-Source: APXvYqwCioxs5tG0ch47n3RKOauok+Rw3LOVZw2wZFDPwxyjMBLXhMt6PpSuaouoQQPfGNIAQP2D2A== X-Received: by 2002:a1c:c14b:: with SMTP id r72mr9582773wmf.166.1564842431454; Sat, 03 Aug 2019 07:27:11 -0700 (PDT) Received: from localhost ([213.149.55.77]) by smtp.gmail.com with ESMTPSA id v5sm107581621wre.50.2019.08.03.07.27.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Aug 2019 07:27:11 -0700 (PDT) Date: Sat, 3 Aug 2019 16:26:13 +0200 From: Domagoj =?UTF-8?Q?Smol=C4=8Di=C4=87?= To: Warner Losh Cc: "freebsd-hackers@freebsd.org" Subject: Re: Device's "stolen" sector Message-ID: <20190803162613.00001766@gmail.com> In-Reply-To: References: <20190716182350.000054f8@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4615vj0cKtz4M6R X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=EQQUUE9I; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rank1seeker@gmail.com designates 2a00:1450:4864:20::331 as permitted sender) smtp.mailfrom=rank1seeker@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[1.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-1.00)[-0.996,0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; IP_SCORE(0.00)[ip: (-8.97), ipnet: 2a00:1450::/32(-3.10), asn: 15169(-2.46), country: US(-0.05)]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2019 14:27:14 -0000 On Tue, 16 Jul 2019 10:45:07 -0600 Warner Losh wrote: > On Tue, Jul 16, 2019 at 10:25 AM Domagoj Smol=C4=8Di=C4=87 > wrote: >=20 > > 11.2-RELEASE-p9 > > > > Tested with >1 disks: > > -- > > SATA disk connected directly with SATA cable to MBO, shows correct > > amount of sectors. > > diskinfo -v ada1 > > > > When I connect it to the same MBO over USB to SATA adapter, 1 > > sector is missing (the last one) > > diskinfo -v da0 > > > > Having last sector inaccessible is a huge problem as many "things" > > use it for a metadata. > > This has many times caused MBR disks occasionally to not be visible > > at all while being 'da0' (gpart: No such geom: da0.) > > And also GPT disks to be in a [CORRUPT] state upon reattach > > directly to SATA interface. > > > > Before submitting a bug, there is only 1 variable left that I can't > > test, because I have only 1 USB to SATA adapter. > > It might be a hardware issue, so can someone else test this too? > > =20 >=20 > On 11.x, I'd install the sg3_util port. You'll need the sg device in > your kernel. Use sg_readcap on /dev/da0 to see if the numbers match > the devinfo from ada1. If they match, then we have a bug in the da > driver. If they differ, you have hardware issues in the USB to SATA > adapter. >=20 > Warner >=20 11.3-RELEASE-p1 So, I've got my hands on another adapter ... It reports equivalent number of sectors to 'ada$N' Meaning the first adapter is faulty (It additionally doesn't report '# Disk= descr.' as it is, but as 'Generic External'). But it came to my attention that both adapters show incorrect '# Disk ident= .' Only when attached as 'ada$N' it is correctly shown. Correctly working adapter trims (tested with 2 different HDDs) '# Disk iden= t.' to 12 chars. Also Cylinders and Heads are VERY different when HDD is attached as 'da$N' = or 'ada$N' (tested with ok adapter) This is not a functionality issue but informational one, but then again, so= me filesystems require correct CHS data during formatting in order to be bo= otable. Domagoj Smol=C4=8Di=C4=87=20