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_ccw.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_ccw.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index 3a9bd5451a49..b04038c74786 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -47,6 +47,8 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device) | |||
47 | struct zfcp_adapter *adapter; | 47 | struct zfcp_adapter *adapter; |
48 | struct zfcp_port *port, *p; | 48 | struct zfcp_port *port, *p; |
49 | struct zfcp_unit *unit, *u; | 49 | struct zfcp_unit *unit, *u; |
50 | LIST_HEAD(unit_remove_lh); | ||
51 | LIST_HEAD(port_remove_lh); | ||
50 | 52 | ||
51 | ccw_device_set_offline(ccw_device); | 53 | ccw_device_set_offline(ccw_device); |
52 | down(&zfcp_data.config_sema); | 54 | down(&zfcp_data.config_sema); |
@@ -55,18 +57,18 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device) | |||
55 | write_lock_irq(&zfcp_data.config_lock); | 57 | write_lock_irq(&zfcp_data.config_lock); |
56 | list_for_each_entry_safe(port, p, &adapter->port_list_head, list) { | 58 | list_for_each_entry_safe(port, p, &adapter->port_list_head, list) { |
57 | list_for_each_entry_safe(unit, u, &port->unit_list_head, list) { | 59 | list_for_each_entry_safe(unit, u, &port->unit_list_head, list) { |
58 | list_move(&unit->list, &port->unit_remove_lh); | 60 | list_move(&unit->list, &unit_remove_lh); |
59 | atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, | 61 | atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, |
60 | &unit->status); | 62 | &unit->status); |
61 | } | 63 | } |
62 | list_move(&port->list, &adapter->port_remove_lh); | 64 | list_move(&port->list, &port_remove_lh); |
63 | atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status); | 65 | atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &port->status); |
64 | } | 66 | } |
65 | atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); | 67 | atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); |
66 | write_unlock_irq(&zfcp_data.config_lock); | 68 | write_unlock_irq(&zfcp_data.config_lock); |
67 | 69 | ||
68 | list_for_each_entry_safe(port, p, &adapter->port_remove_lh, list) { | 70 | list_for_each_entry_safe(port, p, &port_remove_lh, list) { |
69 | list_for_each_entry_safe(unit, u, &port->unit_remove_lh, list) { | 71 | list_for_each_entry_safe(unit, u, &unit_remove_lh, list) { |
70 | if (atomic_read(&unit->status) & | 72 | if (atomic_read(&unit->status) & |
71 | ZFCP_STATUS_UNIT_REGISTERED) | 73 | ZFCP_STATUS_UNIT_REGISTERED) |
72 | scsi_remove_device(unit->device); | 74 | scsi_remove_device(unit->device); |