Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI/IDE: Fix reading a wrong reg for unused sel stream initialization

During pci_ide_init(), it will write PCI_ID_RESERVED_STREAM_ID into all
unused selective IDE stream blocks. In a selective IDE stream block, IDE
stream ID field is in selective IDE stream control register instead of
selective IDE stream capability register.

Fixes: 079115370d00 ("PCI/IDE: Initialize an ID for all IDE streams")
Signed-off-by: Li Ming <ming.li@zohomail.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Xu Yilun <yilun.xu@linux.intel.com>
Link: https://patch.msgid.link/20260111073823.486665-1-ming.li@zohomail.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

authored by

Li Ming and committed by
Dan Williams
0b50f116 8370af20

+1 -1
+1 -1
drivers/pci/ide.c
··· 167 167 for (u16 i = 0; i < nr_streams; i++) { 168 168 int pos = __sel_ide_offset(ide_cap, nr_link_ide, i, nr_ide_mem); 169 169 170 - pci_read_config_dword(pdev, pos + PCI_IDE_SEL_CAP, &val); 170 + pci_read_config_dword(pdev, pos + PCI_IDE_SEL_CTL, &val); 171 171 if (val & PCI_IDE_SEL_CTL_EN) 172 172 continue; 173 173 val &= ~PCI_IDE_SEL_CTL_ID;