On Mon, 2010-08-16 at 20:54 +0200, Bart Van Assche wrote:
> @@ -989,19 +989,21 @@ static void srp_send_completion(struct ib_cq *cq, void
> *target_ptr)
> static struct srp_iu *__srp_get_tx_iu(struct srp_target_port *target,
> enum srp_request_type req_type)
> {
> - s32 min = (req_type == SRP_REQ_TASK_MGMT) ? 1 : 2;
> + s32 rsv;
> +
> + rsv = (req_type == SRP_REQ_TASK_MGMT) ? 0 : SRP_TASK_MGMT_SQ_SIZE;
>
> srp_send_completion(target->send_cq, target);
>
> if (target->tx_head - target->tx_tail >= SRP_SQ_SIZE)
> return NULL;
>
> - if (target->req_lim < min) {
> + if (target->req_lim <= rsv) {
> ++target->zero_req_lim;
> return NULL;
> }
>
> - return target->tx_ring[target->tx_head & SRP_SQ_SIZE];
> + return target->tx_ring[target->tx_head & SRP_SQ_MASK];
> }
Did you forget to remove the rest of the changes? The only change to
this function should be s/SRP_SQ_SIZE/SRP_SQ_MASK/
I'm still not happy about the names, but I'll live with that. Fix the
above and I'm OK with this one.
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html