• Home
  • Raw
  • Download

Lines Matching +full:ati +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * ahci.c - AHCI SATA support
6 * Please ALWAYS copy linux-ide@vger.kernel.org
9 * Copyright 2004-2005 Red Hat, Inc.
12 * as Documentation/driver-api/libata.rst
25 #include <linux/dma-mapping.h>
33 #include <linux/ahci-remap.h>
34 #include <linux/io-64-nonatomic-lo-hi.h>
249 { PCI_VDEVICE(INTEL, 0x06d6), board_ahci }, /* Comet Lake PCH-H RAID */
259 { PCI_VDEVICE(INTEL, 0x27c6), board_ahci }, /* ICH7-M DH */
344 { PCI_VDEVICE(INTEL, 0x9dd3), board_ahci_mobile }, /* Cannon Lake PCH-LP AHCI */
363 { PCI_VDEVICE(INTEL, 0x43d4), board_ahci }, /* Rocket Lake PCH-H RAID */
364 { PCI_VDEVICE(INTEL, 0x43d5), board_ahci }, /* Rocket Lake PCH-H RAID */
365 { PCI_VDEVICE(INTEL, 0x43d6), board_ahci }, /* Rocket Lake PCH-H RAID */
366 { PCI_VDEVICE(INTEL, 0x43d7), board_ahci }, /* Rocket Lake PCH-H RAID */
391 { PCI_VDEVICE(INTEL, 0xa102), board_ahci }, /* Sunrise Point-H AHCI */
393 { PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */
394 { PCI_VDEVICE(INTEL, 0xa106), board_ahci }, /* Sunrise Point-H RAID */
396 { PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */
409 { PCI_VDEVICE(INTEL, 0xa356), board_ahci }, /* Cannon Lake PCH-H RAID */
410 { PCI_VDEVICE(INTEL, 0x06d7), board_ahci }, /* Comet Lake-H RAID */
411 { PCI_VDEVICE(INTEL, 0xa386), board_ahci }, /* Comet Lake PCH-V RAID */
417 { PCI_VDEVICE(INTEL, 0x02d3), board_ahci_mobile }, /* Comet Lake PCH-U AHCI */
428 /* ATI */
429 { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */
430 { PCI_VDEVICE(ATI, 0x4390), board_ahci_sb700 }, /* ATI SB700/800 */
431 { PCI_VDEVICE(ATI, 0x4391), board_ahci_sb700 }, /* ATI SB700/800 */
432 { PCI_VDEVICE(ATI, 0x4392), board_ahci_sb700 }, /* ATI SB700/800 */
433 { PCI_VDEVICE(ATI, 0x4393), board_ahci_sb700 }, /* ATI SB700/800 */
434 { PCI_VDEVICE(ATI, 0x4394), board_ahci_sb700 }, /* ATI SB700/800 */
435 { PCI_VDEVICE(ATI, 0x4395), board_ahci_sb700 }, /* ATI SB700/800 */
443 { PCI_VDEVICE(AMD, 0x7800), board_ahci }, /* AMD Hudson-2 */
583 { PCI_VDEVICE(PROMISE, 0x3781), board_ahci }, /* FastTrak TX8660 ahci-mode */
638 static int mobile_lpm_policy = -1;
645 if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361) { in ahci_pci_save_initial_config()
646 dev_info(&pdev->dev, "JMB361 has only one port\n"); in ahci_pci_save_initial_config()
647 hpriv->force_port_map = 1; in ahci_pci_save_initial_config()
655 if (hpriv->flags & AHCI_HFLAG_MV_PATA) { in ahci_pci_save_initial_config()
656 if (pdev->device == 0x6121) in ahci_pci_save_initial_config()
657 hpriv->mask_port_map = 0x3; in ahci_pci_save_initial_config()
659 hpriv->mask_port_map = 0xf; in ahci_pci_save_initial_config()
660 dev_info(&pdev->dev, in ahci_pci_save_initial_config()
664 ahci_save_initial_config(&pdev->dev, hpriv); in ahci_pci_save_initial_config()
669 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_init_controller()
670 struct pci_dev *pdev = to_pci_dev(host->dev); in ahci_pci_init_controller()
675 if (hpriv->flags & AHCI_HFLAG_MV_PATA) { in ahci_pci_init_controller()
676 if (pdev->device == 0x6121) in ahci_pci_init_controller()
697 struct ata_port *ap = link->ap; in ahci_vt8251_hardreset()
698 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_vt8251_hardreset()
704 hpriv->stop_engine(ap); in ahci_vt8251_hardreset()
706 rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context), in ahci_vt8251_hardreset()
709 hpriv->start_engine(ap); in ahci_vt8251_hardreset()
714 * request follow-up softreset. in ahci_vt8251_hardreset()
716 return online ? -EAGAIN : rc; in ahci_vt8251_hardreset()
722 struct ata_port *ap = link->ap; in ahci_p5wdh_hardreset()
723 struct ahci_port_priv *pp = ap->private_data; in ahci_p5wdh_hardreset()
724 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_p5wdh_hardreset()
725 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; in ahci_p5wdh_hardreset()
730 hpriv->stop_engine(ap); in ahci_p5wdh_hardreset()
733 ata_tf_init(link->device, &tf); in ahci_p5wdh_hardreset()
737 rc = sata_link_hardreset(link, sata_ehc_deb_timing(&link->eh_context), in ahci_p5wdh_hardreset()
740 hpriv->start_engine(ap); in ahci_p5wdh_hardreset()
743 * ASUS P5W-DH Deluxe doesn't send signature FIS after in ahci_p5wdh_hardreset()
765 * ahci_avn_hardreset - attempt more aggressive recovery of Avoton ports.
769 * be recovered by a SATA-hard-reset alone. The failing signature is
782 const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); in ahci_avn_hardreset()
783 struct ata_port *ap = link->ap; in ahci_avn_hardreset()
784 struct ahci_port_priv *pp = ap->private_data; in ahci_avn_hardreset()
785 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_avn_hardreset()
786 u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG; in ahci_avn_hardreset()
787 unsigned long tmo = deadline - jiffies; in ahci_avn_hardreset()
794 hpriv->stop_engine(ap); in ahci_avn_hardreset()
799 int port = ap->port_no; in ahci_avn_hardreset()
800 struct ata_host *host = ap->host; in ahci_avn_hardreset()
801 struct pci_dev *pdev = to_pci_dev(host->dev); in ahci_avn_hardreset()
804 ata_tf_init(link->device, &tf); in ahci_avn_hardreset()
826 hpriv->start_engine(ap); in ahci_avn_hardreset()
839 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_disable_interrupts()
840 void __iomem *mmio = hpriv->mmio; in ahci_pci_disable_interrupts()
880 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_device_suspend()
882 if (hpriv->flags & AHCI_HFLAG_NO_SUSPEND) { in ahci_pci_device_suspend()
883 dev_err(&pdev->dev, in ahci_pci_device_suspend()
885 return -EIO; in ahci_pci_device_suspend()
902 if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { in ahci_pci_device_resume()
924 * If the device fixup already set the dma_mask to some non-standard in ahci_configure_dma_masks()
928 * bogus, platform code should use dev->bus_dma_limit instead.. in ahci_configure_dma_masks()
930 if (pdev->dma_mask && pdev->dma_mask < DMA_BIT_MASK(32)) in ahci_configure_dma_masks()
933 rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(dma_bits)); in ahci_configure_dma_masks()
935 dev_err(&pdev->dev, "DMA enable failed\n"); in ahci_configure_dma_masks()
941 struct pci_dev *pdev = to_pci_dev(host->dev); in ahci_pci_print_info()
959 * hardwired to on-board SIMG 4726. The chipset is ICH8 and doesn't
974 * assumed without follow-up softreset.
989 struct pci_dev *pdev = to_pci_dev(host->dev); in ahci_p5wdh_workaround()
991 if (pdev->bus->number == 0 && pdev->devfn == PCI_DEVFN(0x1f, 2) && in ahci_p5wdh_workaround()
993 struct ata_port *ap = host->ports[1]; in ahci_p5wdh_workaround()
995 dev_info(&pdev->dev, in ahci_p5wdh_workaround()
996 "enabling ASUS P5W DH Deluxe on-board SIMG4726 workaround\n"); in ahci_p5wdh_workaround()
998 ap->ops = &ahci_p5wdh_ops; in ahci_p5wdh_workaround()
999 ap->link.flags |= ATA_LFLAG_NO_SRST | ATA_LFLAG_ASSUME_ATA; in ahci_p5wdh_workaround()
1005 * booting in BIOS compatibility mode. We restore the registers but not ID.
1011 printk(KERN_INFO "ahci: enabling MCP89 AHCI mode\n"); in ahci_mcp89_apple_enable()
1039 return pdev->vendor == PCI_VENDOR_ID_NVIDIA && in is_mcp89_apple()
1040 pdev->device == PCI_DEVICE_ID_NVIDIA_NFORCE_MCP89_SATA && in is_mcp89_apple()
1041 pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE && in is_mcp89_apple()
1042 pdev->subsystem_device == 0xcb89; in is_mcp89_apple()
1051 * working is 1501 which was released on 2007-10-26. in ahci_sb600_enable_64bit()
1057 .ident = "ASUS M2A-VM", in ahci_sb600_enable_64bit()
1061 DMI_MATCH(DMI_BOARD_NAME, "M2A-VM"), in ahci_sb600_enable_64bit()
1066 * All BIOS versions for the MSI K9A2 Platinum (MS-7376) in ahci_sb600_enable_64bit()
1070 * fields as "MICRO-STAR INTERANTIONAL CO.,LTD". in ahci_sb600_enable_64bit()
1073 * "MICRO-STAR INTERNATIONAL CO.,LTD". in ahci_sb600_enable_64bit()
1074 * So try to match on DMI_BOARD_VENDOR of "MICRO-STAR INTER". in ahci_sb600_enable_64bit()
1077 * DMI field of "MS-7376". This was changed to be in ahci_sb600_enable_64bit()
1078 * "K9A2 Platinum (MS-7376)" in version 1.9, but we can still in ahci_sb600_enable_64bit()
1079 * match on DMI_BOARD_NAME of "MS-7376". in ahci_sb600_enable_64bit()
1085 "MICRO-STAR INTER"), in ahci_sb600_enable_64bit()
1086 DMI_MATCH(DMI_BOARD_NAME, "MS-7376"), in ahci_sb600_enable_64bit()
1090 * All BIOS versions for the MSI K9AGM2 (MS-7327) support in ahci_sb600_enable_64bit()
1095 * match on DMI_BOARD_VENDOR of "MICRO-STAR INTER" again. in ahci_sb600_enable_64bit()
1101 "MICRO-STAR INTER"), in ahci_sb600_enable_64bit()
1102 DMI_MATCH(DMI_BOARD_NAME, "MS-7327"), in ahci_sb600_enable_64bit()
1124 if (pdev->bus->number != 0 || pdev->devfn != PCI_DEVFN(0x12, 0) || in ahci_sb600_enable_64bit()
1128 if (!match->driver_data) in ahci_sb600_enable_64bit()
1134 if (strcmp(buf, match->driver_data) >= 0) in ahci_sb600_enable_64bit()
1137 dev_warn(&pdev->dev, in ahci_sb600_enable_64bit()
1139 match->ident); in ahci_sb600_enable_64bit()
1144 dev_warn(&pdev->dev, "%s: enabling 64bit DMA\n", match->ident); in ahci_sb600_enable_64bit()
1154 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), in ahci_broken_system_poweroff()
1163 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), in ahci_broken_system_poweroff()
1175 unsigned long slot = (unsigned long)dmi->driver_data; in ahci_broken_system_poweroff()
1176 /* apply the quirk only to on-board controllers */ in ahci_broken_system_poweroff()
1177 return slot == PCI_SLOT(pdev->devfn); in ahci_broken_system_poweroff()
1187 * On HP dv[4-6] and HDX18 with earlier BIOSen, link in ahci_broken_suspend()
1202 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), in ahci_broken_suspend()
1211 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), in ahci_broken_suspend()
1220 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), in ahci_broken_suspend()
1229 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), in ahci_broken_suspend()
1258 if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2)) in ahci_broken_suspend()
1264 return strcmp(buf, dmi->driver_data) < 0; in ahci_broken_suspend()
1317 return strcmp(buf, dmi->driver_data) < 0; in ahci_broken_lpm()
1339 .ident = "EP45-DQ6", in ahci_broken_online()
1343 DMI_MATCH(DMI_BOARD_NAME, "EP45-DQ6"), in ahci_broken_online()
1348 .ident = "EP45-DS5", in ahci_broken_online()
1352 DMI_MATCH(DMI_BOARD_NAME, "EP45-DS5"), in ahci_broken_online()
1365 val = (unsigned long)dmi->driver_data; in ahci_broken_online()
1367 return pdev->bus->number == (val >> 8) && pdev->devfn == (val & 0xff); in ahci_broken_online()
1389 * is FPDMA non-zero offset enable which when enabled in ahci_gtf_filter_workaround()
1410 filter = (unsigned long)dmi->driver_data; in ahci_gtf_filter_workaround()
1411 dev_info(host->dev, "applying extra ACPI _GTF filter 0x%x for %s\n", in ahci_gtf_filter_workaround()
1412 filter, dmi->ident); in ahci_gtf_filter_workaround()
1414 for (i = 0; i < host->n_ports; i++) { in ahci_gtf_filter_workaround()
1415 struct ata_port *ap = host->ports[i]; in ahci_gtf_filter_workaround()
1421 dev->gtf_filter |= filter; in ahci_gtf_filter_workaround()
1448 DMI_MATCH(DMI_PRODUCT_NAME, "Switch SA5-271") in acer_sa5_271_workaround()
1455 dev_info(&pdev->dev, "enabling Acer Switch Alpha 12 workaround\n"); in acer_sa5_271_workaround()
1456 if ((hpriv->saved_cap & 0xC734FF00) == 0xC734FF00) { in acer_sa5_271_workaround()
1457 hpriv->port_map = 0x7; in acer_sa5_271_workaround()
1458 hpriv->cap = 0xC734FF02; in acer_sa5_271_workaround()
1479 hpriv = host->private_data; in ahci_thunderx_irq_handler()
1480 mmio = hpriv->mmio; in ahci_thunderx_irq_handler()
1486 irq_masked = irq_stat & hpriv->port_map; in ahci_thunderx_irq_handler()
1487 spin_lock(&host->lock); in ahci_thunderx_irq_handler()
1493 spin_unlock(&host->lock); in ahci_thunderx_irq_handler()
1510 if (pdev->vendor != PCI_VENDOR_ID_INTEL || in ahci_remap_check()
1513 !(readl(hpriv->mmio + AHCI_VSCAP) & 1)) in ahci_remap_check()
1516 cap = readq(hpriv->mmio + AHCI_REMAP_CAP); in ahci_remap_check()
1520 if (readl(hpriv->mmio + ahci_remap_dcc(i)) in ahci_remap_check()
1525 hpriv->remapped_nvme++; in ahci_remap_check()
1528 if (!hpriv->remapped_nvme) in ahci_remap_check()
1531 dev_warn(&pdev->dev, "Found %u remapped NVMe devices.\n", in ahci_remap_check()
1532 hpriv->remapped_nvme); in ahci_remap_check()
1533 dev_warn(&pdev->dev, in ahci_remap_check()
1534 "Switch your BIOS from RAID to AHCI mode to use them.\n"); in ahci_remap_check()
1537 * Don't rely on the msi-x capability in the remap case, in ahci_remap_check()
1540 hpriv->flags |= AHCI_HFLAG_NO_MSI; in ahci_remap_check()
1545 return pci_irq_vector(to_pci_dev(host->dev), port); in ahci_get_irq_vector()
1553 if (hpriv->flags & AHCI_HFLAG_NO_MSI) in ahci_init_msi()
1554 return -ENODEV; in ahci_init_msi()
1558 * Message mode could be enforced. In this case assume that advantage in ahci_init_msi()
1559 * of multipe MSIs is negated and use single MSI mode instead. in ahci_init_msi()
1565 if (!(readl(hpriv->mmio + HOST_CTL) & HOST_MRSM)) { in ahci_init_msi()
1566 hpriv->get_irq_vector = ahci_get_irq_vector; in ahci_init_msi()
1567 hpriv->flags |= AHCI_HFLAG_MULTI_MSI; in ahci_init_msi()
1572 * Fallback to single MSI mode if the controller in ahci_init_msi()
1573 * enforced MRSM mode. in ahci_init_msi()
1582 * If the host is not capable of supporting per-port vectors, fall in ahci_init_msi()
1583 * back to single MSI before finally attempting single MSI-X. in ahci_init_msi()
1598 if (!(hpriv->flags & AHCI_HFLAG_IS_MOBILE)) in ahci_update_initial_lpm_policy()
1602 if (mobile_lpm_policy != -1) { in ahci_update_initial_lpm_policy()
1610 if (hpriv->cap & HOST_CAP_PART) in ahci_update_initial_lpm_policy()
1612 else if (hpriv->cap & HOST_CAP_SSC) in ahci_update_initial_lpm_policy()
1619 ap->target_lpm_policy = policy; in ahci_update_initial_lpm_policy()
1628 * Only apply the 6-port PCS quirk for known legacy platforms. in ahci_intel_pcs_quirk()
1630 if (!id || id->vendor != PCI_VENDOR_ID_INTEL) in ahci_intel_pcs_quirk()
1634 if (((enum board_ids) id->driver_data) >= board_ahci_pcs7) in ahci_intel_pcs_quirk()
1639 * implemented as write or write-once register. If the register in ahci_intel_pcs_quirk()
1646 if ((tmp16 & hpriv->port_map) != hpriv->port_map) { in ahci_intel_pcs_quirk()
1647 tmp16 |= hpriv->port_map; in ahci_intel_pcs_quirk()
1657 struct ahci_host_priv *hpriv = host->private_data; in remapped_nvme_show()
1659 return sprintf(buf, "%u\n", hpriv->remapped_nvme); in remapped_nvme_show()
1666 unsigned int board_id = ent->driver_data; in ahci_init_one()
1669 struct device *dev = &pdev->dev; in ahci_init_one()
1679 ata_print_version_once(&pdev->dev, DRV_VERSION); in ahci_init_one()
1684 if (pdev->vendor == PCI_VENDOR_ID_MARVELL && !marvell_enable) in ahci_init_one()
1685 return -ENODEV; in ahci_init_one()
1691 /* Promise's PDC42819 is a SAS/SATA controller that has an AHCI mode. in ahci_init_one()
1692 * At the moment, we can only use the AHCI mode. Let the users know in ahci_init_one()
1695 if (pdev->vendor == PCI_VENDOR_ID_PROMISE) in ahci_init_one()
1696 dev_info(&pdev->dev, in ahci_init_one()
1699 /* Some devices use non-standard BARs */ in ahci_init_one()
1700 if (pdev->vendor == PCI_VENDOR_ID_STMICRO && pdev->device == 0xCC06) in ahci_init_one()
1702 else if (pdev->vendor == 0x1c44 && pdev->device == 0x8000) in ahci_init_one()
1704 else if (pdev->vendor == PCI_VENDOR_ID_CAVIUM) { in ahci_init_one()
1705 if (pdev->device == 0xa01c) in ahci_init_one()
1707 if (pdev->device == 0xa084) in ahci_init_one()
1709 } else if (pdev->vendor == PCI_VENDOR_ID_LOONGSON) { in ahci_init_one()
1710 if (pdev->device == 0x7a08) in ahci_init_one()
1719 if (pdev->vendor == PCI_VENDOR_ID_INTEL && in ahci_init_one()
1720 (pdev->device == 0x2652 || pdev->device == 0x2653)) { in ahci_init_one()
1724 * modes. Enabling ahci mode while MAP indicates in ahci_init_one()
1725 * combined mode is a bad idea. Yield to ata_piix. in ahci_init_one()
1729 dev_info(&pdev->dev, in ahci_init_one()
1730 "controller is in combined mode, can't enable AHCI mode\n"); in ahci_init_one()
1731 return -ENODEV; in ahci_init_one()
1739 if (rc == -EBUSY) in ahci_init_one()
1746 return -ENOMEM; in ahci_init_one()
1747 hpriv->flags |= (unsigned long)pi.private_data; in ahci_init_one()
1751 (pdev->revision == 0xa1 || pdev->revision == 0xa2)) in ahci_init_one()
1752 hpriv->flags |= AHCI_HFLAG_NO_MSI; in ahci_init_one()
1755 if (board_id == board_ahci_sb700 && pdev->revision >= 0x40) in ahci_init_one()
1756 hpriv->flags &= ~AHCI_HFLAG_IGN_SERR_INTERNAL; in ahci_init_one()
1760 hpriv->flags &= ~AHCI_HFLAG_32BIT_ONLY; in ahci_init_one()
1762 hpriv->mmio = pcim_iomap_table(pdev)[ahci_pci_bar]; in ahci_init_one()
1767 sysfs_add_file_to_group(&pdev->dev.kobj, in ahci_init_one()
1773 hpriv->flags |= AHCI_HFLAG_NO_DEVSLP; in ahci_init_one()
1776 if (pdev->vendor == PCI_VENDOR_ID_HUAWEI && in ahci_init_one()
1777 pdev->device == 0xa235 && in ahci_init_one()
1778 pdev->revision < 0x30) in ahci_init_one()
1779 hpriv->flags |= AHCI_HFLAG_NO_SXS; in ahci_init_one()
1781 if (pdev->vendor == 0x177d && pdev->device == 0xa01c) in ahci_init_one()
1782 hpriv->irq_handler = ahci_thunderx_irq_handler; in ahci_init_one()
1795 if (hpriv->cap & HOST_CAP_NCQ) { in ahci_init_one()
1798 * Auto-activate optimization is supposed to be in ahci_init_one()
1803 if (!(hpriv->flags & AHCI_HFLAG_NO_FPDMA_AA)) in ahci_init_one()
1807 * All AHCI controllers should be forward-compatible in ahci_init_one()
1815 if (hpriv->cap & HOST_CAP_PMP) in ahci_init_one()
1822 dev_info(&pdev->dev, in ahci_init_one()
1828 dev_warn(&pdev->dev, in ahci_init_one()
1833 hpriv->flags |= AHCI_HFLAG_NO_SUSPEND; in ahci_init_one()
1834 dev_warn(&pdev->dev, in ahci_init_one()
1839 hpriv->flags |= AHCI_HFLAG_SRST_TOUT_IS_OFFLINE; in ahci_init_one()
1840 dev_info(&pdev->dev, in ahci_init_one()
1845 /* Acer SA5-271 workaround modifies private_data */ in ahci_init_one()
1853 n_ports = max(ahci_nr_ports(hpriv->cap), fls(hpriv->port_map)); in ahci_init_one()
1855 host = ata_host_alloc_pinfo(&pdev->dev, ppi, n_ports); in ahci_init_one()
1857 return -ENOMEM; in ahci_init_one()
1858 host->private_data = hpriv; in ahci_init_one()
1864 hpriv->irq = pci_irq_vector(pdev, 0); in ahci_init_one()
1866 if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss) in ahci_init_one()
1867 host->flags |= ATA_HOST_PARALLEL_SCAN; in ahci_init_one()
1869 dev_info(&pdev->dev, "SSS flag set, parallel bus scan disabled\n"); in ahci_init_one()
1874 for (i = 0; i < host->n_ports; i++) { in ahci_init_one()
1875 struct ata_port *ap = host->ports[i]; in ahci_init_one()
1877 ata_port_pbar_desc(ap, ahci_pci_bar, -1, "abar"); in ahci_init_one()
1879 0x100 + ap->port_no * 0x80, "port"); in ahci_init_one()
1882 if (ap->flags & ATA_FLAG_EM) in ahci_init_one()
1883 ap->em_message_type = hpriv->em_msg_type; in ahci_init_one()
1887 /* disabled/not-implemented port */ in ahci_init_one()
1888 if (!(hpriv->port_map & (1 << i))) in ahci_init_one()
1889 ap->ops = &ata_dummy_port_ops; in ahci_init_one()
1899 rc = ahci_configure_dma_masks(pdev, hpriv->cap & HOST_CAP_64); in ahci_init_one()
1916 pm_runtime_put_noidle(&pdev->dev); in ahci_init_one()
1927 sysfs_remove_file_from_group(&pdev->dev.kobj, in ahci_remove_one()
1930 pm_runtime_get_noresume(&pdev->dev); in ahci_remove_one()
1937 MODULE_DESCRIPTION("AHCI SATA low-level driver");