diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2008-10-01 12:42:20 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-10-03 12:11:54 -0500 |
commit | 0406289ed57955860a4f8d744a14f4c819260ce4 (patch) | |
tree | be91ef3d51f3108469d74c1fa36d10c914ce4c6d /drivers/s390/scsi/zfcp_qdio.c | |
parent | a1b449de5d35b9eec8981c6ea999eea263b19a0b (diff) | |
download | op-kernel-dev-0406289ed57955860a4f8d744a14f4c819260ce4.zip op-kernel-dev-0406289ed57955860a4f8d744a14f4c819260ce4.tar.gz |
[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 0dfaa17..3e05080 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) struct qdio_buffer_element *sbale; /* acknowledgements for transferred buffers */ - pci_batch = req_q->pci_batch + count; + pci_batch = adapter->req_q_pci_batch + count; if (unlikely(pci_batch >= ZFCP_QDIO_PCI_INTERVAL)) { pci_batch %= ZFCP_QDIO_PCI_INTERVAL; pci = first + count - (pci_batch + 1); @@ -366,7 +366,7 @@ int zfcp_qdio_send(struct zfcp_fsf_req *fsf_req) atomic_sub(count, &req_q->count); req_q->first += count; req_q->first %= QDIO_MAX_BUFFERS_PER_Q; - req_q->pci_batch = pci_batch; + adapter->req_q_pci_batch = pci_batch; return 0; } @@ -422,9 +422,9 @@ void zfcp_qdio_close(struct zfcp_adapter *adapter) /* clear QDIOUP flag, thus do_QDIO is not called during qdio_shutdown */ req_q = &adapter->req_q; - spin_lock_bh(&req_q->lock); + spin_lock_bh(&adapter->req_q_lock); atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status); - spin_unlock_bh(&req_q->lock); + spin_unlock_bh(&adapter->req_q_lock); qdio_shutdown(adapter->ccw_device, QDIO_FLAG_CLEANUP_USING_CLEAR); @@ -437,7 +437,7 @@ void zfcp_qdio_close(struct zfcp_adapter *adapter) } req_q->first = 0; atomic_set(&req_q->count, 0); - req_q->pci_batch = 0; + adapter->req_q_pci_batch = 0; adapter->resp_q.first = 0; atomic_set(&adapter->resp_q.count, 0); } @@ -475,7 +475,7 @@ int zfcp_qdio_open(struct zfcp_adapter *adapter) /* set index of first avalable SBALS / number of available SBALS */ adapter->req_q.first = 0; atomic_set(&adapter->req_q.count, QDIO_MAX_BUFFERS_PER_Q); - adapter->req_q.pci_batch = 0; + adapter->req_q_pci_batch = 0; return 0; |