diff options
author | Martin Petermann <martin@linux.vnet.ibm.com> | 2008-07-02 04:56:35 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-12 09:22:34 -0400 |
commit | feac6a07c4a3578bffd6769bb4927e8a7e1f3ffe (patch) | |
tree | 991f87dc67519beef0b6e6513a750babb25af056 /drivers/s390/scsi/zfcp_scsi.c | |
parent | 5d4e226246331087799a01c267ec72e5931ff190 (diff) |
[SCSI] zfcp: Move status accessors from zfcp to SCSI include file.
Move the accessor functions for the scsi_cmnd status from zfcp to the
SCSI include file. Change the interface to the functions to pass the
scsi_cmnd pointer instead of the status pointer.
Signed-off-by: Martin Petermann <martin@linux.vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_scsi.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 446fb1da25df..160307382d2c 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -107,28 +107,6 @@ zfcp_set_fcp_dl(struct fcp_cmnd_iu *fcp_cmd, fcp_dl_t fcp_dl) | |||
107 | *zfcp_get_fcp_dl_ptr(fcp_cmd) = fcp_dl; | 107 | *zfcp_get_fcp_dl_ptr(fcp_cmd) = fcp_dl; |
108 | } | 108 | } |
109 | 109 | ||
110 | /* | ||
111 | * note: it's a bit-or operation not an assignment | ||
112 | * regarding the specified byte | ||
113 | */ | ||
114 | static inline void | ||
115 | set_byte(int *result, char status, char pos) | ||
116 | { | ||
117 | *result |= status << (pos * 8); | ||
118 | } | ||
119 | |||
120 | void | ||
121 | set_host_byte(int *result, char status) | ||
122 | { | ||
123 | set_byte(result, status, 2); | ||
124 | } | ||
125 | |||
126 | void | ||
127 | set_driver_byte(int *result, char status) | ||
128 | { | ||
129 | set_byte(result, status, 3); | ||
130 | } | ||
131 | |||
132 | static int | 110 | static int |
133 | zfcp_scsi_slave_alloc(struct scsi_device *sdp) | 111 | zfcp_scsi_slave_alloc(struct scsi_device *sdp) |
134 | { | 112 | { |
@@ -196,7 +174,7 @@ zfcp_scsi_slave_configure(struct scsi_device *sdp) | |||
196 | static void | 174 | static void |
197 | zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result) | 175 | zfcp_scsi_command_fail(struct scsi_cmnd *scpnt, int result) |
198 | { | 176 | { |
199 | set_host_byte(&scpnt->result, result); | 177 | set_host_byte(scpnt, result); |
200 | if ((scpnt->device != NULL) && (scpnt->device->host != NULL)) | 178 | if ((scpnt->device != NULL) && (scpnt->device->host != NULL)) |
201 | zfcp_scsi_dbf_event_result("fail", 4, | 179 | zfcp_scsi_dbf_event_result("fail", 4, |
202 | (struct zfcp_adapter*) scpnt->device->host->hostdata[0], | 180 | (struct zfcp_adapter*) scpnt->device->host->hostdata[0], |