diff options
author | scottl <scottl@FreeBSD.org> | 2013-09-24 16:50:53 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2013-09-24 16:50:53 +0000 |
commit | 108b7070e7a17abc52f44f333ba095f8f0eafc3a (patch) | |
tree | ccab290b4cfbac27db6123e5df329c2ca4e9a641 /sys/dev/tws | |
parent | 6633bf70ed24c304037f64ca2f28e6ea8d2a0b47 (diff) | |
download | FreeBSD-src-108b7070e7a17abc52f44f333ba095f8f0eafc3a.zip FreeBSD-src-108b7070e7a17abc52f44f333ba095f8f0eafc3a.tar.gz |
Update the CAM API for FreeBSD 10:
- Remove the timeout_ch field. It's been deprecated since FreeBSD 7.0;
MPSAFE drivers should be managing their own timeout storage. The
remaining non-MPSAFE drivers have been modified to also manage their own
storage, and should be considered for updating to MPSAFE (or removal)
during the FreeBSD 10.x lifecycle.
- Add fields related to soft timeouts and quality of service, to be used
in upcoming work.
- Add room for more flags in the CCB header and path_inq structures.
- Begin support for extended 64-bit LUNs.
- Bump the CAM version number to 0x18, but add compat shims. Tested with
camcontrol and smartctl.
Reviewed by: nathanw, ken, kib
Approved by: re
Obtained from: Netflix
Diffstat (limited to 'sys/dev/tws')
-rw-r--r-- | sys/dev/tws/tws.c | 1 | ||||
-rw-r--r-- | sys/dev/tws/tws_cam.c | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c index 409631f..6ebde75 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 46b91f4..b134d76 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); } |