Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 295210 Details for
Bug 432652
RHEL5.2: Modify SATA IDE mode quirk
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed SATA IDE patch to fix resume issue
RHEL5.2_SB700_SATA_IDE_quirk_resume.patch (text/plain), 4.43 KB, created by
Bhavna Sarathy
on 2008-02-18 21:35:45 UTC
(
hide
)
Description:
Proposed SATA IDE patch to fix resume issue
Filename:
MIME Type:
Creator:
Bhavna Sarathy
Created:
2008-02-18 21:35:45 UTC
Size:
4.43 KB
patch
obsolete
>--- linux-2.6.18.i386/include/asm-generic/vmlinux.lds.h.IDEquirkorig 2008-02-18 16:17:27.000000000 -0500 >+++ linux-2.6.18.i386/include/asm-generic/vmlinux.lds.h 2008-02-18 16:18:59.000000000 -0500 >@@ -35,6 +35,8 @@ > VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \ > *(.pci_fixup_enable) \ > VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \ >+ *(.pci_fixup_resume) \ >+ VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \ > } \ > \ > /* RapidIO route ops */ \ >--- linux-2.6.18.i386/include/linux/pci.h.IDEquirkorig 2008-02-18 16:12:56.000000000 -0500 >+++ linux-2.6.18.i386/include/linux/pci.h 2008-02-18 16:16:25.000000000 -0500 >@@ -810,6 +810,7 @@ enum pci_fixup_pass { > pci_fixup_header, /* After reading configuration header */ > pci_fixup_final, /* Final phase of device fixups */ > pci_fixup_enable, /* pci_enable_device() time */ >+ pci_fixup_resume, /* pci_enable_device() time */ > }; > > /* Anonymous variables would be nice... */ >@@ -828,7 +829,9 @@ enum pci_fixup_pass { > #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ > DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ > vendor##device##hook, vendor, device, hook) >- >+#define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \ >+ DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \ >+ resume##vendor##device##hook, vendor, device, hook) > > void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); > >--- linux-2.6.18.i386/drivers/pci/pci-driver.c.IDEquirkorig 2008-02-18 16:21:07.000000000 -0500 >+++ linux-2.6.18.i386/drivers/pci/pci-driver.c 2008-02-18 16:26:13.000000000 -0500 >@@ -313,6 +313,19 @@ static int pci_device_resume(struct devi > return error; > } > >+static int pci_device_resume_early(struct device * dev) >+{ >+ int error = 0; >+ struct pci_dev * pci_dev = to_pci_dev(dev); >+ struct pci_driver * drv = pci_dev->driver; >+ >+ pci_fixup_device(pci_fixup_resume, pci_dev); >+ >+ if (drv && drv->resume_early) >+ error = drv->resume_early(pci_dev); >+ return error; >+} >+ > static void pci_device_shutdown(struct device *dev) > { > struct pci_dev *pci_dev = to_pci_dev(dev); >@@ -509,6 +522,7 @@ struct bus_type pci_bus_type = { > .probe = pci_device_probe, > .remove = pci_device_remove, > .suspend = pci_device_suspend, >+ .resume_early = pci_device_resume_early, > .shutdown = pci_device_shutdown, > .resume = pci_device_resume, > .dev_attrs = pci_dev_attrs, >--- linux-2.6.18.i386/drivers/pci/quirks.c.IDEquirkorig 2008-02-18 15:54:20.000000000 -0500 >+++ linux-2.6.18.i386/drivers/pci/quirks.c 2008-02-18 16:20:37.000000000 -0500 >@@ -855,12 +855,13 @@ static void __init quirk_disable_pxb(str > DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb ); > > >-static void __devinit quirk_sb600_sata(struct pci_dev *pdev) >+static void __devinit quirk_amd_ide_mode(struct pci_dev *pdev) > { >- /* set sb600 sata to ahci mode */ >- if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) { >- u8 tmp; >- >+ /* 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); >@@ -868,10 +869,14 @@ static void __devinit quirk_sb600_sata(s > 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_sb600_sata); >-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_sb600_sata); >+ >+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_amd_ide_mode); >+DECLARE_PCI_FIXUP_RESUME(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); >+DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA, quirk_amd_ide_mode); > > /* > * Serverworks CSB5 IDE does not fully support native mode >@@ -1662,6 +1667,11 @@ void pci_fixup_device(enum pci_fixup_pas > end = __end_pci_fixups_enable; > break; > >+ case pci_fixup_resume: >+ start = __start_pci_fixups_resume; >+ end = __end_pci_fixups_resume; >+ break; >+ > default: > /* stupid compiler warning, you would think with an enum... */ > return;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 432652
: 295210 |
298778