IB/core: Move opa_class_port_info definition to header file
authorDasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Fri, 28 Apr 2017 21:47:10 +0000 (17:47 -0400)
committerDoug Ledford <dledford@redhat.com>
Fri, 28 Apr 2017 22:10:05 +0000 (18:10 -0400)
Both opa_vnic and the hfi driver use the same opa_classport_info
definition. We will also have ib_sa capable of querying opa class
port info and would need this definition. Move it to ib_mad.h
for everyone to use.

Signed-off-by: Dasaratharaman Chandramouli <dasaratharaman.chandramouli@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/mad.c
drivers/infiniband/ulp/opa_vnic/opa_vnic_vema.c
include/rdma/ib_mad.h

index 4c6f51ce258466ef28d0468706a0c6ef6ca3b512..836d00b04547cde994044980a3e3f8a741b4d4e0 100644 (file)
@@ -1994,31 +1994,6 @@ struct opa_pma_mad {
        u8 data[2024];
 } __packed;
 
-struct opa_class_port_info {
-       u8 base_version;
-       u8 class_version;
-       __be16 cap_mask;
-       __be32 cap_mask2_resp_time;
-
-       u8 redirect_gid[16];
-       __be32 redirect_tc_fl;
-       __be32 redirect_lid;
-       __be32 redirect_sl_qp;
-       __be32 redirect_qkey;
-
-       u8 trap_gid[16];
-       __be32 trap_tc_fl;
-       __be32 trap_lid;
-       __be32 trap_hl_qp;
-       __be32 trap_qkey;
-
-       __be16 trap_pkey;
-       __be16 redirect_pkey;
-
-       u8 trap_sl_rsvd;
-       u8 reserved[3];
-} __packed;
-
 struct opa_port_status_req {
        __u8 port_num;
        __u8 reserved[3];
index 6ff7be6113cd3a5af3c7786af5de007bad59acd3..cee49aa6676c6c47a12833d23a5c1d9d8579addb 100644 (file)
@@ -88,31 +88,6 @@ const char opa_vnic_driver_version[] = DRV_VERSION;
 /* Maximum number of VNIC ports supported */
 #define OPA_VNIC_MAX_NUM_VPORT    255
 
-struct opa_class_port_info {
-       u8 base_version;
-       u8 class_version;
-       __be16 cap_mask;
-       __be32 cap_mask2_resp_time;
-
-       u8 redirect_gid[16];
-       __be32 redirect_tc_fl;
-       __be32 redirect_lid;
-       __be32 redirect_sl_qp;
-       __be32 redirect_qkey;
-
-       u8 trap_gid[16];
-       __be32 trap_tc_fl;
-       __be32 trap_lid;
-       __be32 trap_hl_qp;
-       __be32 trap_qkey;
-
-       __be16 trap_pkey;
-       __be16 redirect_pkey;
-
-       u8 trap_sl_rsvd;
-       u8 reserved[3];
-} __packed;
-
 /**
  * struct opa_vnic_vema_port -- VNIC VEMA port details
  * @cport: pointer to port
index 42814a0639350bc14f3dbec59b6ade2f1de5a548..3d5f5d6031ec36ec4be9913dd2c02b97d7376383 100644 (file)
@@ -262,6 +262,31 @@ struct ib_class_port_info {
        __be32                  trap_qkey;
 };
 
+struct opa_class_port_info {
+       u8 base_version;
+       u8 class_version;
+       __be16 cap_mask;
+       __be32 cap_mask2_resp_time;
+
+       u8 redirect_gid[16];
+       __be32 redirect_tc_fl;
+       __be32 redirect_lid;
+       __be32 redirect_sl_qp;
+       __be32 redirect_qkey;
+
+       u8 trap_gid[16];
+       __be32 trap_tc_fl;
+       __be32 trap_lid;
+       __be32 trap_hl_qp;
+       __be32 trap_qkey;
+
+       __be16 trap_pkey;
+       __be16 redirect_pkey;
+
+       u8 trap_sl_rsvd;
+       u8 reserved[3];
+} __packed;
+
 /**
  * ib_get_cpi_resp_time - Returns the resp_time value from
  * cap_mask2_resp_time in ib_class_port_info.