diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/atapiscsi/atapiscsi.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index 83de610b14b..c4e79eda6ab 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.86 2010/01/05 12:17:54 dlg Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.87 2010/01/11 00:00:53 krw Exp $ */ /* * This code is derived from code with the copyright below. @@ -327,7 +327,7 @@ wdc_atapi_send_cmd(sc_xfer) struct channel_softc *chp = as->chp; struct ata_drive_datas *drvp = &chp->ch_drive[as->drive]; struct wdc_xfer *xfer; - int s, ret = SUCCESSFULLY_QUEUED; + int s; int idx; WDCDEBUG_PRINT(("wdc_atapi_send_cmd %s:%d:%d start\n", @@ -425,16 +425,12 @@ wdc_atapi_send_cmd(sc_xfer) } wdc_exec_xfer(chp, xfer); - if (xfer->c_flags & C_POLL) { -#ifdef DIAGNOSTIC - if ((sc_xfer->flags & ITSDONE) == 0) - panic("wdc_atapi_send_cmd: polled command not done"); -#endif - scsi_done(sc_xfer); - ret = COMPLETE; - } splx(s); - return (ret); + + if (xfer->c_flags & C_POLL) + return (COMPLETE); + else + return (SUCCESSFULLY_QUEUED); } void @@ -1575,16 +1571,12 @@ wdc_atapi_done(chp, xfer, timeout, ret) (u_int)xfer->c_flags, sc_xfer->error), DEBUG_XFERS); WDC_LOG_ATAPI_DONE(chp, xfer->drive, xfer->c_flags, sc_xfer->error); - sc_xfer->flags |= ITSDONE; - - if (xfer->c_flags & C_POLL) { + if (xfer->c_flags & C_POLL) wdc_enable_intr(chp); - } else { - WDCDEBUG_PRINT(("wdc_atapi_done: scsi_done\n"), DEBUG_XFERS); - s = splbio(); - scsi_done(sc_xfer); - splx(s); - } + + s = splbio(); + scsi_done(sc_xfer); + splx(s); xfer->next = NULL; return; |