diff options
-rw-r--r-- | Documentation/scsi/sym53c8xx_2.txt | 21 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym53c8xx.h | 1 | ||||
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_glue.c | 66 |
3 files changed, 8 insertions, 80 deletions
diff --git a/Documentation/scsi/sym53c8xx_2.txt b/Documentation/scsi/sym53c8xx_2.txt index 3d9f06bb3d00..49ea5c58c6bc 100644 --- a/Documentation/scsi/sym53c8xx_2.txt +++ b/Documentation/scsi/sym53c8xx_2.txt | |||
@@ -449,25 +449,14 @@ options as above. | |||
449 | cmd_per_lun=#tags (#tags > 1) tagged command queuing enabled | 449 | cmd_per_lun=#tags (#tags > 1) tagged command queuing enabled |
450 | #tags will be truncated to the max queued commands configuration parameter. | 450 | #tags will be truncated to the max queued commands configuration parameter. |
451 | 451 | ||
452 | 10.2.2 Detailed control of tagged commands | 452 | 10.2.2 Burst max |
453 | This option allows you to specify a command queue depth for each device | ||
454 | that supports tagged command queueing. | ||
455 | Example: | ||
456 | tag_ctrl=10/t2t3q16-t5q24/t1u2q32 | ||
457 | will set devices queue depth as follow: | ||
458 | - controller #0 target #2 and target #3 -> 16 commands, | ||
459 | - controller #0 target #5 -> 24 commands, | ||
460 | - controller #1 target #1 logical unit #2 -> 32 commands, | ||
461 | - all other logical units (all targets, all controllers) -> 10 commands. | ||
462 | |||
463 | 10.2.3 Burst max | ||
464 | burst=0 burst disabled | 453 | burst=0 burst disabled |
465 | burst=255 get burst length from initial IO register settings. | 454 | burst=255 get burst length from initial IO register settings. |
466 | burst=#x burst enabled (1<<#x burst transfers max) | 455 | burst=#x burst enabled (1<<#x burst transfers max) |
467 | #x is an integer value which is log base 2 of the burst transfers max. | 456 | #x is an integer value which is log base 2 of the burst transfers max. |
468 | By default the driver uses the maximum value supported by the chip. | 457 | By default the driver uses the maximum value supported by the chip. |
469 | 458 | ||
470 | 10.2.4 LED support | 459 | 10.2.3 LED support |
471 | led=1 enable LED support | 460 | led=1 enable LED support |
472 | led=0 disable LED support | 461 | led=0 disable LED support |
473 | Do not enable LED support if your scsi board does not use SDMS BIOS. | 462 | Do not enable LED support if your scsi board does not use SDMS BIOS. |
@@ -560,9 +549,9 @@ Previously, the sym2 driver accepted arguments of the form | |||
560 | sym53c8xx=tags:4,sync:10,debug:0x200 | 549 | sym53c8xx=tags:4,sync:10,debug:0x200 |
561 | 550 | ||
562 | As a result of the new module parameters, this is no longer available. | 551 | As a result of the new module parameters, this is no longer available. |
563 | Most of the options have remained the same, but tags has split into | 552 | Most of the options have remained the same, but tags has become |
564 | cmd_per_lun and tag_ctrl for its two different purposes. The sample above | 553 | cmd_per_lun to reflect its different purposes. The sample above would |
565 | would be specified as: | 554 | be specified as: |
566 | modprobe sym53c8xx cmd_per_lun=4 sync=10 debug=0x200 | 555 | modprobe sym53c8xx cmd_per_lun=4 sync=10 debug=0x200 |
567 | 556 | ||
568 | or on the kernel boot line as: | 557 | or on the kernel boot line as: |
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); |