Commit c85061e6 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull SCSI fixes from James Bottomley:
 "Two driver fixes (zfcp and target core), one information leak in sg
  and one build clean up"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()
  scsi: core: clean up generated file scsi_devinfo_tbl.c
  scsi: target: tcmu: fix error resetting qfull_time_out to default
  scsi: zfcp: fix infinite iteration on ERP ready list
parents 5997aab0 a45b599a
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Debug traces for zfcp. * Debug traces for zfcp.
* *
* Copyright IBM Corp. 2002, 2017 * Copyright IBM Corp. 2002, 2018
*/ */
#define KMSG_COMPONENT "zfcp" #define KMSG_COMPONENT "zfcp"
...@@ -308,6 +308,27 @@ void zfcp_dbf_rec_trig(char *tag, struct zfcp_adapter *adapter, ...@@ -308,6 +308,27 @@ void zfcp_dbf_rec_trig(char *tag, struct zfcp_adapter *adapter,
spin_unlock_irqrestore(&dbf->rec_lock, flags); spin_unlock_irqrestore(&dbf->rec_lock, flags);
} }
/**
* zfcp_dbf_rec_trig_lock - trace event related to triggered recovery with lock
* @tag: identifier for event
* @adapter: adapter on which the erp_action should run
* @port: remote port involved in the erp_action
* @sdev: scsi device involved in the erp_action
* @want: wanted erp_action
* @need: required erp_action
*
* The adapter->erp_lock must not be held.
*/
void zfcp_dbf_rec_trig_lock(char *tag, struct zfcp_adapter *adapter,
struct zfcp_port *port, struct scsi_device *sdev,
u8 want, u8 need)
{
unsigned long flags;
read_lock_irqsave(&adapter->erp_lock, flags);
zfcp_dbf_rec_trig(tag, adapter, port, sdev, want, need);
read_unlock_irqrestore(&adapter->erp_lock, flags);
}
/** /**
* zfcp_dbf_rec_run_lvl - trace event related to running recovery * zfcp_dbf_rec_run_lvl - trace event related to running recovery
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* External function declarations. * External function declarations.
* *
* Copyright IBM Corp. 2002, 2016 * Copyright IBM Corp. 2002, 2018
*/ */
#ifndef ZFCP_EXT_H #ifndef ZFCP_EXT_H
...@@ -35,6 +35,9 @@ extern int zfcp_dbf_adapter_register(struct zfcp_adapter *); ...@@ -35,6 +35,9 @@ extern int zfcp_dbf_adapter_register(struct zfcp_adapter *);
extern void zfcp_dbf_adapter_unregister(struct zfcp_adapter *); extern void zfcp_dbf_adapter_unregister(struct zfcp_adapter *);
extern void zfcp_dbf_rec_trig(char *, struct zfcp_adapter *, extern void zfcp_dbf_rec_trig(char *, struct zfcp_adapter *,
struct zfcp_port *, struct scsi_device *, u8, u8); struct zfcp_port *, struct scsi_device *, u8, u8);
extern void zfcp_dbf_rec_trig_lock(char *tag, struct zfcp_adapter *adapter,
struct zfcp_port *port,
struct scsi_device *sdev, u8 want, u8 need);
extern void zfcp_dbf_rec_run(char *, struct zfcp_erp_action *); extern void zfcp_dbf_rec_run(char *, struct zfcp_erp_action *);
extern void zfcp_dbf_rec_run_lvl(int level, char *tag, extern void zfcp_dbf_rec_run_lvl(int level, char *tag,
struct zfcp_erp_action *erp); struct zfcp_erp_action *erp);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Interface to Linux SCSI midlayer. * Interface to Linux SCSI midlayer.
* *
* Copyright IBM Corp. 2002, 2017 * Copyright IBM Corp. 2002, 2018
*/ */
#define KMSG_COMPONENT "zfcp" #define KMSG_COMPONENT "zfcp"
...@@ -618,7 +618,7 @@ static void zfcp_scsi_rport_register(struct zfcp_port *port) ...@@ -618,7 +618,7 @@ static void zfcp_scsi_rport_register(struct zfcp_port *port)
ids.port_id = port->d_id; ids.port_id = port->d_id;
ids.roles = FC_RPORT_ROLE_FCP_TARGET; ids.roles = FC_RPORT_ROLE_FCP_TARGET;
zfcp_dbf_rec_trig("scpaddy", port->adapter, port, NULL, zfcp_dbf_rec_trig_lock("scpaddy", port->adapter, port, NULL,
ZFCP_PSEUDO_ERP_ACTION_RPORT_ADD, ZFCP_PSEUDO_ERP_ACTION_RPORT_ADD,
ZFCP_PSEUDO_ERP_ACTION_RPORT_ADD); ZFCP_PSEUDO_ERP_ACTION_RPORT_ADD);
rport = fc_remote_port_add(port->adapter->scsi_host, 0, &ids); rport = fc_remote_port_add(port->adapter->scsi_host, 0, &ids);
...@@ -642,7 +642,7 @@ static void zfcp_scsi_rport_block(struct zfcp_port *port) ...@@ -642,7 +642,7 @@ static void zfcp_scsi_rport_block(struct zfcp_port *port)
struct fc_rport *rport = port->rport; struct fc_rport *rport = port->rport;
if (rport) { if (rport) {
zfcp_dbf_rec_trig("scpdely", port->adapter, port, NULL, zfcp_dbf_rec_trig_lock("scpdely", port->adapter, port, NULL,
ZFCP_PSEUDO_ERP_ACTION_RPORT_DEL, ZFCP_PSEUDO_ERP_ACTION_RPORT_DEL,
ZFCP_PSEUDO_ERP_ACTION_RPORT_DEL); ZFCP_PSEUDO_ERP_ACTION_RPORT_DEL);
fc_remote_port_delete(rport); fc_remote_port_delete(rport);
......
...@@ -182,7 +182,7 @@ zalon7xx-objs := zalon.o ncr53c8xx.o ...@@ -182,7 +182,7 @@ zalon7xx-objs := zalon.o ncr53c8xx.o
NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o
# Files generated that shall be removed upon make clean # Files generated that shall be removed upon make clean
clean-files := 53c700_d.h 53c700_u.h clean-files := 53c700_d.h 53c700_u.h scsi_devinfo_tbl.c
$(obj)/53c700.o $(MODVERDIR)/$(obj)/53c700.ver: $(obj)/53c700_d.h $(obj)/53c700.o $(MODVERDIR)/$(obj)/53c700.ver: $(obj)/53c700_d.h
......
...@@ -1894,7 +1894,7 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size) ...@@ -1894,7 +1894,7 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
num = (rem_sz > scatter_elem_sz_prev) ? num = (rem_sz > scatter_elem_sz_prev) ?
scatter_elem_sz_prev : rem_sz; scatter_elem_sz_prev : rem_sz;
schp->pages[k] = alloc_pages(gfp_mask, order); schp->pages[k] = alloc_pages(gfp_mask | __GFP_ZERO, order);
if (!schp->pages[k]) if (!schp->pages[k])
goto out; goto out;
......
...@@ -2121,6 +2121,8 @@ static ssize_t tcmu_qfull_time_out_store(struct config_item *item, ...@@ -2121,6 +2121,8 @@ static ssize_t tcmu_qfull_time_out_store(struct config_item *item,
if (val >= 0) { if (val >= 0) {
udev->qfull_time_out = val * MSEC_PER_SEC; udev->qfull_time_out = val * MSEC_PER_SEC;
} else if (val == -1) {
udev->qfull_time_out = val;
} else { } else {
printk(KERN_ERR "Invalid qfull timeout value %d\n", val); printk(KERN_ERR "Invalid qfull timeout value %d\n", val);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment