Lines Matching refs:hpriv
87 static void ahci_intel_pcs_quirk(struct pci_dev *pdev, struct ahci_host_priv *hpriv);
659 struct ahci_host_priv *hpriv) in ahci_pci_save_initial_config() argument
663 hpriv->force_port_map = 1; in ahci_pci_save_initial_config()
671 if (hpriv->flags & AHCI_HFLAG_MV_PATA) { in ahci_pci_save_initial_config()
673 hpriv->mask_port_map = 0x3; in ahci_pci_save_initial_config()
675 hpriv->mask_port_map = 0xf; in ahci_pci_save_initial_config()
680 ahci_save_initial_config(&pdev->dev, hpriv); in ahci_pci_save_initial_config()
686 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_reset_controller() local
697 ahci_intel_pcs_quirk(pdev, hpriv); in ahci_pci_reset_controller()
704 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_init_controller() local
710 if (hpriv->flags & AHCI_HFLAG_MV_PATA) { in ahci_pci_init_controller()
733 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_vt8251_hardreset() local
739 hpriv->stop_engine(ap); in ahci_vt8251_hardreset()
744 hpriv->start_engine(ap); in ahci_vt8251_hardreset()
759 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_p5wdh_hardreset() local
765 hpriv->stop_engine(ap); in ahci_p5wdh_hardreset()
775 hpriv->start_engine(ap); in ahci_p5wdh_hardreset()
820 struct ahci_host_priv *hpriv = ap->host->private_data; in ahci_avn_hardreset() local
829 hpriv->stop_engine(ap); in ahci_avn_hardreset()
861 hpriv->start_engine(ap); in ahci_avn_hardreset()
874 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_disable_interrupts() local
875 void __iomem *mmio = hpriv->mmio; in ahci_pci_disable_interrupts()
915 struct ahci_host_priv *hpriv = host->private_data; in ahci_pci_device_suspend() local
917 if (hpriv->flags & AHCI_HFLAG_NO_SUSPEND) { in ahci_pci_device_suspend()
1475 static void acer_sa5_271_workaround(struct ahci_host_priv *hpriv, in acer_sa5_271_workaround() argument
1491 if ((hpriv->saved_cap & 0xC734FF00) == 0xC734FF00) { in acer_sa5_271_workaround()
1492 hpriv->port_map = 0x7; in acer_sa5_271_workaround()
1493 hpriv->cap = 0xC734FF02; in acer_sa5_271_workaround()
1507 struct ahci_host_priv *hpriv; in ahci_thunderx_irq_handler() local
1513 hpriv = host->private_data; in ahci_thunderx_irq_handler()
1514 mmio = hpriv->mmio; in ahci_thunderx_irq_handler()
1520 irq_masked = irq_stat & hpriv->port_map; in ahci_thunderx_irq_handler()
1535 struct ahci_host_priv *hpriv) in ahci_remap_check() argument
1546 !(readl(hpriv->mmio + AHCI_VSCAP) & 1)) in ahci_remap_check()
1549 cap = readq(hpriv->mmio + AHCI_REMAP_CAP); in ahci_remap_check()
1553 if (readl(hpriv->mmio + ahci_remap_dcc(i)) in ahci_remap_check()
1558 hpriv->remapped_nvme++; in ahci_remap_check()
1561 if (!hpriv->remapped_nvme) in ahci_remap_check()
1565 hpriv->remapped_nvme); in ahci_remap_check()
1573 hpriv->flags |= AHCI_HFLAG_NO_MSI; in ahci_remap_check()
1582 struct ahci_host_priv *hpriv) in ahci_init_msi() argument
1586 if (hpriv->flags & AHCI_HFLAG_NO_MSI) in ahci_init_msi()
1598 if (!(readl(hpriv->mmio + HOST_CTL) & HOST_MRSM)) { in ahci_init_msi()
1599 hpriv->get_irq_vector = ahci_get_irq_vector; in ahci_init_msi()
1600 hpriv->flags |= AHCI_HFLAG_MULTI_MSI; in ahci_init_msi()
1625 struct ahci_host_priv *hpriv) in ahci_update_initial_lpm_policy() argument
1631 if (!(hpriv->flags & AHCI_HFLAG_IS_MOBILE)) in ahci_update_initial_lpm_policy()
1643 if (hpriv->cap & HOST_CAP_PART) in ahci_update_initial_lpm_policy()
1645 else if (hpriv->cap & HOST_CAP_SSC) in ahci_update_initial_lpm_policy()
1655 static void ahci_intel_pcs_quirk(struct pci_dev *pdev, struct ahci_host_priv *hpriv) in ahci_intel_pcs_quirk() argument
1679 if ((tmp16 & hpriv->port_map) != hpriv->port_map) { in ahci_intel_pcs_quirk()
1680 tmp16 |= hpriv->port_map; in ahci_intel_pcs_quirk()
1690 struct ahci_host_priv *hpriv = host->private_data; in remapped_nvme_show() local
1692 return sprintf(buf, "%u\n", hpriv->remapped_nvme); in remapped_nvme_show()
1703 struct ahci_host_priv *hpriv; in ahci_init_one() local
1777 hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL); in ahci_init_one()
1778 if (!hpriv) in ahci_init_one()
1780 hpriv->flags |= (unsigned long)pi.private_data; in ahci_init_one()
1785 hpriv->flags |= AHCI_HFLAG_NO_MSI; in ahci_init_one()
1789 hpriv->flags &= ~AHCI_HFLAG_IGN_SERR_INTERNAL; in ahci_init_one()
1793 hpriv->flags &= ~AHCI_HFLAG_32BIT_ONLY; in ahci_init_one()
1795 hpriv->mmio = pcim_iomap_table(pdev)[ahci_pci_bar]; in ahci_init_one()
1798 ahci_remap_check(pdev, ahci_pci_bar, hpriv); in ahci_init_one()
1806 hpriv->flags |= AHCI_HFLAG_NO_DEVSLP; in ahci_init_one()
1812 hpriv->flags |= AHCI_HFLAG_NO_SXS; in ahci_init_one()
1815 hpriv->irq_handler = ahci_thunderx_irq_handler; in ahci_init_one()
1819 ahci_pci_save_initial_config(pdev, hpriv); in ahci_init_one()
1822 if (hpriv->cap & HOST_CAP_NCQ) { in ahci_init_one()
1830 if (!(hpriv->flags & AHCI_HFLAG_NO_FPDMA_AA)) in ahci_init_one()
1842 if (hpriv->cap & HOST_CAP_PMP) in ahci_init_one()
1845 ahci_set_em_messages(hpriv, &pi); in ahci_init_one()
1860 hpriv->flags |= AHCI_HFLAG_NO_SUSPEND; in ahci_init_one()
1866 hpriv->flags |= AHCI_HFLAG_SRST_TOUT_IS_OFFLINE; in ahci_init_one()
1873 acer_sa5_271_workaround(hpriv, pdev); in ahci_init_one()
1880 n_ports = max(ahci_nr_ports(hpriv->cap), fls(hpriv->port_map)); in ahci_init_one()
1885 host->private_data = hpriv; in ahci_init_one()
1887 if (ahci_init_msi(pdev, n_ports, hpriv) < 0) { in ahci_init_one()
1891 hpriv->irq = pci_irq_vector(pdev, 0); in ahci_init_one()
1893 if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss) in ahci_init_one()
1898 if (!(hpriv->cap & HOST_CAP_PART)) in ahci_init_one()
1901 if (!(hpriv->cap & HOST_CAP_SSC)) in ahci_init_one()
1904 if (!(hpriv->cap2 & HOST_CAP2_SDS)) in ahci_init_one()
1919 ap->em_message_type = hpriv->em_msg_type; in ahci_init_one()
1921 ahci_update_initial_lpm_policy(ap, hpriv); in ahci_init_one()
1924 if (!(hpriv->port_map & (1 << i))) in ahci_init_one()
1935 rc = ahci_configure_dma_masks(pdev, hpriv->cap & HOST_CAP_64); in ahci_init_one()