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_dbf.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_dbf.h')
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h index 2bcc3403126a..6a48c197b45d 100644 --- a/drivers/s390/scsi/zfcp_dbf.h +++ b/drivers/s390/scsi/zfcp_dbf.h | |||
@@ -60,7 +60,7 @@ struct zfcp_dbf_rec_record_trigger { | |||
60 | u8 need; | 60 | u8 need; |
61 | u32 as; | 61 | u32 as; |
62 | u32 ps; | 62 | u32 ps; |
63 | u32 us; | 63 | u32 ls; |
64 | u64 ref; | 64 | u64 ref; |
65 | u64 action; | 65 | u64 action; |
66 | u64 wwpn; | 66 | u64 wwpn; |
@@ -350,16 +350,16 @@ void zfcp_dbf_scsi_abort(const char *tag, struct zfcp_dbf *dbf, | |||
350 | /** | 350 | /** |
351 | * zfcp_dbf_scsi_devreset - trace event for Logical Unit or Target Reset | 351 | * zfcp_dbf_scsi_devreset - trace event for Logical Unit or Target Reset |
352 | * @tag: tag indicating success or failure of reset operation | 352 | * @tag: tag indicating success or failure of reset operation |
353 | * @scmnd: SCSI command which caused this error recovery | ||
353 | * @flag: indicates type of reset (Target Reset, Logical Unit Reset) | 354 | * @flag: indicates type of reset (Target Reset, Logical Unit Reset) |
354 | * @unit: unit that needs reset | ||
355 | * @scsi_cmnd: SCSI command which caused this error recovery | ||
356 | */ | 355 | */ |
357 | static inline | 356 | static inline |
358 | void zfcp_dbf_scsi_devreset(const char *tag, u8 flag, struct zfcp_unit *unit, | 357 | void zfcp_dbf_scsi_devreset(const char *tag, struct scsi_cmnd *scmnd, u8 flag) |
359 | struct scsi_cmnd *scsi_cmnd) | ||
360 | { | 358 | { |
359 | struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(scmnd->device); | ||
360 | |||
361 | zfcp_dbf_scsi(flag == FCP_TMF_TGT_RESET ? "trst" : "lrst", tag, 1, | 361 | zfcp_dbf_scsi(flag == FCP_TMF_TGT_RESET ? "trst" : "lrst", tag, 1, |
362 | unit->port->adapter->dbf, scsi_cmnd, NULL, 0); | 362 | zfcp_sdev->port->adapter->dbf, scmnd, NULL, 0); |
363 | } | 363 | } |
364 | 364 | ||
365 | #endif /* ZFCP_DBF_H */ | 365 | #endif /* ZFCP_DBF_H */ |