aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-08-06 05:36:22 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:30 -0400
commit9af5c9c97dc9d599281778864c72b385f0c63341 (patch)
tree8359986bd42c4a9a5b1993078aa9ee4c7971ac3d /drivers/ata/sata_mv.c
parent640fdb504941fa2b9f6f274716fc9f97f2bf6bff (diff)
libata-link: introduce ata_link
Introduce ata_link. It abstracts PHY and sits between ata_port and ata_device. This new level of abstraction is necessary to support SATA Port Multiplier, which basically adds a bunch of links (PHYs) to a ATA host port. Fields related to command execution, spd_limit and EH are per-link and thus moved to ata_link. This patch only defines the host link. Multiple link handling will be added later. Also, a lot of ap->link derefences are added but many of them will be removed as each part is converted to deal directly with ata_link instead of ata_port. This patch introduces no behavior change. Signed-off-by: Tejun Heo <htejun@gmail.com> Cc: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r--drivers/ata/sata_mv.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index d9832e234e44..246e7c5fdce8 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1415,7 +1415,7 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
1415 struct mv_host_priv *hpriv = ap->host->private_data; 1415 struct mv_host_priv *hpriv = ap->host->private_data;
1416 unsigned int edma_enabled = (pp->pp_flags & MV_PP_FLAG_EDMA_EN); 1416 unsigned int edma_enabled = (pp->pp_flags & MV_PP_FLAG_EDMA_EN);
1417 unsigned int action = 0, err_mask = 0; 1417 unsigned int action = 0, err_mask = 0;
1418 struct ata_eh_info *ehi = &ap->eh_info; 1418 struct ata_eh_info *ehi = &ap->link.eh_info;
1419 1419
1420 ata_ehi_clear_desc(ehi); 1420 ata_ehi_clear_desc(ehi);
1421 1421
@@ -1508,7 +1508,7 @@ static void mv_intr_pio(struct ata_port *ap)
1508 return; 1508 return;
1509 1509
1510 /* get active ATA command */ 1510 /* get active ATA command */
1511 qc = ata_qc_from_tag(ap, ap->active_tag); 1511 qc = ata_qc_from_tag(ap, ap->link.active_tag);
1512 if (unlikely(!qc)) /* no active tag */ 1512 if (unlikely(!qc)) /* no active tag */
1513 return; 1513 return;
1514 if (qc->tf.flags & ATA_TFLAG_POLLING) /* polling; we don't own qc */ 1514 if (qc->tf.flags & ATA_TFLAG_POLLING) /* polling; we don't own qc */
@@ -1543,7 +1543,7 @@ static void mv_intr_edma(struct ata_port *ap)
1543 1543
1544 /* 50xx: get active ATA command */ 1544 /* 50xx: get active ATA command */
1545 if (IS_GEN_I(hpriv)) 1545 if (IS_GEN_I(hpriv))
1546 tag = ap->active_tag; 1546 tag = ap->link.active_tag;
1547 1547
1548 /* Gen II/IIE: get active ATA command via tag, to enable 1548 /* Gen II/IIE: get active ATA command via tag, to enable
1549 * support for queueing. this works transparently for 1549 * support for queueing. this works transparently for
@@ -1646,7 +1646,7 @@ static void mv_host_intr(struct ata_host *host, u32 relevant, unsigned int hc)
1646 if (unlikely(have_err_bits)) { 1646 if (unlikely(have_err_bits)) {
1647 struct ata_queued_cmd *qc; 1647 struct ata_queued_cmd *qc;
1648 1648
1649 qc = ata_qc_from_tag(ap, ap->active_tag); 1649 qc = ata_qc_from_tag(ap, ap->link.active_tag);
1650 if (qc && (qc->tf.flags & ATA_TFLAG_POLLING)) 1650 if (qc && (qc->tf.flags & ATA_TFLAG_POLLING))
1651 continue; 1651 continue;
1652 1652
@@ -1688,14 +1688,14 @@ static void mv_pci_error(struct ata_host *host, void __iomem *mmio)
1688 for (i = 0; i < host->n_ports; i++) { 1688 for (i = 0; i < host->n_ports; i++) {
1689 ap = host->ports[i]; 1689 ap = host->ports[i];
1690 if (!ata_port_offline(ap)) { 1690 if (!ata_port_offline(ap)) {
1691 ehi = &ap->eh_info; 1691 ehi = &ap->link.eh_info;
1692 ata_ehi_clear_desc(ehi); 1692 ata_ehi_clear_desc(ehi);
1693 if (!printed++) 1693 if (!printed++)
1694 ata_ehi_push_desc(ehi, 1694 ata_ehi_push_desc(ehi,
1695 "PCI err cause 0x%08x", err_cause); 1695 "PCI err cause 0x%08x", err_cause);
1696 err_mask = AC_ERR_HOST_BUS; 1696 err_mask = AC_ERR_HOST_BUS;
1697 ehi->action = ATA_EH_HARDRESET; 1697 ehi->action = ATA_EH_HARDRESET;
1698 qc = ata_qc_from_tag(ap, ap->active_tag); 1698 qc = ata_qc_from_tag(ap, ap->link.active_tag);
1699 if (qc) 1699 if (qc)
1700 qc->err_mask |= err_mask; 1700 qc->err_mask |= err_mask;
1701 else 1701 else
@@ -2269,7 +2269,7 @@ comreset_retry:
2269static int mv_prereset(struct ata_port *ap, unsigned long deadline) 2269static int mv_prereset(struct ata_port *ap, unsigned long deadline)
2270{ 2270{
2271 struct mv_port_priv *pp = ap->private_data; 2271 struct mv_port_priv *pp = ap->private_data;
2272 struct ata_eh_context *ehc = &ap->eh_context; 2272 struct ata_eh_context *ehc = &ap->link.eh_context;
2273 int rc; 2273 int rc;
2274 2274
2275 rc = mv_stop_dma(ap); 2275 rc = mv_stop_dma(ap);