Commit ecc0d419 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by Christoph Hellwig

[PATCH] qla2xxx: TCQ fixes

  Correct usage of tag-command-queueing methods:

  o Properly call scsi_activate_tcq() rather than
    scsi_adjust_queue_depth().
  o Properly retrieve tag message from command via
    scsi_populate_tag_msg().
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 7c772423
......@@ -22,6 +22,8 @@
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <scsi/scsi_tcq.h>
static inline uint16_t qla2x00_get_cmd_direction(struct scsi_cmnd *cmd);
static inline cont_entry_t *qla2x00_prep_cont_type0_iocb(scsi_qla_host_t *);
static inline cont_a64_entry_t *qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *);
......@@ -337,6 +339,7 @@ qla2x00_start_scsi(srb_t *sp)
uint16_t req_cnt;
uint16_t tot_dsds;
device_reg_t *reg;
char tag[2];
/* Setup device pointers. */
ret = 0;
......@@ -415,14 +418,17 @@ qla2x00_start_scsi(srb_t *sp)
cmd_pkt->lun = cpu_to_le16(fclun->lun);
/* Update tagged queuing modifier */
cmd_pkt->control_flags = __constant_cpu_to_le16(CF_SIMPLE_TAG);
if (cmd->device->tagged_supported) {
switch (cmd->tag) {
case HEAD_OF_QUEUE_TAG:
if (scsi_populate_tag_msg(cmd, tag)) {
switch (tag[0]) {
case MSG_SIMPLE_TAG:
cmd_pkt->control_flags =
__constant_cpu_to_le16(CF_SIMPLE_TAG);
break;
case MSG_HEAD_TAG:
cmd_pkt->control_flags =
__constant_cpu_to_le16(CF_HEAD_TAG);
break;
case ORDERED_QUEUE_TAG:
case MSG_ORDERED_TAG:
cmd_pkt->control_flags =
__constant_cpu_to_le16(CF_ORDERED_TAG);
break;
......
......@@ -1784,7 +1784,7 @@ qla2xxx_slave_configure(struct scsi_device *sdev)
ql2xmaxqdepth = queue_depth;
scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth);
scsi_activate_tcq(sdev, queue_depth);
qla_printk(KERN_INFO, ha,
"scsi(%d:%d:%d:%d): Enabled tagged queuing, queue "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment