Date: Sun, 10 Dec 2000 18:00:03 -0800 (PST) From: Eyal Soha <esoha@cisco.com> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/23409: CD-RW driver fails unless CD in drive at boot up Message-ID: <200012110200.eBB203b73338@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/23409; it has been noted by GNATS.
From: Eyal Soha <esoha@cisco.com>
To: freebsd-gnats-submit@FreeBSD.org, esoha@cisco.com
Cc:  
Subject: Re: kern/23409: CD-RW driver fails unless CD in drive at boot up
Date: Sun, 10 Dec 2000 17:53:21 -0800
 The error is in sys/dev/ata/atapi-cd.c, line 122:
 
     /* get drive capabilities, some drives needs this repeated */
     for (count = 0 ; count < 5 ; count++) {
 	if (!(error = acd_mode_sense(cdp, ATAPI_CDROM_CAP_PAGE,
 				     (caddr_t)&cdp->cap, sizeof(cdp->cap))))
 	    break;
     }
 
 For debugging purposes, I changed 5 to 0xffffff.
 
 When I have a CD installed in the drive or the CD-RW tray is open, I
 usually need only two or three retries.  When the CD-RW drive is
 closed and there is no CD in it, I need between 6400 and 6500 retries.
 The number of retries required fluctuates and drops significantly if I
 put a delay before the for() loop.  The drive is likely not ready by
 the time the ATAPI_CDROM_CAP_PAGE command is being issued.
 
 When the bug isn't being exhibited, the error returned by
 acd_mode_sense is 0x5.  (After getting error 0x5 once or twice, the
 drive responds properly.)
 
 When in the bug case (closed and empty CD-RW drive), the error
 returned on the first call to acd_mode_sense() is 0x5.  Subsequent
 calls all return 0x10 (between 0x400 and 0x440 times) until the final
 call which returns 0.
 
 -- 
 Eyal Soha <esoha@cisco.com>                    Work: (408) 527-9276
 Software Engineer                              Page: (800) 365-4578
 Cisco Systems <http://www.cisco.com>   Epage: esoha@epage.cisco.com
 
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012110200.eBB203b73338>
