aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/tws
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2013-09-24 16:50:53 +0000
committerScott Long <scottl@FreeBSD.org>2013-09-24 16:50:53 +0000
commit185884259b58c3ef8203268c1c201095c7170d63 (patch)
treeccab290b4cfbac27db6123e5df329c2ca4e9a641 /sys/dev/tws
parentfebdb468801f35e51c6c5c22221cfce9197c6f3b (diff)
Notes
Diffstat (limited to 'sys/dev/tws')
-rw-r--r--sys/dev/tws/tws.c1
-rw-r--r--sys/dev/tws/tws_cam.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c
index 409631f28b48..6ebde7574448 100644
--- a/sys/dev/tws/tws.c
+++ b/sys/dev/tws/tws.c
@@ -696,6 +696,7 @@ tws_init_reqs(struct tws_softc *sc, u_int32_t dma_mem_size)
sc->reqs[i].cmd_pkt->hdr.header_desc.size_header = 128;
+ callout_handle_init(&sc->reqs[i].thandle);
sc->reqs[i].state = TWS_REQ_STATE_FREE;
if ( i >= TWS_RESERVED_REQS )
tws_q_insert_tail(sc, &sc->reqs[i], TWS_FREE_Q);
diff --git a/sys/dev/tws/tws_cam.c b/sys/dev/tws/tws_cam.c
index 46b91f47cdab..b134d760e813 100644
--- a/sys/dev/tws/tws_cam.c
+++ b/sys/dev/tws/tws_cam.c
@@ -341,7 +341,7 @@ tws_scsi_complete(struct tws_request *req)
tws_q_remove_request(sc, req, TWS_BUSY_Q);
mtx_unlock(&sc->q_lock);
- untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch);
+ untimeout(tws_timeout, req, req->thandle);
tws_unmap_request(req->sc, req);
@@ -454,7 +454,7 @@ tws_cmd_complete(struct tws_request *req)
{
struct tws_softc *sc = req->sc;
- untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch);
+ untimeout(tws_timeout, req, req->thandle);
tws_unmap_request(sc, req);
}
@@ -561,7 +561,7 @@ tws_scsi_err_complete(struct tws_request *req, struct tws_command_header *hdr)
xpt_done(ccb);
mtx_unlock(&sc->sim_lock);
- untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch);
+ untimeout(tws_timeout, req, req->thandle);
tws_unmap_request(req->sc, req);
mtx_lock(&sc->q_lock);
tws_q_remove_request(sc, req, TWS_BUSY_Q);
@@ -591,7 +591,7 @@ tws_drain_busy_queue(struct tws_softc *sc)
mtx_unlock(&sc->q_lock);
while ( req ) {
TWS_TRACE_DEBUG(sc, "moved to TWS_COMPLETE_Q", 0, req->request_id);
- untimeout(tws_timeout, req, req->ccb_ptr->ccb_h.timeout_ch);
+ untimeout(tws_timeout, req, req->thandle);
req->error_code = TWS_REQ_RET_RESET;
ccb = (union ccb *)(req->ccb_ptr);
@@ -747,7 +747,7 @@ tws_execute_scsi(struct tws_softc *sc, union ccb *ccb)
* and submit the I/O.
*/
sc->stats.scsi_ios++;
- ccb_h->timeout_ch = timeout(tws_timeout, req, (ccb_h->timeout * hz)/1000);
+ req->thandle = timeout(tws_timeout, req, (ccb_h->timeout * hz)/1000);
error = tws_map_request(sc, req);
return(error);
}