aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_scc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/pata_scc.c')
-rw-r--r--drivers/ata/pata_scc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index 4e006d74bef8..7f4cb76ed9fa 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -585,7 +585,7 @@ static int scc_wait_after_reset(struct ata_link *link, unsigned int devmask,
585 * Note: Original code is ata_bus_softreset(). 585 * Note: Original code is ata_bus_softreset().
586 */ 586 */
587 587
588static unsigned int scc_bus_softreset(struct ata_port *ap, unsigned int devmask, 588static int scc_bus_softreset(struct ata_port *ap, unsigned int devmask,
589 unsigned long deadline) 589 unsigned long deadline)
590{ 590{
591 struct ata_ioports *ioaddr = &ap->ioaddr; 591 struct ata_ioports *ioaddr = &ap->ioaddr;
@@ -599,9 +599,7 @@ static unsigned int scc_bus_softreset(struct ata_port *ap, unsigned int devmask,
599 udelay(20); 599 udelay(20);
600 out_be32(ioaddr->ctl_addr, ap->ctl); 600 out_be32(ioaddr->ctl_addr, ap->ctl);
601 601
602 scc_wait_after_reset(&ap->link, devmask, deadline); 602 return scc_wait_after_reset(&ap->link, devmask, deadline);
603
604 return 0;
605} 603}
606 604
607/** 605/**
@@ -618,7 +616,8 @@ static int scc_softreset(struct ata_link *link, unsigned int *classes,
618{ 616{
619 struct ata_port *ap = link->ap; 617 struct ata_port *ap = link->ap;
620 unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS; 618 unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS;
621 unsigned int devmask = 0, err_mask; 619 unsigned int devmask = 0;
620 int rc;
622 u8 err; 621 u8 err;
623 622
624 DPRINTK("ENTER\n"); 623 DPRINTK("ENTER\n");
@@ -634,9 +633,9 @@ static int scc_softreset(struct ata_link *link, unsigned int *classes,
634 633
635 /* issue bus reset */ 634 /* issue bus reset */
636 DPRINTK("about to softreset, devmask=%x\n", devmask); 635 DPRINTK("about to softreset, devmask=%x\n", devmask);
637 err_mask = scc_bus_softreset(ap, devmask, deadline); 636 rc = scc_bus_softreset(ap, devmask, deadline);
638 if (err_mask) { 637 if (rc) {
639 ata_port_err(ap, "SRST failed (err_mask=0x%x)\n", err_mask); 638 ata_port_err(ap, "SRST failed (err_mask=0x%x)\n", rc);
640 return -EIO; 639 return -EIO;
641 } 640 }
642 641