Quirk out the first test in the beginning of wdcprobe(); the Vaio

CD-ROM drive doesn't like it for some reason.
This commit is contained in:
kenh 1998-11-18 19:12:08 +00:00
parent f50fecdeaf
commit 58932a8415
1 changed files with 20 additions and 19 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: wdc.c,v 1.39 1998/11/11 19:38:27 bouyer Exp $ */ /* $NetBSD: wdc.c,v 1.40 1998/11/18 19:12:08 kenh Exp $ */
/* /*
@ -181,26 +181,27 @@ wdcprobe(chp)
* Sanity check to see if the wdc channel responds at all. * Sanity check to see if the wdc channel responds at all.
*/ */
bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, if ((chp->wdc->cap & WDC_CAPABILITY_NO_EXTRA_RESETS) == 0) {
WDSD_IBM); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
delay(1); WDSD_IBM);
st0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status); delay(1);
bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, st0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status);
WDSD_IBM | 0x10); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
delay(1); WDSD_IBM | 0x10);
st1 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status); 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", WDCDEBUG_PRINT(("%s:%d: before reset, st0=0x%x, st1=0x%x\n",
chp->wdc ? chp->wdc->sc_dev.dv_xname : "wdcprobe", chp->channel, chp->wdc ? chp->wdc->sc_dev.dv_xname : "wdcprobe", chp->channel,
st0, st1), DEBUG_PROBE); st0, st1), DEBUG_PROBE);
if (st0 == 0xff)
ret_value &= ~0x01;
if (st1 == 0xff)
ret_value &= ~0x02;
if (ret_value == 0)
return 0;
if (st0 == 0xff)
ret_value &= ~0x01;
if (st1 == 0xff)
ret_value &= ~0x02;
if (ret_value == 0)
return 0;
}
/* assert SRST, wait for reset to complete */ /* assert SRST, wait for reset to complete */
bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh,
WDSD_IBM); WDSD_IBM);