version 1.74.6.1, 1999/12/27 18:34:53 |
version 1.75, 1999/10/20 15:22:26 |
|
|
continue; |
continue; |
|
|
/* Issue a IDENTIFY command, to try to detect slave ghost */ |
/* Issue a IDENTIFY command, to try to detect slave ghost */ |
error = ata_get_params(&chp->ch_drive[i], AT_POLL, ¶ms); |
if (ata_get_params(&chp->ch_drive[i], AT_POLL, ¶ms) == |
if (error == CMD_OK) { |
CMD_OK) { |
/* If IDENTIFY succeded, this is not an OLD ctrl */ |
/* If IDENTIFY succeded, this is not an OLD ctrl */ |
chp->ch_drive[0].drive_flags &= ~DRIVE_OLD; |
chp->ch_drive[0].drive_flags &= ~DRIVE_OLD; |
chp->ch_drive[1].drive_flags &= ~DRIVE_OLD; |
chp->ch_drive[1].drive_flags &= ~DRIVE_OLD; |
} else { |
} else { |
chp->ch_drive[i].drive_flags &= |
chp->ch_drive[i].drive_flags &= |
~(DRIVE_ATA | DRIVE_ATAPI); |
~(DRIVE_ATA | DRIVE_ATAPI); |
WDCDEBUG_PRINT(("%s:%d:%d: IDENTIFY failed (%d)\n", |
WDCDEBUG_PRINT(("%s:%d:%d: IDENTIFY failed\n", |
chp->wdc->sc_dev.dv_xname, |
chp->wdc->sc_dev.dv_xname, |
chp->channel, i, error), DEBUG_PROBE); |
chp->channel, i), DEBUG_PROBE); |
if ((chp->ch_drive[i].drive_flags & DRIVE_OLD) == 0) |
if ((chp->ch_drive[i].drive_flags & DRIVE_OLD) == 0) |
continue; |
continue; |
/* |
/* |
|
|
{ |
{ |
struct channel_softc *chp = arg; |
struct channel_softc *chp = arg; |
struct wdc_xfer *xfer; |
struct wdc_xfer *xfer; |
int ret; |
|
|
|
if ((chp->ch_flags & WDCF_IRQ_WAIT) == 0) { |
if ((chp->ch_flags & WDCF_IRQ_WAIT) == 0) { |
WDCDEBUG_PRINT(("wdcintr: inactive controller\n"), DEBUG_INTR); |
WDCDEBUG_PRINT(("wdcintr: inactive controller\n"), DEBUG_INTR); |
|
|
WDCDEBUG_PRINT(("wdcintr\n"), DEBUG_INTR); |
WDCDEBUG_PRINT(("wdcintr\n"), DEBUG_INTR); |
chp->ch_flags &= ~WDCF_IRQ_WAIT; |
chp->ch_flags &= ~WDCF_IRQ_WAIT; |
xfer = chp->ch_queue->sc_xfer.tqh_first; |
xfer = chp->ch_queue->sc_xfer.tqh_first; |
ret = xfer->c_intr(chp, xfer, 1); |
return xfer->c_intr(chp, xfer, 1); |
if (ret == 0) /* irq was not for us, still waiting for irq */ |
|
chp->ch_flags |= WDCF_IRQ_WAIT; |
|
return (ret); |
|
} |
} |
|
|
/* Put all disk in RESET state */ |
/* Put all disk in RESET state */ |
Line 821 wdcwait(chp, mask, bits, timeout) |
|
Line 817 wdcwait(chp, mask, bits, timeout) |
|
break; |
break; |
if (++time > timeout) { |
if (++time > timeout) { |
WDCDEBUG_PRINT(("wdcwait: timeout, status %x " |
WDCDEBUG_PRINT(("wdcwait: timeout, status %x " |
"error %x (mask 0x%x bits 0x%x)\n", status, |
"error %x\n", status, |
bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, |
bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, |
wd_error), mask, bits), |
wd_error)), |
DEBUG_STATUS | DEBUG_PROBE); |
DEBUG_STATUS); |
return -1; |
return -1; |
} |
} |
delay(WDCDELAY); |
delay(WDCDELAY); |