summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArnaud Patard <apatard@mandriva.com>2006-09-19 00:23:52 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-19 00:23:52 -0400
commitcb60736b32a84cbc9525b0bb4df26b04cbfbc8e8 (patch)
treef0e179a8596588366e098f77ffddbe8cf4b8e677 /drivers
parent95064a75ebf8744e1ff595e8cd7ff9b6c851523e (diff)
downloadop-kernel-dev-cb60736b32a84cbc9525b0bb4df26b04cbfbc8e8.zip
op-kernel-dev-cb60736b32a84cbc9525b0bb4df26b04cbfbc8e8.tar.gz
Fix libata resource conflict for legacy mode
When the libata is trying to handle legacy ide ports (0x1f0 for instance), it doesn't take care if the resource has childs or not. The result is that this situation : 0100-01fe : pnp 00:09 0170-0177 : libata 01f0-01f7 : libata is seen as conflict, which is wrong. The proposed fix is to detect childs and in this case, look at which child is conflicting. Signed-off-by: Arnaud Patard <apatard@mandriva.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libata-bmdma.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/scsi/libata-bmdma.c b/drivers/scsi/libata-bmdma.c
index 9ce221f..3482abb 100644
--- a/drivers/scsi/libata-bmdma.c
+++ b/drivers/scsi/libata-bmdma.c
@@ -1016,11 +1016,14 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
res.start = 0x1f0;
res.end = 0x1f0 + 8 - 1;
conflict = ____request_resource(&ioport_resource, &res);
+ while (conflict->child)
+ conflict = ____request_resource(conflict, &res);
if (!strcmp(conflict->name, "libata"))
legacy_mode |= (1 << 0);
else {
disable_dev_on_err = 0;
- printk(KERN_WARNING "ata: 0x1f0 IDE port busy\n");
+ printk(KERN_WARNING "ata: 0x1f0 IDE port busy\n" \
+ "ata: conflict with %s\n", conflict->name);
}
} else
legacy_mode |= (1 << 0);
@@ -1030,11 +1033,14 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
res.start = 0x170;
res.end = 0x170 + 8 - 1;
conflict = ____request_resource(&ioport_resource, &res);
+ while (conflict->child)
+ conflict = ____request_resource(conflict, &res);
if (!strcmp(conflict->name, "libata"))
legacy_mode |= (1 << 1);
else {
disable_dev_on_err = 0;
- printk(KERN_WARNING "ata: 0x170 IDE port busy\n");
+ printk(KERN_WARNING "ata: 0x170 IDE port busy\n" \
+ "ata: conflict with %s\n", conflict->name);
}
} else
legacy_mode |= (1 << 1);
OpenPOWER on IntegriCloud