2005-11-29  Michael S. Tsirkin  <mst@mellanox.co.il>

	* src/qp.c (mthca_tavor_post_recv): Fix posting long receive
	lists: nreq is set to zero early on, so we need to use
	MTHCA_TAVOR_MAX_WQES_PER_RECV_DB as the increment to rq.head.

2005-11-28  Roland Dreier  <roland@cisco.com>

	* src/qp.c (mthca_init_qp_indices): Set qp->sq.last and
	qp->rq.last so that QP is fully reset when the indices are
	reinited on transition to RESET state.
	(mthca_tavor_post_send, mthca_arbel_post_send): Don't create an
	inline send segment when a work request is posted that has the
	inline flag set but no gather entries included.

2005-11-09  Roland Dreier  <roland@cisco.com>

	* src/srq.c (mthca_tavor_post_srq_recv), src/qp.c
	(mthca_tavor_post_recv): Fix bugs in long receive list handling;
	need to set nreq to 0 and not put 256 credits into the second
	doorbell word.

	* src/cq.c (mthca_cq_clean): Handle case where CQ indices wrap
	around by treating signed comparisons of prod_index and
	cq->cons_index carefully.

2005-11-09  Michael S. Tsirkin  <mst@mellanox.co.il>

	* src/srq.c (mthca_tavor_post_srq_recv), src/qp.c
	(mthca_tavor_post_recv): Tavor requires that a doorbell be rung
	at least every 256 receives, so add code to ring doorbells in the
	middle of posting a huge list of receives.
	
	* src/qp.c (mthca_tavor_post_send, mthca_tavor_post_send): When
	posting atomic operations, could wqe size in "octowords" correctly.

	* src/ah.c (mthca_alloc_av): Don't free ah if page allocation
	fails.  It will be freed where it's allocated, in the caller.

2005-11-08  Roland Dreier  <roland@cisco.com>

	* src/qp.c, src/verbs.c, src/mthca.h: Delegate setting of QP
	capabilities (max_sge, max_inline_data, etc) to kernel.

2005-11-04  Roland Dreier  <roland@cisco.com>

	* src/verbs.c (mthca_destroy_qp): Clean CQEs when we destroy a QP.
	(mthca_modify_qp): Clean CQEs when we move a QP to RESET state,
	and reset QP index pointers.

	* src/cq.c (mthca_cq_clean): Add function to clean out CQEs for
	QPs that are being destroyed or reset.

2005-10-30  Roland Dreier  <roland@cisco.com>

	* src/srq.c (wqe_to_link): Change to use an offset of 12 (the imm
	field), because posting an SRQ WQE may actually change the ee_nds
	field and still cause free list corruption.  A receive WQE will
	never have immediate data, so using imm is definitely safe.

2005-10-25  Roland Dreier  <roland@cisco.com>

	* Release version 1.0-rc4.

2005-10-23  Roland Dreier  <roland@cisco.com>

	* src/qp.c (mthca_return_cap, mthca_alloc_qp_buf), src/verbs.c
	(mthca_create_qp): Explicitly pass QP type to functions used while
	creating QP, since we can't rely on ibv_qp.qp_type to be set until
	after we return.  This fixes breakage with UD QPs introduced in
	the last change below.

2005-10-19  Roland Dreier  <roland@cisco.com>

	* src/mthca.h, src/verbs.c (mthca_create_qp), src/qp.c
	(mthca_tavor_post_send, mthca_arbel_post_send, mthca_alloc_qp_buf,
	mthca_return_cap): Eliminate struct mthca_qp.qpt field and use
	struct ibv_qp.qp_type instead (now that that field has been added
	in libibverbs).

2005-10-18  Roland Dreier  <roland@cisco.com>

	* src/cq.c (handle_error_cqe, mthca_poll_one): Dump CQEs for local
	QP operation errors instead of all error statuses.

2005-10-06  Roland Dreier  <roland@cisco.com>

	* src/srq.c (mthca_free_srq_wqe): Pass index instead of WQE
	address.  The only caller already has the index handy, so there's
	no need to recalculate it here.
	
	* src/srq.c (mthca_tavor_post_srq_recv,
	mthca_arbel_post_srq_recv): Add an extra check so that we report
	the SRQ as full before using the one extra WQE we need internally.

2005-10-05  Roland Dreier  <roland@cisco.com>

	* src/verbs.c (mthca_modify_srq): Fill in mthca_modify_srq().

2005-09-29  Roland Dreier  <roland@cisco.com>

	* src/verbs.c (mthca_query_device): Update to match new libibverbs
	API that requires device-specific libraries to format firmware version.

2005-09-25  Roland Dreier  <roland@cisco.com>

	* src/cq.c, src/mthca.c, src/mthca.h, src/verbs.c: Update to match
	new libibverbs API introduced with completion channel implementation.

2005-09-13  Roland Dreier  <roland@cisco.com>

	* src/qp.c (mthca_tavor_post_send, mthca_tavor_post_recv,
	mthca_arbel_post_send), src/srq.c (mthca_tavor_post_srq_recv):
	Apply Michael S. Tsirkin's patch to fix linking of WQEs on
	mem-free HCAs.  While we're at it, simplify the Tavor WQE posting
	code as well -- there's no need for a conditional, just always lik
	the previous WQE.

2005-09-07  Roland Dreier  <roland@cisco.com>

	* src/mthca.h: Get rid of ntohll() and htonll() now that
	libibverbs defines them in <infiniband/arch.h>.

2005-08-31  Roland Dreier  <roland@cisco.com>

	* src/memfree.c (mthca_free_db): When we free a doorbell record,
	really mark it as free in the free bitmap.  This we we don't
	eventually run out of doorbells if a consumer creates and frees a
	lot of objects.

	* src/memfree.c (mthca_alloc_db): Introduce MTHCA_FREE_MAP_SIZE so
	that we iterate over the correct number of entries in the mem-free
	doorbell record free maps.  This fixes some off-by-a-factor-of-8
	bugs that could lead to crashes.

	* src/verbs.c (mthca_create_cq): In the mem-free case, when
	creating a CQ fails to allocate an arm doorbell, make sure we free
	the set CI doorbell instead of the (non-existent) arm doorbell.
