diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_hca.c | 20 | ||||
-rw-r--r-- | drivers/infiniband/hw/ehca/hipz_hw.h | 6 |
2 files changed, 19 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c index 15806d140461..5bd7b591987e 100644 --- a/drivers/infiniband/hw/ehca/ehca_hca.c +++ b/drivers/infiniband/hw/ehca/ehca_hca.c | |||
@@ -151,7 +151,6 @@ int ehca_query_port(struct ib_device *ibdev, | |||
151 | } | 151 | } |
152 | 152 | ||
153 | memset(props, 0, sizeof(struct ib_port_attr)); | 153 | memset(props, 0, sizeof(struct ib_port_attr)); |
154 | props->state = rblock->state; | ||
155 | 154 | ||
156 | switch (rblock->max_mtu) { | 155 | switch (rblock->max_mtu) { |
157 | case 0x1: | 156 | case 0x1: |
@@ -188,11 +187,20 @@ int ehca_query_port(struct ib_device *ibdev, | |||
188 | props->subnet_timeout = rblock->subnet_timeout; | 187 | props->subnet_timeout = rblock->subnet_timeout; |
189 | props->init_type_reply = rblock->init_type_reply; | 188 | props->init_type_reply = rblock->init_type_reply; |
190 | 189 | ||
191 | props->active_width = IB_WIDTH_12X; | 190 | if (rblock->state && rblock->phys_width) { |
192 | props->active_speed = 0x1; | 191 | props->phys_state = rblock->phys_pstate; |
193 | 192 | props->state = rblock->phys_state; | |
194 | /* at the moment (logical) link state is always LINK_UP */ | 193 | props->active_width = rblock->phys_width; |
195 | props->phys_state = 0x5; | 194 | props->active_speed = rblock->phys_speed; |
195 | } else { | ||
196 | /* old firmware releases don't report physical | ||
197 | * port info, so use default values | ||
198 | */ | ||
199 | props->phys_state = 5; | ||
200 | props->state = rblock->state; | ||
201 | props->active_width = IB_WIDTH_12X; | ||
202 | props->active_speed = 0x1; | ||
203 | } | ||
196 | 204 | ||
197 | query_port1: | 205 | query_port1: |
198 | ehca_free_fw_ctrlblock(rblock); | 206 | ehca_free_fw_ctrlblock(rblock); |
diff --git a/drivers/infiniband/hw/ehca/hipz_hw.h b/drivers/infiniband/hw/ehca/hipz_hw.h index d9739e554515..485b8400359e 100644 --- a/drivers/infiniband/hw/ehca/hipz_hw.h +++ b/drivers/infiniband/hw/ehca/hipz_hw.h | |||
@@ -402,7 +402,11 @@ struct hipz_query_port { | |||
402 | u64 max_msg_sz; | 402 | u64 max_msg_sz; |
403 | u32 max_mtu; | 403 | u32 max_mtu; |
404 | u32 vl_cap; | 404 | u32 vl_cap; |
405 | u8 reserved2[1900]; | 405 | u32 phys_pstate; |
406 | u32 phys_state; | ||
407 | u32 phys_speed; | ||
408 | u32 phys_width; | ||
409 | u8 reserved2[1884]; | ||
406 | u64 guid_entries[255]; | 410 | u64 guid_entries[255]; |
407 | } __attribute__ ((packed)); | 411 | } __attribute__ ((packed)); |
408 | 412 | ||