Lines Matching refs:hpriv
88 static void ahci_intel_pcs_quirk(struct pci_dev *pdev, struct ahci_host_priv *hpriv);
680 struct ahci_host_priv *hpriv, char *mask_s) in ahci_apply_port_map_mask() argument
689 hpriv->mask_port_map = mask; in ahci_apply_port_map_mask()
693 struct ahci_host_priv *hpriv) in ahci_get_port_map_mask() argument
707 ahci_apply_port_map_mask(dev, hpriv, str); in ahci_get_port_map_mask()
742 ahci_apply_port_map_mask(dev, hpriv, mask_s); in ahci_get_port_map_mask()
750 struct ahci_host_priv *hpriv) in ahci_pci_save_initial_config() argument
754 hpriv->saved_port_map = 1; in ahci_pci_save_initial_config()
762 if (hpriv->flags & AHCI_HFLAG_MV_PATA) { in ahci_pci_save_initial_config()
764 hpriv->mask_port_map = 0x3; in ahci_pci_save_initial_config()
766 hpriv->mask_port_map = 0xf; in ahci_pci_save_initial_config()
773 ahci_get_port_map_mask(&pdev->dev, hpriv); in ahci_pci_save_initial_config()
775 ahci_save_initial_config(&pdev->dev, hpriv); in ahci_pci_save_initial_config()
781 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_reset_controller() local
792 ahci_intel_pcs_quirk(pdev, hpriv); in ahci_pci_reset_controller()
799 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_init_controller() local
805 if (hpriv->flags & AHCI_HFLAG_MV_PATA) { in ahci_pci_init_controller()
810 port_mmio = __ahci_port_base(hpriv, mv); in ahci_pci_init_controller()
828 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_vt8251_hardreset() local
832 hpriv->stop_engine(ap); in ahci_vt8251_hardreset()
837 hpriv->start_engine(ap); in ahci_vt8251_hardreset()
850 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_p5wdh_hardreset() local
856 hpriv->stop_engine(ap); in ahci_p5wdh_hardreset()
866 hpriv->start_engine(ap); in ahci_p5wdh_hardreset()
911 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_avn_hardreset() local
918 hpriv->stop_engine(ap); in ahci_avn_hardreset()
950 hpriv->start_engine(ap); in ahci_avn_hardreset()
962 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_disable_interrupts() local
963 void __iomem *mmio = hpriv->mmio; in ahci_pci_disable_interrupts()
1003 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_device_suspend() local
1005 if (hpriv->flags & AHCI_HFLAG_NO_SUSPEND) { in ahci_pci_device_suspend()
1043 struct ahci_host_priv *hpriv) in ahci_configure_dma_masks() argument
1048 if (hpriv->cap & HOST_CAP_64) { in ahci_configure_dma_masks()
1050 if (hpriv->flags & AHCI_HFLAG_43BIT_ONLY) in ahci_configure_dma_masks()
1562 static void acer_sa5_271_workaround(struct ahci_host_priv *hpriv, in acer_sa5_271_workaround() argument
1578 if ((hpriv->saved_cap & 0xC734FF00) == 0xC734FF00) { in acer_sa5_271_workaround()
1579 hpriv->port_map = 0x7; in acer_sa5_271_workaround()
1580 hpriv->cap = 0xC734FF02; in acer_sa5_271_workaround()
1594 struct ahci_host_priv *hpriv; in ahci_thunderx_irq_handler() local
1600 hpriv = host->private_data; in ahci_thunderx_irq_handler()
1601 mmio = hpriv->mmio; in ahci_thunderx_irq_handler()
1607 irq_masked = irq_stat & hpriv->port_map; in ahci_thunderx_irq_handler()
1622 struct ahci_host_priv *hpriv) in ahci_remap_check() argument
1633 !(readl(hpriv->mmio + AHCI_VSCAP) & 1)) in ahci_remap_check()
1636 cap = readq(hpriv->mmio + AHCI_REMAP_CAP); in ahci_remap_check()
1640 if (readl(hpriv->mmio + ahci_remap_dcc(i)) in ahci_remap_check()
1645 hpriv->remapped_nvme++; in ahci_remap_check()
1648 if (!hpriv->remapped_nvme) in ahci_remap_check()
1652 hpriv->remapped_nvme); in ahci_remap_check()
1660 hpriv->flags |= AHCI_HFLAG_NO_MSI; in ahci_remap_check()
1669 struct ahci_host_priv *hpriv) in ahci_init_msi() argument
1673 if (hpriv->flags & AHCI_HFLAG_NO_MSI) in ahci_init_msi()
1685 if (!(readl(hpriv->mmio + HOST_CTL) & HOST_MRSM)) { in ahci_init_msi()
1686 hpriv->get_irq_vector = ahci_get_irq_vector; in ahci_init_msi()
1687 hpriv->flags |= AHCI_HFLAG_MULTI_MSI; in ahci_init_msi()
1713 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_mark_external_port() local
1719 if (((tmp & PORT_CMD_ESP) && (hpriv->cap & HOST_CAP_SXS)) || in ahci_mark_external_port()
1726 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_update_initial_lpm_policy() local
1755 if (hpriv->cap & HOST_CAP_PART) in ahci_update_initial_lpm_policy()
1757 else if (hpriv->cap & HOST_CAP_SSC) in ahci_update_initial_lpm_policy()
1766 static void ahci_intel_pcs_quirk(struct pci_dev *pdev, struct ahci_host_priv *hpriv) in ahci_intel_pcs_quirk() argument
1770 if (!(hpriv->flags & AHCI_HFLAG_INTEL_PCS_QUIRK)) in ahci_intel_pcs_quirk()
1782 if ((tmp16 & hpriv->port_map) != hpriv->port_map) { in ahci_intel_pcs_quirk()
1783 tmp16 |= hpriv->port_map; in ahci_intel_pcs_quirk()
1793 struct ahci_host_priv *hpriv = host->private_data; in remapped_nvme_show() local
1795 return sysfs_emit(buf, "%u\n", hpriv->remapped_nvme); in remapped_nvme_show()
1806 struct ahci_host_priv *hpriv; in ahci_init_one() local
1878 hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); in ahci_init_one()
1879 if (!hpriv) in ahci_init_one()
1881 hpriv->flags |= (unsigned long)pi.private_data; in ahci_init_one()
1886 hpriv->flags |= AHCI_HFLAG_NO_MSI; in ahci_init_one()
1890 hpriv->flags &= ~AHCI_HFLAG_IGN_SERR_INTERNAL; in ahci_init_one()
1894 hpriv->flags &= ~AHCI_HFLAG_32BIT_ONLY; in ahci_init_one()
1896 hpriv->mmio = pcim_iomap_table(pdev)[ahci_pci_bar]; in ahci_init_one()
1899 ahci_remap_check(pdev, ahci_pci_bar, hpriv); in ahci_init_one()
1909 hpriv->flags |= AHCI_HFLAG_NO_SXS; in ahci_init_one()
1912 hpriv->irq_handler = ahci_thunderx_irq_handler; in ahci_init_one()
1916 ahci_pci_save_initial_config(pdev, hpriv); in ahci_init_one()
1919 if (hpriv->cap & HOST_CAP_NCQ) { in ahci_init_one()
1927 if (!(hpriv->flags & AHCI_HFLAG_NO_FPDMA_AA)) in ahci_init_one()
1939 if (hpriv->cap & HOST_CAP_PMP) in ahci_init_one()
1942 ahci_set_em_messages(hpriv, &pi); in ahci_init_one()
1957 hpriv->flags |= AHCI_HFLAG_NO_SUSPEND; in ahci_init_one()
1963 hpriv->flags |= AHCI_HFLAG_SRST_TOUT_IS_OFFLINE; in ahci_init_one()
1970 acer_sa5_271_workaround(hpriv, pdev); in ahci_init_one()
1977 n_ports = max(ahci_nr_ports(hpriv->cap), fls(hpriv->port_map)); in ahci_init_one()
1984 host->private_data = hpriv; in ahci_init_one()
1986 if (ahci_init_msi(pdev, n_ports, hpriv) < 0) { in ahci_init_one()
1990 hpriv->irq = pci_irq_vector(pdev, 0); in ahci_init_one()
1992 if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss) in ahci_init_one()
1997 if (!(hpriv->cap & HOST_CAP_PART)) in ahci_init_one()
2000 if (!(hpriv->cap & HOST_CAP_SSC)) in ahci_init_one()
2003 if (!(hpriv->cap2 & HOST_CAP2_SDS)) in ahci_init_one()
2018 ap->em_message_type = hpriv->em_msg_type; in ahci_init_one()
2025 if (!(hpriv->port_map & (1 << i))) in ahci_init_one()
2036 rc = ahci_configure_dma_masks(pdev, hpriv); in ahci_init_one()