diff options
author | Tejun Heo <htejun@gmail.com> | 2007-08-06 05:36:23 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-12 14:55:31 -0400 |
commit | cc0680a580b5be81a1ca321b58f8e9b80b5c1052 (patch) | |
tree | 57454cdfdc9890f4e8d9f532e9cd240c7361951f /drivers/ata/sata_inic162x.c | |
parent | 955e57dfde4ff75e4d7329ac7a3d645b16015309 (diff) |
libata-link: linkify reset
Make reset methods and related functions deal with ata_link instead of
ata_port.
* ata_do_reset()
* ata_eh_reset()
* all prereset/reset/postreset methods and related functions
This patch introduces no behavior change.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_inic162x.c')
-rw-r--r-- | drivers/ata/sata_inic162x.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c index f2b1bea934bc..95caba0f910e 100644 --- a/drivers/ata/sata_inic162x.c +++ b/drivers/ata/sata_inic162x.c | |||
@@ -417,12 +417,13 @@ static void inic_thaw(struct ata_port *ap) | |||
417 | * SRST and SControl hardreset don't give valid signature on this | 417 | * SRST and SControl hardreset don't give valid signature on this |
418 | * controller. Only controller specific hardreset mechanism works. | 418 | * controller. Only controller specific hardreset mechanism works. |
419 | */ | 419 | */ |
420 | static int inic_hardreset(struct ata_port *ap, unsigned int *class, | 420 | static int inic_hardreset(struct ata_link *link, unsigned int *class, |
421 | unsigned long deadline) | 421 | unsigned long deadline) |
422 | { | 422 | { |
423 | struct ata_port *ap = link->ap; | ||
423 | void __iomem *port_base = inic_port_base(ap); | 424 | void __iomem *port_base = inic_port_base(ap); |
424 | void __iomem *idma_ctl = port_base + PORT_IDMA_CTL; | 425 | void __iomem *idma_ctl = port_base + PORT_IDMA_CTL; |
425 | const unsigned long *timing = sata_ehc_deb_timing(&ap->link.eh_context); | 426 | const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context); |
426 | u16 val; | 427 | u16 val; |
427 | int rc; | 428 | int rc; |
428 | 429 | ||
@@ -435,15 +436,15 @@ static int inic_hardreset(struct ata_port *ap, unsigned int *class, | |||
435 | msleep(1); | 436 | msleep(1); |
436 | writew(val & ~IDMA_CTL_RST_ATA, idma_ctl); | 437 | writew(val & ~IDMA_CTL_RST_ATA, idma_ctl); |
437 | 438 | ||
438 | rc = sata_link_resume(&ap->link, timing, deadline); | 439 | rc = sata_link_resume(link, timing, deadline); |
439 | if (rc) { | 440 | if (rc) { |
440 | ata_port_printk(ap, KERN_WARNING, "failed to resume " | 441 | ata_link_printk(link, KERN_WARNING, "failed to resume " |
441 | "link after reset (errno=%d)\n", rc); | 442 | "link after reset (errno=%d)\n", rc); |
442 | return rc; | 443 | return rc; |
443 | } | 444 | } |
444 | 445 | ||
445 | *class = ATA_DEV_NONE; | 446 | *class = ATA_DEV_NONE; |
446 | if (ata_link_online(&ap->link)) { | 447 | if (ata_link_online(link)) { |
447 | struct ata_taskfile tf; | 448 | struct ata_taskfile tf; |
448 | 449 | ||
449 | /* wait a while before checking status */ | 450 | /* wait a while before checking status */ |
@@ -452,7 +453,7 @@ static int inic_hardreset(struct ata_port *ap, unsigned int *class, | |||
452 | rc = ata_wait_ready(ap, deadline); | 453 | rc = ata_wait_ready(ap, deadline); |
453 | /* link occupied, -ENODEV too is an error */ | 454 | /* link occupied, -ENODEV too is an error */ |
454 | if (rc) { | 455 | if (rc) { |
455 | ata_port_printk(ap, KERN_WARNING, "device not ready " | 456 | ata_link_printk(link, KERN_WARNING, "device not ready " |
456 | "after hardreset (errno=%d)\n", rc); | 457 | "after hardreset (errno=%d)\n", rc); |
457 | return rc; | 458 | return rc; |
458 | } | 459 | } |