diff options
author | Joe Carnuccio <joe.carnuccio@qlogic.com> | 2016-07-06 11:14:19 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-07-15 15:31:31 -0400 |
commit | a29b3dd7aa14facc902b40b8b5c4dccbfb2ad7d0 (patch) | |
tree | 8ebbe20c40a73eb1239ff2410043625560e4d9f9 /drivers/scsi | |
parent | ad1ef1777d5f3b605fe07062da2f08689c507014 (diff) |
qla2xxx: Shutdown board on thermal shutdown aen.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-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_isr.c | 7 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 10 |
4 files changed, 19 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c index b985fcbdf79b..0671f07a0974 100644 --- a/drivers/scsi/qla2xxx/qla_dbg.c +++ b/drivers/scsi/qla2xxx/qla_dbg.c | |||
@@ -27,7 +27,7 @@ | |||
27 | * | | | 0x303a | | 27 | * | | | 0x303a | |
28 | * | DPC Thread | 0x4023 | 0x4002,0x4013 | | 28 | * | DPC Thread | 0x4023 | 0x4002,0x4013 | |
29 | * | Async Events | 0x5089 | 0x502b-0x502f | | 29 | * | Async Events | 0x5089 | 0x502b-0x502f | |
30 | * | | | 0x505e | | 30 | * | | | 0x5047 | |
31 | * | | | 0x5084,0x5075 | | 31 | * | | | 0x5084,0x5075 | |
32 | * | | | 0x503d,0x5044 | | 32 | * | | | 0x503d,0x5044 | |
33 | * | | | 0x507b,0x505f | | 33 | * | | | 0x507b,0x505f | |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 7f861474d7b5..2b7e4f5574bb 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -829,6 +829,7 @@ struct mbx_cmd_32 { | |||
829 | #define MBA_FW_RESTART_CMPLT 0x8060 /* Firmware restart complete */ | 829 | #define MBA_FW_RESTART_CMPLT 0x8060 /* Firmware restart complete */ |
830 | #define MBA_INIT_REQUIRED 0x8061 /* Initialization required */ | 830 | #define MBA_INIT_REQUIRED 0x8061 /* Initialization required */ |
831 | #define MBA_SHUTDOWN_REQUESTED 0x8062 /* Shutdown Requested */ | 831 | #define MBA_SHUTDOWN_REQUESTED 0x8062 /* Shutdown Requested */ |
832 | #define MBA_TEMPERATURE_ALERT 0x8070 /* Temperature Alert */ | ||
832 | #define MBA_DPORT_DIAGNOSTICS 0x8080 /* D-port Diagnostics */ | 833 | #define MBA_DPORT_DIAGNOSTICS 0x8080 /* D-port Diagnostics */ |
833 | #define MBA_FW_INIT_FAILURE 0x8401 /* Firmware initialization failure */ | 834 | #define MBA_FW_INIT_FAILURE 0x8401 /* Firmware initialization failure */ |
834 | #define MBA_MIRROR_LUN_CHANGE 0x8402 /* Mirror LUN State Change | 835 | #define MBA_MIRROR_LUN_CHANGE 0x8402 /* Mirror LUN State Change |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index ea8641b47c86..a2d7935ffeea 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -1158,6 +1158,13 @@ global_port_update: | |||
1158 | mb[1] == 2 ? "done (error)" : "other"); | 1158 | mb[1] == 2 ? "done (error)" : "other"); |
1159 | break; | 1159 | break; |
1160 | 1160 | ||
1161 | case MBA_TEMPERATURE_ALERT: | ||
1162 | ql_dbg(ql_dbg_async, vha, 0x505e, | ||
1163 | "TEMPERATURE ALERT: %04x %04x %04x\n", mb[1], mb[2], mb[3]); | ||
1164 | if (mb[1] == 0x12) | ||
1165 | schedule_work(&ha->board_disable); | ||
1166 | break; | ||
1167 | |||
1161 | default: | 1168 | default: |
1162 | ql_dbg(ql_dbg_async, vha, 0x5057, | 1169 | ql_dbg(ql_dbg_async, vha, 0x5057, |
1163 | "Unknown AEN:%04x %04x %04x %04x\n", | 1170 | "Unknown AEN:%04x %04x %04x %04x\n", |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 7c0b60ca158f..dc608ce46340 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -2901,6 +2901,10 @@ skip_dpc: | |||
2901 | qlt_add_target(ha, base_vha); | 2901 | qlt_add_target(ha, base_vha); |
2902 | 2902 | ||
2903 | clear_bit(PFLG_DRIVER_PROBING, &base_vha->pci_flags); | 2903 | clear_bit(PFLG_DRIVER_PROBING, &base_vha->pci_flags); |
2904 | |||
2905 | if (test_bit(UNLOADING, &base_vha->dpc_flags)) | ||
2906 | return -ENODEV; | ||
2907 | |||
2904 | return 0; | 2908 | return 0; |
2905 | 2909 | ||
2906 | probe_init_failed: | 2910 | probe_init_failed: |
@@ -2947,7 +2951,10 @@ iospace_config_failed: | |||
2947 | ha = NULL; | 2951 | ha = NULL; |
2948 | 2952 | ||
2949 | probe_out: | 2953 | probe_out: |
2954 | pci_disable_pcie_error_reporting(pdev); | ||
2950 | pci_disable_device(pdev); | 2955 | pci_disable_device(pdev); |
2956 | if (test_bit(UNLOADING, &base_vha->dpc_flags)) | ||
2957 | return -ENODEV; | ||
2951 | return ret; | 2958 | return ret; |
2952 | } | 2959 | } |
2953 | 2960 | ||
@@ -5002,6 +5009,9 @@ qla2x00_do_dpc(void *data) | |||
5002 | "DPC handler waking up, dpc_flags=0x%lx.\n", | 5009 | "DPC handler waking up, dpc_flags=0x%lx.\n", |
5003 | base_vha->dpc_flags); | 5010 | base_vha->dpc_flags); |
5004 | 5011 | ||
5012 | if (test_bit(UNLOADING, &base_vha->dpc_flags)) | ||
5013 | break; | ||
5014 | |||
5005 | qla2x00_do_work(base_vha); | 5015 | qla2x00_do_work(base_vha); |
5006 | 5016 | ||
5007 | if (IS_P3P_TYPE(ha)) { | 5017 | if (IS_P3P_TYPE(ha)) { |