Skip to content
Snippets Groups Projects
Commit d73d5842 authored by Asias He's avatar Asias He
Browse files

ide: Fix ide probe


ide_drive::probe(), all the PCI_CLASS_STORAGE devices are probed
including the virtio-scsi device. This way ide driver will hijack
virtio-scsi handling.

Fix it by only matching PCI_CLASS_STORAGE && PCI_SUB_CLASS_STORAGE_IDE
devices

Signed-off-by: default avatarAsias He <asias@cloudius-systems.com>
parent 4c618704
No related branches found
No related tags found
No related merge requests found
...@@ -171,7 +171,7 @@ hw_driver* ide_drive::probe(hw_device* dev) ...@@ -171,7 +171,7 @@ hw_driver* ide_drive::probe(hw_device* dev)
if (_instance > 0) if (_instance > 0)
return nullptr; return nullptr;
if (auto pci_dev = dynamic_cast<pci::device*>(dev)) { if (auto pci_dev = dynamic_cast<pci::device*>(dev)) {
if (pci_dev->get_base_class_code() == pci::function::PCI_CLASS_STORAGE || if (pci_dev->get_base_class_code() == pci::function::PCI_CLASS_STORAGE &&
pci_dev->get_sub_class_code() == pci::function::PCI_SUB_CLASS_STORAGE_IDE) { pci_dev->get_sub_class_code() == pci::function::PCI_SUB_CLASS_STORAGE_IDE) {
/* Reset controller */ /* Reset controller */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment