Messages in this thread | | | Subject | Re: [openib-general] [PATCH 08/13] IB/ehca: qp | From | Hal Rosenstock <> | Date | 21 Aug 2006 08:44:53 -0400 |
| |
On Thu, 2006-08-17 at 16:11, Roland Dreier wrote:
[snip...]
> diff --git a/drivers/infiniband/hw/ehca/ehca_sqp.c b/drivers/infiniband/hw/ehca/ehca_sqp.c > new file mode 100644 > index 0000000..d2c5552 > --- /dev/null > +++ b/drivers/infiniband/hw/ehca/ehca_sqp.c > @@ -0,0 +1,123 @@ > +/* > + * IBM eServer eHCA Infiniband device driver for Linux on POWER > + * > + * SQP functions > + * > + * Authors: Khadija Souissi <souissi@de.ibm.com> > + * Heiko J Schick <schickhj@de.ibm.com>
[snip...]
> + > +extern int ehca_create_aqp1(struct ehca_shca *shca, struct ehca_sport *sport); > +extern int ehca_destroy_aqp1(struct ehca_sport *sport); > + > +extern int ehca_port_act_time; > + > +/** > + * ehca_define_sqp - Defines special queue pair 1 (GSI QP). When special queue > + * pair is created successfully, the corresponding port gets active. > + * > + * Define Special Queue pair 0 (SMI QP) is still not supported. > + * > + * @qp_init_attr: Queue pair init attributes with port and queue pair type > + */ > + > +u64 ehca_define_sqp(struct ehca_shca *shca, > + struct ehca_qp *ehca_qp, > + struct ib_qp_init_attr *qp_init_attr) > +{ > + > + u32 pma_qp_nr = 0; > + u32 bma_qp_nr = 0; > + u64 ret = H_SUCCESS; > + u8 port = qp_init_attr->port_num; > + int counter = 0; > + > + EDEB_EN(7, "port=%x qp_type=%x", > + port, qp_init_attr->qp_type); > + > + shca->sport[port - 1].port_state = IB_PORT_DOWN; > + > + switch (qp_init_attr->qp_type) { > + case IB_QPT_SMI: > + /* function not supported yet */ > + break; > + case IB_QPT_GSI: > + ret = hipz_h_define_aqp1(shca->ipz_hca_handle, > + ehca_qp->ipz_qp_handle, > + ehca_qp->galpas.kernel, > + (u32) qp_init_attr->port_num, > + &pma_qp_nr, &bma_qp_nr); > + > + if (ret != H_SUCCESS) { > + EDEB_ERR(4, "Can't define AQP1 for port %x. rc=%lx", > + port, ret); > + goto ehca_define_aqp1; > + } > + break; > + default: > + ret = H_PARAMETER; > + goto ehca_define_aqp1; > + } > + > + while ((shca->sport[port - 1].port_state != IB_PORT_ACTIVE) && > + (counter < ehca_port_act_time)) { > + EDEB(6, "... wait until port %x is active", > + port); > + msleep_interruptible(1000); > + counter++; > + } > + > + if (counter == ehca_port_act_time) { > + EDEB_ERR(4, "Port %x is not active.", port); > + ret = H_HARDWARE; > + } > + > +ehca_define_aqp1: > + EDEB_EX(7, "ret=%lx", ret); > + > + return ret; > +}
I, for one, was hoping that the timer based transition to active for QP1 would have been resolved before being submitted. Any idea on the plan to resolve this ?
-- Hal
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |