Skip to content

Commit 50cc09c

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: "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
2 parents eeaa762 + 849f858 commit 50cc09c

File tree

9 files changed

+12
-10
lines changed

9 files changed

+12
-10
lines changed

MAINTAINERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13857,7 +13857,8 @@ S: Maintained
1385713857
F: drivers/scsi/qla1280.[ch]
1385813858

1385913859
QLOGIC QLA2XXX FC-SCSI DRIVER
13860-
13860+
M: Nilesh Javali <[email protected]>
13861+
1386113862
1386213863
S: Supported
1386313864
F: Documentation/scsi/LICENSE.qla2xxx

drivers/scsi/hisi_sas/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ config SCSI_HISI_SAS
66
select SCSI_SAS_LIBSAS
77
select BLK_DEV_INTEGRITY
88
depends on ATA
9+
select SATA_HOST
910
help
1011
This driver supports HiSilicon's SAS HBA, including support based
1112
on platform device

drivers/scsi/qla2xxx/qla_dbg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2539,14 +2539,15 @@ ql_dbg(uint level, scsi_qla_host_t *vha, uint id, const char *fmt, ...)
25392539
{
25402540
va_list va;
25412541
struct va_format vaf;
2542-
char pbuf[64];
25432542

25442543
va_start(va, fmt);
25452544

25462545
vaf.fmt = fmt;
25472546
vaf.va = &va;
25482547

25492548
if (!ql_mask_match(level)) {
2549+
char pbuf[64];
2550+
25502551
if (vha != NULL) {
25512552
const struct pci_dev *pdev = vha->hw->pdev;
25522553
/* <module-name> <msg-id>:<host> Message */

drivers/scsi/qla2xxx/qla_init.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3611,8 +3611,6 @@ qla24xx_detect_sfp(scsi_qla_host_t *vha)
36113611
ha->lr_distance = LR_DISTANCE_5K;
36123612
}
36133613

3614-
if (!vha->flags.init_done)
3615-
rc = QLA_SUCCESS;
36163614
out:
36173615
ql_dbg(ql_dbg_async, vha, 0x507b,
36183616
"SFP detect: %s-Range SFP %s (nvr=%x ll=%x lr=%x lrd=%x).\n",

drivers/scsi/qla2xxx/qla_isr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ qla24xx_process_abts(struct scsi_qla_host *vha, void *pkt)
8787
}
8888

8989
/* terminate exchange */
90-
memset(rsp_els, 0, sizeof(*rsp_els));
9190
rsp_els->entry_type = ELS_IOCB_TYPE;
9291
rsp_els->entry_count = 1;
9392
rsp_els->nport_handle = ~0;

drivers/scsi/qla2xxx/qla_mbx.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4894,8 +4894,6 @@ qla25xx_set_els_cmds_supported(scsi_qla_host_t *vha)
48944894
return QLA_MEMORY_ALLOC_FAILED;
48954895
}
48964896

4897-
memset(els_cmd_map, 0, ELS_CMD_MAP_SIZE);
4898-
48994897
els_cmd_map[index] |= 1 << bit;
49004898

49014899
mcp->mb[0] = MBC_SET_RNID_PARAMS;

drivers/scsi/sg.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,10 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
793793
"sg_common_write: scsi opcode=0x%02x, cmd_size=%d\n",
794794
(int) cmnd[0], (int) hp->cmd_len));
795795

796-
if (hp->dxfer_len >= SZ_256M)
796+
if (hp->dxfer_len >= SZ_256M) {
797+
sg_remove_request(sfp, srp);
797798
return -EINVAL;
799+
}
798800

799801
k = sg_start_req(srp, cmnd);
800802
if (k) {

drivers/target/target_core_fabric_lib.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static int fc_get_pr_transport_id(
6363
* encoded TransportID.
6464
*/
6565
ptr = &se_nacl->initiatorname[0];
66-
for (i = 0; i < 24; ) {
66+
for (i = 0; i < 23; ) {
6767
if (!strncmp(&ptr[i], ":", 1)) {
6868
i++;
6969
continue;
@@ -341,7 +341,8 @@ static char *iscsi_parse_pr_out_transport_id(
341341
*p = tolower(*p);
342342
p++;
343343
}
344-
}
344+
} else
345+
*port_nexus_ptr = NULL;
345346

346347
return &buf[4];
347348
}

drivers/target/target_core_user.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2073,6 +2073,7 @@ static void tcmu_reset_ring(struct tcmu_dev *udev, u8 err_level)
20732073
mb->cmd_tail = 0;
20742074
mb->cmd_head = 0;
20752075
tcmu_flush_dcache_range(mb, sizeof(*mb));
2076+
clear_bit(TCMU_DEV_BIT_BROKEN, &udev->flags);
20762077

20772078
del_timer(&udev->cmd_timer);
20782079

0 commit comments

Comments
 (0)