diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2008-10-01 06:42:20 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-10-03 13:11:54 -0400 |
commit | 0406289ed57955860a4f8d744a14f4c819260ce4 (patch) | |
tree | be91ef3d51f3108469d74c1fa36d10c914ce4c6d /drivers/s390/scsi/zfcp_qdio.c | |
parent | a1b449de5d35b9eec8981c6ea999eea263b19a0b (diff) |
[SCSI] zfcp: Simplify zfcp data structures
Reduce the size of zfcp data structures by removing unused and
redundant members. scsi_lun is only the mangled version of the
fcp_lun. So, remove the redundant field and use the fcp_lun instead.
Since the queue lock and the pci_batch indicator are only used in the
request queue, move them from the common queue struct to the adapter
struct.
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_qdio.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_qdio.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c index 0dfaa176af7f..3e05080e62d4 100644 --- a/drivers/s390/scsi/zfcp_qdio.c +++ b/drivers/s390/scsi/zfcp_qdio.c | |||
@@ -346,7 +346,7 @@ int zfcp_qdio_send(struct zfcp_fsf_req *fsf_req) | |||
346 | struct qdio_buffer_element *sbale; | 346 | struct qdio_buffer_element *sbale; |
347 | 347 | ||
348 | /* acknowledgements for transferred buffers */ | 348 | /* acknowledgements for transferred buffers */ |
349 | pci_batch = req_q->pci_batch + count; | 349 | pci_batch = adapter->req_q_pci_batch + count; |
350 | if (unlikely(pci_batch >= ZFCP_QDIO_PCI_INTERVAL)) { | 350 | if (unlikely(pci_batch >= ZFCP_QDIO_PCI_INTERVAL)) { |
351 | pci_batch %= ZFCP_QDIO_PCI_INTERVAL; | 351 | pci_batch %= ZFCP_QDIO_PCI_INTERVAL; |
352 | pci = first + count - (pci_batch + 1); | 352 | pci = first + count - (pci_batch + 1); |
@@ -366,7 +366,7 @@ int zfcp_qdio_send(struct zfcp_fsf_req *fsf_req) | |||
366 | atomic_sub(count, &req_q->count); | 366 | atomic_sub(count, &req_q->count); |
367 | req_q->first += count; | 367 | req_q->first += count; |
368 | req_q->first %= QDIO_MAX_BUFFERS_PER_Q; | 368 | req_q->first %= QDIO_MAX_BUFFERS_PER_Q; |
369 | req_q->pci_batch = pci_batch; | 369 | adapter->req_q_pci_batch = pci_batch; |
370 | return 0; | 370 | return 0; |
371 | } | 371 | } |
372 | 372 | ||
@@ -422,9 +422,9 @@ void zfcp_qdio_close(struct zfcp_adapter *adapter) | |||
422 | 422 | ||
423 | /* clear QDIOUP flag, thus do_QDIO is not called during qdio_shutdown */ | 423 | /* clear QDIOUP flag, thus do_QDIO is not called during qdio_shutdown */ |
424 | req_q = &adapter->req_q; | 424 | req_q = &adapter->req_q; |
425 | spin_lock_bh(&req_q->lock); | 425 | spin_lock_bh(&adapter->req_q_lock); |
426 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); | 426 | atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); |
427 | spin_unlock_bh(&req_q->lock); | 427 | spin_unlock_bh(&adapter->req_q_lock); |
428 | 428 | ||
429 | qdio_shutdown(adapter->ccw_device, QDIO_FLAG_CLEANUP_USING_CLEAR); | 429 | qdio_shutdown(adapter->ccw_device, QDIO_FLAG_CLEANUP_USING_CLEAR); |
430 | 430 | ||
@@ -437,7 +437,7 @@ void zfcp_qdio_close(struct zfcp_adapter *adapter) | |||
437 | } | 437 | } |
438 | req_q->first = 0; | 438 | req_q->first = 0; |
439 | atomic_set(&req_q->count, 0); | 439 | atomic_set(&req_q->count, 0); |
440 | req_q->pci_batch = 0; | 440 | adapter->req_q_pci_batch = 0; |
441 | adapter->resp_q.first = 0; | 441 | adapter->resp_q.first = 0; |
442 | atomic_set(&adapter->resp_q.count, 0); | 442 | atomic_set(&adapter->resp_q.count, 0); |
443 | } | 443 | } |
@@ -475,7 +475,7 @@ int zfcp_qdio_open(struct zfcp_adapter *adapter) | |||
475 | /* set index of first avalable SBALS / number of available SBALS */ | 475 | /* set index of first avalable SBALS / number of available SBALS */ |
476 | adapter->req_q.first = 0; | 476 | adapter->req_q.first = 0; |
477 | atomic_set(&adapter->req_q.count, QDIO_MAX_BUFFERS_PER_Q); | 477 | atomic_set(&adapter->req_q.count, QDIO_MAX_BUFFERS_PER_Q); |
478 | adapter->req_q.pci_batch = 0; | 478 | adapter->req_q_pci_batch = 0; |
479 | 479 | ||
480 | return 0; | 480 | return 0; |
481 | 481 | ||