Date: Mon, 23 Aug 2004 22:25:27 -0700 From: Brian Rogers <burpmaster@truffula.net> To: freebsd-current@freebsd.org Subject: ATAPI_RESET hang fix Message-ID: <412AD147.7050502@truffula.net>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------020609060909080609050002 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I was getting the hang on start after the "ATAPI_RESET time = x" message. I stuck in a diagnostic printf before the ATAPI_RESET, and that actually fixed the hang. So I replaced it with a DELAY(50), and that also avoids the hang. I guess some ATAPI devices don't like being reset right after being queried. (Or there is a bug with handling that in FreeBSD) Patch is attached. --------------020609060909080609050002 Content-Type: text/plain; name="ata-patch.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ata-patch.diff" --- ata-all.c.orig Tue Aug 24 04:39:52 2004 +++ ata-all.c Tue Aug 24 04:40:05 2004 @@ -624,6 +624,7 @@ if (ata_getparam(&ch->device[SLAVE], ATA_ATAPI_IDENTIFY)) ch->devices &= ~ATA_ATAPI_SLAVE; else { + DELAY(50); ata_controlcmd(&ch->device[SLAVE], ATA_ATAPI_RESET, 0, 0, 0); switch (ch->device[SLAVE].param->config & ATA_ATAPI_TYPE_MASK) { #ifdef DEV_ATAPICD @@ -656,6 +657,7 @@ if (ata_getparam(&ch->device[MASTER], ATA_ATAPI_IDENTIFY)) ch->devices &= ~ATA_ATAPI_MASTER; else { + DELAY(50); ata_controlcmd(&ch->device[MASTER], ATA_ATAPI_RESET, 0, 0, 0); switch (ch->device[MASTER].param->config & ATA_ATAPI_TYPE_MASK) { #ifdef DEV_ATAPICD --------------020609060909080609050002--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?412AD147.7050502>