summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_attr.c
diff options
context:
space:
mode:
authorandrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com>2006-03-09 23:27:39 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-12 16:40:13 +0100
commit4a59f71d7f0d6dd433fd509584352cdd7c62e877 (patch)
treeeef8ffac130b9dec1bf08759813084a8b6b3aafc /drivers/scsi/qla2xxx/qla_attr.c
parent[SCSI] qla2xxx: Add VPD sysfs attribute. (diff)
downloadlinux-4a59f71d7f0d6dd433fd509584352cdd7c62e877.tar.xz
linux-4a59f71d7f0d6dd433fd509584352cdd7c62e877.zip
[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.c17
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)
int len = 0;
switch (ha->zio_mode) {
- case QLA_ZIO_MODE_5:
- len += snprintf(buf + len, PAGE_SIZE-len, "Mode 5\n");
- break;
case QLA_ZIO_MODE_6:
len += snprintf(buf + len, PAGE_SIZE-len, "Mode 6\n");
break;
@@ -527,20 +524,16 @@ qla2x00_zio_store(struct class_device *cdev, const char *buf, size_t count)
int val = 0;
uint16_t zio_mode;
+ if (!IS_ZIO_SUPPORTED(ha))
+ return -ENOTSUPP;
+
if (sscanf(buf, "%d", &val) != 1)
return -EINVAL;
- switch (val) {
- case 1:
- zio_mode = QLA_ZIO_MODE_5;
- break;
- case 2:
+ if (val)
zio_mode = QLA_ZIO_MODE_6;
- break;
- default:
+ else
zio_mode = QLA_ZIO_DISABLED;
- break;
- }
/* Update per-hba values and queue a reset. */
if (zio_mode != QLA_ZIO_DISABLED || ha->zio_mode != QLA_ZIO_DISABLED) {