aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-10-30 09:30:06 -0400
committerChristoph Hellwig <hch@lst.de>2014-11-12 05:19:41 -0500
commit5066863337afdb0ad7323f424f7959d9f9f066da (patch)
tree3901d3088c8698f10e1533298ae04a98116bc395 /drivers/s390/scsi
parentabd0c533e37789ef56a73562d6d06d39897bd801 (diff)
scsi: remove abuses of scsi_populate_tag
Unless we want to build a SPI tag message we should just check SCMD_TAGGED instead of reverse engineering a tag type through the use of scsi_populate_tag_msg. Also rename the function to spi_populate_tag_msg, make it behave like the other spi message helpers, and move it to the spi transport class. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r--drivers/s390/scsi/zfcp_fc.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/s390/scsi/zfcp_fc.h b/drivers/s390/scsi/zfcp_fc.h
index b1d2024ed513..df2b541c8287 100644
--- a/drivers/s390/scsi/zfcp_fc.h
+++ b/drivers/s390/scsi/zfcp_fc.h
@@ -212,8 +212,6 @@ static inline
212void zfcp_fc_scsi_to_fcp(struct fcp_cmnd *fcp, struct scsi_cmnd *scsi, 212void zfcp_fc_scsi_to_fcp(struct fcp_cmnd *fcp, struct scsi_cmnd *scsi,
213 u8 tm_flags) 213 u8 tm_flags)
214{ 214{
215 char tag[2];
216
217 int_to_scsilun(scsi->device->lun, (struct scsi_lun *) &fcp->fc_lun); 215 int_to_scsilun(scsi->device->lun, (struct scsi_lun *) &fcp->fc_lun);
218 216
219 if (unlikely(tm_flags)) { 217 if (unlikely(tm_flags)) {
@@ -221,17 +219,7 @@ void zfcp_fc_scsi_to_fcp(struct fcp_cmnd *fcp, struct scsi_cmnd *scsi,
221 return; 219 return;
222 } 220 }
223 221
224 if (scsi_populate_tag_msg(scsi, tag)) { 222 fcp->fc_pri_ta = FCP_PTA_SIMPLE;
225 switch (tag[0]) {
226 case MSG_ORDERED_TAG:
227 fcp->fc_pri_ta |= FCP_PTA_ORDERED;
228 break;
229 case MSG_SIMPLE_TAG:
230 fcp->fc_pri_ta |= FCP_PTA_SIMPLE;
231 break;
232 };
233 } else
234 fcp->fc_pri_ta = FCP_PTA_SIMPLE;
235 223
236 if (scsi->sc_data_direction == DMA_FROM_DEVICE) 224 if (scsi->sc_data_direction == DMA_FROM_DEVICE)
237 fcp->fc_flags |= FCP_CFL_RDDATA; 225 fcp->fc_flags |= FCP_CFL_RDDATA;