diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2010-06-17 04:06:53 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 13:02:11 -0400 |
commit | d32a8c15e1116e87f0105356eca1afb99842ab49 (patch) | |
tree | 3795c1d0bd520021a21613ec063b557e51955cd0 /drivers/scsi/mpt2sas/mpt2sas_base.c | |
parent | b8d7d7bb37b5e25ea740369eb12de5279fe6ab30 (diff) |
[SCSI] mpt2sas: Added sysfs counter for ioc reset
Added a new sysfs shost attribute called ioc_reset_count. This will
keep count of host resets (both diagnostic and message unit).
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.c')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 68cb000bf486..88befc798469 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -3402,6 +3402,7 @@ _base_make_ioc_ready(struct MPT2SAS_ADAPTER *ioc, int sleep_flag, | |||
3402 | enum reset_type type) | 3402 | enum reset_type type) |
3403 | { | 3403 | { |
3404 | u32 ioc_state; | 3404 | u32 ioc_state; |
3405 | int rc; | ||
3405 | 3406 | ||
3406 | dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name, | 3407 | dinitprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s\n", ioc->name, |
3407 | __func__)); | 3408 | __func__)); |
@@ -3430,11 +3431,15 @@ _base_make_ioc_ready(struct MPT2SAS_ADAPTER *ioc, int sleep_flag, | |||
3430 | 3431 | ||
3431 | if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_OPERATIONAL) | 3432 | if ((ioc_state & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_OPERATIONAL) |
3432 | if (!(_base_send_ioc_reset(ioc, | 3433 | if (!(_base_send_ioc_reset(ioc, |
3433 | MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET, 15, CAN_SLEEP))) | 3434 | MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET, 15, CAN_SLEEP))) { |
3435 | ioc->ioc_reset_count++; | ||
3434 | return 0; | 3436 | return 0; |
3437 | } | ||
3435 | 3438 | ||
3436 | issue_diag_reset: | 3439 | issue_diag_reset: |
3437 | return _base_diag_reset(ioc, CAN_SLEEP); | 3440 | rc = _base_diag_reset(ioc, CAN_SLEEP); |
3441 | ioc->ioc_reset_count++; | ||
3442 | return rc; | ||
3438 | } | 3443 | } |
3439 | 3444 | ||
3440 | /** | 3445 | /** |