diff options
Diffstat (limited to 'drivers/scsi/mpt3sas/mpt3sas_scsih.c')
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_scsih.c | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b/drivers/scsi/mpt3sas/mpt3sas_scsih.c index 94261ee9e72d..5a97e3286719 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c +++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * This code is based on drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 | * This code is based on drivers/scsi/mpt3sas/mpt3sas_scsih.c |
5 | * Copyright (C) 2012-2014 LSI Corporation | 5 | * Copyright (C) 2012-2014 LSI Corporation |
6 | * (mailto:DL-MPTFusionLinux@lsi.com) | 6 | * Copyright (C) 2013-2014 Avago Technologies |
7 | * (mailto: MPT-FusionLinux.pdl@avagotech.com) | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
@@ -2392,9 +2393,17 @@ _scsih_host_reset(struct scsi_cmnd *scmd) | |||
2392 | ioc->name, scmd); | 2393 | ioc->name, scmd); |
2393 | scsi_print_command(scmd); | 2394 | scsi_print_command(scmd); |
2394 | 2395 | ||
2396 | if (ioc->is_driver_loading) { | ||
2397 | pr_info(MPT3SAS_FMT "Blocking the host reset\n", | ||
2398 | ioc->name); | ||
2399 | r = FAILED; | ||
2400 | goto out; | ||
2401 | } | ||
2402 | |||
2395 | retval = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, | 2403 | retval = mpt3sas_base_hard_reset_handler(ioc, CAN_SLEEP, |
2396 | FORCE_BIG_HAMMER); | 2404 | FORCE_BIG_HAMMER); |
2397 | r = (retval < 0) ? FAILED : SUCCESS; | 2405 | r = (retval < 0) ? FAILED : SUCCESS; |
2406 | out: | ||
2398 | pr_info(MPT3SAS_FMT "host reset: %s scmd(%p)\n", | 2407 | pr_info(MPT3SAS_FMT "host reset: %s scmd(%p)\n", |
2399 | ioc->name, ((r == SUCCESS) ? "SUCCESS" : "FAILED"), scmd); | 2408 | ioc->name, ((r == SUCCESS) ? "SUCCESS" : "FAILED"), scmd); |
2400 | 2409 | ||
@@ -3342,6 +3351,31 @@ _scsih_check_volume_delete_events(struct MPT3SAS_ADAPTER *ioc, | |||
3342 | } | 3351 | } |
3343 | 3352 | ||
3344 | /** | 3353 | /** |
3354 | * _scsih_temp_threshold_events - display temperature threshold exceeded events | ||
3355 | * @ioc: per adapter object | ||
3356 | * @event_data: the temp threshold event data | ||
3357 | * Context: interrupt time. | ||
3358 | * | ||
3359 | * Return nothing. | ||
3360 | */ | ||
3361 | static void | ||
3362 | _scsih_temp_threshold_events(struct MPT3SAS_ADAPTER *ioc, | ||
3363 | Mpi2EventDataTemperature_t *event_data) | ||
3364 | { | ||
3365 | if (ioc->temp_sensors_count >= event_data->SensorNum) { | ||
3366 | pr_err(MPT3SAS_FMT "Temperature Threshold flags %s%s%s%s" | ||
3367 | " exceeded for Sensor: %d !!!\n", ioc->name, | ||
3368 | ((le16_to_cpu(event_data->Status) & 0x1) == 1) ? "0 " : " ", | ||
3369 | ((le16_to_cpu(event_data->Status) & 0x2) == 2) ? "1 " : " ", | ||
3370 | ((le16_to_cpu(event_data->Status) & 0x4) == 4) ? "2 " : " ", | ||
3371 | ((le16_to_cpu(event_data->Status) & 0x8) == 8) ? "3 " : " ", | ||
3372 | event_data->SensorNum); | ||
3373 | pr_err(MPT3SAS_FMT "Current Temp In Celsius: %d\n", | ||
3374 | ioc->name, event_data->CurrentTemperature); | ||
3375 | } | ||
3376 | } | ||
3377 | |||
3378 | /** | ||
3345 | * _scsih_flush_running_cmds - completing outstanding commands. | 3379 | * _scsih_flush_running_cmds - completing outstanding commands. |
3346 | * @ioc: per adapter object | 3380 | * @ioc: per adapter object |
3347 | * | 3381 | * |
@@ -7194,6 +7228,12 @@ mpt3sas_scsih_event_callback(struct MPT3SAS_ADAPTER *ioc, u8 msix_index, | |||
7194 | case MPI2_EVENT_IR_PHYSICAL_DISK: | 7228 | case MPI2_EVENT_IR_PHYSICAL_DISK: |
7195 | break; | 7229 | break; |
7196 | 7230 | ||
7231 | case MPI2_EVENT_TEMP_THRESHOLD: | ||
7232 | _scsih_temp_threshold_events(ioc, | ||
7233 | (Mpi2EventDataTemperature_t *) | ||
7234 | mpi_reply->EventData); | ||
7235 | break; | ||
7236 | |||
7197 | default: /* ignore the rest */ | 7237 | default: /* ignore the rest */ |
7198 | return 1; | 7238 | return 1; |
7199 | } | 7239 | } |