diff options
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index c729e6988bbb..bce26ee3806e 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -610,6 +610,15 @@ module_param(ahci_em_messages, int, 0444); | |||
610 | MODULE_PARM_DESC(ahci_em_messages, | 610 | MODULE_PARM_DESC(ahci_em_messages, |
611 | "Set AHCI Enclosure Management Message type (0 = disabled, 1 = LED"); | 611 | "Set AHCI Enclosure Management Message type (0 = disabled, 1 = LED"); |
612 | 612 | ||
613 | #if defined(CONFIG_PATA_MARVELL) || defined(CONFIG_PATA_MARVELL_MODULE) | ||
614 | static int marvell_enable; | ||
615 | #else | ||
616 | static int marvell_enable = 1; | ||
617 | #endif | ||
618 | module_param(marvell_enable, int, 0644); | ||
619 | MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)"); | ||
620 | |||
621 | |||
613 | static inline int ahci_nr_ports(u32 cap) | 622 | static inline int ahci_nr_ports(u32 cap) |
614 | { | 623 | { |
615 | return (cap & 0x1f) + 1; | 624 | return (cap & 0x1f) + 1; |
@@ -732,6 +741,8 @@ static void ahci_save_initial_config(struct pci_dev *pdev, | |||
732 | "MV_AHCI HACK: port_map %x -> %x\n", | 741 | "MV_AHCI HACK: port_map %x -> %x\n", |
733 | port_map, | 742 | port_map, |
734 | port_map & mv); | 743 | port_map & mv); |
744 | dev_printk(KERN_ERR, &pdev->dev, | ||
745 | "Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n"); | ||
735 | 746 | ||
736 | port_map &= mv; | 747 | port_map &= mv; |
737 | } | 748 | } |
@@ -2533,6 +2544,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2533 | if (!printed_version++) | 2544 | if (!printed_version++) |
2534 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); | 2545 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
2535 | 2546 | ||
2547 | /* The AHCI driver can only drive the SATA ports, the PATA driver | ||
2548 | can drive them all so if both drivers are selected make sure | ||
2549 | AHCI stays out of the way */ | ||
2550 | if (pdev->vendor == PCI_VENDOR_ID_MARVELL && !marvell_enable) | ||
2551 | return -ENODEV; | ||
2552 | |||
2536 | /* acquire resources */ | 2553 | /* acquire resources */ |
2537 | rc = pcim_enable_device(pdev); | 2554 | rc = pcim_enable_device(pdev); |
2538 | if (rc) | 2555 | if (rc) |