Commit 3bea15a7 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by James Bottomley

[SCSI] Disable sym2 driver queueing

Undef SYM_OPT_HANDLE_DEVICE_QUEUEING.
Call sym_put_start_queue instead of sym_start_next_ccbs.
Turn asserts into checks that we can send the command to the adapter,
and return busy from queuecommand if we can't.
Signed-off-by: default avatarMatthew Wilcox <matthew@wil.cx>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 76789f01
...@@ -475,8 +475,6 @@ static inline int sym_setup_cdb(struct sym_hcb *np, struct scsi_cmnd *cmd, struc ...@@ -475,8 +475,6 @@ static inline int sym_setup_cdb(struct sym_hcb *np, struct scsi_cmnd *cmd, struc
*/ */
int sym_setup_data_and_start(struct sym_hcb *np, struct scsi_cmnd *cmd, struct sym_ccb *cp) int sym_setup_data_and_start(struct sym_hcb *np, struct scsi_cmnd *cmd, struct sym_ccb *cp)
{ {
struct sym_tcb *tp = &np->target[cp->target];
struct sym_lcb *lp = sym_lp(tp, cp->lun);
u32 lastp, goalp; u32 lastp, goalp;
int dir; int dir;
...@@ -557,7 +555,7 @@ int sym_setup_data_and_start(struct sym_hcb *np, struct scsi_cmnd *cmd, struct s ...@@ -557,7 +555,7 @@ int sym_setup_data_and_start(struct sym_hcb *np, struct scsi_cmnd *cmd, struct s
/* /*
* activate this job. * activate this job.
*/ */
sym_start_next_ccbs(np, lp, 2); sym_put_start_queue(np, cp);
return 0; return 0;
out_abort: out_abort:
...@@ -871,15 +869,12 @@ static void sym_tune_dev_queuing(struct sym_tcb *tp, int lun, u_short reqtags) ...@@ -871,15 +869,12 @@ static void sym_tune_dev_queuing(struct sym_tcb *tp, int lun, u_short reqtags)
if (reqtags > lp->s.scdev_depth) if (reqtags > lp->s.scdev_depth)
reqtags = lp->s.scdev_depth; reqtags = lp->s.scdev_depth;
lp->started_limit = reqtags ? reqtags : 2;
lp->started_max = 1;
lp->s.reqtags = reqtags; lp->s.reqtags = reqtags;
if (reqtags != oldtags) { if (reqtags != oldtags) {
dev_info(&tp->starget->dev, dev_info(&tp->starget->dev,
"tagged command queuing %s, command queue depth %d.\n", "tagged command queuing %s, command queue depth %d.\n",
lp->s.reqtags ? "enabled" : "disabled", lp->s.reqtags ? "enabled" : "disabled", reqtags);
lp->started_limit);
} }
} }
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
*/ */
#define SYM_CONF_TIMER_INTERVAL ((HZ+1)/2) #define SYM_CONF_TIMER_INTERVAL ((HZ+1)/2)
#define SYM_OPT_HANDLE_DEVICE_QUEUEING #undef SYM_OPT_HANDLE_DEVICE_QUEUEING
#define SYM_OPT_LIMIT_COMMAND_REORDERING #define SYM_OPT_LIMIT_COMMAND_REORDERING
/* /*
......
...@@ -1469,7 +1469,7 @@ static int sym_prepare_nego(struct sym_hcb *np, struct sym_ccb *cp, u_char *msgp ...@@ -1469,7 +1469,7 @@ static int sym_prepare_nego(struct sym_hcb *np, struct sym_ccb *cp, u_char *msgp
/* /*
* Insert a job into the start queue. * Insert a job into the start queue.
*/ */
static void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp) void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp)
{ {
u_short qidx; u_short qidx;
...@@ -4602,7 +4602,8 @@ struct sym_ccb *sym_get_ccb (struct sym_hcb *np, struct scsi_cmnd *cmd, u_char t ...@@ -4602,7 +4602,8 @@ struct sym_ccb *sym_get_ccb (struct sym_hcb *np, struct scsi_cmnd *cmd, u_char t
* Debugging purpose. * Debugging purpose.
*/ */
#ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING #ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING
assert(lp->busy_itl == 0); if (lp->busy_itl != 0)
goto out_free;
#endif #endif
/* /*
* Allocate resources for tags if not yet. * Allocate resources for tags if not yet.
...@@ -4647,7 +4648,8 @@ struct sym_ccb *sym_get_ccb (struct sym_hcb *np, struct scsi_cmnd *cmd, u_char t ...@@ -4647,7 +4648,8 @@ struct sym_ccb *sym_get_ccb (struct sym_hcb *np, struct scsi_cmnd *cmd, u_char t
* Debugging purpose. * Debugging purpose.
*/ */
#ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING #ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING
assert(lp->busy_itl == 0 && lp->busy_itlq == 0); if (lp->busy_itl != 0 || lp->busy_itlq != 0)
goto out_free;
#endif #endif
/* /*
* Count this nexus for this LUN. * Count this nexus for this LUN.
......
...@@ -1049,6 +1049,8 @@ int sym_reset_scsi_bus(struct sym_hcb *np, int enab_int); ...@@ -1049,6 +1049,8 @@ int sym_reset_scsi_bus(struct sym_hcb *np, int enab_int);
struct sym_chip *sym_lookup_chip_table(u_short device_id, u_char revision); struct sym_chip *sym_lookup_chip_table(u_short device_id, u_char revision);
#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING #ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING
void sym_start_next_ccbs(struct sym_hcb *np, struct sym_lcb *lp, int maxn); void sym_start_next_ccbs(struct sym_hcb *np, struct sym_lcb *lp, int maxn);
#else
void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp);
#endif #endif
void sym_start_up(struct sym_hcb *np, int reason); void sym_start_up(struct sym_hcb *np, int reason);
void sym_interrupt(struct sym_hcb *np); void sym_interrupt(struct sym_hcb *np);
......
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