diff options
author | Armen Baloyan <armen.baloyan@qlogic.com> | 2013-10-30 03:38:17 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-12-19 10:38:58 -0500 |
commit | e8f5e95d5a7db8c8f195bc92c0ca8363223a0a9e (patch) | |
tree | 1494981d2a8be35602abb7c51c2af8f7caf51236 | |
parent | f3ddac1918fe963bcbf8d407a3a3c0881b47248b (diff) |
[SCSI] qla2xxx: Fix issue with not displaying node name after system reboot.
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 1 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mr.c | 18 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mr.h | 3 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 10 |
5 files changed, 33 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index 149a1b5f6616..66f6597d857b 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
@@ -26,7 +26,7 @@ | |||
26 | * | | | 0x302d,0x3033 | | 26 | * | | | 0x302d,0x3033 | |
27 | * | | | 0x3036,0x3038 | | 27 | * | | | 0x3036,0x3038 | |
28 | * | | | 0x303a | | 28 | * | | | 0x303a | |
29 | * | DPC Thread | 0x4022 | 0x4002,0x4013 | | 29 | * | DPC Thread | 0x4023 | 0x4002,0x4013 | |
30 | * | Async Events | 0x5087 | 0x502b-0x502f | | 30 | * | Async Events | 0x5087 | 0x502b-0x502f | |
31 | * | | | 0x5047,0x5052 | | 31 | * | | | 0x5047,0x5052 | |
32 | * | | | 0x5084,0x5075 | | 32 | * | | | 0x5084,0x5075 | |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 0fb01e1e213c..ac62bcacc2d6 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -3370,6 +3370,7 @@ typedef struct scsi_qla_host { | |||
3370 | #define FX00_RESET_RECOVERY 23 | 3370 | #define FX00_RESET_RECOVERY 23 |
3371 | #define FX00_TARGET_SCAN 24 | 3371 | #define FX00_TARGET_SCAN 24 |
3372 | #define FX00_CRITEMP_RECOVERY 25 | 3372 | #define FX00_CRITEMP_RECOVERY 25 |
3373 | #define FX00_HOST_INFO_RESEND 26 | ||
3373 | 3374 | ||
3374 | uint32_t device_flags; | 3375 | uint32_t device_flags; |
3375 | #define SWITCH_FOUND BIT_0 | 3376 | #define SWITCH_FOUND BIT_0 |
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c index 7c17b9277c3f..034f86d9a368 100644 --- a/drivers/scsi/qla2xxx/qla_mr.c +++ b/drivers/scsi/qla2xxx/qla_mr.c | |||
@@ -1610,6 +1610,22 @@ qlafx00_timer_routine(scsi_qla_host_t *vha) | |||
1610 | ha->mr.fw_critemp_timer_tick--; | 1610 | ha->mr.fw_critemp_timer_tick--; |
1611 | } | 1611 | } |
1612 | } | 1612 | } |
1613 | if (ha->mr.host_info_resend) { | ||
1614 | /* | ||
1615 | * Incomplete host info might be sent to firmware | ||
1616 | * durinng system boot - info should be resend | ||
1617 | */ | ||
1618 | if (ha->mr.hinfo_resend_timer_tick == 0) { | ||
1619 | ha->mr.host_info_resend = false; | ||
1620 | set_bit(FX00_HOST_INFO_RESEND, &vha->dpc_flags); | ||
1621 | ha->mr.hinfo_resend_timer_tick = | ||
1622 | QLAFX00_HINFO_RESEND_INTERVAL; | ||
1623 | qla2xxx_wake_dpc(vha); | ||
1624 | } else { | ||
1625 | ha->mr.hinfo_resend_timer_tick--; | ||
1626 | } | ||
1627 | } | ||
1628 | |||
1613 | } | 1629 | } |
1614 | 1630 | ||
1615 | /* | 1631 | /* |
@@ -1888,6 +1904,8 @@ qlafx00_fx_disc(scsi_qla_host_t *vha, fc_port_t *fcport, uint16_t fx_type) | |||
1888 | p_sysid->sysname, SYSNAME_LENGTH); | 1904 | p_sysid->sysname, SYSNAME_LENGTH); |
1889 | strncpy(phost_info->nodename, | 1905 | strncpy(phost_info->nodename, |
1890 | p_sysid->nodename, NODENAME_LENGTH); | 1906 | p_sysid->nodename, NODENAME_LENGTH); |
1907 | if (!strcmp(phost_info->nodename, "(none)")) | ||
1908 | ha->mr.host_info_resend = true; | ||
1891 | strncpy(phost_info->release, | 1909 | strncpy(phost_info->release, |
1892 | p_sysid->release, RELEASE_LENGTH); | 1910 | p_sysid->release, RELEASE_LENGTH); |
1893 | strncpy(phost_info->version, | 1911 | strncpy(phost_info->version, |
diff --git a/drivers/scsi/qla2xxx/qla_mr.h b/drivers/scsi/qla2xxx/qla_mr.h index 79a93c52baec..a5ddea64e55a 100644 --- a/drivers/scsi/qla2xxx/qla_mr.h +++ b/drivers/scsi/qla2xxx/qla_mr.h | |||
@@ -511,6 +511,8 @@ struct mr_data_fx00 { | |||
511 | uint32_t old_aenmbx0_state; | 511 | uint32_t old_aenmbx0_state; |
512 | uint32_t critical_temperature; | 512 | uint32_t critical_temperature; |
513 | bool extended_io_enabled; | 513 | bool extended_io_enabled; |
514 | bool host_info_resend; | ||
515 | uint8_t hinfo_resend_timer_tick; | ||
514 | }; | 516 | }; |
515 | 517 | ||
516 | #define QLAFX00_EXTENDED_IO_EN_MASK 0x20 | 518 | #define QLAFX00_EXTENDED_IO_EN_MASK 0x20 |
@@ -537,6 +539,7 @@ struct mr_data_fx00 { | |||
537 | #define QLAFX00_RESET_INTERVAL 120 /* number of seconds */ | 539 | #define QLAFX00_RESET_INTERVAL 120 /* number of seconds */ |
538 | #define QLAFX00_MAX_RESET_INTERVAL 600 /* number of seconds */ | 540 | #define QLAFX00_MAX_RESET_INTERVAL 600 /* number of seconds */ |
539 | #define QLAFX00_CRITEMP_INTERVAL 60 /* number of seconds */ | 541 | #define QLAFX00_CRITEMP_INTERVAL 60 /* number of seconds */ |
542 | #define QLAFX00_HINFO_RESEND_INTERVAL 60 /* number of seconds */ | ||
540 | 543 | ||
541 | #define QLAFX00_CRITEMP_THRSHLD 80 /* Celsius degrees */ | 544 | #define QLAFX00_CRITEMP_THRSHLD 80 /* Celsius degrees */ |
542 | 545 | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 690b626df930..4ab9a272e11b 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -2495,6 +2495,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2495 | ha->mr.fw_reset_timer_tick = QLAFX00_RESET_INTERVAL; | 2495 | ha->mr.fw_reset_timer_tick = QLAFX00_RESET_INTERVAL; |
2496 | ha->mr.fw_critemp_timer_tick = QLAFX00_CRITEMP_INTERVAL; | 2496 | ha->mr.fw_critemp_timer_tick = QLAFX00_CRITEMP_INTERVAL; |
2497 | ha->mr.fw_hbt_en = 1; | 2497 | ha->mr.fw_hbt_en = 1; |
2498 | ha->mr.host_info_resend = false; | ||
2499 | ha->mr.hinfo_resend_timer_tick = QLAFX00_HINFO_RESEND_INTERVAL; | ||
2498 | } | 2500 | } |
2499 | 2501 | ||
2500 | ql_dbg_pci(ql_dbg_init, pdev, 0x001e, | 2502 | ql_dbg_pci(ql_dbg_init, pdev, 0x001e, |
@@ -4867,6 +4869,14 @@ qla2x00_do_dpc(void *data) | |||
4867 | ql_dbg(ql_dbg_dpc, base_vha, 0x401f, | 4869 | ql_dbg(ql_dbg_dpc, base_vha, 0x401f, |
4868 | "ISPFx00 Target Scan End\n"); | 4870 | "ISPFx00 Target Scan End\n"); |
4869 | } | 4871 | } |
4872 | if (test_and_clear_bit(FX00_HOST_INFO_RESEND, | ||
4873 | &base_vha->dpc_flags)) { | ||
4874 | ql_dbg(ql_dbg_dpc, base_vha, 0x4023, | ||
4875 | "ISPFx00 Host Info resend scheduled\n"); | ||
4876 | qlafx00_fx_disc(base_vha, | ||
4877 | &base_vha->hw->mr.fcport, | ||
4878 | FXDISC_REG_HOST_INFO); | ||
4879 | } | ||
4870 | } | 4880 | } |
4871 | 4881 | ||
4872 | if (test_and_clear_bit(ISP_ABORT_NEEDED, | 4882 | if (test_and_clear_bit(ISP_ABORT_NEEDED, |