From owner-freebsd-bugs@freebsd.org Tue Jun 9 12:36:04 2020 Return-Path: Delivered-To: freebsd-bugs@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 F3C6132BA76 for ; Tue, 9 Jun 2020 12:36:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49h8jw6Ftvz4VH7 for ; Tue, 9 Jun 2020 12:36:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id D500A32BA75; Tue, 9 Jun 2020 12:36:04 +0000 (UTC) Delivered-To: bugs@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 D4C6532BF24 for ; Tue, 9 Jun 2020 12:36:04 +0000 (UTC) (envelope-from bugzilla-noreply@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49h8jw5N8Dz4VQ0 for ; Tue, 9 Jun 2020 12:36:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 B423E15774 for ; Tue, 9 Jun 2020 12:36:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 059Ca4fE042837 for ; Tue, 9 Jun 2020 12:36:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 059Ca47o042836 for bugs@FreeBSD.org; Tue, 9 Jun 2020 12:36:04 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 204521] [new driver] [request] Port rtsx from OpenBSD to FreeBSD Date: Tue, 09 Jun 2020 12:36:01 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: feature, patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: sergey.dyatko@gmail.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2020 12:36:05 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D204521 --- Comment #178 from Sergey V. Dyatko --- (In reply to Henri Hennebert from comment #174) after switching to master branch looks like I need to apply patch from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D204521#c170 for correct insert/removal detection.=20 [un]plugging card 2 times I got following: Jun 9 15:09:06 laptop kernel: rtsx0: detached Jun 9 15:09:06 laptop kernel: pci4: at device 0.0 (no driver attached) Jun 9 15:09:10 laptop kernel: rtsx0: mem 0xf2100000-0xf2100fff at device 0.0 on pci4 Jun 9 15:09:27 laptop kernel: rtsx0: Interrupt card inserted/removed Jun 9 15:09:27 laptop kernel: rtsx0: No request running Jun 9 15:09:27 laptop kernel: mmc0: on rtsx0 Jun 9 15:09:35 laptop kernel: rtsx0: Controller timeout Jun 9 15:09:35 laptop kernel: rtsx0: Soft reset Jun 9 15:09:35 laptop kernel: rtsx0: Controller timeout Jun 9 15:09:35 laptop kernel: rtsx0: Soft reset Jun 9 15:09:35 laptop kernel: rtsx0: Controller timeout Jun 9 15:09:35 laptop kernel: rtsx0: Soft reset Jun 9 15:09:35 laptop kernel: rtsx0: Interrupt card inserted/removed Jun 9 15:09:35 laptop kernel: rtsx0: Controller timeout Jun 9 15:09:35 laptop kernel: rtsx0: Soft reset Jun 9 15:09:35 laptop kernel: mmcsd0: 31GB at mmc0 50.0MHz/4bit/256-block Jun 9 15:09:35 laptop kernel: rtsx0: Soft reset Jun 9 15:09:41 laptop kernel: rtsx0: Controller timeout Jun 9 15:09:41 laptop kernel: rtsx0: Soft reset Jun 9 15:09:41 laptop kernel: rtsx0: Controller timeout Jun 9 15:09:41 laptop kernel: rtsx0: Soft reset Jun 9 15:09:41 laptop kernel: rtsx0: Controller timeout Jun 9 15:09:41 laptop kernel: rtsx0: Soft reset Jun 9 15:09:41 laptop kernel: mmc0: CMD7 failed, RESULT: 1 Jun 9 15:09:41 laptop kernel: mmc0: Card at relative address 1 failed to select Jun 9 15:09:41 laptop kernel: rtsx0: Soft reset Jun 9 15:09:41 laptop kernel: mmcsd0: Error indicated: 1 Timeout Jun 9 15:09:41 laptop kernel: g_access(1003): provider mmcsd0 has error 6 = set Jun 9 15:09:41 laptop syslogd: last message repeated 3 times Jun 9 15:09:41 laptop kernel: mmc0: detached well. after apply patch I got 100% detection :) laptop# mount_msdosfs /dev/mmcsd0s1 /mnt/ laptop# ll !$ ll /mnt/ total 160 drwxr-xr-x 1 root wheel 32768 Oct 9 2019 .android_secure drwxr-xr-x 1 root wheel 32768 Oct 9 2019 Android drwxr-xr-x 1 root wheel 32768 Oct 9 2019 CARDV drwxr-xr-x 1 root wheel 32768 Oct 9 2019 DCIM drwxr-xr-x 1 root wheel 32768 Oct 9 2019 LOST.DIR It is microsd card + adapter Now I try card I tested before (yesterday): Jun 9 15:18:40 laptop kernel: mmc0: detached Jun 9 15:18:45 laptop kernel: rtsx0: Interrupt card inserted/removed Jun 9 15:18:45 laptop kernel: rtsx0: No request running Jun 9 15:18:45 laptop kernel: mmc0: on rtsx0 Jun 9 15:18:57 laptop kernel: rtsx0: Controller timeout Jun 9 15:18:57 laptop kernel: rtsx0: Soft reset Jun 9 15:18:57 laptop kernel: rtsx0: Controller timeout Jun 9 15:18:57 laptop kernel: rtsx0: Soft reset Jun 9 15:18:57 laptop kernel: rtsx0: Controller timeout Jun 9 15:18:57 laptop kernel: rtsx0: Soft reset Jun 9 15:18:57 laptop kernel: rtsx0: Controller timeout Jun 9 15:18:57 laptop kernel: rtsx0: Soft reset Jun 9 15:18:57 laptop kernel: rtsx0: Controller timeout Jun 9 15:18:57 laptop kernel: rtsx0: Soft reset Jun 9 15:18:57 laptop kernel: rtsx0: Controller timeout Jun 9 15:18:57 laptop kernel: rtsx0: Soft reset Jun 9 15:19:01 laptop kernel: rtsx0: Controller timeout Jun 9 15:19:01 laptop kernel: rtsx0: Soft reset Jun 9 15:19:01 laptop kernel: rtsx0: Controller timeout Jun 9 15:19:01 laptop kernel: rtsx0: Soft reset Jun 9 15:19:01 laptop kernel: mmc0: CMD8 failed, RESULT: 1 Jun 9 15:19:01 laptop kernel: mmcsd0: 128MB at mmc0 50.0MHz/4bit/256-block wow. It is detected and I can mount it! laptop# mount_msdosfs /dev/mmcsd0s1 /mnt/ laptop# df -h !$ df -h /mnt/ Filesystem Size Used Avail Capacity Mounted on /dev/mmcsd0s1 122M 32K 122M 0% /mnt now, I'll create GPT and zpool using this card: laptop# gpart create -s GPT /dev/mmcsd0 mmcsd0 created laptop# gpart add -t freebsd-zfs /dev/mmcsd0 mmcsd0p1 added laptop# zpool create TEST /dev/mmcsd0p1 laptop# df -h /TEST Filesystem Size Used Avail Capacity Mounted on TEST 56M 96K 56M 0% /TEST laptop# gpart show mmcsd0 =3D> 40 250800 mmcsd0 GPT (123M) 40 2008 - free - (1.0M) 2048 247808 1 freebsd-zfs (121M) 249856 984 - free - (492K) copy some trash into it: laptop# cp ~tiger/video/2020_0318_185503_081A.MOV /TEST/ load: 0.09 cmd: cp 9986 [tx->tx_sync_done_cv] 1.07r 0.00u 0.00s 0% 3280k /home/tiger/video/2020_0318_185503_081A.MOV -> /TEST/2020_0318_185503_081A.= MOV=20 0% load: 0.06 cmd: cp 9986 [tx->tx_sync_done_cv] 27.47r 0.00u 0.00s 0% 3280k /home/tiger/video/2020_0318_185503_081A.MOV -> /TEST/2020_0318_185503_081A.= MOV=20 1% cp: /TEST/2020_0318_185503_081A.MOV: No space left on device [tiger@laptop]:~%df -h /TEST Filesystem Size Used Avail Capacity Mounted on TEST 55M 55M 0B 100% /TEST laptop# zpool scrub TEST laptop# zpool status TEST pool: TEST state: ONLINE scan: scrub in progress since Tue Jun 9 15:30:04 2020 56.4M scanned at 11.3M/s, 32.7M issued at 6.53M/s, 56.7M total 0 repaired, 57.60% done, no estimated completion time config: NAME STATE READ WRITE CKSUM TEST ONLINE 0 0 0 mmcsd0p1 ONLINE 0 0 0 errors: No known data errors laptop# zpool status TEST pool: TEST state: ONLINE scan: scrub repaired 0 in 0 days 00:00:09 with 0 errors on Tue Jun 9 15:30:13 2020 config: NAME STATE READ WRITE CKSUM TEST ONLINE 0 0 0 mmcsd0p1 ONLINE 0 0 0 errors: No known data errors --=20 You are receiving this mail because: You are the assignee for the bug.=