Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14475
b: refs/heads/master
c: 47f2bce
h: refs/heads/master
i:
  14473: d96c045
  14471: acce710
v: v3
  • Loading branch information
Roland Dreier committed Nov 15, 2005
1 parent 1b06fc5 commit cbd2aa7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f068992a1bccda5574b4f6d33458ef806686d7f
refs/heads/master: 47f2bce9021b4974ed33b072ebb8348c8145c946
15 changes: 9 additions & 6 deletions trunk/drivers/infiniband/ulp/srp/ib_srp.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,13 +802,21 @@ static int srp_post_recv(struct srp_target_port *target)

/*
* Must be called with target->scsi_host->host_lock held to protect
* req_lim and tx_head.
* req_lim and tx_head. Lock cannot be dropped between call here and
* call to __srp_post_send().
*/
static struct srp_iu *__srp_get_tx_iu(struct srp_target_port *target)
{
if (target->tx_head - target->tx_tail >= SRP_SQ_SIZE)
return NULL;

if (unlikely(target->req_lim < 1)) {
if (printk_ratelimit())
printk(KERN_DEBUG PFX "Target has req_lim %d\n",
target->req_lim);
return NULL;
}

return target->tx_ring[target->tx_head & SRP_SQ_SIZE];
}

Expand All @@ -823,11 +831,6 @@ static int __srp_post_send(struct srp_target_port *target,
struct ib_send_wr wr, *bad_wr;
int ret = 0;

if (target->req_lim < 1) {
printk(KERN_ERR PFX "Target has req_lim %d\n", target->req_lim);
return -EAGAIN;
}

list.addr = iu->dma;
list.length = len;
list.lkey = target->srp_host->mr->lkey;
Expand Down

0 comments on commit cbd2aa7

Please sign in to comment.