SD Card Reader broken on UX302LG

Bug #1270676 reported by tehownt on 2014-01-20
80
This bug affects 14 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned

Bug Description

SD card reader (controller Alcor Micro AU6601) is dysfunctional in UX302LG laptop. USB readers work without problem. Nothing happens when pluggin SD/mSD/SDHC/mSDHC cards in the reader (might as well use a piece of wood).
Nothing is listed in lsusb -v that could be the reader.
Nohting is listed in lspci -k -vv -nnn.
Nothing in acpi_listen.
Nothing in kern.log etc.

According to (select "Windows 8" then "Card Reader") :
http://support.asus.com/download.aspx?SLanguage=en&p=3&s=597&m=UX302LG&os=&hashedid=GEZaY8oaj8oSlQ3U

Reader vendor is :
Alcor Multi-Card Reader Driver
http://www.pcidatabase.com/vendor_details.php?id=1672

There is only one device that is "Unassigned class" 1aea:6601 but searching this online only pops up my other bug reports (sigh) and vendor is unassigned on pcidatabase.com.

But...Downloading the 14M Win driver for the reader, vendor id 1aea and device id 6601 is present at multiple instances :
[DeviceList.NTamd64]
; For XP and later
%AMPCIECR% = DriverInstall_6601, PCI\VEN_1aea&DEV_6601

Also there is mention of _Gen instance in the .inf, might point to a "Generic" alternative ?
[DeviceList_Gen.NTamd64]
; For XP and later
%AMPCIECR_GEN% = DriverInstall_Gen, PCI\VEN_105b&DEV_0ef6

This does point to something totally different online 105b:0ef6 points to some Realtek HD Audio device.

A proposed patch was submitted upstream as per:
http://www.spinics.net/lists/linux-mmc/msg29230.html

---
ApportVersion: 2.13.1-0ubuntu1
Architecture: amd64
DistroRelease: Ubuntu 14.04
HibernationDevice: RESUME=UUID=e6458b44-fdb9-4db5-8cac-40ee0bbf9cf6
InstallationDate: Installed on 2013-12-31 (21 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Alpha amd64 (20131231)
MachineType: ASUSTeK COMPUTER INC. UX302LG
Package: linux (not installed)
ProcFB: 0 simple
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.13.0-4-generic.efi.signed root=/dev/mapper/ubuntu--vg-root ro quiet splash acpi_osi= nomodeset plymouth:debug vt.handoff=7
ProcVersionSignature: Ubuntu 3.13.0-4.19-generic 3.13.0-rc8
RelatedPackageVersions:
 linux-restricted-modules-3.13.0-4-generic N/A
 linux-backports-modules-3.13.0-4-generic N/A
 linux-firmware 1.121
Tags: trusty
Uname: Linux 3.13.0-4-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm bumblebee cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 10/30/2013
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: UX302LG.207
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: UX302LG
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrUX302LG.207:bd10/30/2013:svnASUSTeKCOMPUTERINC.:pnUX302LG:pvr1.0:rvnASUSTeKCOMPUTERINC.:rnUX302LG:rvr1.0:cvnASUSTeKCOMPUTERINC.:ct10:cvr1.0:
dmi.product.name: UX302LG
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK COMPUTER INC.

tehownt (tehownt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1270676/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Alberto Aguirre (albaguirre) wrote :

I'm seeing the same issue with in a UX302LA laptop.

affects: ubuntu → linux (Ubuntu)
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.13 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
tehownt (tehownt) wrote :

Tested 3.13 from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/ had to boot in recovery mode/root console because of Bug #1265544 device still shows as "Unassigned class [ff00]: Device 1aea:6601" and SD Cards do not work.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
no longer affects: linux (Ubuntu)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

affects: acpi → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: needs-kernel-logs needs-upstream-testing

apport information

tags: added: apport-collected trusty
description: updated
description: updated

apport information

apport information

apport information

tehownt (tehownt) wrote : CRDA.txt

apport information

apport information

apport information

tehownt (tehownt) wrote : Lspci.txt

apport information

tehownt (tehownt) wrote : Lsusb.txt

apport information

apport information

apport information

apport information

apport information

apport information

tehownt (tehownt) wrote : RfKill.txt

apport information

tehownt (tehownt) wrote : UdevDb.txt

apport information

apport information

apport information

tags: added: kernel-bug-exists-upstream-v3.13 latest-bios-207
removed: needs-kernel-logs needs-upstream-testing

tehownt, thank you for providing the requested information. Did this problem not occur in a release prior to Trusty?

tehownt (tehownt) wrote :

Hello, problem exists in 13.10 and 12.04.3 tested w/ live CD version.

Also, lspci.out attachment got removed but please note that lspci.txt has less info since it ran unprivileged.

tags: added: saucy
tehownt (tehownt) wrote :

Problem existsts in 12.04.0

tags: added: precise

tehownt, the issue you are reporting is an upstream one. Could you please report this problem through the appropriate channel by following the instructions _verbatim_ at https://wiki.ubuntu.com/Bugs/Upstream/kernel ?

Please provide a direct URL to your e-mail to the mailing list once you have made it so that it may be tracked.

Thank you for your understanding.

Changed in linux (Ubuntu):
status: Incomplete → Triaged
Oleksij Rempel (olerem) wrote :

This controller is Alcor Micro AU6601. There is even no info about this chip Alcor Micro website. If we have luck, Alcor Micro will give documentation. If no, we will need to RE it.

tehownt (tehownt) wrote :

Oleksij I tried writing to them but didn't get much of an answer, maybe you'll be more lucky this time (or the more that ask, things might change).
Otherwise you're right, there's pretty much only opening the .sys in IDA that'd be left...

description: updated
Oleksij Rempel (olerem) wrote :

I'm working on driver. Just to make sure, no body making double work.

Oleksij Rempel (olerem) wrote :

@tehownt, did you get absolutely no answer or at least some replay?

tehownt (tehownt) wrote :

Hello Oleksij,

thanks a lot for the hard work on getting a driver for that reader.

I did get a reply from Alcor, it was along the lines of "It should be compatible with Linux, but we do not support 3rd parties, ask your OEM (Asus, in this case) for a driver.".
Asus previously answered (for the display BPP problem) : "We do not support Linux.".

I'll let you guess where this is going...

Oleksij Rempel (olerem) wrote :

Hire is the patch with working driver.
Suddenly i still didn't got any response from MMC devs. If canonical devs can provide some feed back or push, i'll be really happy.

tags: added: patch
Sabin Iacob (iacobs) wrote :

Many thanks, Oleksij!

Since there seems to be no answer to your email from kernel people, I took the liberty of extracting the source from that diff and packaging it using DKMS.

https://launchpad.net/~iacobs/+archive/ubuntu/au6601 (the package is called au6601-dkms)

I only uploaded a package for utopic / 14.10 because that's what I have and could test (also, 14.04 had no video on my UX302L (known bug), so I doubt there are many folks on 14.04 - it's kinda hard to install without a display), I'll add packages for other releases if anyone requests them.

Oleksij Rempel, as per http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/MAINTAINERS you would want to send an e-mail to the mailing list with your proposed patch CC the maintainers:
M: Chris Ball <email address hidden>
M: Ulf Hansson <email address hidden>
L: <email address hidden>

Please post a URL of your e-mail to this report so that it may be tracked via http://vger.kernel.org/vger-lists.html .

tehownt (tehownt) wrote :

@iacobs many thanks for streching Oleksij's work into a working dkms module (I think there might be a newer version of the code in the MMC ML?), I can confirm it works under 14.10.

Sabin Iacob (iacobs) wrote :

indeed... I updated the package

Matthias (matthias-stierle) wrote :

Same problem with Asus BU401LA, unfortunately not fixed by adding ppa:iacobs/au6601 repository. Any chance that can be fixed as well?

Matthias (matthias-stierle) wrote :

I can confirm it is also working for Asus BU401LA. Thanks for the fix!

stefano.fraccaro (sf-1) wrote :

Same problem with Asus PU551L but not fixed with this repository.
I use LinuxMint 17.1 MATE with kernel 3.13.0-37 64 bit

Jerome (micucci) wrote :

The Sabin Iacob patch is working very well with my 14.04LTS (kernel 3.18.3) ! Thanks so much !

Oleksij Rempel (olerem) wrote :

Hmm... looks like i was not subscribed to this bug so didn't got any notifications. Any way,

thank you Sabin for providing dkms package! Christopher, this patch was send for long time to maintainer of SD/MMC subsystem and actually reviewed but never got upstream. Right now i didn't had time to bug maintainer all the time to make some thing with it...

Oleksij Rempel, could you please provide a direct URL to your patch post to the mailinglist so folks here may track it?

Jerome (micucci) wrote :

Unfortunately, this patch doesn't work correctly with Ubuntu 15.04 :(
Reading and creating files on SD card are OK but copying a large file to the SD should freeze my ASUS UX302LG... (I'd tried with Nautilus and terminal 'cp' command).
For example : if I try to copy a little file (around 10Ko) from the desktop to the SD : OK, but for a file around 2Mo, the PC will freeze.

Bartek (bartek-zdanowski) wrote :

Same here
Ubuntu 14.04
Laptop Asus B451J

02:00.0 Unassigned class [ff00]: Device 1aea:6601

Bartek (bartek-zdanowski) wrote :

I've installed this patch but it doesn't work with my Asus. lspci reports the same:
02:00.0 Unassigned class [ff00]: Device 1aea:6601

Ubuntu 14.04
Laptop Asus B451J

Is there anything I could do to help you checking new patches ?

Hans Dampf (cdauth+ubuntu-com) wrote :
Download full text (10.2 KiB)

@iacobs: I tried your package on Arch Linux (kernel 4.4.1-2-ARCH), but when I plug in an SD card, I get the following errors in dmesg:

[ 434.301513] au6601-pci 0000:02:00.0: AU6601 controller found [1aea:6601] (rev 0)
[ 434.301607] au6601-pci 0000:02:00.0: enabling device (0004 -> 0006)
[ 434.441333] mmc0: host does not support reading read-only switch, assuming write-enable
[ 439.447768] au6601-pci 0000:02:00.0: Got data interrupt 0x00100000 even though no data operation was in progress.
[ 439.447805] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
[ 439.449050] IP: [<ffffffffa0bd7f36>] au6601_irq+0x2a6/0x370 [au6601_pci]
[ 439.449999] PGD 307940067 PUD 307d48067 PMD 0
[ 439.450928] Oops: 0002 [#1] PREEMPT SMP
[ 439.451847] Modules linked in: au6601_pci(O) xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter nf_nat nf_conntrack br_netfilter bridge stp llc sha256_ssse3 sha256_generic hmac drbg ansi_cprng ctr ccm als(O) cmac ecb rfcomm dm_thin_pool dm_persistent_data dm_bio_prison dm_bufio libcrc32c loop bnep snd_hda_codec_hdmi joydev mousedev nls_iso8859_1 nls_cp437 vfat fat arc4 snd_hda_codec_conexant snd_hda_codec_generic asus_nb_wmi asus_wmi sparse_keymap iTCO_wdt iTCO_vendor_support uvcvideo intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 btusb kvm_intel videobuf2_core btrtl v4l2_common btbcm kvm btintel videodev bluetooth media irqbypass crct10dif_pclmul iwlmvm
[ 439.455154] crc32_pclmul cdc_acm aesni_intel mac80211 aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd evdev input_leds iwlwifi mac_hid pcspkr psmouse serio_raw cfg80211 i2c_i801 thermal rfkill i915 wmi snd_soc_rt5640 dell_smo8800 snd_soc_rl6231 snd_soc_core battery drm_kms_helper snd_hda_intel i2c_hid elan_i2c snd_compress snd_hda_codec dw_dmac snd_pcm_dmaengine hid drm ac97_bus dw_dmac_core snd_hda_core video intel_gtt snd_hwdep int3402_thermal i2c_designware_platform snd_soc_sst_acpi gpio_lynxpoint syscopyarea 8250_dw e1000e spi_pxa2xx_platform ac snd_pcm i2c_designware_core fjes sysfillrect processor_thermal_device sysimgblt snd_timer int340x_thermal_zone fb_sys_fops snd int3400_thermal intel_soc_dts_iosf i2c_algo_bit acpi_thermal_rel iosf_mbi soundcore ptp tpm_tis mei_me pps_core tpm
[ 439.458822] button mei lpc_ich shpchp processor sch_fq_codel pci_stub vboxpci(O) vboxnetflt(O) vboxnetadp(O) vboxdrv(O) ip_tables x_tables ext4 crc16 mbcache jbd2 dm_mod uas usb_storage sd_mod atkbd libps2 crc32c_intel ahci libahci ehci_pci ehci_hcd libata xhci_pci xhci_hcd scsi_mod usbcore usb_common i8042 serio sdhci_acpi sdhci led_class mmc_core
[ 439.462679] CPU: 2 PID: 5277 Comm: irq/17-au6601 h Tainted: G O 4.4.1-2-ARCH #1
[ 439.463983] Hardware name: ASUSTeK COMPUTER INC. BU201LA/BU201LA, BIOS BU201LA.204 08/12/2014
[ 439.465299] task: ffff88001edf0000 ti: ffff88018f3a0000 task.ti: ffff88018f3a0000
[ 439.466629] RIP: 0010:[<ffffffffa0bd7f36>] [<ffffffffa0bd7f36>] au6601_irq+0x2a6/0x370 [au6601_pci]
[ 439.467966] RSP: 0018:ffff88018f3a3e00 EFLAGS: 00010206
[ 439.469302] RAX: 0000...

Damien Rame (daymz-mobile) wrote :

My laptop is a TOSHIBA Satellite L40-D and I'm having the same issue with the Alcor Card Reader

$ lspci
Unassigned class [ff00]: Device [1aea:6601]

This is running Ubuntu 15.04 on 3.19.0-47
Cards inserted never even get detected by the system. I see no log entry or error in dmesg.

Oleksij Rempel (olerem) wrote :

If you can compile or patch packet by your self, please try latest patch from here:
https://github.com/olerem/linux-2.6/commits/au6601-2015.07.18

Damien Rame (daymz-mobile) wrote :

Hi Olerem,

Thanks for the prompt answer. Unforutnatley, that NULL pointer didn't seem to help much.
The computer boots and the driver loads, but when I insert a SD-card, the laptop freezes after about 8-10 seconds. Just enough time to take a picture of the dmesg:

http://postimg.org/image/6aczojhp3/

I did apply the NULL patch over the au6601.c (e.g. change the if condition at line 724) driver that comes from au6601-dkms from iacobs' repo:

sudo add-apt-repository ppa:iacobs/au6601
sudo apt-get update
sudo apt-get install au6601-dkms

Is this what I was supposed to do?

Oleksij Rempel (olerem) wrote :

What kind of SD card do you use? The error seems to happen on some error path which i never had before.

PS, this driver is based on reverse engineering. with other words i have no idea what is actual error handling of this chip.
I tried to contact the company who designed this chip with no effort.
Probably only way to get documentation or source of working driver is to purchaise development kit http://www.alcormicro.com/en_content/c_product/product_01b.php?CategoryID=7&IndexID=23

If some one has ideas hw to get some thing usable, please share.

Damien Rame (daymz-mobile) wrote :

I used a MicroSDHC with a MicroSD - SD adapter. The card itself is chinese, brand Xedain. If that matters. I didn't think it would be important, but I can try with other cards (SDHC, MicroSD, MIcroSDHC) and brands (real ADATA, Sandisk, Patriot)

It's unfortunate to have to reverse engineer a driver like this.

Oleksij Rempel (olerem) wrote :

I would say it so, if i had this bug on my machine i have had fixed it already :)

Hans Dampf (cdauth+ubuntu-com) wrote :

olerem: I applied the patch to au6601.c from http://ppa.launchpad.net/iacobs/au6601/ubuntu/pool/main/a/au6601/au6601_0.3.orig.tar.gz and compiled the module.

When inserting the module, I get these messages:

Feb 23 16:51:39 kunigunde kernel: au6601-pci 0000:02:00.0: AU6601 controller found [1aea:6601] (rev 0)
Feb 23 16:51:39 kunigunde kernel: au6601-pci 0000:02:00.0: enabling device (0004 -> 0006)
Feb 23 16:51:44 kunigunde kernel: au6601-pci 0000:02:00.0: Got data interrupt 0x00100000 even though no data operation was in progress.
Feb 23 16:51:44 kunigunde kernel: au6601-pci 0000:02:00.0: 0xFFFF7FFF got unhandled IRQ with 1008000
Feb 23 16:51:49 kunigunde kernel: au6601-pci 0000:02:00.0: Got data interrupt 0x00100000 even though no data operation was in progress.
Feb 23 16:51:49 kunigunde kernel: au6601-pci 0000:02:00.0: 0xFFFF7FFF got unhandled IRQ with 1008000

The last two repeat continuously.

When inserting a card, I get this:

Feb 23 16:52:54 kunigunde kernel: mmc0: host does not support reading read-only switch, assuming write-enable
Feb 23 16:52:54 kunigunde kernel: mmc0: new high speed SDHC card at address 0007
Feb 23 16:52:54 kunigunde kernel: mmcblk0: mmc0:0007 SD32G 29.0 GiB
Feb 23 16:52:59 kunigunde kernel: au6601-pci 0000:02:00.0: 0xFFFF7FFF got unhandled IRQ with 3008000
Feb 23 16:52:59 kunigunde kernel: mmcblk0: error -110 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
Feb 23 16:52:59 kunigunde kernel: mmc0: tried to reset card
Feb 23 16:53:04 kunigunde kernel: au6601-pci 0000:02:00.0: 0xFFFF7FFF got unhandled IRQ with 6008000
Feb 23 16:53:04 kunigunde kernel: mmcblk0: error -110 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
Feb 23 16:53:04 kunigunde kernel: mmcblk0: retrying using single block read
Feb 23 16:53:09 kunigunde kernel: au6601-pci 0000:02:00.0: 0xFFFF7FFF got unhandled IRQ with 6008000
Feb 23 16:53:09 kunigunde kernel: mmcblk0: error -110 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
Feb 23 16:53:09 kunigunde kernel: blk_update_request: I/O error, dev mmcblk0, sector 0
Feb 23 16:53:14 kunigunde kernel: au6601-pci 0000:02:00.0: 0xFFFF7FFF got unhandled IRQ with 6008000

The last three lines then continue repeatedly.

Voicu Hodrea (hvm2hvm) wrote :

Hello,

I just found this bug report and I just want to say thanks for everyone who helped make this work. I have an Asus UX302LG laptop and I really needed my card reader so your work helped me a lot.

I know this is offtopic and doesn't help with the discussion but I thought it needed to be said.

Thanks again,

Voicu.

Ipoci (ricci-mailinglist) wrote :

Same error here on a brand new ASUS BU201LA laptop ( I did the mistake to not check its compatibility in advance ) ... :-(

02:00.0 Unassigned class [ff00]: Device 1aea:6601
 Subsystem: Device 0001:0001

Hope the bug will be fixed, SD reader is key for me.

Have a nice day

Bas van den Heuvel (2-bas) wrote :

I've got a UX501-VW skylake laptop with a slightly different sd card reader (1aea:6621). I've tried to recompile the driver from Oleksij with the new PCI id, but it will not insert.

It complains about the irq being available because it's already in use by idma64.1:

[ 7842.389975] au6601-pci 0000:02:00.0: AU6601 controller found [1aea:6621] (rev 0)
[ 7842.390074] au6601-pci 0000:02:00.0: enabling device (0004 -> 0006)
[ 7842.390610] genirq: Flags mismatch irq 17. 00002000 (au6601 host) vs. 00000080 (idma64.1)
[ 7842.390642] au6601-pci 0000:02:00.0: Failed to get irq for data line
[ 7842.390859] au6601-pci: probe of 0000:02:00.0 failed with error -12

Anyone have any idea ?

Thanks in advance

Kamil (kryuu) wrote :

@Bus van den Heuvel: did you found any solution to your issue. I own the same notebook UX501-VW and also encountered the error with IRQ-17 flag. Have you tried do modify the code any futher? The card reader would be very useful for me.

trikrasne (trikrasne) wrote :

Patch that Hans Dampf referenced worked fine for me, until upgrade to Ubuntu 17.04. Dosen't work anymore.

Daniel Drake (dsdrake) wrote :

Here is a driver from the vendor. Compile tested only.

https://github.com/endlessm/linux/tree/T15537/drivers/scsi/ampe_stor
(if this link stops working in future it's probably because we moved it to the master branch)

Anyone interested in testing & upstreaming?

Oleksij Rempel (olerem) wrote :

wow, finally something interesting.
But this source code is absolutely no go for upstream.

Oleksij Rempel (olerem) wrote :

Just to avoid double work. I started analysing of this source. Since it is not using SD/MMC framework and trying to reimplement everything on top of SCSI, this driver is useless for upstreaming.

I'll try to use it for documentation.

Dylan Borg (borgdylan) wrote :

Is there anyone who tried to upstream the au6601 driver? Its till seems like there is no upstream driver for Alcor Micro card readers.

Dylan Borg (borgdylan) wrote :

@olerem I have ordered a Zenbook Pro UX550VE laptop that is also rumoured to have an Alcor Micro SD reader. Would there be anything I could do to help once it arrives (on the linux side)?

Oleksij Rempel (olerem) wrote :

@borgdylan, hi!
right now, the best you can do is to grub this code and polish it until it is suitable for upstream.

here is my last work i did:
https://github.com/olerem/linux-2.6/commits/github/au6601-2017.04.23

last know to work patch is:
"au6601: rename REG_83 to AU6601_REG_DATA_CTRL"

all latest patches I made after vendor code was public. The vendor code is not suitable for upstream, but mostly good enough to extract missing information.

please keep me up to date if you or some body else will work on it.

Bas van den Heuvel (2-bas) wrote :

@Oleksij:

I can't make your latest driver work on the au6621 version (Asus UX501VW):

When I change the PCI id from 0x6601 to 0x6621 the following happens when inserting the module:

Sep 13 12:15:37 brian kernel: [ 1334.181879] au6601-pci 0000:02:00.0: AU6601 controller found [1aea:6621] (rev 0)
Sep 13 12:15:37 brian kernel: [ 1334.181965] au6601-pci 0000:02:00.0: enabling device (0004 -> 0006)
Sep 13 12:15:37 brian kernel: [ 1334.182350] genirq: Flags mismatch irq 17. 00002000 (au6601 host) vs. 00000080 (idma64.1)
Sep 13 12:15:37 brian kernel: [ 1334.182380] au6601-pci 0000:02:00.0: Failed to get irq for data line
Sep 13 12:15:37 brian kernel: [ 1334.182613] au6601-pci: probe of 0000:02:00.0 failed with error -12

BTW newer types of the Zenbook (UX510 for example) have a USB integrated card reader I think.

Regards,

Bas

Oleksij Rempel (olerem) wrote :

au6621 is not compatible with au6601. I don't expect it work with this driver. Not without changes. The major problem is that I don't have a HW to continue development on this driver. The initial device for which I started reverse engineering is permanently in use, so there is only limited access to it.

Bas van den Heuvel (2-bas) wrote :

There are a lot of references to AU6621 registers in the code.

Does this mean, that this was work in progress ?

Has someone some spec sheets for both pci-e adapters (au6601 & au6621)?

Oleksij Rempel (olerem) wrote :

Can please some one help me create a list with affected laptops? May be i can find some used on ebay to proceed with this driver.

Bas van den Heuvel (2-bas) wrote :

I can only add my type:

System Information
 Manufacturer: ASUSTeK COMPUTER INC.
 Product Name: N501VW
 Version: 1.0
 Serial Number: XXXX
 UUID: XXX
 Wake-up Type: Power Switch
 SKU Number: ASUS-NotebookSKU
 Family: N

Type on laptop : UX501VW

Dylan Borg (borgdylan) wrote :

The vendor's driver gives out a Makefile. If the driver works in the first place, can't we wrap it as a DKMS module and install that? Their code seems to handle the AU6621 and AU6601 families of chips.

Bas van den Heuvel (2-bas) wrote :

I've checked out the following git repo:

https://github.com/josch09/ampe_stor

In a directory /usr/src/ampe_stor-1.0

and created the following dkms.conf file:

PACKAGE_NAME="ampe_stor"
PACKAGE_VERSION="1.0"
MAKE[0]="make -C /lib/modules/$kernelver/build KVERSION=$kernelver M=/usr/src/ampe_stor-1.0 modules"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="ampe_stor"
DEST_MODULE_LOCATION[0]="/kernel/drivers/scsi"
AUTOINSTALL="yes"

Works for my ubuntu 16.04 (Asus ux501vw skylake)

Peter Bartyik (bartyik-peter) wrote :

@2-bas
Thanks! I can confirm that it got the reader working for my ux501vw (AU6621) as well.

lspci -vnn -s02:00
02:00.0 Unassigned class [ff00]: Alcor Micro Device [1aea:6621]
 Subsystem: Alcor Micro Device [1aea:6621]
 Flags: bus master, fast devsel, latency 0, IRQ 17
 Memory at dd300000 (64-bit, non-prefetchable) [disabled] [size=256]
 Capabilities: [40] Power Management version 3
 Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+
 Capabilities: [80] Express Endpoint, MSI 00
 Capabilities: [100] Latency Tolerance Reporting
 Kernel driver in use: ampe_stor
 Kernel modules: ampe_stor

tags: added: bios-outdated-210
removed: latest-bios-207
description: updated
Dylan Borg (borgdylan) wrote :

Tried the driver on my UX550. It reads some files incorrectly which end up being shown as having chinese characters in their names or corrupted contents.

Oleksij Rempel (olerem) wrote :

From what i have seen in this driver, won't be really surprised.

Oleksij Rempel (olerem) wrote :

Hm... just note to my self and other users:
- i still hardly working in my "free" time to make au6621 to work with mainline kernel mmc framework. It is still not working, even if i reproduce all register access, but not in the same order as original driver. It is just impossible to do it same way. The au6601 should still work.
- for now, if I recalculate time I spend on this driver to € which I normally get for this kind of work, I would get at least 10 of really expensive laptops. So I think it is not the way, some thing should be done.
- I feels like I send wrong signal to Vendors and Users. Users think, there are always, some one who will do it. Vendors understand only language of money. If users still pay money to vendors for HW without drivers and expect, some one will make it for free, then it is really wrong.
- I need to admit, I would never be able to make upstream version of driver perfectly work. Vendors working on SD/MMC protocol have tools and people to make sure, it will work at least on 50% of all devices and pass certification. I would be able to make it work on 3-10 SD cards in my home collection and be really happy with it.
- If person who gave me au6621 HW will accept it, i would spend one more month on it. And if there are no acceptable results, I will stop to work on this driver.

Dylan Borg (borgdylan) wrote :

Alcor should have made a better effort with their code. Their claim of supporting Linux is a blatant lie as for that to be true they should have coded a production grade driver themselves.

HaraldK (pifpafpuf) wrote :
Download full text (10.2 KiB)

Is this still active in some way?
Laptop: ASUS BU201
uname -a
Linux ... 4.4.0-144-generic #170~14.04.1-Ubuntu SMP Mon Mar 18 15:02:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Is this still the right place to go?
% cat /etc/apt/sources.list.d/iacobs-au6601-trusty.list
deb http://ppa.launchpad.net/iacobs/au6601/ubuntu trusty main
deb-src http://ppa.launchpad.net/iacobs/au6601/ubuntu trusty main

Bombs out with kernel NULL pointer dereference:
[So Apr 14 17:36:41 2019] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
[So Apr 14 17:36:41 2019] IP: [<ffffffffc11c1ef1>] au6601_irq+0x2c1/0x390 [au6601_pci]
[So Apr 14 17:36:41 2019] PGD 0
[So Apr 14 17:36:41 2019] Oops: 0002 [#1] SMP
[So Apr 14 17:36:41 2019] Modules linked in: au6601_pci(OE) dvb_usb_au6610 dvb_usb_v2 dvb_core rc_core btrfs xor raid6_pq ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs libcrc32c drbg ansi_cprng ctr ccm arc4 cmac wl(POE) rfcomm bnep asus_nb_wmi asus_wmi sparse_keymap uvcvideo videobuf2_vmalloc videobuf2_memops dm_multipath videobuf2_v4l2 intel_rapl videobuf2_core x86_pkg_temp_thermal intel_powerclamp coretemp iwlmvm kvm_intel kvm v4l2_common mac80211 videodev irqbypass crct10dif_pclmul crc32_pclmul media ghash_clmulni_intel binfmt_misc aesni_intel iwlwifi aes_x86_64 lrw snd_hda_codec_conexant gf128mul cfg80211 glue_helper snd_hda_codec_generic ablk_helper cryptd snd_hda_codec_hdmi btusb btrtl btbcm btintel snd_seq_midi snd_seq_midi_event snd_hda_intel input_leds joydev snd_hda_codec bluetooth snd_rawmidi serio_raw snd_hda_core snd_hwdep snd_pcm_oss snd_mixer_oss snd_seq snd_pcm lpc_ich snd_seq_device shpchp snd_timer mei_me mei snd soundcore processor_thermal_device intel_soc_dts_iosf dell_smo8800 parport_pc int3402_thermal int340x_thermal_zone intel_smartconnect ppdev int3400_thermal acpi_thermal_rel mac_hid lp parport dm_mirror dm_region_hash dm_log uas usb_storage hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper e1000e psmouse syscopyarea sysfillrect sysimgblt fb_sys_fops ahci ptp drm libahci pps_core wmi video fjes
[So Apr 14 17:36:41 2019] CPU: 1 PID: 21284 Comm: irq/17-au6601 h Tainted: P OE 4.4.0-144-generic #170~14.04.1-Ubuntu
[So Apr 14 17:36:41 2019] Hardware name: ASUSTeK COMPUTER INC. BU201LA/BU201LA, BIOS BU201LA.204 08/12/2014
[So Apr 14 17:36:41 2019] task: ffff8800526a8000 ti: ffff8801b8cac000 task.ti: ffff8801b8cac000
[So Apr 14 17:36:41 2019] RIP: 0010:[<ffffffffc11c1ef1>] [<ffffffffc11c1ef1>] au6601_irq+0x2c1/0x390 [au6601_pci]
[So Apr 14 17:36:41 2019] RSP: 0018:ffff8801b8cafe08 EFLAGS: 00010206
[So Apr 14 17:36:41 2019] RAX: 0000000000000000 RBX: 0000000001108000 RCX: 0000000000000000
[So Apr 14 17:36:41 2019] RDX: 0000000000000001 RSI: ffff88021de90598 RDI: ffff8800d80d3540
[So Apr 14 17:36:41 2019] RBP: ffff8801b8cafe28 R08: 000000000000000a R09: 0000000000000000
[So Apr 14 17:36:41 2019] R10: 0000000000000000 R11: 0000000000000537 R12: ffff8800d80d3540
[So Apr 14 17:36:41 2019] R13: ffff8800d80d3590 R14: 0000000000100000 R15: ffffffff810dd4c0
[So Apr 14 17:36:41 2019] FS: 0000000000000000(0000) GS:ffff88021de80000(0000) knlGS:0000000000000000
[So Apr 14 17:36:41 2019] CS: 0010 DS: 0000 ES: 0000 CR...

Download full text (10.7 KiB)

Hi,

this driver was accepted mainline.
You will find it in 5.1-rc4.

Fixes against mainline version are here:
https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git/log/drivers/mmc/host/alcor.c?h=next

please use it.

Am 14.04.19 um 17:52 schrieb HaraldK:
> Is this still active in some way?
> Laptop: ASUS BU201
> uname -a
> Linux ... 4.4.0-144-generic #170~14.04.1-Ubuntu SMP Mon Mar 18 15:02:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
>
> Is this still the right place to go?
> % cat /etc/apt/sources.list.d/iacobs-au6601-trusty.list
> deb http://ppa.launchpad.net/iacobs/au6601/ubuntu trusty main
> deb-src http://ppa.launchpad.net/iacobs/au6601/ubuntu trusty main
>
> Bombs out with kernel NULL pointer dereference:
> [So Apr 14 17:36:41 2019] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
> [So Apr 14 17:36:41 2019] IP: [<ffffffffc11c1ef1>] au6601_irq+0x2c1/0x390 [au6601_pci]
> [So Apr 14 17:36:41 2019] PGD 0
> [So Apr 14 17:36:41 2019] Oops: 0002 [#1] SMP
> [So Apr 14 17:36:41 2019] Modules linked in: au6601_pci(OE) dvb_usb_au6610 dvb_usb_v2 dvb_core rc_core btrfs xor raid6_pq ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs libcrc32c drbg ansi_cprng ctr ccm arc4 cmac wl(POE) rfcomm bnep asus_nb_wmi asus_wmi sparse_keymap uvcvideo videobuf2_vmalloc videobuf2_memops dm_multipath videobuf2_v4l2 intel_rapl videobuf2_core x86_pkg_temp_thermal intel_powerclamp coretemp iwlmvm kvm_intel kvm v4l2_common mac80211 videodev irqbypass crct10dif_pclmul crc32_pclmul media ghash_clmulni_intel binfmt_misc aesni_intel iwlwifi aes_x86_64 lrw snd_hda_codec_conexant gf128mul cfg80211 glue_helper snd_hda_codec_generic ablk_helper cryptd snd_hda_codec_hdmi btusb btrtl btbcm btintel snd_seq_midi snd_seq_midi_event snd_hda_intel input_leds joydev snd_hda_codec bluetooth snd_rawmidi serio_raw snd_hda_core snd_hwdep snd_pcm_oss snd_mixer_oss snd_seq snd_pcm lpc_ich snd_seq_device shpchp snd_timer mei_me mei snd soundcore processor_thermal_device intel_soc_dts_iosf dell_smo8800 parport_pc int3402_thermal int340x_thermal_zone intel_smartconnect ppdev int3400_thermal acpi_thermal_rel mac_hid lp parport dm_mirror dm_region_hash dm_log uas usb_storage hid_generic usbhid hid i915 i2c_algo_bit drm_kms_helper e1000e psmouse syscopyarea sysfillrect sysimgblt fb_sys_fops ahci ptp drm libahci pps_core wmi video fjes
> [So Apr 14 17:36:41 2019] CPU: 1 PID: 21284 Comm: irq/17-au6601 h Tainted: P OE 4.4.0-144-generic #170~14.04.1-Ubuntu
> [So Apr 14 17:36:41 2019] Hardware name: ASUSTeK COMPUTER INC. BU201LA/BU201LA, BIOS BU201LA.204 08/12/2014
> [So Apr 14 17:36:41 2019] task: ffff8800526a8000 ti: ffff8801b8cac000 task.ti: ffff8801b8cac000
> [So Apr 14 17:36:41 2019] RIP: 0010:[<ffffffffc11c1ef1>] [<ffffffffc11c1ef1>] au6601_irq+0x2c1/0x390 [au6601_pci]
> [So Apr 14 17:36:41 2019] RSP: 0018:ffff8801b8cafe08 EFLAGS: 00010206
> [So Apr 14 17:36:41 2019] RAX: 0000000000000000 RBX: 0000000001108000 RCX: 0000000000000000
> [So Apr 14 17:36:41 2019] RDX: 0000000000000001 RSI: ffff88021de90598 RDI: ffff8800d80d3540
> [So Apr 14 17:36:41 2019] RBP: ffff8801b8cafe28 R08: 000000000000000a R09: 0000000000000000
> [So Apr 14 17:36:41 2019] R10:...

Oleksij Rempel (olerem) wrote :

Hi,

this driver was accepted mainline.
You will find it in 5.1-rc4.

Fixes against mainline version are here:
https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git/log/drivers/mmc/host/alcor.c?h=next

please use it.

tags: added: cherry-pick
Alexey (alexey-muranov) wrote :

Still does not seem to work on NixOS with Linux 5.1.1.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers