Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[linux-6.6.y] ata: libata: disabling PhyRdy Change Interrupt based on actual LPM capability #264

Merged

Conversation

leoliu-oc
Copy link
Contributor

@leoliu-oc leoliu-oc commented Jun 13, 2024

zhaoxin inclusion
category: bugfix
CVE: NA


The ahci spec mentions that PhyRdy Change Interrupt and Link Power Management (LPM) do not coexist.

However, before enabling LPM, the driver did not check whether the host supports LPM, but directly disabled PhyRdy Change Interrupt.

Increase the judgment on the actual support of LPM, and disable PhyRdy Change Interrupt only when it is supported.

…pability

zhaoxin inclusion
category: bugfix
CVE: NA

-----------------

The ahci spec mentions that PhyRdy Change Interrupt and Link Power
Management (LPM) do not coexist.

However, before enabling LPM, the driver did not check whether the host
supports LPM, but directly disabled PhyRdy Change Interrupt.

Increase the judgment on the actual support of LPM, and disable PhyRdy
Change Interrupt only when it is supported.

Signed-off-by: leoliu-oc <[email protected]>
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zccrs for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
Copy link

Hi @leoliu-oc. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@leoliu-oc leoliu-oc changed the title [linux-6.6.y] ata: libata: disabling PhyRdy Change Interrupt based on actual LPM ca… [linux-6.6.y] ata: libata: disabling PhyRdy Change Interrupt based on actual LPM capability Jun 13, 2024
@opsiff
Copy link
Member

opsiff commented Jun 25, 2024

/ok-to-test

@opsiff opsiff merged commit a8ede05 into deepin-community:linux-6.6.y Jun 25, 2024
2 of 3 checks passed
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 在新增代码中,对pdev的检查使用了!device || !dev_is_pci(device),建议使用dev_is_pci(device)来判断device是否为PCI设备,以避免潜在的逻辑错误。
  • 新增代码中,对pdev的检查使用了to_pci_dev(device),需要确认to_pci_dev函数的正确性,以确保返回的pdev是有效的。
  • 新增代码中,对pdev的检查使用了pdev->vendor == PCI_VENDOR_ID_ZHAOXIN,需要确认PCI_VENDOR_ID_ZHAOXIN是否是一个有效的PCI制造商ID常量。
  • 新增代码中,对ap->host->flags的检查使用了ATA_HOST_NO_PART | ATA_HOST_NO_SSC | ATA_HOST_NO_DEVSLP,需要确保这些标志是正确的,并且不会引起逻辑错误。
  • 新增代码中,对link->flags & ATA_LFLAG_NO_LPM的检查使用了!IS_ENABLED(CONFIG_SATA_HOST),需要确保IS_ENABLED函数的正确性,以确保逻辑正确性。

是否建议立即修改:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants