From owner-freebsd-bugs@freebsd.org Fri May 29 05:48:20 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 9EA49330362 for ; Fri, 29 May 2020 05:48:20 +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 49YDBX3nnwz45YB for ; Fri, 29 May 2020 05:48:20 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 806BE33071B; Fri, 29 May 2020 05:48:20 +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 8030933071A for ; Fri, 29 May 2020 05:48:20 +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 49YDBX2w0Fz45mt for ; Fri, 29 May 2020 05:48:20 +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 5F27D12F89 for ; Fri, 29 May 2020 05:48:20 +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 04T5mKWf038367 for ; Fri, 29 May 2020 05:48:20 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 04T5mKrZ038366 for bugs@FreeBSD.org; Fri, 29 May 2020 05:48:20 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: Fri, 29 May 2020 05:48:18 +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: l.yotov@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: Fri, 29 May 2020 05:48:20 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D204521 --- Comment #128 from Lyubomir --- Thanks for the great work. I can confirm that it compiles and loads on: Lenovo T450 pciconf -lv rtsx0@pci0:2:0:0: class=3D0xff0000 card=3D0x503417aa chip=3D0x522710ec rev= =3D0x01 hdr=3D0x00 vendor =3D 'Realtek Semiconductor Co., Ltd.' device =3D 'RTS5227 PCI Express Card Reader' FreeBSD 12.1-RELEASE-p5 GENERIC amd64 I can also copy from and to the inserted card (2GB at the moment available). dmesg rtsx0: mem 0xf1100000-0xf1100fff i= rq 16 at device 0.0 on pci1 rtsx0: Card inserted/removed rtsx0: No request running mmc0: on rtsx0 mmcsd0: 32GB at mmc0 50.0MHz/4bit/256-block Here is the output from the compilation: t450:~/rtsx.git/trunk % 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/lyubd/rtsx.git/trunk 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.rts= x.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 -mno-aes -mno-avx -std=3Diso9899:1999 -c rtsx.c -o rtsx.o rtsx.c:1180:1: warning: unused function 'rtsx_led_enable' [-Wunused-functio= n] rtsx_led_enable(struct rtsx_softc *sc) ^ rtsx.c:1199:1: warning: unused function 'rtsx_led_disable' [-Wunused-functi= on] rtsx_led_disable(struct rtsx_softc *sc) ^ 2 warnings generated. ld -m elf_x86_64_fbsd -d -warn-common --build-id=3Dsha1 -r -d -o rtsx.ko rt= sx.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 Regards, Lyubomir --=20 You are receiving this mail because: You are the assignee for the bug.=