diff options
author | Matthew Wilcox <matthew@wil.cx> | 2007-10-05 15:55:08 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-23 15:11:57 -0400 |
commit | a44131b35ec1a46ed75014d818cb9d5706117b49 (patch) | |
tree | 2e0db739539cff760cfb3cf01b9f0c8c5ed18773 /drivers/scsi | |
parent | 8637baa3609afff9fe4c65ad4c64d72484c699fc (diff) |
[SCSI] sym53c8xx: Remove tag_ctrl module parameter
With sysfs making these options tunable at runtime, there's no
justification for keeping this horrendously complex specification
string around.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym53c8xx.h | 1 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_glue.c | 66 |
2 files changed, 3 insertions, 64 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym53c8xx.h b/drivers/scsi/sym53c8xx_2/sym53c8xx.h index 7519728dfc38..62d29cfac9e4 100644 --- a/drivers/scsi/sym53c8xx_2/sym53c8xx.h +++ b/drivers/scsi/sym53c8xx_2/sym53c8xx.h | |||
@@ -127,7 +127,6 @@ struct sym_driver_setup { | |||
127 | u_char settle_delay; | 127 | u_char settle_delay; |
128 | u_char use_nvram; | 128 | u_char use_nvram; |
129 | u_long excludes[8]; | 129 | u_long excludes[8]; |
130 | char tag_ctrl[100]; | ||
131 | }; | 130 | }; |
132 | 131 | ||
133 | #define SYM_SETUP_MAX_TAG sym_driver_setup.max_tag | 132 | #define SYM_SETUP_MAX_TAG sym_driver_setup.max_tag |
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 6e768c542225..c1d9f6989664 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c | |||
@@ -63,7 +63,6 @@ unsigned int sym_debug_flags = 0; | |||
63 | static char *excl_string; | 63 | static char *excl_string; |
64 | static char *safe_string; | 64 | static char *safe_string; |
65 | module_param_named(cmd_per_lun, sym_driver_setup.max_tag, ushort, 0); | 65 | module_param_named(cmd_per_lun, sym_driver_setup.max_tag, ushort, 0); |
66 | module_param_string(tag_ctrl, sym_driver_setup.tag_ctrl, 100, 0); | ||
67 | module_param_named(burst, sym_driver_setup.burst_order, byte, 0); | 66 | module_param_named(burst, sym_driver_setup.burst_order, byte, 0); |
68 | module_param_named(led, sym_driver_setup.scsi_led, byte, 0); | 67 | module_param_named(led, sym_driver_setup.scsi_led, byte, 0); |
69 | module_param_named(diff, sym_driver_setup.scsi_diff, byte, 0); | 68 | module_param_named(diff, sym_driver_setup.scsi_diff, byte, 0); |
@@ -78,7 +77,6 @@ module_param_named(excl, excl_string, charp, 0); | |||
78 | module_param_named(safe, safe_string, charp, 0); | 77 | module_param_named(safe, safe_string, charp, 0); |
79 | 78 | ||
80 | MODULE_PARM_DESC(cmd_per_lun, "The maximum number of tags to use by default"); | 79 | MODULE_PARM_DESC(cmd_per_lun, "The maximum number of tags to use by default"); |
81 | MODULE_PARM_DESC(tag_ctrl, "More detailed control over tags per LUN"); | ||
82 | MODULE_PARM_DESC(burst, "Maximum burst. 0 to disable, 255 to read from registers"); | 80 | MODULE_PARM_DESC(burst, "Maximum burst. 0 to disable, 255 to read from registers"); |
83 | MODULE_PARM_DESC(led, "Set to 1 to enable LED support"); | 81 | MODULE_PARM_DESC(led, "Set to 1 to enable LED support"); |
84 | MODULE_PARM_DESC(diff, "0 for no differential mode, 1 for BIOS, 2 for always, 3 for not GPIO3"); | 82 | MODULE_PARM_DESC(diff, "0 for no differential mode, 1 for BIOS, 2 for always, 3 for not GPIO3"); |
@@ -744,59 +742,6 @@ static void sym_tune_dev_queuing(struct sym_tcb *tp, int lun, u_short reqtags) | |||
744 | } | 742 | } |
745 | } | 743 | } |
746 | 744 | ||
747 | /* | ||
748 | * Linux select queue depths function | ||
749 | */ | ||
750 | #define DEF_DEPTH (sym_driver_setup.max_tag) | ||
751 | #define ALL_TARGETS -2 | ||
752 | #define NO_TARGET -1 | ||
753 | #define ALL_LUNS -2 | ||
754 | #define NO_LUN -1 | ||
755 | |||
756 | static int device_queue_depth(struct sym_hcb *np, int target, int lun) | ||
757 | { | ||
758 | int c, h, t, u, v; | ||
759 | char *p = sym_driver_setup.tag_ctrl; | ||
760 | char *ep; | ||
761 | |||
762 | h = -1; | ||
763 | t = NO_TARGET; | ||
764 | u = NO_LUN; | ||
765 | while ((c = *p++) != 0) { | ||
766 | v = simple_strtoul(p, &ep, 0); | ||
767 | switch(c) { | ||
768 | case '/': | ||
769 | ++h; | ||
770 | t = ALL_TARGETS; | ||
771 | u = ALL_LUNS; | ||
772 | break; | ||
773 | case 't': | ||
774 | if (t != target) | ||
775 | t = (target == v) ? v : NO_TARGET; | ||
776 | u = ALL_LUNS; | ||
777 | break; | ||
778 | case 'u': | ||
779 | if (u != lun) | ||
780 | u = (lun == v) ? v : NO_LUN; | ||
781 | break; | ||
782 | case 'q': | ||
783 | if (h == np->s.unit && | ||
784 | (t == ALL_TARGETS || t == target) && | ||
785 | (u == ALL_LUNS || u == lun)) | ||
786 | return v; | ||
787 | break; | ||
788 | case '-': | ||
789 | t = ALL_TARGETS; | ||
790 | u = ALL_LUNS; | ||
791 | break; | ||
792 | default: | ||
793 | break; | ||
794 | } | ||
795 | p = ep; | ||
796 | } | ||
797 | return DEF_DEPTH; | ||
798 | } | ||
799 | |||
800 | static int sym53c8xx_slave_alloc(struct scsi_device *sdev) | 745 | static int sym53c8xx_slave_alloc(struct scsi_device *sdev) |
801 | { | 746 | { |
802 | struct sym_hcb *np = sym_get_hcb(sdev->host); | 747 | struct sym_hcb *np = sym_get_hcb(sdev->host); |
@@ -861,21 +806,16 @@ static int sym53c8xx_slave_configure(struct scsi_device *sdev) | |||
861 | * Use at least 2. | 806 | * Use at least 2. |
862 | * Donnot use more than our maximum. | 807 | * Donnot use more than our maximum. |
863 | */ | 808 | */ |
864 | reqtags = device_queue_depth(np, sdev->id, sdev->lun); | 809 | reqtags = sym_driver_setup.max_tag; |
865 | if (reqtags > tp->usrtags) | 810 | if (reqtags > tp->usrtags) |
866 | reqtags = tp->usrtags; | 811 | reqtags = tp->usrtags; |
867 | if (!sdev->tagged_supported) | 812 | if (!sdev->tagged_supported) |
868 | reqtags = 0; | 813 | reqtags = 0; |
869 | #if 1 /* Avoid to locally queue commands for no good reasons */ | ||
870 | if (reqtags > SYM_CONF_MAX_TAG) | 814 | if (reqtags > SYM_CONF_MAX_TAG) |
871 | reqtags = SYM_CONF_MAX_TAG; | 815 | reqtags = SYM_CONF_MAX_TAG; |
872 | depth_to_use = (reqtags ? reqtags : 2); | 816 | depth_to_use = reqtags ? reqtags : 2; |
873 | #else | ||
874 | depth_to_use = (reqtags ? SYM_CONF_MAX_TAG : 2); | ||
875 | #endif | ||
876 | scsi_adjust_queue_depth(sdev, | 817 | scsi_adjust_queue_depth(sdev, |
877 | (sdev->tagged_supported ? | 818 | sdev->tagged_supported ? MSG_SIMPLE_TAG : 0, |
878 | MSG_SIMPLE_TAG : 0), | ||
879 | depth_to_use); | 819 | depth_to_use); |
880 | lp->s.scdev_depth = depth_to_use; | 820 | lp->s.scdev_depth = depth_to_use; |
881 | sym_tune_dev_queuing(tp, sdev->lun, reqtags); | 821 | sym_tune_dev_queuing(tp, sdev->lun, reqtags); |