Alcor Micro AU6601 PCI-E Flash card reader controller and Linux kernel 4.16

I've got email from Justin Faber today saying the procedure, described here, doesn't work for Linux kernel 4.16.6-1 in ArchLinux - build fails with the following log:

make -C /lib/modules/4.16.6-1-ARCH/build/ SUBDIRS=/var/lib/dkms/au6601/0.3/build modules
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/usr/lib/modules/4.16.6-1-ARCH/build'
  CC [M]  /var/lib/dkms/au6601/0.3/build/au6601.o
/var/lib/dkms/au6601/0.3/build/au6601.c: In function ‘au6601_pci_probe’:
/var/lib/dkms/au6601/0.3/build/au6601.c:1187:2: error: implicit declaration of function ‘setup_timer’; did you mean ‘setup_irq’? [-Werror=implicit-function-declaration]
  setup_timer(&host->timer, au6601_timeout_timer, (unsigned long)host);
/var/lib/dkms/au6601/0.3/build/au6601.c: In function ‘au6601_send_cmd’:
/var/lib/dkms/au6601/0.3/build/au6601.c:619:5: warning: ‘ctrl’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  u8 ctrl; /* some mysterious flags and control */
cc1: some warnings being treated as errors
make[2]: *** [scripts/ /var/lib/dkms/au6601/0.3/build/au6601.o] Error 1
make[1]: *** [Makefile:1562: _module_/var/lib/dkms/au6601/0.3/build] Error 2
make[1]: Leaving directory '/usr/lib/modules/4.16.6-1-ARCH/build'
make: *** [Makefile:33: default] Error 2 

DuckDuckGo (my default search engine, by the way) helped to localize the issue - changes in Linux kernel timers API.

I've followed instructions from the commit comments and prepared the patch and PKGBUILD to simplify installation:

Please use this procedure and generated package at your own risk as I'm not a Linux kernel driver developer.

Here is an updated version of steps to install the driver for amd64 architecture and Linux kernel 4.16+:

  • create temporary directory somewhere and cd into it
  • download patch and PKGBUILD (ensure PKGBUILD and au6601-timers.diff are located in the root of previously created temporary directory)
  • build and install package using makepkg
  • install kernel driver
  • use card reader :)

$ mkdir au6601-dkms && cd au6601-dkms
$ wget -O
$ unzip -j
$ makepkg -si
$ sudo modprobe au6601-pci
$ udevil mount /dev/mmcblk0p1

# profit!

Last modified: 2018-05-05 07:12:00 +00:00 UTC