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
This commit is contained in:
parent
43982f05be
commit
9bdb4a0a3f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103253
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user