aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_sil24.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_sil24.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_sil24.c')
-rw-r--r--drivers/ata/sata_sil24.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 233e88693395..2d8334e7921d 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -456,7 +456,7 @@ static int sil24_tag(int tag)
456 456
457static void sil24_dev_config(struct ata_device *dev) 457static void sil24_dev_config(struct ata_device *dev)
458{ 458{
459 void __iomem *port = dev->ap->ioaddr.cmd_addr; 459 void __iomem *port = dev->link->ap->ioaddr.cmd_addr;
460 460
461 if (dev->cdb_len == 16) 461 if (dev->cdb_len == 16)
462 writel(PORT_CS_CDB16, port + PORT_CTRL_STAT); 462 writel(PORT_CS_CDB16, port + PORT_CTRL_STAT);
@@ -609,7 +609,7 @@ static int sil24_do_softreset(struct ata_port *ap, unsigned int *class,
609 if (time_after(deadline, jiffies)) 609 if (time_after(deadline, jiffies))
610 timeout_msec = jiffies_to_msecs(deadline - jiffies); 610 timeout_msec = jiffies_to_msecs(deadline - jiffies);
611 611
612 ata_tf_init(ap->device, &tf); /* doesn't really matter */ 612 ata_tf_init(ap->link.device, &tf); /* doesn't really matter */
613 rc = sil24_exec_polled_cmd(ap, pmp, &tf, 0, PRB_CTRL_SRST, 613 rc = sil24_exec_polled_cmd(ap, pmp, &tf, 0, PRB_CTRL_SRST,
614 timeout_msec); 614 timeout_msec);
615 if (rc == -EBUSY) { 615 if (rc == -EBUSY) {
@@ -804,7 +804,7 @@ static void sil24_error_intr(struct ata_port *ap)
804{ 804{
805 void __iomem *port = ap->ioaddr.cmd_addr; 805 void __iomem *port = ap->ioaddr.cmd_addr;
806 struct sil24_port_priv *pp = ap->private_data; 806 struct sil24_port_priv *pp = ap->private_data;
807 struct ata_eh_info *ehi = &ap->eh_info; 807 struct ata_eh_info *ehi = &ap->link.eh_info;
808 int freeze = 0; 808 int freeze = 0;
809 u32 irq_stat; 809 u32 irq_stat;
810 810
@@ -856,7 +856,7 @@ static void sil24_error_intr(struct ata_port *ap)
856 } 856 }
857 857
858 /* record error info */ 858 /* record error info */
859 qc = ata_qc_from_tag(ap, ap->active_tag); 859 qc = ata_qc_from_tag(ap, ap->link.active_tag);
860 if (qc) { 860 if (qc) {
861 sil24_read_tf(ap, qc->tag, &pp->tf); 861 sil24_read_tf(ap, qc->tag, &pp->tf);
862 qc->err_mask |= err_mask; 862 qc->err_mask |= err_mask;
@@ -910,7 +910,7 @@ static inline void sil24_host_intr(struct ata_port *ap)
910 if (rc > 0) 910 if (rc > 0)
911 return; 911 return;
912 if (rc < 0) { 912 if (rc < 0) {
913 struct ata_eh_info *ehi = &ap->eh_info; 913 struct ata_eh_info *ehi = &ap->link.eh_info;
914 ehi->err_mask |= AC_ERR_HSM; 914 ehi->err_mask |= AC_ERR_HSM;
915 ehi->action |= ATA_EH_SOFTRESET; 915 ehi->action |= ATA_EH_SOFTRESET;
916 ata_port_freeze(ap); 916 ata_port_freeze(ap);
@@ -921,7 +921,7 @@ static inline void sil24_host_intr(struct ata_port *ap)
921 if (!(ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) && ata_ratelimit()) 921 if (!(ap->flags & SIL24_FLAG_PCIX_IRQ_WOC) && ata_ratelimit())
922 ata_port_printk(ap, KERN_INFO, "spurious interrupt " 922 ata_port_printk(ap, KERN_INFO, "spurious interrupt "
923 "(slot_stat 0x%x active_tag %d sactive 0x%x)\n", 923 "(slot_stat 0x%x active_tag %d sactive 0x%x)\n",
924 slot_stat, ap->active_tag, ap->sactive); 924 slot_stat, ap->link.active_tag, ap->link.sactive);
925} 925}
926 926
927static irqreturn_t sil24_interrupt(int irq, void *dev_instance) 927static irqreturn_t sil24_interrupt(int irq, void *dev_instance)
@@ -963,7 +963,7 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance)
963 963
964static void sil24_error_handler(struct ata_port *ap) 964static void sil24_error_handler(struct ata_port *ap)
965{ 965{
966 struct ata_eh_context *ehc = &ap->eh_context; 966 struct ata_eh_context *ehc = &ap->link.eh_context;
967 967
968 if (sil24_init_port(ap)) { 968 if (sil24_init_port(ap)) {
969 ata_eh_freeze_port(ap); 969 ata_eh_freeze_port(ap);