mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Reviewed-by: Mike Christie <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]>
This commit is contained in:
parent
abd0c533e3
commit
5066863337
19 changed files with 56 additions and 311 deletions
|
|
@ -212,8 +212,6 @@ static inline
|
|||
void zfcp_fc_scsi_to_fcp(struct fcp_cmnd *fcp, struct scsi_cmnd *scsi,
|
||||
u8 tm_flags)
|
||||
{
|
||||
char tag[2];
|
||||
|
||||
int_to_scsilun(scsi->device->lun, (struct scsi_lun *) &fcp->fc_lun);
|
||||
|
||||
if (unlikely(tm_flags)) {
|
||||
|
|
@ -221,17 +219,7 @@ void zfcp_fc_scsi_to_fcp(struct fcp_cmnd *fcp, struct scsi_cmnd *scsi,
|
|||
return;
|
||||
}
|
||||
|
||||
if (scsi_populate_tag_msg(scsi, tag)) {
|
||||
switch (tag[0]) {
|
||||
case MSG_ORDERED_TAG:
|
||||
fcp->fc_pri_ta |= FCP_PTA_ORDERED;
|
||||
break;
|
||||
case MSG_SIMPLE_TAG:
|
||||
fcp->fc_pri_ta |= FCP_PTA_SIMPLE;
|
||||
break;
|
||||
};
|
||||
} else
|
||||
fcp->fc_pri_ta = FCP_PTA_SIMPLE;
|
||||
fcp->fc_pri_ta = FCP_PTA_SIMPLE;
|
||||
|
||||
if (scsi->sc_data_direction == DMA_FROM_DEVICE)
|
||||
fcp->fc_flags |= FCP_CFL_RDDATA;
|
||||
|
|
|
|||
Loading…
Reference in a new issue