SCSI fixes on 20170802

This seven is mostly minor build, Kconfig and error leg fixes.
 
 Signed-off-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJZgeACAAoJEAVr7HOZEZN4vxwP/0GZc1EWDubS8DZZOr4X25WA
 jofQFCrWYf9jBcCA64pv7kF5wCbQk0MFXMvs2u5YHGMV8U4VyquNT2zEYm+R5ZD8
 C3sIdgZyxb7x+KkUJ5NxvDBIzAQuQcPEUPZspgi809veoATQ28qoMO1NkOJzbJGE
 nUs/6TZcpA5xGdqXtI3G6IsbvuAFO1hmI2aIUAj5UVKV+B9ILGsxWHPzYPErgtra
 afTJ8jO4vYW/wcyY7/DG/V8UAvU/0pe9NZqgt0Gn+XiSq5C9HnqS9+BWjU9nx98g
 EiPuvP6UBq7zGmjFQdUTwYuysbPDwyVfB1l7RJFVeBTPj6sINFrqTQPU8qwy96S8
 gxfObnfbEkx4zJmv4iP8HtAgRQMVsVN64ICD6oeS4JQWmXoz90S0vCLwrTQv36ll
 UHmBaSKMqPHTt+emEmup3rcOBU+4PIVq40jQjUyBCJXd/kg5GUz7Og++/NHX8JDZ
 qhVJ/VhkBacnDD9fZLQ2cMfcB/E5pUmEgx3MycZty8pXx0AkttWyB0lIddln2yiL
 qpZwbJ4nbhS7TO1/ScZlHEqp/rVY3aaIvLovWrhrmy4N1KBk41EmSxCokxkv+Kmd
 Twy35eHLDT9Hn0emT+y12Ul5y0cTxy1JMOcMf6LLXAHQsKgg2khm3JfHcXC7H4mO
 H/FpxwQT7z47yU3FF2mZ
 =/+Ot
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "These seven patches are mostly minor build, Kconfig and error leg
  fixes"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: qedi: Fix return code in qedi_ep_connect()
  scsi: lpfc: fix linking against modular NVMe support
  scsi: scsi_transport_fc: return -EBUSY for deleted vport
  scsi: libcxgbi: add check for valid cxgbi_task_data
  scsi: aic7xxx: fix firmware build with O=path
  scsi: megaraid_sas: fix memleak in megasas_alloc_cmdlist_fusion
  scsi: qedi: Add ISCSI_BOOT_SYSFS to Kconfig
This commit is contained in:
Linus Torvalds 2017-08-02 08:43:19 -07:00
commit 33611ba0fe
8 changed files with 58 additions and 37 deletions

View File

@ -1230,6 +1230,8 @@ config SCSI_LPFC
tristate "Emulex LightPulse Fibre Channel Support" tristate "Emulex LightPulse Fibre Channel Support"
depends on PCI && SCSI depends on PCI && SCSI
depends on SCSI_FC_ATTRS depends on SCSI_FC_ATTRS
depends on NVME_TARGET_FC || NVME_TARGET_FC=n
depends on NVME_FC || NVME_FC=n
select CRC_T10DIF select CRC_T10DIF
---help--- ---help---
This lpfc driver supports the Emulex LightPulse This lpfc driver supports the Emulex LightPulse

View File

@ -55,9 +55,9 @@ aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
$(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm $(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic7xxx_reg.h \
$(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
$(src)/aic7xxx.seq $(srctree)/$(src)/aic7xxx.seq
$(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h $(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h
else else
@ -72,14 +72,14 @@ aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
$(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm $(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
$(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic79xx_reg.h \
$(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
$(src)/aic79xx.seq $(srctree)/$(src)/aic79xx.seq
$(aic79xx-gen-y): $(obj)/aic79xx_seq.h $(aic79xx-gen-y): $(obj)/aic79xx_seq.h
else else
$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped $(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
endif endif
$(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] $(obj)/aicasm/aicasm: $(srctree)/$(src)/aicasm/*.[chyl]
$(MAKE) -C $(src)/aicasm $(MAKE) -C $(srctree)/$(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/

View File

@ -1,19 +1,21 @@
PROG= aicasm PROG= aicasm
OUTDIR ?= ./
.SUFFIXES= .l .y .c .h .SUFFIXES= .l .y .c .h
CSRCS= aicasm.c aicasm_symbol.c CSRCS= aicasm.c aicasm_symbol.c
YSRCS= aicasm_gram.y aicasm_macro_gram.y YSRCS= aicasm_gram.y aicasm_macro_gram.y
LSRCS= aicasm_scan.l aicasm_macro_scan.l LSRCS= aicasm_scan.l aicasm_macro_scan.l
GENHDRS= aicdb.h $(YSRCS:.y=.h) GENHDRS= $(addprefix ${OUTDIR}/,aicdb.h $(YSRCS:.y=.h))
GENSRCS= $(YSRCS:.y=.c) $(LSRCS:.l=.c) GENSRCS= $(addprefix ${OUTDIR}/,$(YSRCS:.y=.c) $(LSRCS:.l=.c))
SRCS= ${CSRCS} ${GENSRCS} SRCS= ${CSRCS} ${GENSRCS}
LIBS= -ldb LIBS= -ldb
clean-files:= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output) $(PROG) clean-files:= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output) $(PROG)
# Override default kernel CFLAGS. This is a userland app. # Override default kernel CFLAGS. This is a userland app.
AICASM_CFLAGS:= -I/usr/include -I. AICASM_CFLAGS:= -I/usr/include -I. -I$(OUTDIR)
LEX= flex LEX= flex
YACC= bison YACC= bison
YFLAGS= -d YFLAGS= -d
@ -32,22 +34,25 @@ YFLAGS+= -t -v
LFLAGS= -d LFLAGS= -d
endif endif
$(PROG): ${GENHDRS} $(SRCS) $(PROG): $(OUTDIR) ${GENHDRS} $(SRCS)
$(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(PROG) $(LIBS) $(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(OUTDIR)/$(PROG) $(LIBS)
aicdb.h: $(OUTDIR):
mkdir -p $(OUTDIR)
$(OUTDIR)/aicdb.h:
@if [ -e "/usr/include/db4/db_185.h" ]; then \ @if [ -e "/usr/include/db4/db_185.h" ]; then \
echo "#include <db4/db_185.h>" > aicdb.h; \ echo "#include <db4/db_185.h>" > $@; \
elif [ -e "/usr/include/db3/db_185.h" ]; then \ elif [ -e "/usr/include/db3/db_185.h" ]; then \
echo "#include <db3/db_185.h>" > aicdb.h; \ echo "#include <db3/db_185.h>" > $@; \
elif [ -e "/usr/include/db2/db_185.h" ]; then \ elif [ -e "/usr/include/db2/db_185.h" ]; then \
echo "#include <db2/db_185.h>" > aicdb.h; \ echo "#include <db2/db_185.h>" > $@; \
elif [ -e "/usr/include/db1/db_185.h" ]; then \ elif [ -e "/usr/include/db1/db_185.h" ]; then \
echo "#include <db1/db_185.h>" > aicdb.h; \ echo "#include <db1/db_185.h>" > $@; \
elif [ -e "/usr/include/db/db_185.h" ]; then \ elif [ -e "/usr/include/db/db_185.h" ]; then \
echo "#include <db/db_185.h>" > aicdb.h; \ echo "#include <db/db_185.h>" > $@; \
elif [ -e "/usr/include/db_185.h" ]; then \ elif [ -e "/usr/include/db_185.h" ]; then \
echo "#include <db_185.h>" > aicdb.h; \ echo "#include <db_185.h>" > $@; \
else \ else \
echo "*** Install db development libraries"; \ echo "*** Install db development libraries"; \
fi fi
@ -58,23 +63,23 @@ clean:
# Create a dependency chain in generated files # Create a dependency chain in generated files
# to avoid concurrent invocations of the single # to avoid concurrent invocations of the single
# rule that builds them all. # rule that builds them all.
aicasm_gram.c: aicasm_gram.h $(OUTDIR)/aicasm_gram.c: $(OUTDIR)/aicasm_gram.h
aicasm_gram.c aicasm_gram.h: aicasm_gram.y $(OUTDIR)/aicasm_gram.c $(OUTDIR)/aicasm_gram.h: aicasm_gram.y
$(YACC) $(YFLAGS) -b $(<:.y=) $< $(YACC) $(YFLAGS) -b $(<:.y=) $<
mv $(<:.y=).tab.c $(<:.y=.c) mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
mv $(<:.y=).tab.h $(<:.y=.h) mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
# Create a dependency chain in generated files # Create a dependency chain in generated files
# to avoid concurrent invocations of the single # to avoid concurrent invocations of the single
# rule that builds them all. # rule that builds them all.
aicasm_macro_gram.c: aicasm_macro_gram.h $(OUTDIR)/aicasm_macro_gram.c: $(OUTDIR)/aicasm_macro_gram.h
aicasm_macro_gram.c aicasm_macro_gram.h: aicasm_macro_gram.y $(OUTDIR)/aicasm_macro_gram.c $(OUTDIR)/aicasm_macro_gram.h: aicasm_macro_gram.y
$(YACC) $(YFLAGS) -b $(<:.y=) -p mm $< $(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
mv $(<:.y=).tab.c $(<:.y=.c) mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
mv $(<:.y=).tab.h $(<:.y=.h) mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
aicasm_scan.c: aicasm_scan.l $(OUTDIR)/aicasm_scan.c: aicasm_scan.l
$(LEX) $(LFLAGS) -o$@ $< $(LEX) $(LFLAGS) -o $@ $<
aicasm_macro_scan.c: aicasm_macro_scan.l $(OUTDIR)/aicasm_macro_scan.c: aicasm_macro_scan.l
$(LEX) $(LFLAGS) -Pmm -o$@ $< $(LEX) $(LFLAGS) -Pmm -o $@ $<

View File

@ -2128,6 +2128,13 @@ void cxgbi_cleanup_task(struct iscsi_task *task)
struct iscsi_tcp_task *tcp_task = task->dd_data; struct iscsi_tcp_task *tcp_task = task->dd_data;
struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task);
if (!tcp_task || !tdata || (tcp_task->dd_data != tdata)) {
pr_info("task 0x%p,0x%p, tcp_task 0x%p, tdata 0x%p/0x%p.\n",
task, task->sc, tcp_task,
tcp_task ? tcp_task->dd_data : NULL, tdata);
return;
}
log_debug(1 << CXGBI_DBG_ISCSI, log_debug(1 << CXGBI_DBG_ISCSI,
"task 0x%p, skb 0x%p, itt 0x%x.\n", "task 0x%p, skb 0x%p, itt 0x%x.\n",
task, tdata->skb, task->hdr_itt); task, tdata->skb, task->hdr_itt);

View File

@ -425,7 +425,7 @@ static int megasas_create_sg_sense_fusion(struct megasas_instance *instance)
int int
megasas_alloc_cmdlist_fusion(struct megasas_instance *instance) megasas_alloc_cmdlist_fusion(struct megasas_instance *instance)
{ {
u32 max_mpt_cmd, i; u32 max_mpt_cmd, i, j;
struct fusion_context *fusion; struct fusion_context *fusion;
fusion = instance->ctrl_context; fusion = instance->ctrl_context;
@ -450,11 +450,15 @@ megasas_alloc_cmdlist_fusion(struct megasas_instance *instance)
fusion->cmd_list[i] = kzalloc(sizeof(struct megasas_cmd_fusion), fusion->cmd_list[i] = kzalloc(sizeof(struct megasas_cmd_fusion),
GFP_KERNEL); GFP_KERNEL);
if (!fusion->cmd_list[i]) { if (!fusion->cmd_list[i]) {
for (j = 0; j < i; j++)
kfree(fusion->cmd_list[j]);
kfree(fusion->cmd_list);
dev_err(&instance->pdev->dev, dev_err(&instance->pdev->dev,
"Failed from %s %d\n", __func__, __LINE__); "Failed from %s %d\n", __func__, __LINE__);
return -ENOMEM; return -ENOMEM;
} }
} }
return 0; return 0;
} }
int int

View File

@ -5,6 +5,7 @@ config QEDI
select SCSI_ISCSI_ATTRS select SCSI_ISCSI_ATTRS
select QED_LL2 select QED_LL2
select QED_ISCSI select QED_ISCSI
select ISCSI_BOOT_SYSFS
---help--- ---help---
This driver supports iSCSI offload for the QLogic FastLinQ This driver supports iSCSI offload for the QLogic FastLinQ
41000 Series Converged Network Adapters. 41000 Series Converged Network Adapters.

View File

@ -824,7 +824,7 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
u32 iscsi_cid = QEDI_CID_RESERVED; u32 iscsi_cid = QEDI_CID_RESERVED;
u16 len = 0; u16 len = 0;
char *buf = NULL; char *buf = NULL;
int ret; int ret, tmp;
if (!shost) { if (!shost) {
ret = -ENXIO; ret = -ENXIO;
@ -940,10 +940,10 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
ep_rel_conn: ep_rel_conn:
qedi->ep_tbl[iscsi_cid] = NULL; qedi->ep_tbl[iscsi_cid] = NULL;
ret = qedi_ops->release_conn(qedi->cdev, qedi_ep->handle); tmp = qedi_ops->release_conn(qedi->cdev, qedi_ep->handle);
if (ret) if (tmp)
QEDI_WARN(&qedi->dbg_ctx, "release_conn returned %d\n", QEDI_WARN(&qedi->dbg_ctx, "release_conn returned %d\n",
ret); tmp);
ep_free_sq: ep_free_sq:
qedi_free_sq(qedi, qedi_ep); qedi_free_sq(qedi, qedi_ep);
ep_conn_exit: ep_conn_exit:

View File

@ -1286,7 +1286,7 @@ store_fc_vport_delete(struct device *dev, struct device_attribute *attr,
unsigned long flags; unsigned long flags;
spin_lock_irqsave(shost->host_lock, flags); spin_lock_irqsave(shost->host_lock, flags);
if (vport->flags & (FC_VPORT_DEL | FC_VPORT_CREATING)) { if (vport->flags & (FC_VPORT_DEL | FC_VPORT_CREATING | FC_VPORT_DELETING)) {
spin_unlock_irqrestore(shost->host_lock, flags); spin_unlock_irqrestore(shost->host_lock, flags);
return -EBUSY; return -EBUSY;
} }
@ -2430,8 +2430,10 @@ fc_remove_host(struct Scsi_Host *shost)
spin_lock_irqsave(shost->host_lock, flags); spin_lock_irqsave(shost->host_lock, flags);
/* Remove any vports */ /* Remove any vports */
list_for_each_entry_safe(vport, next_vport, &fc_host->vports, peers) list_for_each_entry_safe(vport, next_vport, &fc_host->vports, peers) {
vport->flags |= FC_VPORT_DELETING;
fc_queue_work(shost, &vport->vport_delete_work); fc_queue_work(shost, &vport->vport_delete_work);
}
/* Remove any remote ports */ /* Remove any remote ports */
list_for_each_entry_safe(rport, next_rport, list_for_each_entry_safe(rport, next_rport,