I'm on Ubuntu 15.10, and it doesn't detect my SD card insertions. I've tried multiple solutions that seem to be the common answer for a problem like this, but no success.

I saw this discussion that indicated that there's a driver by Realtek for a similar device, and that some minor hacks usually solve the problem for my specific device.

After following those steps and running make, I get the following errors:

cp -f ./define.release ./define.h
make -C /lib/modules/4.2.0-34-generic/build/ SUBDIRS=/home/anti/Software/rts5227 modules
make[1]: Entering directory '/usr/src/linux-headers-4.2.0-34-generic'
  CC [M]  /home/anti/Software/rts5227/rtsx.o
/home/anti/Software/rts5227/rtsx.c: In function ‘proc_info’:
/home/anti/Software/rts5227/rtsx.c:148:55: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
  SPRINTF("        Build: %s, %s\n", __DATE__, __TIME__);
                                                       ^
/home/anti/Software/rts5227/rtsx.c:148:55: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
In file included from include/linux/printk.h:6:0,
                 from include/linux/kernel.h:13,
                 from include/linux/sched.h:17,
                 from include/linux/blkdev.h:4,
                 from /home/anti/Software/rts5227/rtsx.c:23:
/home/anti/Software/rts5227/rtsx.c: In function ‘rtsx_control_thread’:
include/linux/kern_levels.h:4:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘u64 {aka long long unsigned int}’ [-Wformat=]
 #define KERN_SOH "\001"  /* ASCII Start Of Header */
                  ^
include/linux/kern_levels.h:10:18: note: in expansion of macro ‘KERN_SOH’
 #define KERN_ERR KERN_SOH "3" /* error conditions */
                  ^
/home/anti/Software/rts5227/rtsx.c:521:11: note: in expansion of macro ‘KERN_ERR’
    printk(KERN_ERR "Bad target number (%d:%d)\n",
           ^
include/linux/kern_levels.h:4:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘u64 {aka long long unsigned int}’ [-Wformat=]
 #define KERN_SOH "\001"  /* ASCII Start Of Header */
                  ^
include/linux/kern_levels.h:10:18: note: in expansion of macro ‘KERN_SOH’
 #define KERN_ERR KERN_SOH "3" /* error conditions */
                  ^
/home/anti/Software/rts5227/rtsx.c:527:11: note: in expansion of macro ‘KERN_ERR’
    printk(KERN_ERR "Bad LUN (%d:%d)\n",
           ^
/home/anti/Software/rts5227/rtsx.c: In function ‘rtsx_probe’:
/home/anti/Software/rts5227/rtsx.c:921:39: error: macro "__DATE__" might prevent reproducible builds [-Werror=date-time]
  printk(KERN_INFO "--- %s, %s ---\n", __DATE__, __TIME__);
                                       ^
/home/anti/Software/rts5227/rtsx.c:921:49: error: macro "__TIME__" might prevent reproducible builds [-Werror=date-time]
  printk(KERN_INFO "--- %s, %s ---\n", __DATE__, __TIME__);
                                                 ^
/home/anti/Software/rts5227/rtsx.c: At top level:
/home/anti/Software/rts5227/rtsx.c:132:12: warning: ‘proc_info’ defined but not used [-Wunused-function]
 static int proc_info (struct Scsi_Host *host, char *buffer,
            ^
cc1: some warnings being treated as errors
scripts/Makefile.build:258: recipe for target '/home/anti/Software/rts5227/rtsx.o' failed
make[2]: *** [/home/anti/Software/rts5227/rtsx.o] Error 1
Makefile:1398: recipe for target '_module_/home/anti/Software/rts5227' failed
make[1]: *** [_module_/home/anti/Software/rts5227] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-34-generic'
Makefile:35: recipe for target 'default' failed
make: *** [default] Error 2

Is there any way I can solve this and use this driver to use my reader?

My kernel version is 4.2.0-34-generic.

This is the output for lspci -v | grep Reader

02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5227 PCI Express Card Reader (rev 01)

I'll provide any other output that might be needed to solve the question.

Thanks in advance!

share|improve this question
up vote 2 down vote accepted

Okay, I figured it out.

The thing causing problems is the implicit declaration of the function vmalloc() throughout the various files of the driver's source.

I added #include <linux/vmalloc.h> to the relevant files, which are rtsx.c, rtsx_chip.c, rtsx_scsi.c and ms.c.

I still got a lot of warnings and notes when running make, but was able to compile and install the driver, and the SD cards work now!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.