diff options
author | Mark Lord <liml@rtr.ca> | 2008-04-16 14:56:51 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:56:08 -0400 |
commit | 17c5aab5b34e351531466e35b154ca86db7d46a9 (patch) | |
tree | 506cfb861eacf9b42e796a14285f321212bb518c /drivers/ata | |
parent | 0d8be5cbff8fd95da72d749a64e150b851f470c6 (diff) |
sata_mv cosmetics
More cosmetic cleanups to unclutter the changes needed for PMP support.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/sata_mv.c | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 3e2f779ae9c6..89a798221a6c 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -224,14 +224,20 @@ enum { | |||
224 | SATA_STATUS_OFS = 0x300, /* ctrl, err regs follow status */ | 224 | SATA_STATUS_OFS = 0x300, /* ctrl, err regs follow status */ |
225 | SATA_ACTIVE_OFS = 0x350, | 225 | SATA_ACTIVE_OFS = 0x350, |
226 | SATA_FIS_IRQ_CAUSE_OFS = 0x364, | 226 | SATA_FIS_IRQ_CAUSE_OFS = 0x364, |
227 | |||
227 | LTMODE_OFS = 0x30c, | 228 | LTMODE_OFS = 0x30c, |
229 | LTMODE_BIT8 = (1 << 8), /* unknown, but necessary */ | ||
230 | |||
228 | PHY_MODE3 = 0x310, | 231 | PHY_MODE3 = 0x310, |
229 | PHY_MODE4 = 0x314, | 232 | PHY_MODE4 = 0x314, |
230 | PHY_MODE2 = 0x330, | 233 | PHY_MODE2 = 0x330, |
231 | SATA_IFCTL_OFS = 0x344, | 234 | SATA_IFCTL_OFS = 0x344, |
232 | SATA_IFSTAT_OFS = 0x34c, | 235 | SATA_IFSTAT_OFS = 0x34c, |
233 | VENDOR_UNIQUE_FIS_OFS = 0x35c, | 236 | VENDOR_UNIQUE_FIS_OFS = 0x35c, |
237 | |||
234 | FIS_CFG_OFS = 0x360, | 238 | FIS_CFG_OFS = 0x360, |
239 | FIS_CFG_SINGLE_SYNC = (1 << 16), /* SYNC on DMA activation */ | ||
240 | |||
235 | MV5_PHY_MODE = 0x74, | 241 | MV5_PHY_MODE = 0x74, |
236 | MV5_LT_MODE = 0x30, | 242 | MV5_LT_MODE = 0x30, |
237 | MV5_PHY_CTL = 0x0C, | 243 | MV5_PHY_CTL = 0x0C, |
@@ -616,10 +622,10 @@ static const struct ata_port_info mv_port_info[] = { | |||
616 | .port_ops = &mv_iie_ops, | 622 | .port_ops = &mv_iie_ops, |
617 | }, | 623 | }, |
618 | { /* chip_soc */ | 624 | { /* chip_soc */ |
619 | .flags = MV_COMMON_FLAGS | MV_FLAG_SOC, | 625 | .flags = MV_COMMON_FLAGS | MV_FLAG_SOC, |
620 | .pio_mask = 0x1f, /* pio0-4 */ | 626 | .pio_mask = 0x1f, /* pio0-4 */ |
621 | .udma_mask = ATA_UDMA6, | 627 | .udma_mask = ATA_UDMA6, |
622 | .port_ops = &mv_iie_ops, | 628 | .port_ops = &mv_iie_ops, |
623 | }, | 629 | }, |
624 | }; | 630 | }; |
625 | 631 | ||
@@ -1377,7 +1383,8 @@ static unsigned int mv_qc_issue(struct ata_queued_cmd *qc) | |||
1377 | 1383 | ||
1378 | if ((qc->tf.protocol != ATA_PROT_DMA) && | 1384 | if ((qc->tf.protocol != ATA_PROT_DMA) && |
1379 | (qc->tf.protocol != ATA_PROT_NCQ)) { | 1385 | (qc->tf.protocol != ATA_PROT_NCQ)) { |
1380 | /* We're about to send a non-EDMA capable command to the | 1386 | /* |
1387 | * We're about to send a non-EDMA capable command to the | ||
1381 | * port. Turn off EDMA so there won't be problems accessing | 1388 | * port. Turn off EDMA so there won't be problems accessing |
1382 | * shadow block, etc registers. | 1389 | * shadow block, etc registers. |
1383 | */ | 1390 | */ |
@@ -2293,14 +2300,13 @@ static int mv_hardreset(struct ata_link *link, unsigned int *class, | |||
2293 | 2300 | ||
2294 | /* Workaround for errata FEr SATA#10 (part 2) */ | 2301 | /* Workaround for errata FEr SATA#10 (part 2) */ |
2295 | do { | 2302 | do { |
2296 | const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); | 2303 | const unsigned long *timing = |
2304 | sata_ehc_deb_timing(&link->eh_context); | ||
2297 | 2305 | ||
2298 | rc = sata_link_hardreset(link, timing, deadline + extra, &online, NULL); | 2306 | rc = sata_link_hardreset(link, timing, deadline + extra, |
2299 | if (rc) { | 2307 | &online, NULL); |
2300 | ata_link_printk(link, KERN_ERR, | 2308 | if (rc) |
2301 | "COMRESET failed (errno=%d)\n", rc); | ||
2302 | return rc; | 2309 | return rc; |
2303 | } | ||
2304 | sata_scr_read(link, SCR_STATUS, &sstatus); | 2310 | sata_scr_read(link, SCR_STATUS, &sstatus); |
2305 | if (!IS_GEN_I(hpriv) && ++attempts >= 5 && sstatus == 0x121) { | 2311 | if (!IS_GEN_I(hpriv) && ++attempts >= 5 && sstatus == 0x121) { |
2306 | /* Force 1.5gb/s link speed and try again */ | 2312 | /* Force 1.5gb/s link speed and try again */ |
@@ -2310,7 +2316,7 @@ static int mv_hardreset(struct ata_link *link, unsigned int *class, | |||
2310 | } | 2316 | } |
2311 | } while (sstatus != 0x0 && sstatus != 0x113 && sstatus != 0x123); | 2317 | } while (sstatus != 0x0 && sstatus != 0x113 && sstatus != 0x123); |
2312 | 2318 | ||
2313 | return online ? -EAGAIN : rc; | 2319 | return rc; |
2314 | } | 2320 | } |
2315 | 2321 | ||
2316 | static void mv_eh_freeze(struct ata_port *ap) | 2322 | static void mv_eh_freeze(struct ata_port *ap) |
@@ -2975,7 +2981,7 @@ MODULE_DESCRIPTION("SCSI low-level driver for Marvell SATA controllers"); | |||
2975 | MODULE_LICENSE("GPL"); | 2981 | MODULE_LICENSE("GPL"); |
2976 | MODULE_DEVICE_TABLE(pci, mv_pci_tbl); | 2982 | MODULE_DEVICE_TABLE(pci, mv_pci_tbl); |
2977 | MODULE_VERSION(DRV_VERSION); | 2983 | MODULE_VERSION(DRV_VERSION); |
2978 | MODULE_ALIAS("platform:sata_mv"); | 2984 | MODULE_ALIAS("platform:" DRV_NAME); |
2979 | 2985 | ||
2980 | #ifdef CONFIG_PCI | 2986 | #ifdef CONFIG_PCI |
2981 | module_param(msi, int, 0444); | 2987 | module_param(msi, int, 0444); |