diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2010-09-08 08:39:55 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-09-16 22:54:17 -0400 |
commit | b62a8d9b45b971a67a0f8413338c230e3117dff5 (patch) | |
tree | a38acd9f0fcb14e41e26503d8a25d8f1539dd27d /drivers/s390/scsi/zfcp_ext.h | |
parent | fdbd1c5e27dabfa950d4b0f52a20069aeaf67b9d (diff) |
[SCSI] zfcp: Use SCSI device data zfcp_scsi_dev instead of zfcp_unit
This is the large change to switch from using the data in
zfcp_unit to zfcp_scsi_dev. Keeping everything working requires doing
the switch in one piece. To ensure that no code keeps using the data
in zfcp_unit, this patch also removes the data from zfcp_unit that is
now being replaced with zfcp_scsi_dev.
For zfcp, the scsi_device together with zfcp_scsi_dev exist from the
call of slave_alloc to the call of slave_destroy. The data in
zfcp_scsi_dev is initialized in zfcp_scsi_slave_alloc and the LUN is
opened; the final shutdown for the LUN is run from slave_destroy.
Where the scsi_device or zfcp_scsi_dev is needed, the pointer to the
scsi_device is passed as function argument and inside the function
converted to the pointer to zfcp_scsi_dev; this avoids back and forth
conversion betweeen scsi_device and zfcp_scsi_dev.
While changing the function arguments from zfcp_unit to scsi_device,
the functions names are renamed form "unit" to "lun". This is to have
a seperation between zfcp_scsi_dev/LUN and the zfcp_unit; only code
referring to the remaining configuration information in zfcp_unit
struct uses "unit".
Reviewed-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_ext.h')
-rw-r--r-- | drivers/s390/scsi/zfcp_ext.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index 3c90604076e0..80714679f5d6 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h | |||
@@ -42,10 +42,10 @@ extern void zfcp_dbf_rec_thread(char *, struct zfcp_dbf *); | |||
42 | extern void zfcp_dbf_rec_thread_lock(char *, struct zfcp_dbf *); | 42 | extern void zfcp_dbf_rec_thread_lock(char *, struct zfcp_dbf *); |
43 | extern void zfcp_dbf_rec_adapter(char *, void *, struct zfcp_dbf *); | 43 | extern void zfcp_dbf_rec_adapter(char *, void *, struct zfcp_dbf *); |
44 | extern void zfcp_dbf_rec_port(char *, void *, struct zfcp_port *); | 44 | extern void zfcp_dbf_rec_port(char *, void *, struct zfcp_port *); |
45 | extern void zfcp_dbf_rec_unit(char *, void *, struct zfcp_unit *); | 45 | extern void zfcp_dbf_rec_lun(char *, void *, struct scsi_device *); |
46 | extern void zfcp_dbf_rec_trigger(char *, void *, u8, u8, void *, | 46 | extern void zfcp_dbf_rec_trigger(char *, void *, u8, u8, void *, |
47 | struct zfcp_adapter *, struct zfcp_port *, | 47 | struct zfcp_adapter *, struct zfcp_port *, |
48 | struct zfcp_unit *); | 48 | struct scsi_device *); |
49 | extern void zfcp_dbf_rec_action(char *, struct zfcp_erp_action *); | 49 | extern void zfcp_dbf_rec_action(char *, struct zfcp_erp_action *); |
50 | extern void _zfcp_dbf_hba_fsf_response(const char *, int, struct zfcp_fsf_req *, | 50 | extern void _zfcp_dbf_hba_fsf_response(const char *, int, struct zfcp_fsf_req *, |
51 | struct zfcp_dbf *); | 51 | struct zfcp_dbf *); |
@@ -76,20 +76,20 @@ extern void zfcp_erp_port_shutdown(struct zfcp_port *, int, char *, void *); | |||
76 | extern void zfcp_erp_port_forced_reopen(struct zfcp_port *, int, char *, | 76 | extern void zfcp_erp_port_forced_reopen(struct zfcp_port *, int, char *, |
77 | void *); | 77 | void *); |
78 | extern void zfcp_erp_port_failed(struct zfcp_port *, char *, void *); | 78 | extern void zfcp_erp_port_failed(struct zfcp_port *, char *, void *); |
79 | extern void zfcp_erp_modify_unit_status(struct zfcp_unit *, char *, void *, u32, | 79 | extern void zfcp_erp_modify_lun_status(struct scsi_device *, char *, void *, |
80 | int); | 80 | u32, int); |
81 | extern void zfcp_erp_unit_reopen(struct zfcp_unit *, int, char *, void *); | 81 | extern void zfcp_erp_lun_reopen(struct scsi_device *, int, char *, void *); |
82 | extern void zfcp_erp_unit_shutdown(struct zfcp_unit *, int, char *, void *); | 82 | extern void zfcp_erp_lun_shutdown(struct scsi_device *, int, char *, void *); |
83 | extern void zfcp_erp_unit_shutdown_wait(struct zfcp_unit *, char *); | 83 | extern void zfcp_erp_lun_shutdown_wait(struct scsi_device *, char *); |
84 | extern void zfcp_erp_unit_failed(struct zfcp_unit *, char *, void *); | 84 | extern void zfcp_erp_lun_failed(struct scsi_device *, char *, void *); |
85 | extern int zfcp_erp_thread_setup(struct zfcp_adapter *); | 85 | extern int zfcp_erp_thread_setup(struct zfcp_adapter *); |
86 | extern void zfcp_erp_thread_kill(struct zfcp_adapter *); | 86 | extern void zfcp_erp_thread_kill(struct zfcp_adapter *); |
87 | extern void zfcp_erp_wait(struct zfcp_adapter *); | 87 | extern void zfcp_erp_wait(struct zfcp_adapter *); |
88 | extern void zfcp_erp_notify(struct zfcp_erp_action *, unsigned long); | 88 | extern void zfcp_erp_notify(struct zfcp_erp_action *, unsigned long); |
89 | extern void zfcp_erp_port_boxed(struct zfcp_port *, char *, void *); | 89 | extern void zfcp_erp_port_boxed(struct zfcp_port *, char *, void *); |
90 | extern void zfcp_erp_unit_boxed(struct zfcp_unit *, char *, void *); | 90 | extern void zfcp_erp_lun_boxed(struct scsi_device *, char *, void *); |
91 | extern void zfcp_erp_port_access_denied(struct zfcp_port *, char *, void *); | 91 | extern void zfcp_erp_port_access_denied(struct zfcp_port *, char *, void *); |
92 | extern void zfcp_erp_unit_access_denied(struct zfcp_unit *, char *, void *); | 92 | extern void zfcp_erp_lun_access_denied(struct scsi_device *, char *, void *); |
93 | extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *, char *, | 93 | extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *, char *, |
94 | void *); | 94 | void *); |
95 | extern void zfcp_erp_timeout_handler(unsigned long); | 95 | extern void zfcp_erp_timeout_handler(unsigned long); |
@@ -117,8 +117,8 @@ extern int zfcp_fsf_open_wka_port(struct zfcp_fc_wka_port *); | |||
117 | extern int zfcp_fsf_close_wka_port(struct zfcp_fc_wka_port *); | 117 | extern int zfcp_fsf_close_wka_port(struct zfcp_fc_wka_port *); |
118 | extern int zfcp_fsf_close_port(struct zfcp_erp_action *); | 118 | extern int zfcp_fsf_close_port(struct zfcp_erp_action *); |
119 | extern int zfcp_fsf_close_physical_port(struct zfcp_erp_action *); | 119 | extern int zfcp_fsf_close_physical_port(struct zfcp_erp_action *); |
120 | extern int zfcp_fsf_open_unit(struct zfcp_erp_action *); | 120 | extern int zfcp_fsf_open_lun(struct zfcp_erp_action *); |
121 | extern int zfcp_fsf_close_unit(struct zfcp_erp_action *); | 121 | extern int zfcp_fsf_close_lun(struct zfcp_erp_action *); |
122 | extern int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *); | 122 | extern int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *); |
123 | extern int zfcp_fsf_exchange_config_data_sync(struct zfcp_qdio *, | 123 | extern int zfcp_fsf_exchange_config_data_sync(struct zfcp_qdio *, |
124 | struct fsf_qtcb_bottom_config *); | 124 | struct fsf_qtcb_bottom_config *); |
@@ -134,12 +134,10 @@ extern int zfcp_fsf_send_ct(struct zfcp_fc_wka_port *, struct zfcp_fsf_ct_els *, | |||
134 | mempool_t *, unsigned int); | 134 | mempool_t *, unsigned int); |
135 | extern int zfcp_fsf_send_els(struct zfcp_adapter *, u32, | 135 | extern int zfcp_fsf_send_els(struct zfcp_adapter *, u32, |
136 | struct zfcp_fsf_ct_els *, unsigned int); | 136 | struct zfcp_fsf_ct_els *, unsigned int); |
137 | extern int zfcp_fsf_send_fcp_command_task(struct zfcp_unit *, | 137 | extern int zfcp_fsf_fcp_cmnd(struct scsi_cmnd *); |
138 | struct scsi_cmnd *); | ||
139 | extern void zfcp_fsf_req_free(struct zfcp_fsf_req *); | 138 | extern void zfcp_fsf_req_free(struct zfcp_fsf_req *); |
140 | extern struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_unit *, u8); | 139 | extern struct zfcp_fsf_req *zfcp_fsf_fcp_task_mgmt(struct scsi_cmnd *, u8); |
141 | extern struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long, | 140 | extern struct zfcp_fsf_req *zfcp_fsf_abort_fcp_cmnd(struct scsi_cmnd *); |
142 | struct zfcp_unit *); | ||
143 | extern void zfcp_fsf_reqid_check(struct zfcp_qdio *, int); | 141 | extern void zfcp_fsf_reqid_check(struct zfcp_qdio *, int); |
144 | 142 | ||
145 | /* zfcp_qdio.c */ | 143 | /* zfcp_qdio.c */ |