aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_mad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_mad.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_mad.c42
1 files changed, 3 insertions, 39 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c
index f7f8391fe43f..1a9d0a2c33c3 100644
--- a/drivers/infiniband/hw/ipath/ipath_mad.c
+++ b/drivers/infiniband/hw/ipath/ipath_mad.c
@@ -137,47 +137,11 @@ static int recv_subn_get_guidinfo(struct ib_smp *smp,
137 return reply(smp); 137 return reply(smp);
138} 138}
139 139
140struct port_info {
141 __be64 mkey;
142 __be64 gid_prefix;
143 __be16 lid;
144 __be16 sm_lid;
145 __be32 cap_mask;
146 __be16 diag_code;
147 __be16 mkey_lease_period;
148 u8 local_port_num;
149 u8 link_width_enabled;
150 u8 link_width_supported;
151 u8 link_width_active;
152 u8 linkspeed_portstate; /* 4 bits, 4 bits */
153 u8 portphysstate_linkdown; /* 4 bits, 4 bits */
154 u8 mkeyprot_resv_lmc; /* 2 bits, 3, 3 */
155 u8 linkspeedactive_enabled; /* 4 bits, 4 bits */
156 u8 neighbormtu_mastersmsl; /* 4 bits, 4 bits */
157 u8 vlcap_inittype; /* 4 bits, 4 bits */
158 u8 vl_high_limit;
159 u8 vl_arb_high_cap;
160 u8 vl_arb_low_cap;
161 u8 inittypereply_mtucap; /* 4 bits, 4 bits */
162 u8 vlstallcnt_hoqlife; /* 3 bits, 5 bits */
163 u8 operationalvl_pei_peo_fpi_fpo; /* 4 bits, 1, 1, 1, 1 */
164 __be16 mkey_violations;
165 __be16 pkey_violations;
166 __be16 qkey_violations;
167 u8 guid_cap;
168 u8 clientrereg_resv_subnetto; /* 1 bit, 2 bits, 5 */
169 u8 resv_resptimevalue; /* 3 bits, 5 bits */
170 u8 localphyerrors_overrunerrors; /* 4 bits, 4 bits */
171 __be16 max_credit_hint;
172 u8 resv;
173 u8 link_roundtrip_latency[3];
174} __attribute__ ((packed));
175
176static int recv_subn_get_portinfo(struct ib_smp *smp, 140static int recv_subn_get_portinfo(struct ib_smp *smp,
177 struct ib_device *ibdev, u8 port) 141 struct ib_device *ibdev, u8 port)
178{ 142{
179 struct ipath_ibdev *dev; 143 struct ipath_ibdev *dev;
180 struct port_info *pip = (struct port_info *)smp->data; 144 struct ib_port_info *pip = (struct ib_port_info *)smp->data;
181 u16 lid; 145 u16 lid;
182 u8 ibcstat; 146 u8 ibcstat;
183 u8 mtu; 147 u8 mtu;
@@ -312,7 +276,7 @@ static int recv_subn_set_guidinfo(struct ib_smp *smp,
312static int recv_subn_set_portinfo(struct ib_smp *smp, 276static int recv_subn_set_portinfo(struct ib_smp *smp,
313 struct ib_device *ibdev, u8 port) 277 struct ib_device *ibdev, u8 port)
314{ 278{
315 struct port_info *pip = (struct port_info *)smp->data; 279 struct ib_port_info *pip = (struct ib_port_info *)smp->data;
316 struct ib_event event; 280 struct ib_event event;
317 struct ipath_ibdev *dev; 281 struct ipath_ibdev *dev;
318 u32 flags; 282 u32 flags;
@@ -445,7 +409,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
445 409
446 if (pip->clientrereg_resv_subnetto & 0x80) { 410 if (pip->clientrereg_resv_subnetto & 0x80) {
447 clientrereg = 1; 411 clientrereg = 1;
448 event.event = IB_EVENT_LID_CHANGE; 412 event.event = IB_EVENT_CLIENT_REREGISTER;
449 ib_dispatch_event(&event); 413 ib_dispatch_event(&event);
450 } 414 }
451 415