aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_dev.h
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@mellanox.co.il>2006-04-10 12:43:47 -0400
committerRoland Dreier <rolandd@cisco.com>2006-04-10 12:43:47 -0400
commitbf6a9e31cfa768ce0a8e18474b3ca808641d9243 (patch)
treea7ebdb5a10e528959ca1497e222975d3087a5eef /drivers/infiniband/hw/mthca/mthca_dev.h
parentd2e0655ede1d91c3a586455d03a4a2d57e659830 (diff)
IB: simplify static rate encoding
Push translation of static rate to HCA format into low-level drivers, where it belongs. For static rate encoding, use encoding of rate field from IB standard PathRecord, with addition of value 0, for backwards compatibility with current usage. The changes are: - Add enum ib_rate to midlayer includes. - Get rid of static rate translation in IPoIB; just use static rate directly from Path and MulticastGroup records. - Update mthca driver to translate absolute static rate into the format used by hardware. This also fixes mthca's static rate handling for HCAs that are capable of 4X DDR. Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_dev.h')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_dev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h
index bb2a9d628d7d..49d0eae5518a 100644
--- a/drivers/infiniband/hw/mthca/mthca_dev.h
+++ b/drivers/infiniband/hw/mthca/mthca_dev.h
@@ -172,6 +172,7 @@ struct mthca_limits {
172 int reserved_pds; 172 int reserved_pds;
173 u32 page_size_cap; 173 u32 page_size_cap;
174 u32 flags; 174 u32 flags;
175 u16 stat_rate_support;
175 u8 port_width_cap; 176 u8 port_width_cap;
176}; 177};
177 178
@@ -353,6 +354,7 @@ struct mthca_dev {
353 struct ib_mad_agent *send_agent[MTHCA_MAX_PORTS][2]; 354 struct ib_mad_agent *send_agent[MTHCA_MAX_PORTS][2];
354 struct ib_ah *sm_ah[MTHCA_MAX_PORTS]; 355 struct ib_ah *sm_ah[MTHCA_MAX_PORTS];
355 spinlock_t sm_lock; 356 spinlock_t sm_lock;
357 u8 rate[MTHCA_MAX_PORTS];
356}; 358};
357 359
358#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG 360#ifdef CONFIG_INFINIBAND_MTHCA_DEBUG
@@ -555,6 +557,8 @@ int mthca_read_ah(struct mthca_dev *dev, struct mthca_ah *ah,
555 struct ib_ud_header *header); 557 struct ib_ud_header *header);
556int mthca_ah_query(struct ib_ah *ibah, struct ib_ah_attr *attr); 558int mthca_ah_query(struct ib_ah *ibah, struct ib_ah_attr *attr);
557int mthca_ah_grh_present(struct mthca_ah *ah); 559int mthca_ah_grh_present(struct mthca_ah *ah);
560u8 mthca_get_rate(struct mthca_dev *dev, int static_rate, u8 port);
561enum ib_rate mthca_rate_to_ib(struct mthca_dev *dev, u8 mthca_rate, u8 port);
558 562
559int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid); 563int mthca_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid);
560int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid); 564int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid);