diff options
author | Tejun Heo <htejun@gmail.com> | 2007-08-06 05:36:22 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:30 -0400 |
commit | 9af5c9c97dc9d599281778864c72b385f0c63341 (patch) | |
tree | 8359986bd42c4a9a5b1993078aa9ee4c7971ac3d /drivers/ata/sata_sil.c | |
parent | 640fdb504941fa2b9f6f274716fc9f97f2bf6bff (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_sil.c')
-rw-r--r-- | drivers/ata/sata_sil.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 8c72e714b456..2ddbe4cc71e4 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c | |||
@@ -312,7 +312,7 @@ static int sil_set_mode (struct ata_port *ap, struct ata_device **r_failed) | |||
312 | return rc; | 312 | return rc; |
313 | 313 | ||
314 | for (i = 0; i < 2; i++) { | 314 | for (i = 0; i < 2; i++) { |
315 | dev = &ap->device[i]; | 315 | dev = &ap->link.device[i]; |
316 | if (!ata_dev_enabled(dev)) | 316 | if (!ata_dev_enabled(dev)) |
317 | dev_mode[i] = 0; /* PIO0/1/2 */ | 317 | dev_mode[i] = 0; /* PIO0/1/2 */ |
318 | else if (dev->flags & ATA_DFLAG_PIO) | 318 | else if (dev->flags & ATA_DFLAG_PIO) |
@@ -374,8 +374,8 @@ static int sil_scr_write(struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
374 | 374 | ||
375 | static void sil_host_intr(struct ata_port *ap, u32 bmdma2) | 375 | static void sil_host_intr(struct ata_port *ap, u32 bmdma2) |
376 | { | 376 | { |
377 | struct ata_eh_info *ehi = &ap->eh_info; | 377 | struct ata_eh_info *ehi = &ap->link.eh_info; |
378 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); | 378 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->link.active_tag); |
379 | u8 status; | 379 | u8 status; |
380 | 380 | ||
381 | if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) { | 381 | if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) { |
@@ -394,8 +394,8 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2) | |||
394 | * repeat probing needlessly. | 394 | * repeat probing needlessly. |
395 | */ | 395 | */ |
396 | if (!(ap->pflags & ATA_PFLAG_FROZEN)) { | 396 | if (!(ap->pflags & ATA_PFLAG_FROZEN)) { |
397 | ata_ehi_hotplugged(&ap->eh_info); | 397 | ata_ehi_hotplugged(&ap->link.eh_info); |
398 | ap->eh_info.serror |= serror; | 398 | ap->link.eh_info.serror |= serror; |
399 | } | 399 | } |
400 | 400 | ||
401 | goto freeze; | 401 | goto freeze; |
@@ -562,8 +562,8 @@ static void sil_thaw(struct ata_port *ap) | |||
562 | */ | 562 | */ |
563 | static void sil_dev_config(struct ata_device *dev) | 563 | static void sil_dev_config(struct ata_device *dev) |
564 | { | 564 | { |
565 | struct ata_port *ap = dev->ap; | 565 | struct ata_port *ap = dev->link->ap; |
566 | int print_info = ap->eh_context.i.flags & ATA_EHI_PRINTINFO; | 566 | int print_info = ap->link.eh_context.i.flags & ATA_EHI_PRINTINFO; |
567 | unsigned int n, quirks = 0; | 567 | unsigned int n, quirks = 0; |
568 | unsigned char model_num[ATA_ID_PROD_LEN + 1]; | 568 | unsigned char model_num[ATA_ID_PROD_LEN + 1]; |
569 | 569 | ||