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 309434 Details for
Bug 451586
RHEL5.3: SB600/700 SATA controller PMP support
[?]
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]
SB600/700 SATA PMP support for RHEL5.2
SBX00_SATA_PMP_support_RHEL5.2_v2.patch (text/plain), 5.45 KB, created by
Shane Huang
on 2008-06-16 02:26:45 UTC
(
hide
)
Description:
SB600/700 SATA PMP support for RHEL5.2
Filename:
MIME Type:
Creator:
Shane Huang
Created:
2008-06-16 02:26:45 UTC
Size:
5.45 KB
patch
obsolete
>There is one bug in ATI SATA PMP of SB600 and SB700 old revision, which leads >to soft reset failure. This patch can fix the bug and has been backported to >RedHat RHEL5.2. > >Signed-off-by: Shane Huang <shane.huang@amd.com> > >diff -ruN a/drivers/ata/ahci.c b/drivers/ata/ahci.c >--- a/drivers/ata/ahci.c 2008-06-12 17:31:13.000000000 +0800 >+++ b/drivers/ata/ahci.c 2008-06-13 14:24:08.000000000 +0800 >@@ -187,6 +187,7 @@ > AHCI_HFLAG_NO_PMP = (1 << 6), /* no PMP */ > AHCI_HFLAG_NO_HOTPLUG = (1 << 7), /* ignore PxSERR.DIAG.N */ > AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */ >+ AHCI_HFLAG_IGN_PMP_IPMS = (1 << 9), /* ignore PxIS.IPMS */ > > /* ap->flags bits */ > >@@ -254,6 +255,7 @@ > static void ahci_error_handler(struct ata_port *ap); > static void ahci_vt8251_error_handler(struct ata_port *ap); > static void ahci_p5wdh_error_handler(struct ata_port *ap); >+static void ahci_sb600_error_handler(struct ata_port *ap); > static void ahci_post_internal_cmd(struct ata_queued_cmd *qc); > static int ahci_port_resume(struct ata_port *ap); > static void ahci_dev_config(struct ata_device *dev); >@@ -397,6 +399,44 @@ > .port_stop = ahci_port_stop, > }; > >+static const struct ata_port_operations ahci_sb600_ops = { >+ .check_status = ahci_check_status, >+ .check_altstatus = ahci_check_status, >+ .dev_select = ata_noop_dev_select, >+ >+ .dev_config = ahci_dev_config, >+ >+ .tf_read = ahci_tf_read, >+ >+ .qc_defer = sata_pmp_qc_defer_cmd_switch, >+ .qc_prep = ahci_qc_prep, >+ .qc_issue = ahci_qc_issue, >+ >+ .irq_clear = ahci_irq_clear, >+ >+ .scr_read = ahci_scr_read, >+ .scr_write = ahci_scr_write, >+ >+ .freeze = ahci_freeze, >+ .thaw = ahci_thaw, >+ >+ .error_handler = ahci_sb600_error_handler, >+ .post_internal_cmd = ahci_post_internal_cmd, >+ >+ .pmp_attach = ahci_pmp_attach, >+ .pmp_detach = ahci_pmp_detach, >+ >+#ifdef CONFIG_PM >+ .port_suspend = ahci_port_suspend, >+ .port_resume = ahci_port_resume, >+#endif >+ .enable_pm = ahci_enable_alpm, >+ .disable_pm = ahci_disable_alpm, >+ >+ .port_start = ahci_port_start, >+ .port_stop = ahci_port_stop, >+}; >+ > #define AHCI_HFLAGS(flags) .private_data = (void *)(flags) > > static const struct ata_port_info ahci_port_info[] = { >@@ -430,12 +470,12 @@ > { > AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | > AHCI_HFLAG_32BIT_ONLY | >- AHCI_HFLAG_SECT255 | AHCI_HFLAG_NO_PMP), >+ AHCI_HFLAG_SECT255 | AHCI_HFLAG_IGN_PMP_IPMS), > .flags = AHCI_FLAG_COMMON, > .link_flags = AHCI_LFLAG_COMMON, > .pio_mask = 0x1f, /* pio0-4 */ > .udma_mask = ATA_UDMA6, >- .port_ops = &ahci_ops, >+ .port_ops = &ahci_sb600_ops, > }, > /* board_ahci_mv */ > { >@@ -451,12 +491,12 @@ > /* board_ahci_sb700 */ > { > AHCI_HFLAGS (AHCI_HFLAG_IGN_SERR_INTERNAL | >- AHCI_HFLAG_NO_PMP), >+ AHCI_HFLAG_IGN_PMP_IPMS), > .flags = AHCI_FLAG_COMMON, > .link_flags = AHCI_LFLAG_COMMON, > .pio_mask = 0x1f, /* pio0-4 */ > .udma_mask = ATA_UDMA6, >- .port_ops = &ahci_ops, >+ .port_ops = &ahci_sb600_ops, > }, > }; > >@@ -1287,10 +1327,13 @@ > int pmp, unsigned long deadline) > { > struct ata_port *ap = link->ap; >+ struct ahci_host_priv *hpriv = ap->host->private_data; >+ void __iomem *port_mmio = ahci_port_base(ap); > const char *reason = NULL; > unsigned long now, msecs; > struct ata_taskfile tf; > int rc; >+ u32 irq_sts; > > DPRINTK("ENTER\n"); > >@@ -1332,6 +1375,21 @@ > /* wait a while before checking status */ > ata_wait_after_reset(ap, deadline); > >+ /* Soft reset fails on some chips with IPMS set when PMP is >+ * enabled and SATA HDD/ODD is connected to SATA port. >+ * There is no need to check TFDATA if BAD PMP is found due >+ * to HW bug, which can save timeout delay. >+ */ >+ if ((hpriv->flags & AHCI_HFLAG_IGN_PMP_IPMS) && >+ (pmp == SATA_PMP_CTRL_PORT)) { >+ irq_sts = readl(port_mmio + PORT_IRQ_STAT); >+ if (irq_sts & PORT_IRQ_BAD_PMP) { >+ reason = "bad pmp with IPMS"; >+ rc = -EIO; >+ goto fail; >+ } >+ } >+ > rc = ata_wait_ready(ap, deadline); > /* link occupied, -ENODEV too is an error */ > if (rc) { >@@ -1359,6 +1417,36 @@ > return ahci_do_softreset(link, class, pmp, deadline); > } > >+static int ahci_sb600_softreset(struct ata_link *link, unsigned int *class, >+ unsigned long deadline) >+{ >+ struct ata_port *ap = link->ap; >+ void __iomem *port_mmio = ahci_port_base(ap); >+ int pmp = 0; >+ int rc = 0; >+ u32 irq_sts; >+ >+ if (link->ap->flags & ATA_FLAG_PMP) >+ pmp = SATA_PMP_CTRL_PORT; >+ >+ rc = ahci_do_softreset(link, class, pmp, deadline); >+ >+ /* >+ * Soft reset fails on some ATI chips with IPMS set when PMP >+ * is enabled but SATA HDD/ODD is connected to SATA port, >+ * do soft reset again to port 0. >+ */ >+ if (rc == -EIO) { >+ irq_sts = readl(port_mmio + PORT_IRQ_STAT); >+ if (irq_sts & PORT_IRQ_BAD_PMP) { >+ ata_link_printk(link, KERN_WARNING, >+ "failed due to HW bug, retry pmp=0\n"); >+ rc = ahci_do_softreset(link, class, 0, deadline); >+ } >+ } >+ return rc; >+} >+ > static int ahci_hardreset(struct ata_link *link, unsigned int *class, > unsigned long deadline) > { >@@ -1878,6 +1966,21 @@ > ahci_postreset); > } > >+static void ahci_sb600_error_handler(struct ata_port *ap) >+{ >+ if (!(ap->pflags & ATA_PFLAG_FROZEN)) { >+ /* restart engine */ >+ ahci_stop_engine(ap); >+ ahci_start_engine(ap); >+ } >+ >+ /* perform recovery */ >+ sata_pmp_do_eh(ap, ata_std_prereset, ahci_sb600_softreset, >+ ahci_hardreset, ahci_postreset, >+ sata_pmp_std_prereset, ahci_sb600_softreset, >+ sata_pmp_std_hardreset, sata_pmp_std_postreset); >+} >+ > static void ahci_post_internal_cmd(struct ata_queued_cmd *qc) > { > struct ata_port *ap = qc->ap;
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 451586
: 309434 |
314171
|
314172
|
314174
|
314285
|
314369
|
314371