Skip to content

Commit 0b50f11

Browse files
liming011djbw
authored andcommitted
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: 0791153 ("PCI/IDE: Initialize an ID for all IDE streams") Signed-off-by: Li Ming <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Reviewed-by: Xu Yilun <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent 8370af2 commit 0b50f11

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/pci/ide.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ void pci_ide_init(struct pci_dev *pdev)
167167
for (u16 i = 0; i < nr_streams; i++) {
168168
int pos = __sel_ide_offset(ide_cap, nr_link_ide, i, nr_ide_mem);
169169

170-
pci_read_config_dword(pdev, pos + PCI_IDE_SEL_CAP, &val);
170+
pci_read_config_dword(pdev, pos + PCI_IDE_SEL_CTL, &val);
171171
if (val & PCI_IDE_SEL_CTL_EN)
172172
continue;
173173
val &= ~PCI_IDE_SEL_CTL_ID;

0 commit comments

Comments
 (0)