summaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_qdio.c
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2008-07-02 10:56:34 +0200
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 08:22:34 -0500
commit5d4e226246331087799a01c267ec72e5931ff190 (patch)
tree4e9c740de12db68fa5594e3b8c83bf64461fbed8 /drivers/s390/scsi/zfcp_qdio.c
parent7afe29f7dd6dccbe454d7fd6cd6a5a7f7bcbc530 (diff)
[SCSI] zfcp: Small QDIO cleanups
QBUFF_PER_PAGE is only used inside the qdio module, so move it to zfcp_qdio.c zfcp_qdio_zero_sbals is now only used in the qdio module, so make it static. 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.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/s390/scsi/zfcp_qdio.c b/drivers/s390/scsi/zfcp_qdio.c
index bd6561d5358..b8ed42bb5c9 100644
--- a/drivers/s390/scsi/zfcp_qdio.c
+++ b/drivers/s390/scsi/zfcp_qdio.c
@@ -11,6 +11,7 @@
/* FIXME(tune): free space should be one max. SBAL chain plus what? */
#define ZFCP_QDIO_PCI_INTERVAL (QDIO_MAX_BUFFERS_PER_Q \
- (ZFCP_MAX_SBALS_PER_REQ + 4))
+#define QBUFF_PER_PAGE (PAGE_SIZE / sizeof(struct qdio_buffer))
static int zfcp_qdio_buffers_enqueue(struct qdio_buffer **sbal)
{
@@ -63,6 +64,16 @@ static void zfcp_qdio_handler_error(struct zfcp_adapter *adapter, u8 id)
ZFCP_STATUS_COMMON_ERP_FAILED, id, NULL);
}
+static void zfcp_qdio_zero_sbals(struct qdio_buffer *sbal[], int first, int cnt)
+{
+ int i, sbal_idx;
+
+ for (i = first; i < first + cnt; i++) {
+ sbal_idx = i % QDIO_MAX_BUFFERS_PER_Q;
+ memset(sbal[sbal_idx], 0, sizeof(struct qdio_buffer));
+ }
+}
+
static void zfcp_qdio_int_req(struct ccw_device *cdev, unsigned int status,
unsigned int qdio_err, unsigned int siga_err,
unsigned int queue_no, int first, int count,
@@ -366,22 +377,6 @@ int zfcp_qdio_send(struct zfcp_fsf_req *fsf_req)
}
/**
- * zfcp_qdio_zero_sbals - zero all sbals of the specified area and queue
- * @buf: pointer to array of SBALS
- * @first: integer specifying the SBAL number to start
- * @count: integer specifying the number of SBALS to process
- */
-void zfcp_qdio_zero_sbals(struct qdio_buffer *sbal[], int first, int count)
-{
- int i, sbal_idx;
-
- for (i = first; i < first + count; i++) {
- sbal_idx = i % QDIO_MAX_BUFFERS_PER_Q;
- memset(sbal[sbal_idx], 0, sizeof(struct qdio_buffer));
- }
-}
-
-/**
* zfcp_qdio_allocate - allocate queue memory and initialize QDIO data
* @adapter: pointer to struct zfcp_adapter
* Returns: -ENOMEM on memory allocation error or return value from