Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Dec 1997 20:58:19 +0100 (MET)
From:      Søren Schmidt <sos@FreeBSD.dk>
To:        deischen@iworks.interworks.org (Daniel M. Eischen)
Cc:        freebsd-hackers@FreeBSD.ORG, freebsd-mobile@FreeBSD.ORG
Subject:   Re: Fix for slow reacting ATAPI CD-ROM
Message-ID:  <199712021958.UAA01466@sos.freebsd.dk>
In-Reply-To: <199712021813.MAA10260@iworks.InterWorks.org> from "Daniel M. Eischen" at "Dec 2, 97 12:13:54 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
In reply to Daniel M. Eischen who wrote:
> 
> Please forgive the cross-post, wasn't sure where this belongs.  
> 
> I have a new ChemUSA Chembook and everything works fine
> except for the CD-ROM drive, which times out waiting 
> for the command phase in atapi_wait_cmd().  I was able
> to get it to work by increasing the wait count to 3000.
> 
>         /* Wait for DRQ from 50 usec to 3 msec for slow devices */
>         int cnt = ata->intrcmd ? 10000 : ata->slow ? 3000 : 50;
>         int ireason = 0, phase = 0;
> 
> +       cnt = 3000;
> + 
> 	/* Wait for command phase. */
> 	for (; cnt>0; cnt-=10) {
> 		ireason = inb (ata->port + AR_IREASON);
> 
> Obviously, this drive isn't detected as a slow device (I
> can post the boot messages later if needed).  What I wanted
> to do was to add a config flag for setting this, but it doesn't
> look like that is sent down to the atapi driver.
> 
> Question: Can we change atapi_attach() to accept a 4th argument
>           and use this to pass config flags from wdattach() in
>           wd.c?  Is there another method I should be using to
>           handle atapi device quirks?

Hmm, I think that atapi_attach should be educated on how to treat
this device, test for model make etc, and then set the slow bit...
This is the place to do quirks for atapi CDROM device.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Søren Schmidt               (sos@FreeBSD.org)               FreeBSD Core Team
                Even more code to hack -- will it ever end
..



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712021958.UAA01466>