Subject: Re: CDROM detection (again)
To: None <jonathan@DSG.Stanford.EDU>
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
List: current-users
Date: 11/12/1998 15:32:42
Okay, I figured out the problem (at least, for me).
There is a section of code in wdc:wdcprobe() right in the beginning:
/*
* Sanity check to see if the wdc channel responds at all.
*/
bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
WDSD_IBM);
delay(1);
st0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status);
bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
WDSD_IBM | 0x10);
delay(1);
st1 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status);
WDCDEBUG_PRINT(("%s:%d: before reset, st0=0x%x, st1=0x%x\n",
chp->wdc ? chp->wdc->sc_dev.dv_xname : "wdcprobe", chp->channel,
st0, st1), DEBUG_PROBE);
if (st0 == 0xff)
ret_value &= ~0x01;
if (st1 == 0xff)
ret_value &= ~0x02;
if (ret_value == 0)
return 0;
#ifdef'ing this code out made my CD-ROM drive start working. Jonathan,
can you see if this works for you?
Manuel, do you have any ideas? I will agree that my CD-ROM drive is
cranky, and I'm willing to quirk this code ... but should it even be
there? I think that other OS's IDE drivers don't do this.
--Ken