Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ata-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata

Pull ata fix from Damien Le Moal:
"A single fix to address an issue with wake from suspend with PCS
adapters, from Adam"

* tag 'ata-6.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
ata: ahci: Fix PCS quirk application for suspend

+23 -9
+23 -9
drivers/ata/ahci.c
··· 83 83 static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 84 84 static void ahci_remove_one(struct pci_dev *dev); 85 85 static void ahci_shutdown_one(struct pci_dev *dev); 86 + static void ahci_intel_pcs_quirk(struct pci_dev *pdev, struct ahci_host_priv *hpriv); 86 87 static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class, 87 88 unsigned long deadline); 88 89 static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class, ··· 677 676 ahci_save_initial_config(&pdev->dev, hpriv); 678 677 } 679 678 679 + static int ahci_pci_reset_controller(struct ata_host *host) 680 + { 681 + struct pci_dev *pdev = to_pci_dev(host->dev); 682 + struct ahci_host_priv *hpriv = host->private_data; 683 + int rc; 684 + 685 + rc = ahci_reset_controller(host); 686 + if (rc) 687 + return rc; 688 + 689 + /* 690 + * If platform firmware failed to enable ports, try to enable 691 + * them here. 692 + */ 693 + ahci_intel_pcs_quirk(pdev, hpriv); 694 + 695 + return 0; 696 + } 697 + 680 698 static void ahci_pci_init_controller(struct ata_host *host) 681 699 { 682 700 struct ahci_host_priv *hpriv = host->private_data; ··· 890 870 struct ata_host *host = pci_get_drvdata(pdev); 891 871 int rc; 892 872 893 - rc = ahci_reset_controller(host); 873 + rc = ahci_pci_reset_controller(host); 894 874 if (rc) 895 875 return rc; 896 876 ahci_pci_init_controller(host); ··· 926 906 ahci_mcp89_apple_enable(pdev); 927 907 928 908 if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { 929 - rc = ahci_reset_controller(host); 909 + rc = ahci_pci_reset_controller(host); 930 910 if (rc) 931 911 return rc; 932 912 ··· 1804 1784 /* save initial config */ 1805 1785 ahci_pci_save_initial_config(pdev, hpriv); 1806 1786 1807 - /* 1808 - * If platform firmware failed to enable ports, try to enable 1809 - * them here. 1810 - */ 1811 - ahci_intel_pcs_quirk(pdev, hpriv); 1812 - 1813 1787 /* prepare host */ 1814 1788 if (hpriv->cap & HOST_CAP_NCQ) { 1815 1789 pi.flags |= ATA_FLAG_NCQ; ··· 1913 1899 if (rc) 1914 1900 return rc; 1915 1901 1916 - rc = ahci_reset_controller(host); 1902 + rc = ahci_pci_reset_controller(host); 1917 1903 if (rc) 1918 1904 return rc; 1919 1905