diff options
| author | Scott Long <scottl@FreeBSD.org> | 2003-11-09 20:46:08 +0000 |
|---|---|---|
| committer | Scott Long <scottl@FreeBSD.org> | 2003-11-09 20:46:08 +0000 |
| commit | 65b5d095971a4a5647c4d8a67ef888ab188c0749 (patch) | |
| tree | 6e89d85f9007e3456d4038c2dcbd6c3a58f63015 /sys/dev | |
| parent | 25d136776ed0fd05a303e032167d3a396f911633 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ata/atapi-cam.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c index 9d495ae3b9a3..a95825d76e4c 100644 --- a/sys/dev/ata/atapi-cam.c +++ b/sys/dev/ata/atapi-cam.c @@ -549,11 +549,15 @@ atapi_poll(struct cam_sim *sim) static void atapi_cb(struct ata_request *request) { - struct atapi_hcb *hcb = (struct atapi_hcb *) request->driver; - struct ccb_scsiio *csio = &hcb->ccb->csio; + struct atapi_hcb *hcb; + struct ccb_scsiio *csio; u_int32_t rc; mtx_lock(&Giant); + + hcb = (struct atapi_hcb *)request->driver; + csio = &hcb->ccb->csio; + #ifdef CAMDEBUG # define err (request->error) if (CAM_DEBUGGED(csio->ccb_h.path, CAM_DEBUG_CDB)) { @@ -597,8 +601,11 @@ atapi_cb(struct ata_request *request) bcopy(hcb->dxfer_alloc, csio->data_ptr, csio->dxfer_len); } } + free_hcb_and_ccb_done(hcb, rc); mtx_unlock(&Giant); + + ata_free_request(request); } static void |
