IB/hfi1: Clean up port state structure definition
authorIra Weiny <ira.weiny@intel.com>
Fri, 1 Jul 2016 23:00:49 +0000 (16:00 -0700)
committerDoug Ledford <dledford@redhat.com>
Tue, 2 Aug 2016 16:00:54 +0000 (12:00 -0400)
The definition of port state changed mid development and the
old structure was kept accidentally.  Remove this dead code.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/mad.c
drivers/infiniband/hw/hfi1/mad.h
include/rdma/opa_port_info.h

index fca07a1d6c284b90238543777e85462cc2249651..223dd46cf2aad295e761a1e23ebab3c63e3723e4 100644 (file)
@@ -588,7 +588,6 @@ static int __subn_get_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data,
 
        pi->port_phys_conf = (ppd->port_type & 0xf);
 
-#if PI_LED_ENABLE_SUP
        pi->port_states.ledenable_offlinereason = ppd->neighbor_normal << 4;
        pi->port_states.ledenable_offlinereason |=
                ppd->is_sm_config_started << 5;
@@ -602,11 +601,6 @@ static int __subn_get_opa_portinfo(struct opa_smp *smp, u32 am, u8 *data,
        pi->port_states.ledenable_offlinereason |= is_beaconing_active << 6;
        pi->port_states.ledenable_offlinereason |=
                ppd->offline_disabled_reason;
-#else
-       pi->port_states.offline_reason = ppd->neighbor_normal << 4;
-       pi->port_states.offline_reason |= ppd->is_sm_config_started << 5;
-       pi->port_states.offline_reason |= ppd->offline_disabled_reason;
-#endif /* PI_LED_ENABLE_SUP */
 
        pi->port_states.portphysstate_portstate =
                (hfi1_ibphys_portstate(ppd) << 4) | state;
@@ -1752,17 +1746,11 @@ static int __subn_get_opa_psi(struct opa_smp *smp, u32 am, u8 *data,
        if (start_of_sm_config && (lstate == IB_PORT_INIT))
                ppd->is_sm_config_started = 1;
 
-#if PI_LED_ENABLE_SUP
        psi->port_states.ledenable_offlinereason = ppd->neighbor_normal << 4;
        psi->port_states.ledenable_offlinereason |=
                ppd->is_sm_config_started << 5;
        psi->port_states.ledenable_offlinereason |=
                ppd->offline_disabled_reason;
-#else
-       psi->port_states.offline_reason = ppd->neighbor_normal << 4;
-       psi->port_states.offline_reason |= ppd->is_sm_config_started << 5;
-       psi->port_states.offline_reason |= ppd->offline_disabled_reason;
-#endif /* PI_LED_ENABLE_SUP */
 
        psi->port_states.portphysstate_portstate =
                (hfi1_ibphys_portstate(ppd) << 4) | (lstate & 0xf);
index 8b734aaae88adf48be52a1a2e3d17ca4f800b7ce..5aa3fd1be6538e6b37842c3cd734dedaf18f8dc0 100644 (file)
 #define _HFI1_MAD_H
 
 #include <rdma/ib_pma.h>
-#define USE_PI_LED_ENABLE      1 /*
-                                  * use led enabled bit in struct
-                                  * opa_port_states, if available
-                                  */
 #include <rdma/opa_smi.h>
 #include <rdma/opa_port_info.h>
-#ifndef PI_LED_ENABLE_SUP
-#define PI_LED_ENABLE_SUP 0
-#endif
 #include "opa_compat.h"
 
 /*
index 2b95c2c336eb85db88c1054f991547c11a11ec4e..9303e0e4f508d8c524a34b979da7a359cb15b30c 100644 (file)
 #if !defined(OPA_PORT_INFO_H)
 #define OPA_PORT_INFO_H
 
-/* Temporary until HFI driver is updated */
-#ifndef USE_PI_LED_ENABLE
-#define USE_PI_LED_ENABLE 0
-#endif
-
 #define OPA_PORT_LINK_MODE_NOP 0               /* No change */
 #define OPA_PORT_LINK_MODE_OPA 4               /* Port mode is OPA */
 
@@ -274,23 +269,12 @@ enum port_info_field_masks {
        OPA_PI_MASK_MTU_CAP                       = 0x0F,
 };
 
-#if USE_PI_LED_ENABLE
 struct opa_port_states {
        u8     reserved;
        u8     ledenable_offlinereason;   /* 1 res, 1 bit, 6 bits */
        u8     reserved2;
        u8     portphysstate_portstate;   /* 4 bits, 4 bits */
 };
-#define PI_LED_ENABLE_SUP 1
-#else
-struct opa_port_states {
-       u8     reserved;
-       u8     offline_reason;            /* 2 res, 6 bits */
-       u8     reserved2;
-       u8     portphysstate_portstate;   /* 4 bits, 4 bits */
-};
-#define PI_LED_ENABLE_SUP 0
-#endif
 
 struct opa_port_state_info {
        struct opa_port_states port_states;