From b1aff6c540ed2c26e713586f0965a019a20eb3bb Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Fri, 2 Feb 2007 15:29:52 +0900 Subject: [PATCH] --- yaml --- r: 47380 b: refs/heads/master c: fe334602a83463aff59ae24c4b3e808d650a3c80 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/ata/sata_inic162x.c | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index bea486a1d772..74df16c79f1f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 34fee227dd13af593be599b19683464ac4dd4c8b +refs/heads/master: fe334602a83463aff59ae24c4b3e808d650a3c80 diff --git a/trunk/drivers/ata/sata_inic162x.c b/trunk/drivers/ata/sata_inic162x.c index 170a10ad478f..c5335f422801 100644 --- a/trunk/drivers/ata/sata_inic162x.c +++ b/trunk/drivers/ata/sata_inic162x.c @@ -429,11 +429,6 @@ static int inic_hardreset(struct ata_port *ap, unsigned int *class) /* hammer it into sane state */ inic_reset_port(port_base); - if (ata_port_offline(ap)) { - *class = ATA_DEV_NONE; - return 0; - } - val = readw(idma_ctl); writew(val | IDMA_CTL_RST_ATA, idma_ctl); readw(idma_ctl); /* flush */ @@ -443,16 +438,17 @@ static int inic_hardreset(struct ata_port *ap, unsigned int *class) rc = sata_phy_resume(ap, timing); if (rc) { ata_port_printk(ap, KERN_WARNING, "failed to resume " - "link for reset (errno=%d)\n", rc); + "link after reset (errno=%d)\n", rc); return rc; } - msleep(150); - *class = ATA_DEV_NONE; if (ata_port_online(ap)) { struct ata_taskfile tf; + /* wait a while before checking status */ + msleep(150); + if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) { ata_port_printk(ap, KERN_WARNING, "device busy after hardreset\n");