HP ENVY - 13-ad001la Pop-Os 19.10 PCI 讀卡器不工作
我有一個帶有 PopOs 19.10 的 HP Envy 13-ad001la。讀卡器不工作;當我使用時,
lspci
我得到這是一個 Alcor Micro 設備閱讀器:01:00.0 Unassigned class [ff00]: Alcor Micro Device 6625 Subsystem: Hewlett-Packard Company Device 834a Flags: fast devsel, IRQ 255 Memory at a1200000 (64-bit, non-prefetchable) [disabled] [size=4K] 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
據我了解,“未分配的類”意味著 Linux 找不到該設備的驅動程序。我搜尋了對應的驅動,發現驅動是“alcor_pci”(https://cateee.net/lkddb/web-lkddb/MISC_ALCOR_PCI.html)並沒有載入,所以我使用了modprobe來載入它。
~ lsmod | grep alcor alcor_pci 20480 0
但在此之後它仍然無法正常工作,
lshw
顯示以下內容(NO RECLAMADO 意味著 UNCLAIMED):*-pci:0 descripción: PCI bridge producto: Sunrise Point-LP PCI Express Root Port #5 fabricante: Intel Corporation id físico: 1c información del bus: pci@0000:00:1c.0 versión: f1 anchura: 32 bits reloj: 33MHz capacidades: pci normal_decode bus_master cap_list configuración: driver=pcieport recursos: irq:122 memoria:a1200000-a12fffff *-generic NO RECLAMADO descripción: Unassigned class producto: Alcor Micro fabricante: Alcor Micro id físico: 0 información del bus: pci@0000:01:00.0 versión: 00 anchura: 64 bits reloj: 33MHz capacidades: cap_list configuración: latency=0 recursos: memoria:a1200000-a1200fff
有人可以幫我嗎?我不知道載入模組後是否需要做任何其他事情。
它無法工作,因為 AU6625 設備 ID 僅在linux 5.6中添加。
(即使不匹配,一些驅動程序確實支持“強制使用”模組,但我真的不會屏住呼吸讓讀卡器支持它)
(此文本是從法語到英語的自動翻譯。)
您好,
我對這張卡的體驗:
*"Alcor Micro AU6625 PCI-E Flash card reader controller"*
如果您願意重新編譯您的 linux 核心,該卡似乎與核心中已包含的 AU6621 驅動程序(從核心版本 5.5.6 起)一起工作得很好。只需在模組的原始碼中“重命名”它,然後重新編譯 linux 核心。從核心版本 5.5.9 開始,這對我有用。我已經使用它幾個月了,沒有(明顯的)問題,這些核心版本(5.5.9、5.5.16、5.6.7、5.6.9)
我的環境:
"HP ENVY Laptop 13-ad1xx" LSPCI 02:00.0 Unassigned class [ff00]: Alcor Micro AU6625 PCI-E Flash card reader controller Debian Stock linux kernel: https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.7.tar.xz
警告,我不是開發人員,我只是一個喜歡不時重新編譯他的 linux 核心的系統管理員。
本文的其餘部分假設您已經知道如何重新編譯 Linux 核心。否則最好不要繼續這個過程;錯誤地建構核心並執行它可能非常危險,您可能會損壞硬碟驅動器上的所有數據。
提取原始碼後,需要在解壓縮核心原始碼的根目錄調整以下文件(通過 shell 命令 “$ grep -i -n -r “AU662” *” 找到)。
將所有帶有“6621”的引用更改為“6625”。
更改前: $ grep -i -r -n “AU662” *
*drivers/misc/cardreader/alcor_pci.c:5: * Driver for Alcor Micro AU6601 and AU6621 controllers* *drivers/misc/cardreader/alcor_pci.c:37:static const struct alcor_dev_cfg au6621_cfg = {* *drivers/misc/cardreader/alcor_pci.c:41:static const struct alcor_dev_cfg au6625_cfg = {* *drivers/misc/cardreader/alcor_pci.c:48: { PCI_DEVICE(PCI_ID_ALCOR_MICRO, PCI_ID_AU6621),* *drivers/misc/cardreader/alcor_pci.c:49: .driver_data = (kernel_ulong_t)&au6621_cfg },* *drivers/misc/cardreader/alcor_pci.c:50: { PCI_DEVICE(PCI_ID_ALCOR_MICRO, PCI_ID_AU6625),* *drivers/misc/cardreader/alcor_pci.c:51: .driver_data = (kernel_ulong_t)&au6625_cfg },* *drivers/misc/cardreader/Kconfig:8: au6621.* *drivers/mmc/host/alcor.c:5: * Driver for Alcor Micro AU6601 and AU6621 controllers* *drivers/mmc/host/alcor.c:892: /* The clk will not work on au6621. We need to trigger data* *include/linux/alcor_pci.h:5: * Driver for Alcor Micro AU6601 and AU6621 controllers* *include/linux/alcor_pci.h:19:#define PCI_ID_AU6621 0x6621* *include/linux/alcor_pci.h:20:#define PCI_ID_AU6625 0x6625* *include/linux/alcor_pci.h:36: * 0x10 - ADMA phy address. AU6621 only?* *include/linux/alcor_pci.h:45: * The au6601 and au6621 have different DMA engines with different issues. One* *include/linux/alcor_pci.h:46: * For example au6621 engine is triggered by addr change. No other interaction* *include/linux/alcor_pci.h:54:#define AU6621_DMA_PAGE_CNT 0x05* *include/linux/alcor_pci.h:57:/* ADMA ctrl? AU6621 only. */* *include/linux/alcor_pci.h:58:#define AU6621_DMA_CTRL 0x0c* *include/linux/alcor_pci.h:59:#define AU6621_DMA_ENABLE BIT(0)*
更改後:
*drivers/misc/cardreader/alcor_pci.c:5: * Driver for Alcor Micro AU6601 and AU6625 controllers* *drivers/misc/cardreader/alcor_pci.c:37:static const struct alcor_dev_cfg au6625_cfg = {* *drivers/misc/cardreader/alcor_pci.c:41:/*static const struct alcor_dev_cfg au6625_cfg = {* *drivers/misc/cardreader/alcor_pci.c:48: { PCI_DEVICE(PCI_ID_ALCOR_MICRO, PCI_ID_AU6625),* *drivers/misc/cardreader/alcor_pci.c:49: .driver_data = (kernel_ulong_t)&au6625_cfg },* *drivers/misc/cardreader/Kconfig:8: au6625.* *drivers/mmc/host/alcor.c:5: * Driver for Alcor Micro AU6601 and AU6625 controllers* *drivers/mmc/host/alcor.c:892: /* The clk will not work on au6625. We need to trigger data* *include/linux/alcor_pci.h:5: * Driver for Alcor Micro AU6601 and AU6625 controllers* *include/linux/alcor_pci.h:19:#define PCI_ID_AU6621 0x6621* *include/linux/alcor_pci.h:20:#define PCI_ID_AU6625 0x6625* *include/linux/alcor_pci.h:36: * 0x10 - ADMA phy address. AU6625 only?* *include/linux/alcor_pci.h:45: * The au6601 and au6625 have different DMA engines with different issues. One* *include/linux/alcor_pci.h:46: * For example au6625 engine is triggered by addr change. No other interaction* *include/linux/alcor_pci.h:54:#define AU6625_DMA_PAGE_CNT 0x05* *include/linux/alcor_pci.h:57:/* ADMA ctrl? AU6625 only. */* *include/linux/alcor_pci.h:58:#define AU6625_DMA_CTRL 0x0c* *include/linux/alcor_pci.h:59:#define AU6625_DMA_ENABLE BIT(0)*
兩個重要說明:
- 從核心 5.6.x 開始,核心中似乎包含了 AU6625 驅動程序,但是這個包含的驅動程序似乎還沒有工作(至少在我的配置和我目前使用的 5.6.9 核心上) ) 因此,您必須從程式碼中“註釋”或刪除這個新部分。
- 在這個新編譯的核心上重新啟動後,“lspci”命令將繼續顯示“Unassigned Class …”。
為了我
02:00.0 未分配的班級
$$ ff00 $$: Alcor Micro AU6625 PCI-E Flash讀卡器控制器
但是這張卡無論如何都很好用,並且像其他任何卡一樣安裝在我的 Filemanager (Nautilus) 中。
dmesg
May 10 13:35:35 MylapX kernel: [ 0.818161] pci 0000:02:00.0: [1aea:6625] type 00 class 0xff0000 May 10 13:35:35 MylapX kernel: [ 0.818209] pci 0000:02:00.0: reg 0x10: [mem 0xb4200000-0xb4200fff 64bit] May 10 13:35:35 MylapX kernel: [ 0.818386] pci 0000:02:00.0: supports D1 D2 May 10 13:35:35 MylapX kernel: [ 0.818388] pci 0000:02:00.0: PME# supported from D1 D2 D3hot D3cold May 10 13:35:35 MylapX kernel: [ 2.845290] alcor_pci 0000:02:00.0: enabling device (0000 -> 0002) May 10 13:35:39 MylapX kernel: [ 7.617586] mmc0: Skipping voltage switch May 10 13:35:39 MylapX kernel: [ 7.877031] mmc0: new high speed SDXC card at address aaaa May 10 13:35:39 MylapX kernel: [ 7.880661] mmcblk0: mmc0:aaaa ACLCF 119 GiB May 10 13:35:39 MylapX kernel: [ 7.896324] mmcblk0: p1
fdisk -l
Disk /dev/mmcblk0: 119.9 GiB, 127865454592 bytes, 249737216 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Device Boot Start End Sectors Size Id Type /dev/mmcblk0p1 32768 249737215 249704448 119.1G 7 HPFS/NTFS/exFAT
$ df -h
Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p1 120G 98G 22G 82% /media/user/3561-6331