From owner-freebsd-bugs@freebsd.org Mon Jun 8 13:54:41 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 D859032FEEC for ; Mon, 8 Jun 2020 13:54:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 49gZW55Rrsz4YvQ for ; Mon, 8 Jun 2020 13:54:41 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id B8FC732FEEB; Mon, 8 Jun 2020 13:54:41 +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 B8C34330246 for ; Mon, 8 Jun 2020 13:54:41 +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 49gZW54WYQz4Z34 for ; Mon, 8 Jun 2020 13:54:41 +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 969102581F for ; Mon, 8 Jun 2020 13:54:41 +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 058DsfHn016832 for ; Mon, 8 Jun 2020 13:54:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 058DsfrE016831 for bugs@FreeBSD.org; Mon, 8 Jun 2020 13:54:41 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: Mon, 08 Jun 2020 13:54:33 +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: Mon, 08 Jun 2020 13:54:41 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D204521 --- Comment #169 from Sergey V. Dyatko --- (In reply to Henri Hennebert from comment #167) Still no luck :( [tiger@laptop]:~/tmp/rtsx%git status On branch tweak-RTS5229-RTS525A Your branch is up to date with 'origin/tweak-RTS5229-RTS525A'. nothing to commit, working tree clean [tiger@laptop]:~/tmp/rtsx%make machine -> /usr/src/sys/amd64/include x86 -> /usr/src/sys/x86/include awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/pci/pci_if.m -h awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/mmc/mmcbr_if.m -h Warning: Object directory not changed from original /usr/home/tiger/tmp/rtsx cc "-ferror-limit=3D0" -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common=20 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=3D./machine=3D/usr/src/sys/amd64/include -fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include -MD -MF.depend.r= tsx.o -MTrtsx.o -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float=20 -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -W= all -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-comp= are -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member -Wno-format-zero-length -mno-aes -mno-avx -std=3Diso9899:1999 -c rtsx.c = -o rtsx.o ld -m elf_x86_64_fbsd -d -warn-common --build-id=3Dsha1 -T /usr/src/sys/conf/ldscript.kmod.amd64 -r -d -o rtsx.ko rtsx.o :> export_syms awk -f /usr/src/sys/conf/kmod_syms.awk rtsx.ko export_syms | xargs -J% obj= copy % rtsx.ko objcopy --strip-debug rtsx.ko [tiger@laptop]:~/tmp/rtsx%sudo make install install -T release -o root -g wheel -m 555 rtsx.ko /boot/modules/ kldxref /boot/modules [tiger@laptop]:~/tmp/rtsx%kldstat -v | grep rtsx 31 1 0xffffffff83953000 81d8 rtsx.ko (/boot/modules/rtsx.ko) 529 rtsx/mmc 528 pci/rtsx [tiger@laptop]:~/tmp/rtsx%sudo kldunload !$ sudo kldunload rtsx messages: Jun 8 16:49:50 laptop kernel: rtsx0: detached Jun 8 16:49:50 laptop kernel: pci4: at device 0.0 (no driver attached) [tiger@laptop]:~/tmp/rtsx%sudo kldload rtsx [tiger@laptop]:~/tmp/rtsx% messages (But I have sd card inserted!): Jun 8 16:50:41 laptop kernel: rtsx0: mem 0xf2100000-0xf2100fff at device 0.0 on pci4 Jun 8 16:50:41 laptop kernel: rtsx0: Card absent [tiger@laptop]:~/tmp/rtsx%ll /dev/mm* ls: No match. messages after I remove card: Jun 8 16:52:08 laptop kernel: rtsx0: Interrupt card inserted/removed Jun 8 16:52:08 laptop kernel: rtsx0: Card present Jun 8 16:52:08 laptop kernel: rtsx0: No request running Jun 8 16:52:08 laptop kernel: mmc0: on rtsx0 Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: rtsx0: Controller timeout Jun 8 16:52:32 laptop kernel: rtsx0: Soft reset Jun 8 16:52:32 laptop kernel: mmc0: No compatible cards found on bus and keyboard stop working for a ~30 sec Now, plug card back: Jun 8 16:53:55 laptop kernel: rtsx0: Interrupt card inserted/removed Jun 8 16:53:55 laptop kernel: rtsx0: Card absent Jun 8 16:53:55 laptop kernel: rtsx0: No request running Jun 8 16:53:55 laptop kernel: mmc0: detached Looks like attaching/detaching card swapped + I don't have any mmc* devices= in both cases it is FreeBSD 13.0-CURRENT #1 r356767M, Lenovo t470p --=20 You are receiving this mail because: You are the assignee for the bug.=