aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorMoore, Eric <Eric.Moore@lsil.com>2006-01-16 20:53:19 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2006-01-31 15:39:56 -0500
commitece50914d5ce5c238e07d644e58701c173c48b7d (patch)
treeca26b12074f941cca5eb73ca6ff6884a5a04f39f /drivers/message
parent928496ac317cff0eaf70aef2d5039a2f66966247 (diff)
[SCSI] fusion: add verbose messages for RAID actions
A customer request to send raid asyn actions from firmware to the event syslog. This shows when raid volumes go degraded, or complete resync, or volumes created/deleted, etc. Signed-off-by: Eric Moore <Eric.Moore@lsil.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptbase.c136
1 files changed, 136 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 780e8be9066e..2ef64b9ada88 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -4390,6 +4390,138 @@ mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode)
4390} 4390}
4391 4391
4392/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 4392/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
4393
4394static void
4395mptbase_raid_process_event_data(MPT_ADAPTER *ioc,
4396 MpiEventDataRaid_t * pRaidEventData)
4397{
4398 int volume;
4399 int reason;
4400 int disk;
4401 int status;
4402 int flags;
4403 int state;
4404
4405 volume = pRaidEventData->VolumeID;
4406 reason = pRaidEventData->ReasonCode;
4407 disk = pRaidEventData->PhysDiskNum;
4408 status = le32_to_cpu(pRaidEventData->SettingsStatus);
4409 flags = (status >> 0) & 0xff;
4410 state = (status >> 8) & 0xff;
4411
4412 if (reason == MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED) {
4413 return;
4414 }
4415
4416 if ((reason >= MPI_EVENT_RAID_RC_PHYSDISK_CREATED &&
4417 reason <= MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED) ||
4418 (reason == MPI_EVENT_RAID_RC_SMART_DATA)) {
4419 printk(MYIOC_s_INFO_FMT "RAID STATUS CHANGE for PhysDisk %d\n",
4420 ioc->name, disk);
4421 } else {
4422 printk(MYIOC_s_INFO_FMT "RAID STATUS CHANGE for VolumeID %d\n",
4423 ioc->name, volume);
4424 }
4425
4426 switch(reason) {
4427 case MPI_EVENT_RAID_RC_VOLUME_CREATED:
4428 printk(MYIOC_s_INFO_FMT " volume has been created\n",
4429 ioc->name);
4430 break;
4431
4432 case MPI_EVENT_RAID_RC_VOLUME_DELETED:
4433
4434 printk(MYIOC_s_INFO_FMT " volume has been deleted\n",
4435 ioc->name);
4436 break;
4437
4438 case MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED:
4439 printk(MYIOC_s_INFO_FMT " volume settings have been changed\n",
4440 ioc->name);
4441 break;
4442
4443 case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED:
4444 printk(MYIOC_s_INFO_FMT " volume is now %s%s%s%s\n",
4445 ioc->name,
4446 state == MPI_RAIDVOL0_STATUS_STATE_OPTIMAL
4447 ? "optimal"
4448 : state == MPI_RAIDVOL0_STATUS_STATE_DEGRADED
4449 ? "degraded"
4450 : state == MPI_RAIDVOL0_STATUS_STATE_FAILED
4451 ? "failed"
4452 : "state unknown",
4453 flags & MPI_RAIDVOL0_STATUS_FLAG_ENABLED
4454 ? ", enabled" : "",
4455 flags & MPI_RAIDVOL0_STATUS_FLAG_QUIESCED
4456 ? ", quiesced" : "",
4457 flags & MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS
4458 ? ", resync in progress" : "" );
4459 break;
4460
4461 case MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED:
4462 printk(MYIOC_s_INFO_FMT " volume membership of PhysDisk %d has changed\n",
4463 ioc->name, disk);
4464 break;
4465
4466 case MPI_EVENT_RAID_RC_PHYSDISK_CREATED:
4467 printk(MYIOC_s_INFO_FMT " PhysDisk has been created\n",
4468 ioc->name);
4469 break;
4470
4471 case MPI_EVENT_RAID_RC_PHYSDISK_DELETED:
4472 printk(MYIOC_s_INFO_FMT " PhysDisk has been deleted\n",
4473 ioc->name);
4474 break;
4475
4476 case MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED:
4477 printk(MYIOC_s_INFO_FMT " PhysDisk settings have been changed\n",
4478 ioc->name);
4479 break;
4480
4481 case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED:
4482 printk(MYIOC_s_INFO_FMT " PhysDisk is now %s%s%s\n",
4483 ioc->name,
4484 state == MPI_PHYSDISK0_STATUS_ONLINE
4485 ? "online"
4486 : state == MPI_PHYSDISK0_STATUS_MISSING
4487 ? "missing"
4488 : state == MPI_PHYSDISK0_STATUS_NOT_COMPATIBLE
4489 ? "not compatible"
4490 : state == MPI_PHYSDISK0_STATUS_FAILED
4491 ? "failed"
4492 : state == MPI_PHYSDISK0_STATUS_INITIALIZING
4493 ? "initializing"
4494 : state == MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED
4495 ? "offline requested"
4496 : state == MPI_PHYSDISK0_STATUS_FAILED_REQUESTED
4497 ? "failed requested"
4498 : state == MPI_PHYSDISK0_STATUS_OTHER_OFFLINE
4499 ? "offline"
4500 : "state unknown",
4501 flags & MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC
4502 ? ", out of sync" : "",
4503 flags & MPI_PHYSDISK0_STATUS_FLAG_QUIESCED
4504 ? ", quiesced" : "" );
4505 break;
4506
4507 case MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED:
4508 printk(MYIOC_s_INFO_FMT " Domain Validation needed for PhysDisk %d\n",
4509 ioc->name, disk);
4510 break;
4511
4512 case MPI_EVENT_RAID_RC_SMART_DATA:
4513 printk(MYIOC_s_INFO_FMT " SMART data received, ASC/ASCQ = %02xh/%02xh\n",
4514 ioc->name, pRaidEventData->ASC, pRaidEventData->ASCQ);
4515 break;
4516
4517 case MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED:
4518 printk(MYIOC_s_INFO_FMT " replacement of PhysDisk %d has started\n",
4519 ioc->name, disk);
4520 break;
4521 }
4522}
4523
4524/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
4393/* 4525/*
4394 * GetIoUnitPage2 - Retrieve BIOS version and boot order information. 4526 * GetIoUnitPage2 - Retrieve BIOS version and boot order information.
4395 * @ioc: Pointer to MPT_ADAPTER structure 4527 * @ioc: Pointer to MPT_ADAPTER structure
@@ -5978,6 +6110,10 @@ ProcessEventNotification(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply
5978 } 6110 }
5979 } 6111 }
5980 break; 6112 break;
6113 case MPI_EVENT_INTEGRATED_RAID:
6114 mptbase_raid_process_event_data(ioc,
6115 (MpiEventDataRaid_t *)pEventReply->Data);
6116 break;
5981 default: 6117 default:
5982 break; 6118 break;
5983 } 6119 }