diff options
author | thomas <thomas@FreeBSD.org> | 2002-09-12 15:15:33 +0000 |
---|---|---|
committer | thomas <thomas@FreeBSD.org> | 2002-09-12 15:15:33 +0000 |
commit | ac837d1b21eb7f193ba51166e255b87787d7a60a (patch) | |
tree | 6248a58693b2a8b2975013c542863b6b4e29ff3a /sys | |
parent | 670e2d1870a239e9d7c6ab0863dd77ae5ac56f7d (diff) | |
download | FreeBSD-src-ac837d1b21eb7f193ba51166e255b87787d7a60a.zip FreeBSD-src-ac837d1b21eb7f193ba51166e255b87787d7a60a.tar.gz |
Change a couple of splcam() calls that do not make sense in atapi-cam
(what we want to mask is the ATA interrupts, which run at level splbio),
and add interrupt masking around the statement that modifies the
request queue for a SIM.
This resolves problems reported by users under heavy ATAPI load.
Reviewed by: roberto
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/atapi-cam.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c index 0e56b97..b8294ab 100644 --- a/sys/dev/ata/atapi-cam.c +++ b/sys/dev/ata/atapi-cam.c @@ -203,7 +203,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) struct atapi_hcb *hcb = NULL; int unit = cam_sim_unit(sim); int bus = cam_sim_bus(sim); - int len; + int len, s; char *buf; switch (ccb_h->func_code) { @@ -452,7 +452,9 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) M_NOWAIT | M_ZERO))) goto action_oom; } + s = splbio(); TAILQ_INSERT_TAIL(&softc->pending_hcbs, hcb, chain); + splx(s); if (atapi_queue_cmd(dev, hcb->cmd, buf, len, (((ccb_h->flags & CAM_DIR_MASK) == CAM_DIR_IN) ? ATPR_F_READ : 0) | ATPR_F_QUIET, @@ -490,10 +492,10 @@ atapi_poll(struct cam_sim *sim) int atapi_cb(struct atapi_request *req) { - int s = splcam(); struct atapi_hcb *hcb = (struct atapi_hcb *) req->driver; struct ccb_scsiio *csio = &hcb->ccb->csio; int hcb_status = req->result; + int s = splbio(); #ifdef CAMDEBUG if (CAM_DEBUGGED(csio->ccb_h.path, CAM_DEBUG_CDB)) { @@ -550,7 +552,7 @@ static void atapi_async(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg) { - int s = splcam(); + int s = splbio(); atapi_async1(callback_arg, code, path, arg); splx(s); |