]> Gentwo Git Trees - linux/.git/commit
ahci: Marvell 88SE9215 controllers prefer DMA for ATAPI
authorHuacai Chen <chenhuacai@loongson.cn>
Tue, 18 Mar 2025 10:43:14 +0000 (18:43 +0800)
committerNiklas Cassel <cassel@kernel.org>
Tue, 18 Mar 2025 10:56:15 +0000 (11:56 +0100)
commit0507c777f5d8f9e34b137d28ee263599a7b81242
tree7af2f3bc46baa9f24461c821ddadddcfc21bb80b
parentb500ee5fde1bd0c85026dfcdadbc175548fb5216
ahci: Marvell 88SE9215 controllers prefer DMA for ATAPI

We use CD/DVD drives under Marvell 88SE9215 SATA controller on many
Loongson-based machines. We found its PIO doesn't work well, and on the
opposite its DMA seems work very well.

We don't know the detail of the 88SE9215 SATA controller, but we have
tested different CD/DVD drives and they all have problems under 88SE9215
(but they all work well under an Intel SATA controller). So, we consider
this problem is bound to 88SE9215 SATA controller rather than bound to
CD/DVD drives.

As a solution, we define a new dedicated AHCI board id which is named
board_ahci_yes_fbs_atapi_dma for 88SE9215, and for this id we set the
AHCI_HFLAG_ATAPI_DMA_QUIRK and ATA_QUIRK_ATAPI_MOD16_DMA flags on the
SATA controller in order to prefer ATAPI DMA.

Reported-by: Yuli Wang <wangyuli@uniontech.com>
Tested-by: Jie Fan <fanjie@uniontech.com>
Tested-by: Erpeng Xu <xuerpeng@uniontech.com>
Tested-by: Yuli Wang <wangyuli@uniontech.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://lore.kernel.org/r/20250318104314.2160526-1-chenhuacai@loongson.cn
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/ahci.c
drivers/ata/ahci.h
drivers/ata/libahci.c