diff options
author | Jitendra Bhivare <jitendra.bhivare@avagotech.com> | 2016-01-20 03:40:53 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-02-23 21:27:02 -0500 |
commit | 53aefe2552e6efadb0e1a12c2c3adb12105a64f9 (patch) | |
tree | c4e5f79e2744a665099b8ceb34ee260230774e9e /drivers/scsi/be2iscsi/be_main.c | |
parent | c9beb6fa14576c4e566696d62f26d748459bac2d (diff) |
be2iscsi: Fix to handle misconfigured optics events
Log messages for misconfigured transceivers reported by FW.
Register async events that driver handles using MCC_CREATE_EXT ioctl.
Errors messages for faulted/uncertified/unqualified optics are logged.
Added IOCTL to get port_name to be displayed in error message.
Signed-off-by: Jitendra Bhivare <jitendra.bhivare@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 5aab8fd32e4d..e86eca98a525 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c | |||
@@ -2046,21 +2046,7 @@ static void beiscsi_process_mcc_isr(struct beiscsi_hba *phba) | |||
2046 | num_processed = 0; | 2046 | num_processed = 0; |
2047 | } | 2047 | } |
2048 | if (mcc_compl->flags & CQE_FLAGS_ASYNC_MASK) { | 2048 | if (mcc_compl->flags & CQE_FLAGS_ASYNC_MASK) { |
2049 | /* Interpret flags as an async trailer */ | 2049 | beiscsi_process_async_event(phba, mcc_compl); |
2050 | if (is_link_state_evt(mcc_compl->flags)) | ||
2051 | /* Interpret compl as a async link evt */ | ||
2052 | beiscsi_async_link_state_process(phba, | ||
2053 | (struct be_async_event_link_state *) mcc_compl); | ||
2054 | else { | ||
2055 | beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_MBOX, | ||
2056 | "BM_%d : Unsupported Async Event, flags" | ||
2057 | " = 0x%08x\n", | ||
2058 | mcc_compl->flags); | ||
2059 | if (phba->state & BE_ADAPTER_LINK_UP) { | ||
2060 | phba->state |= BE_ADAPTER_CHECK_BOOT; | ||
2061 | phba->get_boot = BE_GET_BOOT_RETRIES; | ||
2062 | } | ||
2063 | } | ||
2064 | } else if (mcc_compl->flags & CQE_FLAGS_COMPLETED_MASK) { | 2050 | } else if (mcc_compl->flags & CQE_FLAGS_COMPLETED_MASK) { |
2065 | be_mcc_compl_process_isr(&phba->ctrl, mcc_compl); | 2051 | be_mcc_compl_process_isr(&phba->ctrl, mcc_compl); |
2066 | atomic_dec(&phba->ctrl.mcc_obj.q.used); | 2052 | atomic_dec(&phba->ctrl.mcc_obj.q.used); |
@@ -3866,6 +3852,8 @@ static int hwi_init_port(struct beiscsi_hba *phba) | |||
3866 | phwi_context->min_eqd = 0; | 3852 | phwi_context->min_eqd = 0; |
3867 | phwi_context->cur_eqd = 0; | 3853 | phwi_context->cur_eqd = 0; |
3868 | be_cmd_fw_initialize(&phba->ctrl); | 3854 | be_cmd_fw_initialize(&phba->ctrl); |
3855 | /* set optic state to unknown */ | ||
3856 | phba->optic_state = 0xff; | ||
3869 | 3857 | ||
3870 | status = beiscsi_create_eqs(phba, phwi_context); | 3858 | status = beiscsi_create_eqs(phba, phwi_context); |
3871 | if (status != 0) { | 3859 | if (status != 0) { |
@@ -5678,6 +5666,7 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev, | |||
5678 | "BM_%d : Error getting fw config\n"); | 5666 | "BM_%d : Error getting fw config\n"); |
5679 | goto free_port; | 5667 | goto free_port; |
5680 | } | 5668 | } |
5669 | mgmt_get_port_name(&phba->ctrl, phba); | ||
5681 | 5670 | ||
5682 | if (enable_msix) | 5671 | if (enable_msix) |
5683 | find_num_cpus(phba); | 5672 | find_num_cpus(phba); |