diff options
author | Jitendra Bhivare <jitendra.bhivare@avagotech.com> | 2016-01-20 14:10:59 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-02-23 21:27:02 -0500 |
commit | 9c4f8b01731c4ccf369a34f40f5eb384548af46a (patch) | |
tree | 31c4d5acb6dbd44a3821c81ab737e8cc144ec32e /drivers/scsi/be2iscsi/be_cmds.h | |
parent | 048084c26830f714e8eadef3f90ae793a4904545 (diff) | |
download | linux-9c4f8b01731c4ccf369a34f40f5eb384548af46a.tar.gz linux-9c4f8b01731c4ccf369a34f40f5eb384548af46a.tar.bz2 linux-9c4f8b01731c4ccf369a34f40f5eb384548af46a.zip |
be2iscsi: Fix async link event processing
Use only port_link_status only to determine link state change. Only bit
0 is used to get the state. Remove code for processing port_fault.
Fixed get_nic_conf structure definition. Removed rsvd[23] field in
be_cmd_get_nic_conf_resp.
Moved definitions of struct field values below the field.
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>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_cmds.h')
-rw-r--r-- | drivers/scsi/be2iscsi/be_cmds.h | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/drivers/scsi/be2iscsi/be_cmds.h b/drivers/scsi/be2iscsi/be_cmds.h index a194066e5ab8..7caf585e4c2a 100644 --- a/drivers/scsi/be2iscsi/be_cmds.h +++ b/drivers/scsi/be2iscsi/be_cmds.h @@ -142,7 +142,6 @@ struct be_async_event_trailer { enum { ASYNC_EVENT_LINK_DOWN = 0x0, ASYNC_EVENT_LINK_UP = 0x1, - ASYNC_EVENT_LOGICAL = 0x2 }; /** @@ -152,7 +151,15 @@ enum { struct be_async_event_link_state { u8 physical_port; u8 port_link_status; +/** + * ASYNC_EVENT_LINK_DOWN 0x0 + * ASYNC_EVENT_LINK_UP 0x1 + * ASYNC_EVENT_LINK_LOGICAL_DOWN 0x2 + * ASYNC_EVENT_LINK_LOGICAL_UP 0x3 + */ +#define BE_ASYNC_LINK_UP_MASK 0x01 u8 port_duplex; + u8 port_speed; /* BE2ISCSI_LINK_SPEED_ZERO 0x00 - no link */ #define BE2ISCSI_LINK_SPEED_10MBPS 0x01 #define BE2ISCSI_LINK_SPEED_100MBPS 0x02 @@ -160,10 +167,6 @@ struct be_async_event_link_state { #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 event_reason; u16 qos_link_speed; @@ -684,20 +687,6 @@ struct be_cmd_req_modify_eq_delay { /******************** Get MAC ADDR *******************/ -#define ETH_ALEN 6 - -struct be_cmd_get_nic_conf_req { - struct be_cmd_req_hdr hdr; - u32 nic_port_count; - u32 speed; - u32 max_speed; - u32 link_state; - u32 max_frame_size; - u16 size_of_structure; - u8 mac_address[ETH_ALEN]; - u32 rsvd[23]; -}; - struct be_cmd_get_nic_conf_resp { struct be_cmd_resp_hdr hdr; u32 nic_port_count; @@ -706,9 +695,8 @@ struct be_cmd_get_nic_conf_resp { u32 link_state; u32 max_frame_size; u16 size_of_structure; - u8 mac_address[6]; - u32 rsvd[23]; -}; + u8 mac_address[ETH_ALEN]; +} __packed; #define BEISCSI_ALIAS_LEN 32 |