Merge branch 'svn-trunk'

This commit is contained in:
Bart Van Assche
2019-02-24 12:44:45 -08:00
15 changed files with 1481 additions and 1635 deletions
+6 -6
View File
@@ -3,29 +3,29 @@
ABT_DETAILS="x86_64"
ABT_JOBS=5
ABT_KERNELS=" \
4.20.7 \
4.19.20-nc \
4.20.12 \
4.19.25-nc \
4.18.18-nc \
4.17.18-nc \
4.16.18-nc \
4.15.18-nc \
4.14.98-nc \
4.14.103-nc \
4.13.16-nc \
4.12.14-nc \
4.11.12-nc \
4.10.17-nc \
4.9.155-nc \
4.9.160-nc \
4.8.17-nc \
4.7.10-nc \
4.6.7-nc \
4.5.7-nc \
4.4.174-nc \
4.4.176-nc \
4.3.6-nc \
4.2.8-nc \
4.1.52-nc \
4.0.9-nc \
3.19.8-nc \
3.18.134-nc \
3.18.136-nc \
3.17.8-nc \
3.16.60-nc \
3.15.10-nc \
+4 -4
View File
@@ -9,7 +9,7 @@
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, version 2
# of the License.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -20,8 +20,8 @@
# all (the default) : make all
# clean : clean files
# extraclean : clean + clean dependencies
# install : install
# uninstall : uninstall
# install : install
# uninstall : uninstall
#
# Notes :
# - install and uninstall must be made as root
@@ -33,7 +33,7 @@ EXTRA_CFLAGS += -I$(SCST_INC_DIR)
EXTRA_CFLAGS += -W -Wno-unused-parameter -Wno-missing-field-initializers
EXTRA_CFLAGS += -DCONFIG_SCST_EXTRACHECKS
EXTRA_CFLAGS += -DCONFIG_SCST_EXTRACHECKS
#EXTRA_CFLAGS += -DCONFIG_SCST_TRACING
EXTRA_CFLAGS += -DCONFIG_SCST_DEBUG -g -fno-inline -fno-inline-functions
#EXTRA_CFLAGS += -DCONFIG_QLA_TGT_DEBUG_WORK_IN_THREAD
+2 -2
View File
@@ -141,7 +141,7 @@ qla24xx_dump_ram(struct qla_hw_data *ha, uint32_t addr, uint32_t *ram,
}
}
*nxt = rval == QLA_SUCCESS ? &ram[cnt]: NULL;
*nxt = rval == QLA_SUCCESS ? &ram[cnt] : NULL;
return rval;
}
@@ -326,7 +326,7 @@ qla2xxx_dump_ram(struct qla_hw_data *ha, uint32_t addr, uint16_t *ram,
}
}
*nxt = rval == QLA_SUCCESS ? &ram[cnt]: NULL;
*nxt = rval == QLA_SUCCESS ? &ram[cnt] : NULL;
return rval;
}
+5 -5
View File
@@ -128,9 +128,9 @@
#define RD_REG_BYTE_RELAXED(addr) readb_relaxed(addr)
#define RD_REG_WORD_RELAXED(addr) readw_relaxed(addr)
#define RD_REG_DWORD_RELAXED(addr) readl_relaxed(addr)
#define WRT_REG_BYTE(addr, data) writeb(data,addr)
#define WRT_REG_WORD(addr, data) writew(data,addr)
#define WRT_REG_DWORD(addr, data) writel(data,addr)
#define WRT_REG_BYTE(addr, data) writeb(data, addr)
#define WRT_REG_WORD(addr, data) writew(data, addr)
#define WRT_REG_DWORD(addr, data) writel(data, addr)
/*
* The ISP2312 v2 chip cannot access the FLASH/GPIO registers via MMIO in an
@@ -1407,7 +1407,7 @@ typedef struct {
uint32_t dseg_0_length; /* Data segment 0 length. */
uint32_t dseg_1_address[2]; /* Data segment 1 address. */
uint32_t dseg_1_length; /* Data segment 1 length. */
uint32_t dseg_2_address [2]; /* Data segment 2 address. */
uint32_t dseg_2_address[2]; /* Data segment 2 address. */
uint32_t dseg_2_length; /* Data segment 2 length. */
uint32_t dseg_3_address[2]; /* Data segment 3 address. */
uint32_t dseg_3_length; /* Data segment 3 length. */
@@ -2328,7 +2328,7 @@ struct isp_operations {
int (*get_flash_version) (struct scsi_qla_host *, void *);
int (*start_scsi) (srb_t *);
int (*abort_isp) (struct scsi_qla_host *);
int (*iospace_config)(struct qla_hw_data*);
int (*iospace_config)(struct qla_hw_data *);
};
/* MSI-X Support *************************************************************/
+2 -2
View File
@@ -79,7 +79,7 @@ extern void qla2x00_async_adisc_done(struct scsi_qla_host *, fc_port_t *,
extern void *qla2x00_alloc_iocbs(struct scsi_qla_host *, srb_t *);
extern fc_port_t *
qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t );
qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t);
/*
* Global Data in qla_os.c source file.
*/
@@ -150,7 +150,7 @@ extern void qla24xx_deallocate_vp_id(scsi_qla_host_t *);
extern int qla24xx_init_vp(scsi_qla_host_t *);
extern int qla24xx_disable_vp(scsi_qla_host_t *);
extern int qla24xx_enable_vp(scsi_qla_host_t *);
extern int qla24xx_control_vp(scsi_qla_host_t *, int );
extern int qla24xx_control_vp(scsi_qla_host_t *, int);
extern int qla24xx_modify_vp_config(scsi_qla_host_t *);
extern int qla2x00_send_change_request(scsi_qla_host_t *, uint16_t, uint16_t);
extern void qla2x00_vp_stop_timer(scsi_qla_host_t *);
+1 -1
View File
@@ -1629,7 +1629,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *vha)
eiter->type = cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE);
eiter->len = cpu_to_be16(4 + 4);
max_frame_size = IS_FWI2_CAPABLE(ha) ?
le16_to_cpu(icb24->frame_payload_size):
le16_to_cpu(icb24->frame_payload_size) :
le16_to_cpu(ha->init_cb->frame_payload_size);
eiter->a.max_frame_size = cpu_to_be32(max_frame_size);
size += 4 + 4;
+14 -14
View File
@@ -2148,7 +2148,7 @@ qla2x00_configure_hba(scsi_qla_host_t *vha)
ql_dbg(ql_dbg_disc, vha, 0x2012, "%s success\n", __func__);
return(rval);
return rval;
}
inline void
@@ -2620,7 +2620,7 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)
ha->zio_mode = icb->add_firmware_options[0] &
(BIT_3 | BIT_2 | BIT_1 | BIT_0);
ha->zio_timer = icb->interrupt_delay_timer ?
icb->interrupt_delay_timer: 2;
icb->interrupt_delay_timer : 2;
}
icb->add_firmware_options[0] &=
~(BIT_3 | BIT_2 | BIT_1 | BIT_0);
@@ -2653,7 +2653,7 @@ qla2x00_rport_del(void *data)
unsigned long flags;
spin_lock_irqsave(fcport->vha->host->host_lock, flags);
rport = fcport->drport ? fcport->drport: fcport->rport;
rport = fcport->drport ? fcport->drport : fcport->rport;
fcport->drport = NULL;
spin_unlock_irqrestore(fcport->vha->host->host_lock, flags);
if (rport) {
@@ -2771,9 +2771,9 @@ qla2x00_configure_loop(scsi_qla_host_t *vha)
ql_dbg(ql_dbg_disc, vha, 0x201e,
"Needs RSCN update and loop transition.\n");
rval = QLA_FUNCTION_FAILED;
}
else
} else {
rval = qla2x00_configure_fabric(vha);
}
}
if (rval == QLA_SUCCESS) {
@@ -4625,11 +4625,11 @@ qla24xx_nvram_config(scsi_qla_host_t *vha)
ha->flags.disable_risc_code_load = 0;
ha->flags.enable_lip_reset = 0;
ha->flags.enable_lip_full_login =
le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0;
le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0;
ha->flags.enable_target_reset =
le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0;
le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0;
ha->flags.enable_led_scheme = 0;
ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0;
ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0;
ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) &
(BIT_6 | BIT_5 | BIT_4)) >> 4;
@@ -4704,7 +4704,7 @@ qla24xx_nvram_config(scsi_qla_host_t *vha)
ha->zio_mode = le32_to_cpu(icb->firmware_options_2) &
(BIT_3 | BIT_2 | BIT_1 | BIT_0);
ha->zio_timer = le16_to_cpu(icb->interrupt_delay_timer) ?
le16_to_cpu(icb->interrupt_delay_timer): 2;
le16_to_cpu(icb->interrupt_delay_timer) : 2;
#endif /* CONFIG_SCSI_QLA2XXX_TARGET */
}
icb->firmware_options_2 &= cpu_to_le32(
@@ -5352,7 +5352,7 @@ qla84xx_init_chip(scsi_qla_host_t *vha)
mutex_unlock(&ha->cs84xx->fw_update_mutex);
return rval != QLA_SUCCESS || status[0] ? QLA_FUNCTION_FAILED:
return rval != QLA_SUCCESS || status[0] ? QLA_FUNCTION_FAILED :
QLA_SUCCESS;
}
@@ -5589,11 +5589,11 @@ qla81xx_nvram_config(scsi_qla_host_t *vha)
ha->flags.disable_risc_code_load = 0;
ha->flags.enable_lip_reset = 0;
ha->flags.enable_lip_full_login =
le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0;
le32_to_cpu(nv->host_p) & BIT_10 ? 1 : 0;
ha->flags.enable_target_reset =
le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0;
le32_to_cpu(nv->host_p) & BIT_11 ? 1 : 0;
ha->flags.enable_led_scheme = 0;
ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0;
ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1 : 0;
ha->operating_mode = (le32_to_cpu(icb->firmware_options_2) &
(BIT_6 | BIT_5 | BIT_4)) >> 4;
@@ -5669,7 +5669,7 @@ qla81xx_nvram_config(scsi_qla_host_t *vha)
ha->zio_mode = le32_to_cpu(icb->firmware_options_2) &
(BIT_3 | BIT_2 | BIT_1 | BIT_0);
ha->zio_timer = le16_to_cpu(icb->interrupt_delay_timer) ?
le16_to_cpu(icb->interrupt_delay_timer): 2;
le16_to_cpu(icb->interrupt_delay_timer) : 2;
#endif /* CONFIG_SCSI_QLA2XXX_TARGET */
}
icb->firmware_options_2 &= cpu_to_le32(
+1 -1
View File
@@ -2782,7 +2782,7 @@ __qla24xx_issue_tmf(char *name, uint32_t type, struct fc_port *fcport,
/* Issue marker IOCB. */
rval2 = qla2x00_marker(vha, req, rsp, fcport->loop_id, l,
type == TCF_LUN_RESET ? MK_SYNC_ID_LUN: MK_SYNC_ID);
type == TCF_LUN_RESET ? MK_SYNC_ID_LUN : MK_SYNC_ID);
if (rval2 != QLA_SUCCESS) {
ql_dbg(ql_dbg_mbx, vha, 0x1099,
"Failed to issue marker IOCB (%x).\n", rval2);
+1 -1
View File
@@ -502,7 +502,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport)
if (!vha) {
ql_log(ql_log_warn, vha, 0xa005,
"scsi_host_alloc() failed for vport.\n");
return(NULL);
return NULL;
}
host = vha->host;
+1 -1
View File
@@ -121,7 +121,7 @@ static struct crb_128M_2M_block_map crb_128M_2M_map[64] = {
{0, 0x0000000, 0x0000000, 0x000000},
{0, 0x0000000, 0x0000000, 0x000000},
{1, 0x01e0000, 0x01e0800, 0x122000},
{0, 0x0000000, 0x0000000, 0x000000} } } ,
{0, 0x0000000, 0x0000000, 0x000000} } },
{{{1, 0x0200000, 0x0210000, 0x180000} } },
{{{0, 0, 0, 0} } },
{{{1, 0x0400000, 0x0401000, 0x169000} } },
+5 -5
View File
@@ -130,7 +130,7 @@ MODULE_PARM_DESC(ql2xshiftctondsd,
static void qla2x00_free_device(scsi_qla_host_t *);
int ql2xfdmienable=1;
int ql2xfdmienable = 1;
module_param(ql2xfdmienable, int, S_IRUGO);
MODULE_PARM_DESC(ql2xfdmienable,
"Enables FDMI registrations "
@@ -159,7 +159,7 @@ MODULE_PARM_DESC(ql2xenablehba_err_chk,
" 1 -- Error isolation enabled only for DIX Type 0\n"
" 2 -- Error isolation enabled for all Types\n");
int ql2xiidmaenable=1;
int ql2xiidmaenable = 1;
module_param(ql2xiidmaenable, int, S_IRUGO);
MODULE_PARM_DESC(ql2xiidmaenable,
"Enables iIDMA settings "
@@ -248,7 +248,7 @@ MODULE_PARM_DESC(ql2xmdenable,
/*
* SCSI host template entry points
*/
static int qla2xxx_slave_configure(struct scsi_device * device);
static int qla2xxx_slave_configure(struct scsi_device *device);
static int qla2xxx_slave_alloc(struct scsi_device *);
static int qla2xxx_scan_finished(struct Scsi_Host *, unsigned long time);
static void qla2xxx_scan_start(struct Scsi_Host *);
@@ -316,8 +316,8 @@ struct scsi_host_template qla2xxx_driver_template = {
#endif /* CONFIG_SCSI_QLA2XXX_TARGET */
};
static struct scsi_transport_template *qla2xxx_transport_template = NULL;
struct scsi_transport_template *qla2xxx_transport_vport_template = NULL;
static struct scsi_transport_template *qla2xxx_transport_template;
struct scsi_transport_template *qla2xxx_transport_vport_template;
/* TODO Convert to inlines
*
+1
View File
@@ -292,6 +292,7 @@ CONFIG_MMIOTRACE \
CONFIG_NET_DROP_MONITOR \
CONFIG_NOP_TRACER \
CONFIG_SCHED_TRACER \
CONFIG_SECURITY_SELINUX \
CONFIG_STACK_TRACER \
CONFIG_STACK_VALIDATION \
CONFIG_TRACEPOINTS \
+21 -15
View File
@@ -434,6 +434,14 @@ static inline ssize_t call_write_iter(struct file *file, struct kiocb *kio,
}
#endif
/*
* See also commit b745fafaf70c ("fs: Introduce RWF_NOWAIT and
* FMODE_AIO_NOWAIT") # v4.13.
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
#define IOCB_NOWAIT 0
#endif
/* See also commit bdd1d2d3d251 ("fs: fix kernel_read prototype") # v4.14 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
static inline ssize_t
@@ -444,21 +452,6 @@ kernel_read_backport(struct file *file, void *buf, size_t count, loff_t *pos)
#define kernel_read(file, buf, count, pos) \
kernel_read_backport((file), (buf), (count), (pos))
/*
* See also commit 7bb307e894d5 ("export kernel_write(), convert open-coded
* instances") # v3.10.
*/
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) && !defined(RHEL_MAJOR)
static inline ssize_t
kernel_write_backport(struct file *file, void *buf, size_t count, loff_t *pos)
{
return kernel_write(file, *pos, buf, count);
}
#define kernel_write(file, buf, count, pos) \
kernel_write_backport((file), (buf), (count), (pos))
#endif
#endif
/* <linux/iocontext.h> */
@@ -875,6 +868,10 @@ static inline void sg_mark_end(struct scatterlist *sg)
{
}
static inline void sg_unmark_end(struct scatterlist *sg)
{
}
#ifndef __BACKPORT_LINUX_SCATTERLIST_H_TO_2_6_23__
static inline void sg_init_table(struct scatterlist *sgl, unsigned int nents)
@@ -902,6 +899,15 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page,
#endif /* for_each_sg */
#endif /* __BACKPORT_LINUX_SCATTERLIST_H_TO_2_6_23__ */
#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
/*
* See also commit c8164d8931fd ("scatterlist: introduce sg_unmark_end";
* v3.10).
*/
static inline void sg_unmark_end(struct scatterlist *sg)
{
sg->page_link &= ~0x02;
}
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) */
/* <linux/slab.h> */
File diff suppressed because it is too large Load Diff
+2
View File
@@ -1099,6 +1099,7 @@ success:
*sgv = obj;
obj->sg_entries[cnt-1].length -= PAGE_ALIGN(size) - size;
sg_mark_end(&obj->sg_entries[cnt-1]);
TRACE_MEM("obj=%p, sg_entries %p (size=%d, pages=%d, sg_count=%d, "
"count=%d, last_len=%d)", obj, obj->sg_entries, size, pages,
@@ -1224,6 +1225,7 @@ void sgv_pool_free(struct sgv_pool_obj *obj, struct scst_mem_lim *mem_lim)
if (obj->cache_num >= 0) {
obj->sg_entries[obj->orig_sg].length = obj->orig_length;
sg_unmark_end(&obj->sg_entries[obj->orig_sg]);
sgv_put_obj(obj);
} else {
obj->owner_pool->alloc_fns.free_pages_fn(obj->sg_entries,