Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144441
b: refs/heads/master
c: 7001f0c
h: refs/heads/master
i:
  144439: 55578fc
v: v3
  • Loading branch information
Martin Petermann authored and James Bottomley committed Apr 27, 2009
1 parent 8c47174 commit 120f24d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 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: c6936e7f34383db2f5038dfa2f0c168ebc2920e5
refs/heads/master: 7001f0c4863230dd1560425fa0f5aad9e21716b8
28 changes: 14 additions & 14 deletions trunk/drivers/s390/scsi/zfcp_fsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,30 +645,30 @@ static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req)
}
}

static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter)
__releases(&adapter->req_q_lock)
__acquires(&adapter->req_q_lock)
static int zfcp_fsf_sbal_check(struct zfcp_adapter *adapter)
{
struct zfcp_qdio_queue *req_q = &adapter->req_q;
long ret;

if (atomic_read(&req_q->count) <= -REQUEST_LIST_SIZE)
return -EIO;
if (atomic_read(&req_q->count) > 0)
return 0;
spin_lock_bh(&adapter->req_q_lock);
if (atomic_read(&req_q->count))
return 1;
spin_unlock_bh(&adapter->req_q_lock);
return 0;
}

static int zfcp_fsf_req_sbal_get(struct zfcp_adapter *adapter)
{
long ret;

atomic_dec(&req_q->count);
spin_unlock_bh(&adapter->req_q_lock);
ret = wait_event_interruptible_timeout(adapter->request_wq,
atomic_read(&req_q->count) >= 0,
5 * HZ);
spin_lock_bh(&adapter->req_q_lock);
atomic_inc(&req_q->count);

zfcp_fsf_sbal_check(adapter), 5 * HZ);
if (ret > 0)
return 0;
if (!ret)
atomic_inc(&adapter->qdio_outb_full);

spin_lock_bh(&adapter->req_q_lock);
return -EIO;
}

Expand Down

0 comments on commit 120f24d

Please sign in to comment.