diff options
| author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2006-06-23 19:10:39 -0400 |
|---|---|---|
| committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-26 17:21:55 -0400 |
| commit | d4c760c2119fca982f335d83ff9095479c5d6737 (patch) | |
| tree | 63aad21ecfd0deb720e1367df4e87035cf6fc435 | |
| parent | 395e0808fad28b08b982dd9f299fe4723e7c579b (diff) | |
[SCSI] qla2xxx: Add NVRAM 'Disable Serdes' bit support.
The host section of ISP24xx NVRAMs contain a new bit which
allows a user to selectively disable ports of an HBA. These
ports (hosts) will not be presented to the midlayer.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| -rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 1 | ||||
| -rw-r--r-- | drivers/scsi/qla2xxx/qla_fw.h | 2 | ||||
| -rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 13 |
3 files changed, 15 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 653e22e490a1..dfcd3a2dd7c1 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
| @@ -2044,6 +2044,7 @@ typedef struct scsi_qla_host { | |||
| 2044 | uint32_t enable_led_scheme :1; | 2044 | uint32_t enable_led_scheme :1; |
| 2045 | uint32_t msi_enabled :1; | 2045 | uint32_t msi_enabled :1; |
| 2046 | uint32_t msix_enabled :1; | 2046 | uint32_t msix_enabled :1; |
| 2047 | uint32_t disable_serdes :1; | ||
| 2047 | } flags; | 2048 | } flags; |
| 2048 | 2049 | ||
| 2049 | atomic_t loop_state; | 2050 | atomic_t loop_state; |
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index 3af478663be7..af023f51fe76 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h | |||
| @@ -141,7 +141,7 @@ struct nvram_24xx { | |||
| 141 | * BIT 2 = Enable Memory Map BIOS | 141 | * BIT 2 = Enable Memory Map BIOS |
| 142 | * BIT 3 = Enable Selectable Boot | 142 | * BIT 3 = Enable Selectable Boot |
| 143 | * BIT 4 = Disable RISC code load | 143 | * BIT 4 = Disable RISC code load |
| 144 | * BIT 5 = | 144 | * BIT 5 = Disable Serdes |
| 145 | * BIT 6 = | 145 | * BIT 6 = |
| 146 | * BIT 7 = | 146 | * BIT 7 = |
| 147 | * | 147 | * |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 880de6f380e9..2ccdd848bcf6 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
| @@ -89,6 +89,17 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) | |||
| 89 | 89 | ||
| 90 | ha->isp_ops.nvram_config(ha); | 90 | ha->isp_ops.nvram_config(ha); |
| 91 | 91 | ||
| 92 | if (ha->flags.disable_serdes) { | ||
| 93 | /* Mask HBA via NVRAM settings? */ | ||
| 94 | qla_printk(KERN_INFO, ha, "Masking HBA WWPN " | ||
| 95 | "%02x%02x%02x%02x%02x%02x%02x%02x (via NVRAM).\n", | ||
| 96 | ha->port_name[0], ha->port_name[1], | ||
| 97 | ha->port_name[2], ha->port_name[3], | ||
| 98 | ha->port_name[4], ha->port_name[5], | ||
| 99 | ha->port_name[6], ha->port_name[7]); | ||
| 100 | return QLA_FUNCTION_FAILED; | ||
| 101 | } | ||
| 102 | |||
| 92 | qla_printk(KERN_INFO, ha, "Verifying loaded RISC code...\n"); | 103 | qla_printk(KERN_INFO, ha, "Verifying loaded RISC code...\n"); |
| 93 | 104 | ||
| 94 | retry = 10; | 105 | retry = 10; |
| @@ -1639,6 +1650,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
| 1639 | ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); | 1650 | ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); |
| 1640 | ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); | 1651 | ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); |
| 1641 | ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0; | 1652 | ha->flags.enable_led_scheme = (nv->special_options[1] & BIT_4) ? 1 : 0; |
| 1653 | ha->flags.disable_serdes = 0; | ||
| 1642 | 1654 | ||
| 1643 | ha->operating_mode = | 1655 | ha->operating_mode = |
| 1644 | (icb->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) >> 4; | 1656 | (icb->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) >> 4; |
| @@ -3450,6 +3462,7 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) | |||
| 3450 | ha->flags.enable_lip_full_login = 1; | 3462 | ha->flags.enable_lip_full_login = 1; |
| 3451 | ha->flags.enable_target_reset = 1; | 3463 | ha->flags.enable_target_reset = 1; |
| 3452 | ha->flags.enable_led_scheme = 0; | 3464 | ha->flags.enable_led_scheme = 0; |
| 3465 | ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0; | ||
| 3453 | 3466 | ||
| 3454 | ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) & | 3467 | ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) & |
| 3455 | (BIT_6 | BIT_5 | BIT_4)) >> 4; | 3468 | (BIT_6 | BIT_5 | BIT_4)) >> 4; |
