Skip to content

Commit cdce6ac

Browse files
committed
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI update from James Bottomley: "This is a much shorter set of patches that were on the go but didn't make it in to the early pull request for the merge window. It's really a set of bug fixes plus some final cleanup work on the new tag queue API" * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: storvsc: ring buffer failures may result in I/O freeze ipr: set scsi_level correctly for disk arrays ipr: add support for async scanning to speed up boot scsi_debug: fix missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case scsi_debug: take sdebug_host_list_lock when changing capacity scsi_debug: improve driver description in Kconfig scsi_debug: fix compare and write errors qla2xxx: fix race in handling rport deletion during recovery causes panic scsi: blacklist RSOC for Microsoft iSCSI target devices scsi: fix random memory corruption with scsi-mq + T10 PI Revert "[SCSI] mpt3sas: Remove phys on topology change" Revert "[SCSI] mpt2sas: Remove phys on topology change." esas2r: Correct typos of "validate" in a comment fc: FCP_PTA_SIMPLE is 0 ibmvfc: remove unused tag variable scsi: remove MSG_*_TAG defines scsi: remove scsi_set_tag_type scsi: remove scsi_get_tag_type scsi: never drop to untagged mode during queue ramp down scsi: remove ->change_queue_type method
2 parents 5d6a546 + e617457 commit cdce6ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+151
-366
lines changed

drivers/infiniband/ulp/srp/ib_srp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,6 @@ static struct scsi_host_template srp_template = {
27402740
.info = srp_target_info,
27412741
.queuecommand = srp_queuecommand,
27422742
.change_queue_depth = srp_change_queue_depth,
2743-
.change_queue_type = scsi_change_queue_type,
27442743
.eh_abort_handler = srp_abort,
27452744
.eh_device_reset_handler = srp_reset_device,
27462745
.eh_host_reset_handler = srp_reset_host,

drivers/infiniband/ulp/srpt/ib_srpt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,17 +1708,17 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
17081708

17091709
switch (srp_cmd->task_attr) {
17101710
case SRP_CMD_SIMPLE_Q:
1711-
cmd->sam_task_attr = MSG_SIMPLE_TAG;
1711+
cmd->sam_task_attr = TCM_SIMPLE_TAG;
17121712
break;
17131713
case SRP_CMD_ORDERED_Q:
17141714
default:
1715-
cmd->sam_task_attr = MSG_ORDERED_TAG;
1715+
cmd->sam_task_attr = TCM_ORDERED_TAG;
17161716
break;
17171717
case SRP_CMD_HEAD_OF_Q:
1718-
cmd->sam_task_attr = MSG_HEAD_TAG;
1718+
cmd->sam_task_attr = TCM_HEAD_TAG;
17191719
break;
17201720
case SRP_CMD_ACA:
1721-
cmd->sam_task_attr = MSG_ACA_TAG;
1721+
cmd->sam_task_attr = TCM_ACA_TAG;
17221722
break;
17231723
}
17241724

@@ -1733,7 +1733,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
17331733
sizeof(srp_cmd->lun));
17341734
rc = target_submit_cmd(cmd, ch->sess, srp_cmd->cdb,
17351735
&send_ioctx->sense_data[0], unpacked_lun, data_len,
1736-
MSG_SIMPLE_TAG, dir, TARGET_SCF_ACK_KREF);
1736+
TCM_SIMPLE_TAG, dir, TARGET_SCF_ACK_KREF);
17371737
if (rc != 0) {
17381738
ret = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
17391739
goto send_sense;

drivers/scsi/53c700.c

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt);
176176
STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt);
177177
STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt);
178178
static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth);
179-
static int NCR_700_change_queue_type(struct scsi_device *SDpnt, int depth);
180179

181180
STATIC struct device_attribute *NCR_700_dev_attrs[];
182181

@@ -326,7 +325,6 @@ NCR_700_detect(struct scsi_host_template *tpnt,
326325
tpnt->slave_destroy = NCR_700_slave_destroy;
327326
tpnt->slave_alloc = NCR_700_slave_alloc;
328327
tpnt->change_queue_depth = NCR_700_change_queue_depth;
329-
tpnt->change_queue_type = NCR_700_change_queue_type;
330328
tpnt->use_blk_tags = 1;
331329

332330
if(tpnt->name == NULL)
@@ -904,8 +902,8 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata
904902
hostdata->tag_negotiated &= ~(1<<scmd_id(SCp));
905903

906904
SCp->device->tagged_supported = 0;
905+
SCp->device->simple_tags = 0;
907906
scsi_change_queue_depth(SCp->device, host->cmd_per_lun);
908-
scsi_set_tag_type(SCp->device, 0);
909907
} else {
910908
shost_printk(KERN_WARNING, host,
911909
"(%d:%d) Unexpected REJECT Message %s\n",
@@ -1818,8 +1816,8 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)
18181816
hostdata->tag_negotiated &= ~(1<<scmd_id(SCp));
18191817
}
18201818

1821-
if((hostdata->tag_negotiated &(1<<scmd_id(SCp)))
1822-
&& scsi_get_tag_type(SCp->device)) {
1819+
if ((hostdata->tag_negotiated & (1<<scmd_id(SCp))) &&
1820+
SCp->device->simple_tags) {
18231821
slot->tag = SCp->request->tag;
18241822
CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n",
18251823
slot->tag, slot);
@@ -2082,39 +2080,6 @@ NCR_700_change_queue_depth(struct scsi_device *SDp, int depth)
20822080
return scsi_change_queue_depth(SDp, depth);
20832081
}
20842082

2085-
static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
2086-
{
2087-
int change_tag = ((tag_type ==0 && scsi_get_tag_type(SDp) != 0)
2088-
|| (tag_type != 0 && scsi_get_tag_type(SDp) == 0));
2089-
struct NCR_700_Host_Parameters *hostdata =
2090-
(struct NCR_700_Host_Parameters *)SDp->host->hostdata[0];
2091-
2092-
/* We have a global (per target) flag to track whether TCQ is
2093-
* enabled, so we'll be turning it off for the entire target here.
2094-
* our tag algorithm will fail if we mix tagged and untagged commands,
2095-
* so quiesce the device before doing this */
2096-
if (change_tag)
2097-
scsi_target_quiesce(SDp->sdev_target);
2098-
2099-
scsi_set_tag_type(SDp, tag_type);
2100-
if (!tag_type) {
2101-
/* shift back to the default unqueued number of commands
2102-
* (the user can still raise this) */
2103-
scsi_change_queue_depth(SDp, SDp->host->cmd_per_lun);
2104-
hostdata->tag_negotiated &= ~(1 << sdev_id(SDp));
2105-
} else {
2106-
/* Here, we cleared the negotiation flag above, so this
2107-
* will force the driver to renegotiate */
2108-
scsi_change_queue_depth(SDp, SDp->queue_depth);
2109-
if (change_tag)
2110-
NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
2111-
}
2112-
if (change_tag)
2113-
scsi_target_resume(SDp->sdev_target);
2114-
2115-
return tag_type;
2116-
}
2117-
21182083
static ssize_t
21192084
NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char *buf)
21202085
{

drivers/scsi/Kconfig

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,18 +1462,17 @@ config SCSI_WD719X
14621462
SCSI controllers (based on WD33C296A chip).
14631463

14641464
config SCSI_DEBUG
1465-
tristate "SCSI debugging host simulator"
1465+
tristate "SCSI debugging host and device simulator"
14661466
depends on SCSI
14671467
select CRC_T10DIF
14681468
help
1469-
This is a host adapter simulator that can simulate multiple hosts
1470-
each with multiple dummy SCSI devices (disks). It defaults to one
1471-
host adapter with one dummy SCSI disk. Each dummy disk uses kernel
1472-
RAM as storage (i.e. it is a ramdisk). To save space when multiple
1473-
dummy disks are simulated, they share the same kernel RAM for
1474-
their storage. See <http://sg.danny.cz/sg/sdebug26.html> for more
1475-
information. This driver is primarily of use to those testing the
1476-
SCSI and block subsystems. If unsure, say N.
1469+
This pseudo driver simulates one or more hosts (SCSI initiators),
1470+
each with one or more targets, each with one or more logical units.
1471+
Defaults to one of each, creating a small RAM disk device. Many
1472+
parameters found in the /sys/bus/pseudo/drivers/scsi_debug
1473+
directory can be tweaked at run time.
1474+
See <http://sg.danny.cz/sg/sdebug26.html> for more information.
1475+
Mainly used for testing and best as a module. If unsure, say N.
14771476

14781477
config SCSI_MESH
14791478
tristate "MESH (Power Mac internal SCSI) support"

drivers/scsi/advansys.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7921,9 +7921,9 @@ static int asc_build_req(struct asc_board *boardp, struct scsi_cmnd *scp,
79217921
*/
79227922
if ((asc_dvc->cur_dvc_qng[scp->device->id] > 0) &&
79237923
(boardp->reqcnt[scp->device->id] % 255) == 0) {
7924-
asc_scsi_q->q2.tag_code = MSG_ORDERED_TAG;
7924+
asc_scsi_q->q2.tag_code = ORDERED_QUEUE_TAG;
79257925
} else {
7926-
asc_scsi_q->q2.tag_code = MSG_SIMPLE_TAG;
7926+
asc_scsi_q->q2.tag_code = SIMPLE_QUEUE_TAG;
79277927
}
79287928

79297929
/* Build ASC_SCSI_Q */
@@ -8351,7 +8351,7 @@ static int AscPutReadyQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq, uchar q_no)
83518351
}
83528352
q_addr = ASC_QNO_TO_QADDR(q_no);
83538353
if ((scsiq->q1.target_id & asc_dvc->use_tagged_qng) == 0) {
8354-
scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG;
8354+
scsiq->q2.tag_code &= ~SIMPLE_QUEUE_TAG;
83558355
}
83568356
scsiq->q1.status = QS_FREE;
83578357
AscMemWordCopyPtrToLram(iop_base,
@@ -8669,7 +8669,7 @@ static int AscExeScsiQueue(ASC_DVC_VAR *asc_dvc, ASC_SCSI_Q *scsiq)
86698669
}
86708670
}
86718671
if (disable_syn_offset_one_fix) {
8672-
scsiq->q2.tag_code &= ~MSG_SIMPLE_TAG;
8672+
scsiq->q2.tag_code &= ~SIMPLE_QUEUE_TAG;
86738673
scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX |
86748674
ASC_TAG_FLAG_DISABLE_DISCONNECT);
86758675
} else {

drivers/scsi/aic94xx/aic94xx_init.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ static struct scsi_host_template aic94xx_sht = {
6363
.scan_finished = asd_scan_finished,
6464
.scan_start = asd_scan_start,
6565
.change_queue_depth = sas_change_queue_depth,
66-
.change_queue_type = sas_change_queue_type,
6766
.bios_param = sas_bios_param,
6867
.can_queue = 1,
6968
.cmd_per_lun = 1,

drivers/scsi/bnx2fc/bnx2fc_fcoe.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2792,7 +2792,6 @@ static struct scsi_host_template bnx2fc_shost_template = {
27922792
.eh_host_reset_handler = fc_eh_host_reset,
27932793
.slave_alloc = fc_slave_alloc,
27942794
.change_queue_depth = scsi_change_queue_depth,
2795-
.change_queue_type = scsi_change_queue_type,
27962795
.this_id = -1,
27972796
.cmd_per_lun = 3,
27982797
.use_clustering = ENABLE_CLUSTERING,

drivers/scsi/bnx2fc/bnx2fc_io.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,11 +1737,7 @@ void bnx2fc_build_fcp_cmnd(struct bnx2fc_cmd *io_req,
17371737
fcp_cmnd->fc_pri_ta = 0;
17381738
fcp_cmnd->fc_tm_flags = io_req->mp_req.tm_flags;
17391739
fcp_cmnd->fc_flags = io_req->io_req_flags;
1740-
1741-
if (sc_cmd->flags & SCMD_TAGGED)
1742-
fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
1743-
else
1744-
fcp_cmnd->fc_pri_ta = 0;
1740+
fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
17451741
}
17461742

17471743
static void bnx2fc_parse_fcp_rsp(struct bnx2fc_cmd *io_req,

drivers/scsi/csiostor/csio_scsi.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,7 @@ csio_scsi_fcp_cmnd(struct csio_ioreq *req, void *addr)
172172
fcp_cmnd->fc_cmdref = 0;
173173

174174
memcpy(fcp_cmnd->fc_cdb, scmnd->cmnd, 16);
175-
if (scmnd->flags & SCMD_TAGGED)
176-
fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
177-
else
178-
fcp_cmnd->fc_pri_ta = 0;
175+
fcp_cmnd->fc_pri_ta = FCP_PTA_SIMPLE;
179176
fcp_cmnd->fc_dl = cpu_to_be32(scsi_bufflen(scmnd));
180177

181178
if (req->nsge)

drivers/scsi/esas2r/esas2r_flash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,9 +684,9 @@ static u16 calc_fi_checksum(struct esas2r_flash_context *fc)
684684
* 1) verify the fi_version is correct
685685
* 2) verify the checksum of the entire image.
686686
* 3) validate the adap_typ, action and length fields.
687-
* 4) valdiate each component header. check the img_type and
687+
* 4) validate each component header. check the img_type and
688688
* length fields
689-
* 5) valdiate each component image. validate signatures and
689+
* 5) validate each component image. validate signatures and
690690
* local checksums
691691
*/
692692
static bool verify_fi(struct esas2r_adapter *a,

drivers/scsi/esas2r/esas2r_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ static struct scsi_host_template driver_template = {
255255
.emulated = 0,
256256
.proc_name = ESAS2R_DRVR_NAME,
257257
.change_queue_depth = scsi_change_queue_depth,
258-
.change_queue_type = scsi_change_queue_type,
259258
.max_sectors = 0xFFFF,
260259
.use_blk_tags = 1,
261260
};

drivers/scsi/fcoe/fcoe.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ static struct scsi_host_template fcoe_shost_template = {
281281
.eh_host_reset_handler = fc_eh_host_reset,
282282
.slave_alloc = fc_slave_alloc,
283283
.change_queue_depth = scsi_change_queue_depth,
284-
.change_queue_type = scsi_change_queue_type,
285284
.this_id = -1,
286285
.cmd_per_lun = 3,
287286
.can_queue = FCOE_MAX_OUTSTANDING_COMMANDS,

drivers/scsi/fnic/fnic_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ static struct scsi_host_template fnic_host_template = {
111111
.eh_host_reset_handler = fnic_host_reset,
112112
.slave_alloc = fnic_slave_alloc,
113113
.change_queue_depth = scsi_change_queue_depth,
114-
.change_queue_type = scsi_change_queue_type,
115114
.this_id = -1,
116115
.cmd_per_lun = 3,
117116
.can_queue = FNIC_DFLT_IO_REQ,

drivers/scsi/ibmvscsi/ibmvfc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,6 @@ static int ibmvfc_queuecommand_lck(struct scsi_cmnd *cmnd,
16151615
struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
16161616
struct ibmvfc_cmd *vfc_cmd;
16171617
struct ibmvfc_event *evt;
1618-
u8 tag[2];
16191618
int rc;
16201619

16211620
if (unlikely((rc = fc_remote_port_chkready(rport))) ||
@@ -3089,7 +3088,6 @@ static struct scsi_host_template driver_template = {
30893088
.target_alloc = ibmvfc_target_alloc,
30903089
.scan_finished = ibmvfc_scan_finished,
30913090
.change_queue_depth = ibmvfc_change_queue_depth,
3092-
.change_queue_type = scsi_change_queue_type,
30933091
.cmd_per_lun = 16,
30943092
.can_queue = IBMVFC_MAX_REQUESTS_DEFAULT,
30953093
.this_id = -1,

0 commit comments

Comments
 (0)