Commit 373b45f7 authored by Stephen M. Cameron's avatar Stephen M. Cameron Committed by Jens Axboe

cciss: Set the performant mode bit in the scsi half of the driver

cciss: Set the performant mode bit in the scsi half of the driver
In a couple of places, the performant mode bit wasn't being set in
the scsi half of the driver, causing commands to seem to hang.  Use
enqueue_cmd_and_start_io() where appropriate.  This fixes a bug that

	echo engage scsi > /proc/driver/cciss/cciss0

would hang.
Signed-off-by: default avatarStephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent d54142c7
...@@ -921,7 +921,6 @@ cciss_scsi_do_simple_cmd(ctlr_info_t *c, ...@@ -921,7 +921,6 @@ cciss_scsi_do_simple_cmd(ctlr_info_t *c,
unsigned char *buf, int bufsize, unsigned char *buf, int bufsize,
int direction) int direction)
{ {
unsigned long flags;
DECLARE_COMPLETION_ONSTACK(wait); DECLARE_COMPLETION_ONSTACK(wait);
cp->cmd_type = CMD_IOCTL_PEND; // treat this like an ioctl cp->cmd_type = CMD_IOCTL_PEND; // treat this like an ioctl
...@@ -948,14 +947,7 @@ cciss_scsi_do_simple_cmd(ctlr_info_t *c, ...@@ -948,14 +947,7 @@ cciss_scsi_do_simple_cmd(ctlr_info_t *c,
bufsize, DMA_FROM_DEVICE); bufsize, DMA_FROM_DEVICE);
cp->waiting = &wait; cp->waiting = &wait;
enqueue_cmd_and_start_io(c, cp);
/* 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);
wait_for_completion(&wait); wait_for_completion(&wait);
/* undo the dma mapping */ /* undo the dma mapping */
...@@ -1525,15 +1517,7 @@ cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd ...@@ -1525,15 +1517,7 @@ cciss_scsi_queue_command (struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd
break; break;
} }
cciss_scatter_gather(c, cp, cmd); cciss_scatter_gather(c, cp, cmd);
enqueue_cmd_and_start_io(c, cp);
/* 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);
/* the cmd'll come back via intr handler in complete_scsi_command() */ /* the cmd'll come back via intr handler in complete_scsi_command() */
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment