aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt2sas/mpt2sas_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mpt2sas/mpt2sas_base.c')
-rw-r--r--drivers/scsi/mpt2sas/mpt2sas_base.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c
index b7b6285a3061..6f786349679f 100644
--- a/drivers/scsi/mpt2sas/mpt2sas_base.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_base.c
@@ -285,6 +285,9 @@ _base_sas_ioc_info(struct MPT2SAS_ADAPTER *ioc, MPI2DefaultReply_t *mpi_reply,
285 request_hdr->Function == MPI2_FUNCTION_EVENT_NOTIFICATION) 285 request_hdr->Function == MPI2_FUNCTION_EVENT_NOTIFICATION)
286 return; 286 return;
287 287
288 if (ioc_status == MPI2_IOCSTATUS_CONFIG_INVALID_PAGE)
289 return;
290
288 switch (ioc_status) { 291 switch (ioc_status) {
289 292
290/**************************************************************************** 293/****************************************************************************
@@ -517,8 +520,18 @@ _base_display_event_data(struct MPT2SAS_ADAPTER *ioc,
517 desc = "IR Operation Status"; 520 desc = "IR Operation Status";
518 break; 521 break;
519 case MPI2_EVENT_SAS_DISCOVERY: 522 case MPI2_EVENT_SAS_DISCOVERY:
520 desc = "Discovery"; 523 {
521 break; 524 Mpi2EventDataSasDiscovery_t *event_data =
525 (Mpi2EventDataSasDiscovery_t *)mpi_reply->EventData;
526 printk(MPT2SAS_INFO_FMT "Discovery: (%s)", ioc->name,
527 (event_data->ReasonCode == MPI2_EVENT_SAS_DISC_RC_STARTED) ?
528 "start" : "stop");
529 if (event_data->DiscoveryStatus)
530 printk("discovery_status(0x%08x)",
531 le32_to_cpu(event_data->DiscoveryStatus));
532 printk("\n");
533 return;
534 }
522 case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE: 535 case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE:
523 desc = "SAS Broadcast Primitive"; 536 desc = "SAS Broadcast Primitive";
524 break; 537 break;
@@ -3184,7 +3197,7 @@ _base_event_notification(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
3184 mpi_request->VP_ID = 0; 3197 mpi_request->VP_ID = 0;
3185 for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++) 3198 for (i = 0; i < MPI2_EVENT_NOTIFY_EVENTMASK_WORDS; i++)
3186 mpi_request->EventMasks[i] = 3199 mpi_request->EventMasks[i] =
3187 le32_to_cpu(ioc->event_masks[i]); 3200 cpu_to_le32(ioc->event_masks[i]);
3188 mpt2sas_base_put_smid_default(ioc, smid); 3201 mpt2sas_base_put_smid_default(ioc, smid);
3189 init_completion(&ioc->base_cmds.done); 3202 init_completion(&ioc->base_cmds.done);
3190 timeleft = wait_for_completion_timeout(&ioc->base_cmds.done, 30*HZ); 3203 timeleft = wait_for_completion_timeout(&ioc->base_cmds.done, 30*HZ);
@@ -3648,6 +3661,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
3648 pci_set_drvdata(ioc->pdev, NULL); 3661 pci_set_drvdata(ioc->pdev, NULL);
3649 kfree(ioc->tm_cmds.reply); 3662 kfree(ioc->tm_cmds.reply);
3650 kfree(ioc->transport_cmds.reply); 3663 kfree(ioc->transport_cmds.reply);
3664 kfree(ioc->scsih_cmds.reply);
3651 kfree(ioc->config_cmds.reply); 3665 kfree(ioc->config_cmds.reply);
3652 kfree(ioc->base_cmds.reply); 3666 kfree(ioc->base_cmds.reply);
3653 kfree(ioc->ctl_cmds.reply); 3667 kfree(ioc->ctl_cmds.reply);
@@ -3655,6 +3669,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
3655 ioc->ctl_cmds.reply = NULL; 3669 ioc->ctl_cmds.reply = NULL;
3656 ioc->base_cmds.reply = NULL; 3670 ioc->base_cmds.reply = NULL;
3657 ioc->tm_cmds.reply = NULL; 3671 ioc->tm_cmds.reply = NULL;
3672 ioc->scsih_cmds.reply = NULL;
3658 ioc->transport_cmds.reply = NULL; 3673 ioc->transport_cmds.reply = NULL;
3659 ioc->config_cmds.reply = NULL; 3674 ioc->config_cmds.reply = NULL;
3660 ioc->pfacts = NULL; 3675 ioc->pfacts = NULL;
@@ -3684,6 +3699,7 @@ mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc)
3684 kfree(ioc->base_cmds.reply); 3699 kfree(ioc->base_cmds.reply);
3685 kfree(ioc->tm_cmds.reply); 3700 kfree(ioc->tm_cmds.reply);
3686 kfree(ioc->transport_cmds.reply); 3701 kfree(ioc->transport_cmds.reply);
3702 kfree(ioc->scsih_cmds.reply);
3687 kfree(ioc->config_cmds.reply); 3703 kfree(ioc->config_cmds.reply);
3688} 3704}
3689 3705