be2iscsi: Fix to process 25G link speed info from FW
Async link event provides port_speed info. Cache the port_speed info and use the same to report in ISCSI_HOST_PARAM_PORT_SPEED query. Removed link status query IOCTL used to do the same. Signed-off-by: Jitendra Bhivare <jitendra.bhivare@avagotech.com> Reviewed-by: Hannes Reinicke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

父節點
f9e4fa4619
當前提交
048084c268
@@ -153,12 +153,21 @@ struct be_async_event_link_state {
|
||||
u8 physical_port;
|
||||
u8 port_link_status;
|
||||
u8 port_duplex;
|
||||
/* BE2ISCSI_LINK_SPEED_ZERO 0x00 - no link */
|
||||
#define BE2ISCSI_LINK_SPEED_10MBPS 0x01
|
||||
#define BE2ISCSI_LINK_SPEED_100MBPS 0x02
|
||||
#define BE2ISCSI_LINK_SPEED_1GBPS 0x03
|
||||
#define BE2ISCSI_LINK_SPEED_10GBPS 0x04
|
||||
#define BE2ISCSI_LINK_SPEED_25GBPS 0x06
|
||||
#define BE2ISCSI_LINK_SPEED_40GBPS 0x07
|
||||
u8 port_speed;
|
||||
#define BEISCSI_PHY_LINK_FAULT_NONE 0x00
|
||||
#define BEISCSI_PHY_LINK_FAULT_LOCAL 0x01
|
||||
#define BEISCSI_PHY_LINK_FAULT_REMOTE 0x02
|
||||
u8 port_fault;
|
||||
u8 rsvd0[7];
|
||||
u8 event_reason;
|
||||
u16 qos_link_speed;
|
||||
u32 event_tag;
|
||||
struct be_async_event_trailer trailer;
|
||||
} __packed;
|
||||
|
||||
@@ -711,29 +720,6 @@ struct be_cmd_hba_name {
|
||||
u8 initiator_alias[BEISCSI_ALIAS_LEN];
|
||||
} __packed;
|
||||
|
||||
struct be_cmd_ntwk_link_status_req {
|
||||
struct be_cmd_req_hdr hdr;
|
||||
u32 rsvd0;
|
||||
} __packed;
|
||||
|
||||
/*** Port Speed Values ***/
|
||||
#define BE2ISCSI_LINK_SPEED_ZERO 0x00
|
||||
#define BE2ISCSI_LINK_SPEED_10MBPS 0x01
|
||||
#define BE2ISCSI_LINK_SPEED_100MBPS 0x02
|
||||
#define BE2ISCSI_LINK_SPEED_1GBPS 0x03
|
||||
#define BE2ISCSI_LINK_SPEED_10GBPS 0x04
|
||||
struct be_cmd_ntwk_link_status_resp {
|
||||
struct be_cmd_resp_hdr hdr;
|
||||
u8 phys_port;
|
||||
u8 mac_duplex;
|
||||
u8 mac_speed;
|
||||
u8 mac_fault;
|
||||
u8 mgmt_mac_duplex;
|
||||
u8 mgmt_mac_speed;
|
||||
u16 qos_link_speed;
|
||||
u32 logical_link_speed;
|
||||
} __packed;
|
||||
|
||||
int beiscsi_cmd_eq_create(struct be_ctrl_info *ctrl,
|
||||
struct be_queue_info *eq, int eq_delay);
|
||||
|
||||
@@ -752,7 +738,6 @@ int be_poll_mcc(struct be_ctrl_info *ctrl);
|
||||
int mgmt_check_supported_fw(struct be_ctrl_info *ctrl,
|
||||
struct beiscsi_hba *phba);
|
||||
unsigned int be_cmd_get_initname(struct beiscsi_hba *phba);
|
||||
unsigned int be_cmd_get_port_speed(struct beiscsi_hba *phba);
|
||||
|
||||
void free_mcc_tag(struct be_ctrl_info *ctrl, unsigned int tag);
|
||||
|
||||
|
Reference in New Issue
Block a user