Unverified Commit 1087e901 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!3176 [OLK-6.6] Turning off Zhaoxin ahci controller runtime pm

Merge Pull Request from: @leoliu-oc 
 
There exits some problems with enabling ahci controller runtime pm on various Zhaoxin platforms.
	
For some Zhaoxin CPUs, link into listen mode, and PHY into P2, which will cause the device to continuously send comminit. When the controller is in D3, the comminit will continuously wake up the controller, resulting in the controller being unable to stabilize at D3;

For another Zhaoxin CPUs, after entering and exiting runtime pm for a certain number of times, ahci controller reset accumulates for many times, which will make ahci and PXPTRF P2CW think that the other party can no longer receive requests and block the P2CW path, resulting in failure to recognize the device;

There are alse some Zhaoxin CPUs, the test is normal, but considering that the server platform is not sensitive to power consumption, and this part has very little impact on power consumption;

In summary, it is recommended to close the zx ahci controller runtime pm.

### Issue
https://gitee.com/openeuler/kernel/issues/I8WZ2Y

### Test
Pass: When importing a patch, the controller remains at D0 and the disk is always detected, which is expected. 
 
Link:https://gitee.com/openeuler/kernel/pulls/3176

 

Reviewed-by: default avatarYihang Li <liyihang9@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parents 3fd47296 02f56f77
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -900,6 +900,11 @@ static int ahci_pci_device_runtime_suspend(struct device *dev)
	struct pci_dev *pdev = to_pci_dev(dev);
	struct ata_host *host = pci_get_drvdata(pdev);

	if (pdev->vendor == PCI_VENDOR_ID_ZHAOXIN && pdev->revision <= 0x20) {
		dev_err(&pdev->dev, "zx ahci controller does not support runtime pm!\n");
		return -EIO;
	}

	ahci_pci_disable_interrupts(host);
	return 0;
}