Commit d01d51be authored by Martin Peschke's avatar Martin Peschke Committed by James Bottomley

[SCSI] zfcp: Rename sbal_last.

sbal_last is confusing, as it is not the last one actually used,
but just a limit. sbal_limit is a better name.
Signed-off-by: default avatarMartin Peschke <mp3@de.ibm.com>
Signed-off-by: default avatarChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 0f83b110
...@@ -851,7 +851,7 @@ struct zfcp_fsf_req { ...@@ -851,7 +851,7 @@ struct zfcp_fsf_req {
struct zfcp_adapter *adapter; /* adapter request belongs to */ struct zfcp_adapter *adapter; /* adapter request belongs to */
u8 sbal_number; /* nr of SBALs free for use */ u8 sbal_number; /* nr of SBALs free for use */
u8 sbal_first; /* first SBAL for this request */ u8 sbal_first; /* first SBAL for this request */
u8 sbal_last; /* last possible SBAL for u8 sbal_limit; /* last possible SBAL for
this reuest */ this reuest */
u8 sbal_curr; /* current SBAL during creation u8 sbal_curr; /* current SBAL during creation
of request */ of request */
......
...@@ -432,9 +432,9 @@ zfcp_qdio_sbal_limit(struct zfcp_fsf_req *fsf_req, int max_sbals) ...@@ -432,9 +432,9 @@ zfcp_qdio_sbal_limit(struct zfcp_fsf_req *fsf_req, int max_sbals)
{ {
int count = atomic_read(&fsf_req->adapter->request_queue.free_count); int count = atomic_read(&fsf_req->adapter->request_queue.free_count);
count = min(count, max_sbals); count = min(count, max_sbals);
fsf_req->sbal_last = fsf_req->sbal_first; fsf_req->sbal_limit = fsf_req->sbal_first;
fsf_req->sbal_last += (count - 1); fsf_req->sbal_limit += (count - 1);
fsf_req->sbal_last %= QDIO_MAX_BUFFERS_PER_Q; fsf_req->sbal_limit %= QDIO_MAX_BUFFERS_PER_Q;
} }
/** /**
...@@ -455,7 +455,7 @@ zfcp_qdio_sbal_chain(struct zfcp_fsf_req *fsf_req, unsigned long sbtype) ...@@ -455,7 +455,7 @@ zfcp_qdio_sbal_chain(struct zfcp_fsf_req *fsf_req, unsigned long sbtype)
sbale->flags |= SBAL_FLAGS_LAST_ENTRY; sbale->flags |= SBAL_FLAGS_LAST_ENTRY;
/* don't exceed last allowed SBAL */ /* don't exceed last allowed SBAL */
if (fsf_req->sbal_curr == fsf_req->sbal_last) if (fsf_req->sbal_curr == fsf_req->sbal_limit)
return NULL; return NULL;
/* set chaining flag in first SBALE of current SBAL */ /* set chaining flag in first SBALE of current SBAL */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment