Date: Sat, 22 Aug 2009 17:35:32 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 167617 for review Message-ID: <200908221735.n7MHZW1F015043@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=167617 Change 167617 by mav@mav_mavbook on 2009/08/22 17:34:58 Reduce reset time. Improve logging. Affected files ... .. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#49 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#49 (text+ko) ==== @@ -1599,7 +1599,7 @@ AHCI_P_IX_DP | AHCI_P_IX_UF | AHCI_P_IX_SDB | AHCI_P_IX_DS | AHCI_P_IX_PS | AHCI_P_IX_DHR)); if (bootverbose) - device_printf(dev, "AHCI reset done: devices=%08x\n", ch->devices); + device_printf(dev, "AHCI reset done: device found\n"); /* Tell the XPT about the event */ xpt_async(AC_BUS_RESET, ch->path, NULL); } @@ -1666,6 +1666,13 @@ ((status & ATA_SS_SPD_MASK) != ATA_SS_SPD_NO_SPEED) && ((status & ATA_SS_IPM_MASK) == ATA_SS_IPM_ACTIVE)) break; + if ((status & ATA_SS_DET_MASK) == ATA_SS_DET_PHY_OFFLINE) { + if (bootverbose) { + device_printf(ch->dev, "SATA offline status=%08x\n", + status); + } + return (0); + } DELAY(1000); } if (timeout >= 100) { @@ -1709,11 +1716,11 @@ ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_RESET | val | ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER); - DELAY(50000); + DELAY(5000); ATA_OUTL(ch->r_mem, AHCI_P_SCTL, ATA_SC_DET_IDLE | val | ((ch->pm_level > 0) ? 0 : (ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))); - DELAY(50000); + DELAY(5000); return (ahci_sata_connect(ch)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908221735.n7MHZW1F015043>