diff options
author | Jitendra Bhivare <jitendra.bhivare@avagotech.com> | 2016-01-20 14:10:53 +0530 |
---|---|---|
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.h | |
parent | c9beb6fa14576c4e566696d62f26d748459bac2d (diff) | |
download | linux-stable-53aefe2552e6efadb0e1a12c2c3adb12105a64f9.tar.gz linux-stable-53aefe2552e6efadb0e1a12c2c3adb12105a64f9.tar.bz2 linux-stable-53aefe2552e6efadb0e1a12c2c3adb12105a64f9.zip |
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.h')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.h b/drivers/scsi/be2iscsi/be_main.h index bd9d1e175b07..c09082aef7ae 100644 --- a/drivers/scsi/be2iscsi/be_main.h +++ b/drivers/scsi/be2iscsi/be_main.h @@ -415,6 +415,7 @@ struct beiscsi_hba { } fw_config; unsigned int state; + u8 optic_state; int get_boot; bool fw_timeout; bool ue_detected; @@ -422,6 +423,7 @@ struct beiscsi_hba { bool mac_addr_set; u8 mac_address[ETH_ALEN]; + u8 port_name; char fw_ver_str[BEISCSI_VER_STRLEN]; char wq_name[20]; struct workqueue_struct *wq; /* The actuak work queue */ @@ -1073,12 +1075,14 @@ struct hwi_context_memory { #define BEISCSI_LOG_CONFIG 0x0020 /* CONFIG Code Path */ #define BEISCSI_LOG_ISCSI 0x0040 /* SCSI/iSCSI Protocol related Logs */ +#define __beiscsi_log(phba, level, fmt, arg...) \ + shost_printk(level, phba->shost, fmt, __LINE__, ##arg) + #define beiscsi_log(phba, level, mask, fmt, arg...) \ do { \ uint32_t log_value = phba->attr_log_enable; \ if (((mask) & log_value) || (level[1] <= '3')) \ - shost_printk(level, phba->shost, \ - fmt, __LINE__, ##arg); \ -} while (0) + __beiscsi_log(phba, level, fmt, ##arg); \ +} while (0); #endif |