[Bug 204521] [new driver] [request] Port rtsx from OpenBSD to FreeBSD

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri May 29 05:48:20 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204521

--- Comment #128 from Lyubomir <l.yotov at gmail.com> ---
Thanks for the great work. I can confirm that it compiles and loads on:
Lenovo T450
pciconf -lv

rtsx0 at pci0:2:0:0: class=0xff0000 card=0x503417aa chip=0x522710ec rev=0x01
hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = '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: <Realtek RTS5227 PCI MMC/SD Card Reader> mem 0xf1100000-0xf1100fff irq
16 at device 0.0 on pci1
rtsx0: Card inserted/removed
rtsx0: No request running
mmc0: <MMC/SD bus> on rtsx0
mmcsd0: 32GB <SDHC USD00 0.2 SN 26157BA2 MFG 06/2016 by 156 SO> 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=0"  -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -I.
-I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common 
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
-fdebug-prefix-map=./machine=/usr/src/sys/amd64/include
-fdebug-prefix-map=./x86=/usr/src/sys/x86/include   -MD  -MF.depend.rtsx.o
-MTrtsx.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float 
-fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall
-Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign
-D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs
-fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare
-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=iso9899:1999 -c rtsx.c -o rtsx.o
rtsx.c:1180:1: warning: unused function 'rtsx_led_enable' [-Wunused-function]
rtsx_led_enable(struct rtsx_softc *sc)
^
rtsx.c:1199:1: warning: unused function 'rtsx_led_disable' [-Wunused-function]
rtsx_led_disable(struct rtsx_softc *sc)
^
2 warnings generated.
ld -m elf_x86_64_fbsd -d -warn-common --build-id=sha1 -r -d -o rtsx.ko rtsx.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk rtsx.ko  export_syms | xargs -J% objcopy
% rtsx.ko
objcopy --strip-debug rtsx.ko

Regards,
Lyubomir

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list