Created attachment 319985 [details] Force IDE mode to AHCI mode at S3 resume +++ This bug was initially created as a clone of Bug #432652 +++ AMD chipset dev, team has been moving towards unifying SB600/700/800 support. This patch was approved by Jeff Garzik and is necessary to initialize ans set SATA mode correctly. http://marc.info/?l=linux-pci&m=120193321032703&w=2 --- Additional comment from bnagendr on 2008-02-18 12:32:21 EDT --- This patch is a bug fix and will affect future SBs. The bug is S3 resume failed when you put SATA disk 2nd port and set SATA type as native IDE. The root cause is we have not correctly set operating mode when resume. Is this sufficient to push it into R5.2? --- Additional comment from rpacheco on 2008-02-18 14:20:52 EDT --- We have an HP dx2450 with the SB700 that can be used for validation. --- Additional comment from peterm on 2008-02-18 14:29:06 EDT --- The system is in my office ready for testing. --- Additional comment from bnagendr on 2008-02-18 16:35:45 EDT --- Created an attachment (id=295210) Proposed SATA IDE patch to fix resume issue The patch for RHEL5.2 will have to include the pci_fixups_resume and resume_early implementation. I've attached the backport I have come up with so far. --- Additional comment from bnagendr on 2008-02-18 16:39:08 EDT --- Shane, Please look through this patch for completeness and provide the upstream patch set that adds the resume and resume_early implementation. Once I have the complete back port done I would ask you to test on RHEL5 as well. Also, do we need resume_early and it's counterpart suspend_late? Or does the latter have no bearing to the chipset resume issue? Ideally we want the smallest patch set necessary to fix the issue. Regards, Bhavana --- Additional comment from bnagendr on 2008-03-14 14:30:16 EDT --- Russ, please add the master tracker. Just when we thought we were done with R5.2... --- Additional comment from mjenner on 2008-03-14 17:08:30 EDT --- Need the usual bullet items answered for an exception request post beta kernel: 1) business justification 2) patch status, is patch upstream 3) the intended patch attached to the bz or a clear pointer to said 4) current testing status 5) test plan QE Can't ack without this data. --- Additional comment from crane.cai on 2008-03-16 21:04:38 EDT --- Hi Bhavana, This backport of PCI_RESUME_FIXUP is well. (In reply to comment #5) > Shane, > > Please look through this patch for completeness and provide the upstream patch > set that adds the resume and resume_early implementation. Once I have the > complete back port done I would ask you to test on RHEL5 as well. > > Also, do we need resume_early and it's counterpart suspend_late? Or does the > latter have no bearing to the chipset resume issue? > > Ideally we want the smallest patch set necessary to fix the issue. > > Regards, > Bhavana --- Additional comment from shane.huang on 2008-03-17 04:12:02 EDT --- upstream commit: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux- 2.6.git;a=commit;h=05a7d22b9f02e7fe8fb5ff972b46743948139b3c --- Additional comment from richard.zhao on 2008-03-21 04:39:45 EDT --- Created an attachment (id=298778) ahci driver side fix patch 1) business justification We found the s3 resume failed issue exists in RHEL 5.2 beta. The patch is for AMD SB600/SB700, which is already be seen in market. So it's very urgent for us to have it be supported in RHEL5.2. 2) patch status, is patch upstream Upstream has accepted the patch, see Comment#9. 3) the intended patch attached to the bz or a clear pointer to said If we use the upstream patch, we needs back port pci_fixups_resume. But when we back port it, we find it involve too much of power management subsystem (resume_early). So I think it's better for redhat to back port pci_fixups_resume. If pci_fixups_resume will not be back ported, we can also fix the issue on ahci driver side. Please see the attached ahci driver side fix patch. 4) current testing status ahci driver side fix patch is under test by AMD QA, and will be finished in next week. 5) test plan Do acpi test to check whether the issue is fixed. --- Additional comment from bnagendr on 2008-03-21 11:09:39 EDT --- Thanks Richard for the answering Martin's bulleted items. I want to clarify the patch that we want in RHEL5.2 a bit more. We are sensitive to the fact that R5.2 is post beta and want to make the least lines of change that would still fix the issue but not introduce a massive change. The upstream patch as is will need (as Richard described) resume early changes in the PM subsystems. Instead we have chosen to use the existing AHCI resume function and adding the relevant code to that function. The brew build is being tested at AMD http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1222747 The 32-bit test have completed with successful results. The 64-bit test results will be available Monday. I will submit the patch to RHML after the 64-bit results are in as well. If there are any more questions please let us know. --- Additional comment from bnagendr on 2008-03-24 15:28:40 EDT --- Posted to RHML on Mar 24. --- Additional comment from bnagendr on 2008-03-24 15:30:25 EDT --- Both 32-bit and 64-bit test results are done and the brew build works for all SATA ports, both native IDE and Legacy IDE. Please provide the BZ ACKs. --- Additional comment from dzickus on 2008-04-02 12:09:14 EDT --- in kernel-2.6.18-88.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5 --- Additional comment from errata-xmlrpc on 2008-05-21 11:09:26 EDT --- An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0314.html
REOPEN this bug for RHEL5.3 because RedHat lost this bug during the update to sata driver, which leads to S3 resume failure again! The patch has been attached, which was generated with kernel 2.6.18-118, please add it ASAP. Thanks
Updated flags.
This bugzilla has Keywords: Regression. Since no regressions are allowed between releases, it is also being proposed as a blocker for this release. Please resolve ASAP.
RHEL5.3 Alpha released last week uses kernel -118, which contains the bug. I wonder whether this bug will be fixed by RHEL5.3 Beta to be released this month? Thanks
Jeff and Russell, There is no update to this BZ these days, are you going to add the patch to RHEL5.3 Beta? So that our QA can verify it with Beta. Thanks Shane
Issue #234266 has been created on RedHat Issue Tracker for this bug. please check it.
*** Bug 469140 has been marked as a duplicate of this bug. ***
This patch is still missing in RHEL5.3 Snapshot2 (kernel -122), neither the next version kernel -123, please pursue it further.
Hello Shane, Would you please do a quick test with kernel-2.6.18-123.el5.bz466422.1? When updating the RHEL5.3 ahci driver I did not carry forward Bhavana's ahci changes that went into RHEL5.2, sorry about that. Thanks. http://people.redhat.com/dmilburn/
Shane, Also, do we need check for other device IDs besides 0x4380 and 0x4390, the ahci driver supports other SB700/800 devices? Can you please provide more details, why do we not need to check for 0x4391 thru 0x4395? Thanks, David
Hi David, Please take a look to drivers/pci/quirks.c static void __devinit quirk_amd_ide_mode(struct pci_dev *pdev) { /* set sb600/sb700/sb800 sata to ahci mode */ u8 tmp; pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp); if (tmp == 0x01) { pci_read_config_byte(pdev, 0x40, &tmp); pci_write_config_byte(pdev, 0x40, tmp|1); pci_write_config_byte(pdev, 0x9, 1); pci_write_config_byte(pdev, 0xa, 6); pci_write_config_byte(pdev, 0x40, tmp); pdev->class = PCI_CLASS_STORAGE_SATA_AHCI; printk(KERN_INFO "PCI: set SATA to AHCI mode\n"); } } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); This function above forces SB600/SB700 IDE mode(0x4380/0x4390) into AHCI mode to use ahci driver. But the "force" will get lost at ACPI S3 resume, that's why we need to create this BZ and and the fixup patch for S3 resume. As to 0x4391~4395, they are not IDE mode, which need NOT the fixup at S3 resume of course. Thanks,
David, kernel-2.6.18-123.el5.bz466422.1 can work on my SB700 platform, please help to add the patch to RHEL5.3 kernel. Thanks
Thank you Shane, I have submitted for internal review.
in kernel-2.6.18-125.el5 You can download this test kernel from http://people.redhat.com/dzickus/el5
Verified with kernel-2.6.18-125.el5, thanks.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2009-0225.html