diff options
Diffstat (limited to 'linux/dev')
-rw-r--r-- | linux/dev/drivers/block/ahci.c | 15 | ||||
-rw-r--r-- | linux/dev/include/linux/blk.h | 1 |
2 files changed, 16 insertions, 0 deletions
diff --git a/linux/dev/drivers/block/ahci.c b/linux/dev/drivers/block/ahci.c index f67ba2f..b60f1a1 100644 --- a/linux/dev/drivers/block/ahci.c +++ b/linux/dev/drivers/block/ahci.c @@ -861,6 +861,21 @@ static void ahci_probe_dev(unsigned char bus, unsigned char device) return; } +#ifdef CONFIG_BLK_DEV_IDE + /* OK, we will handle it. Disable probing on legacy IDE ports it may have. */ + for (i = 0; i < 6; i++) + { + unsigned mybar; + if (pcibios_read_config_dword(bus, device, PCI_BASE_ADDRESS_0 + i*4, &mybar) == PCIBIOS_SUCCESSFUL) { + if (!(bar & PCI_BASE_ADDRESS_SPACE_IO)) + /* Memory, don't care */ + continue; + /* printk("ahci: %02x:%02x.%x: BAR %d is %x\n", bus, dev, fun, i, mybar); */ + ide_disable_base(bar & PCI_BASE_ADDRESS_IO_MASK); + } + } +#endif + nports = (readl(&ahci_host->cap) & 0x1f) + 1; port_map = readl(&ahci_host->pi); diff --git a/linux/dev/include/linux/blk.h b/linux/dev/include/linux/blk.h index 156d91c..b924a14 100644 --- a/linux/dev/include/linux/blk.h +++ b/linux/dev/include/linux/blk.h @@ -78,6 +78,7 @@ extern int hd_init(void); #endif #ifdef CONFIG_BLK_DEV_IDE extern int ide_init(void); +extern void ide_disable_base(unsigned base); #endif #ifdef CONFIG_BLK_DEV_XD extern int xd_init(void); |