aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sym53c8xx_2
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2006-03-28 11:03:44 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-13 11:13:24 -0400
commit3bea15a76eecc03729bf74d6ab2a1f849c08423e (patch)
tree674e96482b034ed57222878816f87c63cc5d800f /drivers/scsi/sym53c8xx_2
parent76789f01768bb4cef706f4c9e7e2f3f4eb8c1431 (diff)
[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: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c9
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.h2
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c8
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.h2
4 files changed, 10 insertions, 11 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index 052ce11806ad..a27dd66b6613 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -475,8 +475,6 @@ static inline int sym_setup_cdb(struct sym_hcb *np, struct scsi_cmnd *cmd, struc
475 */ 475 */
476int sym_setup_data_and_start(struct sym_hcb *np, struct scsi_cmnd *cmd, struct sym_ccb *cp) 476int sym_setup_data_and_start(struct sym_hcb *np, struct scsi_cmnd *cmd, struct sym_ccb *cp)
477{ 477{
478 struct sym_tcb *tp = &np->target[cp->target];
479 struct sym_lcb *lp = sym_lp(tp, cp->lun);
480 u32 lastp, goalp; 478 u32 lastp, goalp;
481 int dir; 479 int dir;
482 480
@@ -557,7 +555,7 @@ int sym_setup_data_and_start(struct sym_hcb *np, struct scsi_cmnd *cmd, struct s
557 /* 555 /*
558 * activate this job. 556 * activate this job.
559 */ 557 */
560 sym_start_next_ccbs(np, lp, 2); 558 sym_put_start_queue(np, cp);
561 return 0; 559 return 0;
562 560
563out_abort: 561out_abort:
@@ -871,15 +869,12 @@ static void sym_tune_dev_queuing(struct sym_tcb *tp, int lun, u_short reqtags)
871 if (reqtags > lp->s.scdev_depth) 869 if (reqtags > lp->s.scdev_depth)
872 reqtags = lp->s.scdev_depth; 870 reqtags = lp->s.scdev_depth;
873 871
874 lp->started_limit = reqtags ? reqtags : 2;
875 lp->started_max = 1;
876 lp->s.reqtags = reqtags; 872 lp->s.reqtags = reqtags;
877 873
878 if (reqtags != oldtags) { 874 if (reqtags != oldtags) {
879 dev_info(&tp->starget->dev, 875 dev_info(&tp->starget->dev,
880 "tagged command queuing %s, command queue depth %d.\n", 876 "tagged command queuing %s, command queue depth %d.\n",
881 lp->s.reqtags ? "enabled" : "disabled", 877 lp->s.reqtags ? "enabled" : "disabled", reqtags);
882 lp->started_limit);
883 } 878 }
884} 879}
885 880
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h
index cc92d0c70cd7..a446cda3f64c 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.h
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.h
@@ -68,7 +68,7 @@
68 */ 68 */
69#define SYM_CONF_TIMER_INTERVAL ((HZ+1)/2) 69#define SYM_CONF_TIMER_INTERVAL ((HZ+1)/2)
70 70
71#define SYM_OPT_HANDLE_DEVICE_QUEUEING 71#undef SYM_OPT_HANDLE_DEVICE_QUEUEING
72#define SYM_OPT_LIMIT_COMMAND_REORDERING 72#define SYM_OPT_LIMIT_COMMAND_REORDERING
73 73
74/* 74/*
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index b2ac482caae8..a6cbb90e2bb9 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -1469,7 +1469,7 @@ static int sym_prepare_nego(struct sym_hcb *np, struct sym_ccb *cp, u_char *msgp
1469/* 1469/*
1470 * Insert a job into the start queue. 1470 * Insert a job into the start queue.
1471 */ 1471 */
1472static void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp) 1472void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp)
1473{ 1473{
1474 u_short qidx; 1474 u_short qidx;
1475 1475
@@ -4602,7 +4602,8 @@ struct sym_ccb *sym_get_ccb (struct sym_hcb *np, struct scsi_cmnd *cmd, u_char t
4602 * Debugging purpose. 4602 * Debugging purpose.
4603 */ 4603 */
4604#ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING 4604#ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING
4605 assert(lp->busy_itl == 0); 4605 if (lp->busy_itl != 0)
4606 goto out_free;
4606#endif 4607#endif
4607 /* 4608 /*
4608 * Allocate resources for tags if not yet. 4609 * 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 * Debugging purpose. 4648 * Debugging purpose.
4648 */ 4649 */
4649#ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING 4650#ifndef SYM_OPT_HANDLE_DEVICE_QUEUEING
4650 assert(lp->busy_itl == 0 && lp->busy_itlq == 0); 4651 if (lp->busy_itl != 0 || lp->busy_itlq != 0)
4652 goto out_free;
4651#endif 4653#endif
4652 /* 4654 /*
4653 * Count this nexus for this LUN. 4655 * Count this nexus for this LUN.
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.h b/drivers/scsi/sym53c8xx_2/sym_hipd.h
index 2456090bb241..79ab6a177039 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.h
@@ -1049,6 +1049,8 @@ int sym_reset_scsi_bus(struct sym_hcb *np, int enab_int);
1049struct sym_chip *sym_lookup_chip_table(u_short device_id, u_char revision); 1049struct sym_chip *sym_lookup_chip_table(u_short device_id, u_char revision);
1050#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING 1050#ifdef SYM_OPT_HANDLE_DEVICE_QUEUEING
1051void sym_start_next_ccbs(struct sym_hcb *np, struct sym_lcb *lp, int maxn); 1051void sym_start_next_ccbs(struct sym_hcb *np, struct sym_lcb *lp, int maxn);
1052#else
1053void sym_put_start_queue(struct sym_hcb *np, struct sym_ccb *cp);
1052#endif 1054#endif
1053void sym_start_up(struct sym_hcb *np, int reason); 1055void sym_start_up(struct sym_hcb *np, int reason);
1054void sym_interrupt(struct sym_hcb *np); 1056void sym_interrupt(struct sym_hcb *np);