Skip to content

Commit

Permalink
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "Seven fixes: three in target, one on a sg error leg, two in qla2xxx
  fixing warnings introduced in the last merge window and updating
  MAINTAINERS and one in hisi_sas fixing a problem introduced by libata"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: sg: add sg_remove_request in sg_common_write
  scsi: target: tcmu: reset_ring should reset TCMU_DEV_BIT_BROKEN
  scsi: target: fix PR IN / READ FULL STATUS for FC
  scsi: target: Write NULL to *port_nexus_ptr if no ISID
  scsi: MAINTAINERS: Update qla2xxx FC-SCSI driver maintainer
  scsi: qla2xxx: Fix regression warnings
  scsi: hisi_sas: Fix build error without SATA_HOST
  • Loading branch information
torvalds committed Apr 18, 2020
2 parents eeaa762 + 849f858 commit 50cc09c
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -13857,7 +13857,8 @@ S: Maintained
F: drivers/scsi/qla1280.[ch]

QLOGIC QLA2XXX FC-SCSI DRIVER
M: [email protected]
M: Nilesh Javali <[email protected]>
M: [email protected]
L: [email protected]
S: Supported
F: Documentation/scsi/LICENSE.qla2xxx
Expand Down
1 change: 1 addition & 0 deletions drivers/scsi/hisi_sas/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ config SCSI_HISI_SAS
select SCSI_SAS_LIBSAS
select BLK_DEV_INTEGRITY
depends on ATA
select SATA_HOST
help
This driver supports HiSilicon's SAS HBA, including support based
on platform device
Expand Down
3 changes: 2 additions & 1 deletion drivers/scsi/qla2xxx/qla_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2539,14 +2539,15 @@ ql_dbg(uint level, scsi_qla_host_t *vha, uint id, const char *fmt, ...)
{
va_list va;
struct va_format vaf;
char pbuf[64];

va_start(va, fmt);

vaf.fmt = fmt;
vaf.va = &va;

if (!ql_mask_match(level)) {
char pbuf[64];

if (vha != NULL) {
const struct pci_dev *pdev = vha->hw->pdev;
/* <module-name> <msg-id>:<host> Message */
Expand Down
2 changes: 0 additions & 2 deletions drivers/scsi/qla2xxx/qla_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -3611,8 +3611,6 @@ qla24xx_detect_sfp(scsi_qla_host_t *vha)
ha->lr_distance = LR_DISTANCE_5K;
}

if (!vha->flags.init_done)
rc = QLA_SUCCESS;
out:
ql_dbg(ql_dbg_async, vha, 0x507b,
"SFP detect: %s-Range SFP %s (nvr=%x ll=%x lr=%x lrd=%x).\n",
Expand Down
1 change: 0 additions & 1 deletion drivers/scsi/qla2xxx/qla_isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ qla24xx_process_abts(struct scsi_qla_host *vha, void *pkt)
}

/* terminate exchange */
memset(rsp_els, 0, sizeof(*rsp_els));
rsp_els->entry_type = ELS_IOCB_TYPE;
rsp_els->entry_count = 1;
rsp_els->nport_handle = ~0;
Expand Down
2 changes: 0 additions & 2 deletions drivers/scsi/qla2xxx/qla_mbx.c
Original file line number Diff line number Diff line change
Expand Up @@ -4894,8 +4894,6 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha)
return QLA_MEMORY_ALLOC_FAILED;
}

memset(els_cmd_map, 0, ELS_CMD_MAP_SIZE);

els_cmd_map[index] |= 1 << bit;

mcp->mb[0] = MBC_SET_RNID_PARAMS;
Expand Down
4 changes: 3 additions & 1 deletion drivers/scsi/sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,10 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
"sg_common_write: scsi opcode=0x%02x, cmd_size=%d\n",
(int) cmnd[0], (int) hp->cmd_len));

if (hp->dxfer_len >= SZ_256M)
if (hp->dxfer_len >= SZ_256M) {
sg_remove_request(sfp, srp);
return -EINVAL;
}

k = sg_start_req(srp, cmnd);
if (k) {
Expand Down
5 changes: 3 additions & 2 deletions drivers/target/target_core_fabric_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static int fc_get_pr_transport_id(
* encoded TransportID.
*/
ptr = &se_nacl->initiatorname[0];
for (i = 0; i < 24; ) {
for (i = 0; i < 23; ) {
if (!strncmp(&ptr[i], ":", 1)) {
i++;
continue;
Expand Down Expand Up @@ -341,7 +341,8 @@ static char *iscsi_parse_pr_out_transport_id(
*p = tolower(*p);
p++;
}
}
} else
*port_nexus_ptr = NULL;

return &buf[4];
}
Expand Down
1 change: 1 addition & 0 deletions drivers/target/target_core_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -2073,6 +2073,7 @@ static void tcmu_reset_ring(struct tcmu_dev *udev, u8 err_level)
mb->cmd_tail = 0;
mb->cmd_head = 0;
tcmu_flush_dcache_range(mb, sizeof(*mb));
clear_bit(TCMU_DEV_BIT_BROKEN, &udev->flags);

del_timer(&udev->cmd_timer);

Expand Down

0 comments on commit 50cc09c

Please sign in to comment.