if (wdc_c->flags & AT_READ) {
if ((wdc_c->flags & AT_READ) && (chp->ch_status & WDCS_DRQ)) {
__wdccommand_intr(chp, xfer, irq)	struct channel_softc *chp;	struct wdc_xfer *xfer;	int irq;{	struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];	struct wdc_command *wdc_c = xfer->cmd;	int bcount = wdc_c->bcount;	char *data = wdc_c->data;	WDCDEBUG_PRINT(("__wdccommand_intr %s:%d:%d\n",	    chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive), DEBUG_INTR);	if (wdcwait(chp, wdc_c->r_st_pmask, wdc_c->r_st_pmask,	     (irq == 0)  ? wdc_c->timeout : 0)) {		if (irq && (xfer->c_flags & C_TIMEOU) == 0) 			return 0; /* IRQ was not for us */		wdc_c->flags |= AT_TIMEOU;		__wdccommand_done(chp, xfer);		WDCDEBUG_PRINT(("__wdccommand_intr returned\n"), DEBUG_INTR);		return 1;	}        if (chp->wdc->cap & WDC_CAPABILITY_IRQACK)                chp->wdc->irqack(chp);	if (wdc_c->flags & AT_READ) {		wdc_input_bytes(drvp, data, bcount);	} else if (wdc_c->flags & AT_WRITE) {		wdc_output_bytes(drvp, data, bcount);	}	__wdccommand_done(chp, xfer);	WDCDEBUG_PRINT(("__wdccommand_intr returned\n"), DEBUG_INTR);	return 1;}