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 | |
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')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 17 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 3 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 5 |
4 files changed, 16 insertions, 13 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) { |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 20798f93d8da..53508f3c4ae9 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -762,7 +762,6 @@ typedef struct { | |||
762 | #define PD_STATE_WAIT_PORT_LOGOUT_ACK 11 | 762 | #define PD_STATE_WAIT_PORT_LOGOUT_ACK 11 |
763 | 763 | ||
764 | 764 | ||
765 | #define QLA_ZIO_MODE_5 (BIT_2 | BIT_0) | ||
766 | #define QLA_ZIO_MODE_6 (BIT_2 | BIT_1) | 765 | #define QLA_ZIO_MODE_6 (BIT_2 | BIT_1) |
767 | #define QLA_ZIO_DISABLED 0 | 766 | #define QLA_ZIO_DISABLED 0 |
768 | #define QLA_ZIO_DEFAULT_TIMER 2 | 767 | #define QLA_ZIO_DEFAULT_TIMER 2 |
@@ -2238,6 +2237,7 @@ typedef struct scsi_qla_host { | |||
2238 | #define DT_ISP5432 BIT_10 | 2237 | #define DT_ISP5432 BIT_10 |
2239 | #define DT_ISP_LAST (DT_ISP5432 << 1) | 2238 | #define DT_ISP_LAST (DT_ISP5432 << 1) |
2240 | 2239 | ||
2240 | #define DT_ZIO_SUPPORTED BIT_28 | ||
2241 | #define DT_OEM_001 BIT_29 | 2241 | #define DT_OEM_001 BIT_29 |
2242 | #define DT_ISP2200A BIT_30 | 2242 | #define DT_ISP2200A BIT_30 |
2243 | #define DT_EXTENDED_IDS BIT_31 | 2243 | #define DT_EXTENDED_IDS BIT_31 |
@@ -2260,6 +2260,7 @@ typedef struct scsi_qla_host { | |||
2260 | #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha)) | 2260 | #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha)) |
2261 | #define IS_QLA54XX(ha) (IS_QLA5422(ha) || IS_QLA5432(ha)) | 2261 | #define IS_QLA54XX(ha) (IS_QLA5422(ha) || IS_QLA5432(ha)) |
2262 | 2262 | ||
2263 | #define IS_ZIO_SUPPORTED(ha) ((ha)->device_type & DT_ZIO_SUPPORTED) | ||
2263 | #define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001) | 2264 | #define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001) |
2264 | #define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS) | 2265 | #define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS) |
2265 | 2266 | ||
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 71b6bcc181f9..ebc7c2498067 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -1659,6 +1659,8 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1659 | ~(BIT_3 | BIT_2 | BIT_1 | BIT_0); | 1659 | ~(BIT_3 | BIT_2 | BIT_1 | BIT_0); |
1660 | ha->flags.process_response_queue = 0; | 1660 | ha->flags.process_response_queue = 0; |
1661 | if (ha->zio_mode != QLA_ZIO_DISABLED) { | 1661 | if (ha->zio_mode != QLA_ZIO_DISABLED) { |
1662 | ha->zio_mode = QLA_ZIO_MODE_6; | ||
1663 | |||
1662 | DEBUG2(printk("scsi(%ld): ZIO mode %d enabled; timer " | 1664 | DEBUG2(printk("scsi(%ld): ZIO mode %d enabled; timer " |
1663 | "delay (%d us).\n", ha->host_no, ha->zio_mode, | 1665 | "delay (%d us).\n", ha->host_no, ha->zio_mode, |
1664 | ha->zio_timer * 100)); | 1666 | ha->zio_timer * 100)); |
@@ -3474,6 +3476,8 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) | |||
3474 | ~(BIT_3 | BIT_2 | BIT_1 | BIT_0)); | 3476 | ~(BIT_3 | BIT_2 | BIT_1 | BIT_0)); |
3475 | ha->flags.process_response_queue = 0; | 3477 | ha->flags.process_response_queue = 0; |
3476 | if (ha->zio_mode != QLA_ZIO_DISABLED) { | 3478 | if (ha->zio_mode != QLA_ZIO_DISABLED) { |
3479 | ha->zio_mode = QLA_ZIO_MODE_6; | ||
3480 | |||
3477 | DEBUG2(printk("scsi(%ld): ZIO mode %d enabled; timer delay " | 3481 | DEBUG2(printk("scsi(%ld): ZIO mode %d enabled; timer delay " |
3478 | "(%d us).\n", ha->host_no, ha->zio_mode, | 3482 | "(%d us).\n", ha->host_no, ha->zio_mode, |
3479 | ha->zio_timer * 100)); | 3483 | ha->zio_timer * 100)); |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 4dc08d94ebec..0fc89ac6a51b 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1161,12 +1161,15 @@ qla2x00_set_isp_flags(scsi_qla_host_t *ha) | |||
1161 | break; | 1161 | break; |
1162 | case PCI_DEVICE_ID_QLOGIC_ISP2300: | 1162 | case PCI_DEVICE_ID_QLOGIC_ISP2300: |
1163 | ha->device_type |= DT_ISP2300; | 1163 | ha->device_type |= DT_ISP2300; |
1164 | ha->device_type |= DT_ZIO_SUPPORTED; | ||
1164 | break; | 1165 | break; |
1165 | case PCI_DEVICE_ID_QLOGIC_ISP2312: | 1166 | case PCI_DEVICE_ID_QLOGIC_ISP2312: |
1166 | ha->device_type |= DT_ISP2312; | 1167 | ha->device_type |= DT_ISP2312; |
1168 | ha->device_type |= DT_ZIO_SUPPORTED; | ||
1167 | break; | 1169 | break; |
1168 | case PCI_DEVICE_ID_QLOGIC_ISP2322: | 1170 | case PCI_DEVICE_ID_QLOGIC_ISP2322: |
1169 | ha->device_type |= DT_ISP2322; | 1171 | ha->device_type |= DT_ISP2322; |
1172 | ha->device_type |= DT_ZIO_SUPPORTED; | ||
1170 | if (ha->pdev->subsystem_vendor == 0x1028 && | 1173 | if (ha->pdev->subsystem_vendor == 0x1028 && |
1171 | ha->pdev->subsystem_device == 0x0170) | 1174 | ha->pdev->subsystem_device == 0x0170) |
1172 | ha->device_type |= DT_OEM_001; | 1175 | ha->device_type |= DT_OEM_001; |
@@ -1179,9 +1182,11 @@ qla2x00_set_isp_flags(scsi_qla_host_t *ha) | |||
1179 | break; | 1182 | break; |
1180 | case PCI_DEVICE_ID_QLOGIC_ISP2422: | 1183 | case PCI_DEVICE_ID_QLOGIC_ISP2422: |
1181 | ha->device_type |= DT_ISP2422; | 1184 | ha->device_type |= DT_ISP2422; |
1185 | ha->device_type |= DT_ZIO_SUPPORTED; | ||
1182 | break; | 1186 | break; |
1183 | case PCI_DEVICE_ID_QLOGIC_ISP2432: | 1187 | case PCI_DEVICE_ID_QLOGIC_ISP2432: |
1184 | ha->device_type |= DT_ISP2432; | 1188 | ha->device_type |= DT_ISP2432; |
1189 | ha->device_type |= DT_ZIO_SUPPORTED; | ||
1185 | break; | 1190 | break; |
1186 | case PCI_DEVICE_ID_QLOGIC_ISP5422: | 1191 | case PCI_DEVICE_ID_QLOGIC_ISP5422: |
1187 | ha->device_type |= DT_ISP5422; | 1192 | ha->device_type |= DT_ISP5422; |