Skip to content

Commit f0d98d8

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley: "This is a set of minor (and safe changes) that didn't make the initial pull request plus some bug fixes. The status handling code is actually a running regression from the previous merge window which had an incomplete fix (now reverted) and most of the remaining bug fixes are for problems older than the current merge window" [ Side note: this merge also takes the base kernel git repository to 6+ million objects for the first time. Technically we hit it a couple of merges ago already if you count all the tag objects, but now it reaches 6M+ objects reachable from HEAD. I was joking around that that's when I should switch to 5.0, because 3.0 happened at the 2M mark, and 4.0 happened at 4M objects. But probably not, even if numerology is about as good a reason as any. - Linus ] * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: devinfo: Add Microsoft iSCSI target to 1024 sector blacklist scsi: cxgb4i: silence overflow warning in t4_uld_rx_handler() scsi: dpt_i2o: Use after free in I2ORESETCMD ioctl scsi: core: Make scsi_result_to_blk_status() recognize CONDITION MET scsi: core: Rename __scsi_error_from_host_byte() into scsi_result_to_blk_status() Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()" scsi: aacraid: Insure command thread is not recursively stopped scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION scsi: qla2xxx: correctly shift host byte scsi: qla2xxx: Fix race condition between iocb timeout and initialisation scsi: qla2xxx: Avoid double completion of abort command scsi: qla2xxx: Fix small memory leak in qla2x00_probe_one on probe failure scsi: scsi_dh: Don't look for NULL devices handlers by name scsi: core: remove redundant assignment to shost->use_blk_mq
2 parents ca71b3b + 4d42680 commit f0d98d8

File tree

18 files changed

+109
-82
lines changed

18 files changed

+109
-82
lines changed

drivers/scsi/aacraid/commsup.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1502,9 +1502,10 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
15021502
host = aac->scsi_host_ptr;
15031503
scsi_block_requests(host);
15041504
aac_adapter_disable_int(aac);
1505-
if (aac->thread->pid != current->pid) {
1505+
if (aac->thread && aac->thread->pid != current->pid) {
15061506
spin_unlock_irq(host->host_lock);
15071507
kthread_stop(aac->thread);
1508+
aac->thread = NULL;
15081509
jafo = 1;
15091510
}
15101511

@@ -1591,6 +1592,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
15911592
aac->name);
15921593
if (IS_ERR(aac->thread)) {
15931594
retval = PTR_ERR(aac->thread);
1595+
aac->thread = NULL;
15941596
goto out;
15951597
}
15961598
}

drivers/scsi/aacraid/linit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,7 @@ static void __aac_shutdown(struct aac_dev * aac)
15621562
up(&fib->event_wait);
15631563
}
15641564
kthread_stop(aac->thread);
1565+
aac->thread = NULL;
15651566
}
15661567

15671568
aac_send_shutdown(aac);

drivers/scsi/cxgbi/cxgb4i/cxgb4i.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2108,12 +2108,12 @@ static int t4_uld_rx_handler(void *handle, const __be64 *rsp,
21082108
log_debug(1 << CXGBI_DBG_TOE,
21092109
"cdev %p, opcode 0x%x(0x%x,0x%x), skb %p.\n",
21102110
cdev, opc, rpl->ot.opcode_tid, ntohl(rpl->ot.opcode_tid), skb);
2111-
if (cxgb4i_cplhandlers[opc])
2112-
cxgb4i_cplhandlers[opc](cdev, skb);
2113-
else {
2111+
if (opc >= ARRAY_SIZE(cxgb4i_cplhandlers) || !cxgb4i_cplhandlers[opc]) {
21142112
pr_err("No handler for opcode 0x%x.\n", opc);
21152113
__kfree_skb(skb);
2116-
}
2114+
} else
2115+
cxgb4i_cplhandlers[opc](cdev, skb);
2116+
21172117
return 0;
21182118
nomem:
21192119
log_debug(1 << CXGBI_DBG_TOE, "OOM bailing out.\n");

drivers/scsi/dpt_i2o.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,13 +2051,16 @@ static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, ulong ar
20512051
}
20522052
break;
20532053
}
2054-
case I2ORESETCMD:
2055-
if(pHba->host)
2056-
spin_lock_irqsave(pHba->host->host_lock, flags);
2054+
case I2ORESETCMD: {
2055+
struct Scsi_Host *shost = pHba->host;
2056+
2057+
if (shost)
2058+
spin_lock_irqsave(shost->host_lock, flags);
20572059
adpt_hba_reset(pHba);
2058-
if(pHba->host)
2059-
spin_unlock_irqrestore(pHba->host->host_lock, flags);
2060+
if (shost)
2061+
spin_unlock_irqrestore(shost->host_lock, flags);
20602062
break;
2063+
}
20612064
case I2ORESCANCMD:
20622065
adpt_rescan(pHba);
20632066
break;

drivers/scsi/hosts.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,6 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
472472
else
473473
shost->dma_boundary = 0xffffffff;
474474

475-
shost->use_blk_mq = scsi_use_blk_mq;
476475
shost->use_blk_mq = scsi_use_blk_mq || shost->hostt->force_blk_mq;
477476

478477
device_initialize(&shost->shost_gendev);

drivers/scsi/qla2xxx/qla_gs.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3794,6 +3794,7 @@ int qla24xx_async_gffid(scsi_qla_host_t *vha, fc_port_t *fcport)
37943794
sp->gen1 = fcport->rscn_gen;
37953795
sp->gen2 = fcport->login_gen;
37963796

3797+
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
37973798
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
37983799

37993800
/* CT_IU preamble */
@@ -3812,7 +3813,6 @@ int qla24xx_async_gffid(scsi_qla_host_t *vha, fc_port_t *fcport)
38123813
sp->u.iocb_cmd.u.ctarg.rsp_size = GFF_ID_RSP_SIZE;
38133814
sp->u.iocb_cmd.u.ctarg.nport_handle = NPH_SNS;
38143815

3815-
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
38163816
sp->done = qla24xx_async_gffid_sp_done;
38173817

38183818
rval = qla2x00_start_sp(sp);
@@ -4230,6 +4230,8 @@ static int qla24xx_async_gnnft(scsi_qla_host_t *vha, struct srb *sp,
42304230
sp->name = "gnnft";
42314231
sp->gen1 = vha->hw->base_qpair->chip_reset;
42324232
sp->gen2 = fc4_type;
4233+
4234+
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
42334235
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
42344236

42354237
memset(sp->u.iocb_cmd.u.ctarg.rsp, 0, sp->u.iocb_cmd.u.ctarg.rsp_size);
@@ -4246,7 +4248,6 @@ static int qla24xx_async_gnnft(scsi_qla_host_t *vha, struct srb *sp,
42464248
sp->u.iocb_cmd.u.ctarg.req_size = GNN_FT_REQ_SIZE;
42474249
sp->u.iocb_cmd.u.ctarg.nport_handle = NPH_SNS;
42484250

4249-
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
42504251
sp->done = qla2x00_async_gpnft_gnnft_sp_done;
42514252

42524253
rval = qla2x00_start_sp(sp);
@@ -4370,6 +4371,8 @@ int qla24xx_async_gpnft(scsi_qla_host_t *vha, u8 fc4_type, srb_t *sp)
43704371
sp->name = "gpnft";
43714372
sp->gen1 = vha->hw->base_qpair->chip_reset;
43724373
sp->gen2 = fc4_type;
4374+
4375+
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
43734376
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
43744377

43754378
rspsz = sizeof(struct ct_sns_gpnft_rsp) +
@@ -4385,7 +4388,6 @@ int qla24xx_async_gpnft(scsi_qla_host_t *vha, u8 fc4_type, srb_t *sp)
43854388

43864389
sp->u.iocb_cmd.u.ctarg.nport_handle = NPH_SNS;
43874390

4388-
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
43894391
sp->done = qla2x00_async_gpnft_gnnft_sp_done;
43904392

43914393
rval = qla2x00_start_sp(sp);
@@ -4495,6 +4497,7 @@ int qla24xx_async_gnnid(scsi_qla_host_t *vha, fc_port_t *fcport)
44954497
sp->gen1 = fcport->rscn_gen;
44964498
sp->gen2 = fcport->login_gen;
44974499

4500+
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
44984501
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
44994502

45004503
/* CT_IU preamble */
@@ -4516,7 +4519,6 @@ int qla24xx_async_gnnid(scsi_qla_host_t *vha, fc_port_t *fcport)
45164519
sp->u.iocb_cmd.u.ctarg.rsp_size = GNN_ID_RSP_SIZE;
45174520
sp->u.iocb_cmd.u.ctarg.nport_handle = NPH_SNS;
45184521

4519-
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
45204522
sp->done = qla2x00_async_gnnid_sp_done;
45214523

45224524
rval = qla2x00_start_sp(sp);
@@ -4632,6 +4634,7 @@ int qla24xx_async_gfpnid(scsi_qla_host_t *vha, fc_port_t *fcport)
46324634
sp->gen1 = fcport->rscn_gen;
46334635
sp->gen2 = fcport->login_gen;
46344636

4637+
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
46354638
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
46364639

46374640
/* CT_IU preamble */
@@ -4653,7 +4656,6 @@ int qla24xx_async_gfpnid(scsi_qla_host_t *vha, fc_port_t *fcport)
46534656
sp->u.iocb_cmd.u.ctarg.rsp_size = GFPN_ID_RSP_SIZE;
46544657
sp->u.iocb_cmd.u.ctarg.nport_handle = NPH_SNS;
46554658

4656-
sp->u.iocb_cmd.timeout = qla2x00_async_iocb_timeout;
46574659
sp->done = qla2x00_async_gfpnid_sp_done;
46584660

46594661
rval = qla2x00_start_sp(sp);

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,11 @@ qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport,
183183
sp->name = "login";
184184
sp->gen1 = fcport->rscn_gen;
185185
sp->gen2 = fcport->login_gen;
186-
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
187186

188187
lio = &sp->u.iocb_cmd;
189188
lio->timeout = qla2x00_async_iocb_timeout;
189+
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
190+
190191
sp->done = qla2x00_async_login_sp_done;
191192
lio->u.logio.flags |= SRB_LOGIN_COND_PLOGI;
192193

@@ -245,10 +246,11 @@ qla2x00_async_logout(struct scsi_qla_host *vha, fc_port_t *fcport)
245246

246247
sp->type = SRB_LOGOUT_CMD;
247248
sp->name = "logout";
248-
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
249249

250250
lio = &sp->u.iocb_cmd;
251251
lio->timeout = qla2x00_async_iocb_timeout;
252+
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
253+
252254
sp->done = qla2x00_async_logout_sp_done;
253255
rval = qla2x00_start_sp(sp);
254256
if (rval != QLA_SUCCESS)
@@ -307,10 +309,11 @@ qla2x00_async_prlo(struct scsi_qla_host *vha, fc_port_t *fcport)
307309

308310
sp->type = SRB_PRLO_CMD;
309311
sp->name = "prlo";
310-
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
311312

312313
lio = &sp->u.iocb_cmd;
313314
lio->timeout = qla2x00_async_iocb_timeout;
315+
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
316+
314317
sp->done = qla2x00_async_prlo_sp_done;
315318
rval = qla2x00_start_sp(sp);
316319
if (rval != QLA_SUCCESS)
@@ -412,10 +415,11 @@ qla2x00_async_adisc(struct scsi_qla_host *vha, fc_port_t *fcport,
412415

413416
sp->type = SRB_ADISC_CMD;
414417
sp->name = "adisc";
415-
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
416418

417419
lio = &sp->u.iocb_cmd;
418420
lio->timeout = qla2x00_async_iocb_timeout;
421+
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
422+
419423
sp->done = qla2x00_async_adisc_sp_done;
420424
if (data[1] & QLA_LOGIO_LOGIN_RETRIED)
421425
lio->u.logio.flags |= SRB_LOGIN_RETRIED;
@@ -745,6 +749,8 @@ int qla24xx_async_gnl(struct scsi_qla_host *vha, fc_port_t *fcport)
745749
sp->gen1 = fcport->rscn_gen;
746750
sp->gen2 = fcport->login_gen;
747751

752+
mbx = &sp->u.iocb_cmd;
753+
mbx->timeout = qla2x00_async_iocb_timeout;
748754
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha)+2);
749755

750756
mb = sp->u.iocb_cmd.u.mbx.out_mb;
@@ -757,9 +763,6 @@ int qla24xx_async_gnl(struct scsi_qla_host *vha, fc_port_t *fcport)
757763
mb[8] = vha->gnl.size;
758764
mb[9] = vha->vp_idx;
759765

760-
mbx = &sp->u.iocb_cmd;
761-
mbx->timeout = qla2x00_async_iocb_timeout;
762-
763766
sp->done = qla24xx_async_gnl_sp_done;
764767

765768
rval = qla2x00_start_sp(sp);
@@ -887,10 +890,11 @@ qla24xx_async_prli(struct scsi_qla_host *vha, fc_port_t *fcport)
887890

888891
sp->type = SRB_PRLI_CMD;
889892
sp->name = "prli";
890-
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
891893

892894
lio = &sp->u.iocb_cmd;
893895
lio->timeout = qla2x00_async_iocb_timeout;
896+
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
897+
894898
sp->done = qla2x00_async_prli_sp_done;
895899
lio->u.logio.flags = 0;
896900

@@ -955,6 +959,9 @@ int qla24xx_async_gpdb(struct scsi_qla_host *vha, fc_port_t *fcport, u8 opt)
955959
sp->name = "gpdb";
956960
sp->gen1 = fcport->rscn_gen;
957961
sp->gen2 = fcport->login_gen;
962+
963+
mbx = &sp->u.iocb_cmd;
964+
mbx->timeout = qla2x00_async_iocb_timeout;
958965
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha) + 2);
959966

960967
pd = dma_pool_zalloc(ha->s_dma_pool, GFP_KERNEL, &pd_dma);
@@ -974,8 +981,6 @@ int qla24xx_async_gpdb(struct scsi_qla_host *vha, fc_port_t *fcport, u8 opt)
974981
mb[9] = vha->vp_idx;
975982
mb[10] = opt;
976983

977-
mbx = &sp->u.iocb_cmd;
978-
mbx->timeout = qla2x00_async_iocb_timeout;
979984
mbx->u.mbx.in = (void *)pd;
980985
mbx->u.mbx.in_dma = pd_dma;
981986

@@ -1490,13 +1495,15 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun,
14901495
tm_iocb = &sp->u.iocb_cmd;
14911496
sp->type = SRB_TM_CMD;
14921497
sp->name = "tmf";
1498+
1499+
tm_iocb->timeout = qla2x00_tmf_iocb_timeout;
1500+
init_completion(&tm_iocb->u.tmf.comp);
14931501
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha));
1502+
14941503
tm_iocb->u.tmf.flags = flags;
14951504
tm_iocb->u.tmf.lun = lun;
14961505
tm_iocb->u.tmf.data = tag;
14971506
sp->done = qla2x00_tmf_sp_done;
1498-
tm_iocb->timeout = qla2x00_tmf_iocb_timeout;
1499-
init_completion(&tm_iocb->u.tmf.comp);
15001507

15011508
rval = qla2x00_start_sp(sp);
15021509
if (rval != QLA_SUCCESS)
@@ -1550,8 +1557,8 @@ qla24xx_abort_sp_done(void *ptr, int res)
15501557
srb_t *sp = ptr;
15511558
struct srb_iocb *abt = &sp->u.iocb_cmd;
15521559

1553-
del_timer(&sp->u.iocb_cmd.timer);
1554-
complete(&abt->u.abt.comp);
1560+
if (del_timer(&sp->u.iocb_cmd.timer))
1561+
complete(&abt->u.abt.comp);
15551562
}
15561563

15571564
int
@@ -1570,7 +1577,11 @@ qla24xx_async_abort_cmd(srb_t *cmd_sp)
15701577
abt_iocb = &sp->u.iocb_cmd;
15711578
sp->type = SRB_ABT_CMD;
15721579
sp->name = "abort";
1580+
1581+
abt_iocb->timeout = qla24xx_abort_iocb_timeout;
1582+
init_completion(&abt_iocb->u.abt.comp);
15731583
qla2x00_init_timer(sp, qla2x00_get_async_timeout(vha));
1584+
15741585
abt_iocb->u.abt.cmd_hndl = cmd_sp->handle;
15751586

15761587
if (vha->flags.qpairs_available && cmd_sp->qpair)
@@ -1580,8 +1591,6 @@ qla24xx_async_abort_cmd(srb_t *cmd_sp)
15801591
abt_iocb->u.abt.req_que_no = cpu_to_le16(vha->req->id);
15811592

15821593
sp->done = qla24xx_abort_sp_done;
1583-
abt_iocb->timeout = qla24xx_abort_iocb_timeout;
1584-
init_completion(&abt_iocb->u.abt.comp);
15851594

15861595
rval = qla2x00_start_sp(sp);
15871596
if (rval != QLA_SUCCESS)

drivers/scsi/qla2xxx/qla_inline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,13 @@ qla2x00_init_timer(srb_t *sp, unsigned long tmo)
272272
{
273273
timer_setup(&sp->u.iocb_cmd.timer, qla2x00_sp_timeout, 0);
274274
sp->u.iocb_cmd.timer.expires = jiffies + tmo * HZ;
275-
add_timer(&sp->u.iocb_cmd.timer);
276275
sp->free = qla2x00_sp_free;
277276
init_completion(&sp->comp);
278277
if (IS_QLAFX00(sp->vha->hw) && (sp->type == SRB_FXIOCB_DCMD))
279278
init_completion(&sp->u.iocb_cmd.u.fxiocb.fxiocb_comp);
280279
if (sp->type == SRB_ELS_DCMD)
281280
init_completion(&sp->u.iocb_cmd.u.els_logo.comp);
281+
add_timer(&sp->u.iocb_cmd.timer);
282282
}
283283

284284
static inline int

drivers/scsi/qla2xxx/qla_iocb.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,8 +2460,8 @@ qla24xx_els_dcmd_iocb(scsi_qla_host_t *vha, int els_opcode,
24602460
sp->type = SRB_ELS_DCMD;
24612461
sp->name = "ELS_DCMD";
24622462
sp->fcport = fcport;
2463-
qla2x00_init_timer(sp, ELS_DCMD_TIMEOUT);
24642463
elsio->timeout = qla2x00_els_dcmd_iocb_timeout;
2464+
qla2x00_init_timer(sp, ELS_DCMD_TIMEOUT);
24652465
sp->done = qla2x00_els_dcmd_sp_done;
24662466
sp->free = qla2x00_els_dcmd_sp_free;
24672467

@@ -2658,8 +2658,11 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode,
26582658
sp->type = SRB_ELS_DCMD;
26592659
sp->name = "ELS_DCMD";
26602660
sp->fcport = fcport;
2661-
qla2x00_init_timer(sp, ELS_DCMD_TIMEOUT);
2661+
26622662
elsio->timeout = qla2x00_els_dcmd2_iocb_timeout;
2663+
init_completion(&elsio->u.els_plogi.comp);
2664+
qla2x00_init_timer(sp, ELS_DCMD_TIMEOUT);
2665+
26632666
sp->done = qla2x00_els_dcmd2_sp_done;
26642667
sp->free = qla2x00_els_dcmd2_sp_free;
26652668

@@ -2696,7 +2699,6 @@ qla24xx_els_dcmd2_iocb(scsi_qla_host_t *vha, int els_opcode,
26962699
ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x0109,
26972700
(uint8_t *)elsio->u.els_plogi.els_plogi_pyld, 0x70);
26982701

2699-
init_completion(&elsio->u.els_plogi.comp);
27002702
rval = qla2x00_start_sp(sp);
27012703
if (rval != QLA_SUCCESS) {
27022704
rval = QLA_FUNCTION_FAILED;

drivers/scsi/qla2xxx/qla_isr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,7 +2174,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
21742174
0x10, 0x1);
21752175
set_driver_byte(cmd, DRIVER_SENSE);
21762176
set_host_byte(cmd, DID_ABORT);
2177-
cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
2177+
cmd->result |= SAM_STAT_CHECK_CONDITION;
21782178
return 1;
21792179
}
21802180

@@ -2184,7 +2184,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
21842184
0x10, 0x3);
21852185
set_driver_byte(cmd, DRIVER_SENSE);
21862186
set_host_byte(cmd, DID_ABORT);
2187-
cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
2187+
cmd->result |= SAM_STAT_CHECK_CONDITION;
21882188
return 1;
21892189
}
21902190

@@ -2194,7 +2194,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
21942194
0x10, 0x2);
21952195
set_driver_byte(cmd, DRIVER_SENSE);
21962196
set_host_byte(cmd, DID_ABORT);
2197-
cmd->result |= SAM_STAT_CHECK_CONDITION << 1;
2197+
cmd->result |= SAM_STAT_CHECK_CONDITION;
21982198
return 1;
21992199
}
22002200

@@ -2347,7 +2347,7 @@ qla25xx_process_bidir_status_iocb(scsi_qla_host_t *vha, void *pkt,
23472347
bsg_job->reply_len = sizeof(struct fc_bsg_reply);
23482348
/* Always return DID_OK, bsg will send the vendor specific response
23492349
* in this case only */
2350-
sp->done(sp, DID_OK << 6);
2350+
sp->done(sp, DID_OK << 16);
23512351

23522352
}
23532353

0 commit comments

Comments
 (0)