aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_sysfs.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2009-08-18 09:43:19 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-05 09:49:27 -0400
commit564e1c86c810f9ccfe4300afa402815e3db4886d (patch)
treeecb88038c443d6486e9df352c79b3c78be5454ef /drivers/s390/scsi/zfcp_sysfs.c
parent42428f747a8a0db9c6de03e105932316defad65d (diff)
[SCSI] zfcp: Move qdio related data out of zfcp_adapter
The zfcp_adapter structure was growing over time to a size of almost one memory page. To reduce the size of the data structure and to seperate different layers, put all qdio related data in the new zfcp_qdio data structure. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_sysfs.c')
-rw-r--r--drivers/s390/scsi/zfcp_sysfs.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/s390/scsi/zfcp_sysfs.c b/drivers/s390/scsi/zfcp_sysfs.c
index 0fe5cce818cb..a6cf62636834 100644
--- a/drivers/s390/scsi/zfcp_sysfs.c
+++ b/drivers/s390/scsi/zfcp_sysfs.c
@@ -425,7 +425,7 @@ static ssize_t zfcp_sysfs_adapter_util_show(struct device *dev,
425 if (!qtcb_port) 425 if (!qtcb_port)
426 return -ENOMEM; 426 return -ENOMEM;
427 427
428 retval = zfcp_fsf_exchange_port_data_sync(adapter, qtcb_port); 428 retval = zfcp_fsf_exchange_port_data_sync(adapter->qdio, qtcb_port);
429 if (!retval) 429 if (!retval)
430 retval = sprintf(buf, "%u %u %u\n", qtcb_port->cp_util, 430 retval = sprintf(buf, "%u %u %u\n", qtcb_port->cp_util,
431 qtcb_port->cb_util, qtcb_port->a_util); 431 qtcb_port->cb_util, qtcb_port->a_util);
@@ -451,7 +451,7 @@ static int zfcp_sysfs_adapter_ex_config(struct device *dev,
451 if (!qtcb_config) 451 if (!qtcb_config)
452 return -ENOMEM; 452 return -ENOMEM;
453 453
454 retval = zfcp_fsf_exchange_config_data_sync(adapter, qtcb_config); 454 retval = zfcp_fsf_exchange_config_data_sync(adapter->qdio, qtcb_config);
455 if (!retval) 455 if (!retval)
456 *stat_inf = qtcb_config->stat_info; 456 *stat_inf = qtcb_config->stat_info;
457 457
@@ -492,15 +492,15 @@ static ssize_t zfcp_sysfs_adapter_q_full_show(struct device *dev,
492 char *buf) 492 char *buf)
493{ 493{
494 struct Scsi_Host *scsi_host = class_to_shost(dev); 494 struct Scsi_Host *scsi_host = class_to_shost(dev);
495 struct zfcp_adapter *adapter = 495 struct zfcp_qdio *qdio =
496 (struct zfcp_adapter *) scsi_host->hostdata[0]; 496 ((struct zfcp_adapter *) scsi_host->hostdata[0])->qdio;
497 u64 util; 497 u64 util;
498 498
499 spin_lock_bh(&adapter->qdio_stat_lock); 499 spin_lock_bh(&qdio->stat_lock);
500 util = adapter->req_q_util; 500 util = qdio->req_q_util;
501 spin_unlock_bh(&adapter->qdio_stat_lock); 501 spin_unlock_bh(&qdio->stat_lock);
502 502
503 return sprintf(buf, "%d %llu\n", atomic_read(&adapter->qdio_outb_full), 503 return sprintf(buf, "%d %llu\n", atomic_read(&qdio->req_q_full),
504 (unsigned long long)util); 504 (unsigned long long)util);
505} 505}
506static DEVICE_ATTR(queue_full, S_IRUGO, zfcp_sysfs_adapter_q_full_show, NULL); 506static DEVICE_ATTR(queue_full, S_IRUGO, zfcp_sysfs_adapter_q_full_show, NULL);