diff options
author | andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> | 2006-03-09 17:27:39 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-12 10:40:13 -0500 |
commit | 4a59f71d7f0d6dd433fd509584352cdd7c62e877 (patch) | |
tree | eef8ffac130b9dec1bf08759813084a8b6b3aafc /drivers/scsi/qla2xxx/qla_attr.c | |
parent | 6f6417905cf272337a9762e1f92a1fffa651fcd3 (diff) |
[SCSI] qla2xxx: Further restrict ZIO mode support.
Only support ZIO mode 6 on specific ISP types.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_attr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 488b3d16427b..fee0c493775b 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -507,9 +507,6 @@ qla2x00_zio_show(struct class_device *cdev, char *buf) | |||
507 | int len = 0; | 507 | int len = 0; |
508 | 508 | ||
509 | switch (ha->zio_mode) { | 509 | switch (ha->zio_mode) { |
510 | case QLA_ZIO_MODE_5: | ||
511 | len += snprintf(buf + len, PAGE_SIZE-len, "Mode 5\n"); | ||
512 | break; | ||
513 | case QLA_ZIO_MODE_6: | 510 | case QLA_ZIO_MODE_6: |
514 | len += snprintf(buf + len, PAGE_SIZE-len, "Mode 6\n"); | 511 | len += snprintf(buf + len, PAGE_SIZE-len, "Mode 6\n"); |
515 | break; | 512 | break; |
@@ -527,20 +524,16 @@ qla2x00_zio_store(struct class_device *cdev, const char *buf, size_t count) | |||
527 | int val = 0; | 524 | int val = 0; |
528 | uint16_t zio_mode; | 525 | uint16_t zio_mode; |
529 | 526 | ||
527 | if (!IS_ZIO_SUPPORTED(ha)) | ||
528 | return -ENOTSUPP; | ||
529 | |||
530 | if (sscanf(buf, "%d", &val) != 1) | 530 | if (sscanf(buf, "%d", &val) != 1) |
531 | return -EINVAL; | 531 | return -EINVAL; |
532 | 532 | ||
533 | switch (val) { | 533 | if (val) |
534 | case 1: | ||
535 | zio_mode = QLA_ZIO_MODE_5; | ||
536 | break; | ||
537 | case 2: | ||
538 | zio_mode = QLA_ZIO_MODE_6; | 534 | zio_mode = QLA_ZIO_MODE_6; |
539 | break; | 535 | else |
540 | default: | ||
541 | zio_mode = QLA_ZIO_DISABLED; | 536 | zio_mode = QLA_ZIO_DISABLED; |
542 | break; | ||
543 | } | ||
544 | 537 | ||
545 | /* Update per-hba values and queue a reset. */ | 538 | /* Update per-hba values and queue a reset. */ |
546 | if (zio_mode != QLA_ZIO_DISABLED || ha->zio_mode != QLA_ZIO_DISABLED) { | 539 | if (zio_mode != QLA_ZIO_DISABLED || ha->zio_mode != QLA_ZIO_DISABLED) { |