summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2014-03-18 23:17:28 +0000
committerkettenis <kettenis@openbsd.org>2014-03-18 23:17:28 +0000
commitafd382d569860a5a8d0970d58ad2d0ebf52c6a19 (patch)
tree1e3d9d183d63fc8ec147feb30ef08a972cd6401e
parentRetire hp300, mvme68k and mvme88k ports. These ports have no users, keeping (diff)
downloadwireguard-openbsd-afd382d569860a5a8d0970d58ad2d0ebf52c6a19.tar.xz
wireguard-openbsd-afd382d569860a5a8d0970d58ad2d0ebf52c6a19.zip
Remove timeout logic from the polling loop. It causes more problems than it
solves, and hopefully timeouts won't happen anymore now that we clear interrupts before checking the response in pointer. Fixes problems on my alpha where spinning up one of the disks takes longer than the timeout value.
-rw-r--r--sys/dev/ic/qlw.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/dev/ic/qlw.c b/sys/dev/ic/qlw.c
index 5e6946bf06a..8f53245a4ce 100644
--- a/sys/dev/ic/qlw.c
+++ b/sys/dev/ic/qlw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qlw.c,v 1.18 2014/03/16 10:36:44 kettenis Exp $ */
+/* $OpenBSD: qlw.c,v 1.19 2014/03/18 23:17:28 kettenis Exp $ */
/*
* Copyright (c) 2011 David Gwynne <dlg@openbsd.org>
@@ -905,20 +905,11 @@ qlw_scsi_cmd(struct scsi_xfer *xs)
SIMPLEQ_INIT(&list);
do {
ccb = qlw_scsi_cmd_poll(sc);
- if (ccb == NULL) {
- printf("TO 0x%02x\n", xs->cmd->opcode);
- break;
- }
SIMPLEQ_INSERT_TAIL(&list, ccb, ccb_link);
} while (xs->io != ccb);
mtx_leave(&sc->sc_queue_mtx);
- if (xs->io != ccb) {
- xs->error = XS_DRIVER_STUFFUP;
- scsi_done(xs);
- }
-
while ((ccb = SIMPLEQ_FIRST(&list)) != NULL) {
SIMPLEQ_REMOVE_HEAD(&list, ccb_link);
scsi_done(ccb->ccb_xs);
@@ -930,9 +921,8 @@ qlw_scsi_cmd_poll(struct qlw_softc *sc)
{
u_int16_t rspin;
struct qlw_ccb *ccb = NULL;
- int i = 50000;
- while (ccb == NULL && --i > 0) {
+ while (ccb == NULL) {
u_int16_t isr, info;
delay(100);