From 128df65eb400136620fad50a7ba6bddce66fc1cf Mon Sep 17 00:00:00 2001 From: "Stephen M. Cameron" Date: Mon, 19 Jul 2010 13:44:45 -0500 Subject: [PATCH] --- yaml --- r: 208291 b: refs/heads/master c: 373b45f7b691bf7faafeed46b0b3dcd5b281cd5f h: refs/heads/master i: 208289: 7f65fcfd64f0476a15c51500d0a33bc2ce4a41f8 208287: ddd5afebfb853a7a0a13c0c518c08da3aa47a167 v: v3 --- [refs] | 2 +- trunk/drivers/block/cciss_scsi.c | 20 ++------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index e46dc2d9cc3f..316087da5a6d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d54142c71f05b608b7360d80bdab74eed0f17a98 +refs/heads/master: 373b45f7b691bf7faafeed46b0b3dcd5b281cd5f diff --git a/trunk/drivers/block/cciss_scsi.c b/trunk/drivers/block/cciss_scsi.c index 8e0a709286df..3604b72f2af9 100644 --- a/trunk/drivers/block/cciss_scsi.c +++ b/trunk/drivers/block/cciss_scsi.c @@ -921,7 +921,6 @@ cciss_scsi_do_simple_cmd(ctlr_info_t *c, unsigned char *buf, int bufsize, int direction) { - unsigned long flags; DECLARE_COMPLETION_ONSTACK(wait); cp->cmd_type = CMD_IOCTL_PEND; // treat this like an ioctl @@ -948,14 +947,7 @@ cciss_scsi_do_simple_cmd(ctlr_info_t *c, bufsize, DMA_FROM_DEVICE); cp->waiting = &wait; - - /* Put the request on the tail of the request queue */ - spin_lock_irqsave(CCISS_LOCK(c->ctlr), flags); - addQ(&c->reqQ, cp); - c->Qdepth++; - start_io(c); - spin_unlock_irqrestore(CCISS_LOCK(c->ctlr), flags); - + enqueue_cmd_and_start_io(c, cp); wait_for_completion(&wait); /* undo the dma mapping */ @@ -1525,15 +1517,7 @@ cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd break; } cciss_scatter_gather(c, cp, cmd); - - /* Put the request on the tail of the request queue */ - - spin_lock_irqsave(CCISS_LOCK(ctlr), flags); - addQ(&c->reqQ, cp); - c->Qdepth++; - start_io(c); - spin_unlock_irqrestore(CCISS_LOCK(ctlr), flags); - + enqueue_cmd_and_start_io(c, cp); /* the cmd'll come back via intr handler in complete_scsi_command() */ return 0; }