mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -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
|
|
@ -80,27 +80,6 @@ static inline void scsi_deactivate_tcq(struct scsi_device *sdev, int depth)
|
|||
scsi_adjust_queue_depth(sdev, 0, depth);
|
||||
}
|
||||
|
||||
/**
|
||||
* scsi_populate_tag_msg - place a tag message in a buffer
|
||||
* @SCpnt: pointer to the Scsi_Cmnd for the tag
|
||||
* @msg: pointer to the area to place the tag
|
||||
*
|
||||
* Notes:
|
||||
* designed to create the correct type of tag message for the
|
||||
* particular request. Returns the size of the tag message.
|
||||
* May return 0 if TCQ is disabled for this device.
|
||||
**/
|
||||
static inline int scsi_populate_tag_msg(struct scsi_cmnd *cmd, char *msg)
|
||||
{
|
||||
if (cmd->flags & SCMD_TAGGED) {
|
||||
*msg++ = MSG_SIMPLE_TAG;
|
||||
*msg++ = cmd->request->tag;
|
||||
return 2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline struct scsi_cmnd *scsi_mq_find_tag(struct Scsi_Host *shost,
|
||||
int unique_tag)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -157,5 +157,6 @@ int spi_populate_width_msg(unsigned char *msg, int width);
|
|||
int spi_populate_sync_msg(unsigned char *msg, int period, int offset);
|
||||
int spi_populate_ppr_msg(unsigned char *msg, int period, int offset, int width,
|
||||
int options);
|
||||
int spi_populate_tag_msg(unsigned char *msg, struct scsi_cmnd *cmd);
|
||||
|
||||
#endif /* SCSI_TRANSPORT_SPI_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue