diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-21 20:39:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-21 20:39:32 -0400 |
commit | c85061e6e0ee07e131b929e6a17bb2e20d19b321 (patch) | |
tree | c0c59dfd8c2beaba79c293952a4ab96173bd11a0 /drivers | |
parent | 5997aab0a11ea27ee8e520ecc551ed18fd3e8296 (diff) | |
parent | a45b599ad808c3c982fdcdc12b0b8611c2f92824 (diff) |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 23 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ext.h | 5 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 14 | ||||
-rw-r--r-- | drivers/scsi/Makefile | 2 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 2 | ||||
-rw-r--r-- | drivers/target/target_core_user.c | 2 |
6 files changed, 37 insertions, 11 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index a8b831000b2d..18c4f933e8b9 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Debug traces for zfcp. | 5 | * Debug traces for zfcp. |
6 | * | 6 | * |
7 | * Copyright IBM Corp. 2002, 2017 | 7 | * Copyright IBM Corp. 2002, 2018 |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define KMSG_COMPONENT "zfcp" | 10 | #define KMSG_COMPONENT "zfcp" |
@@ -308,6 +308,27 @@ void zfcp_dbf_rec_trig(char *tag, struct zfcp_adapter *adapter, | |||
308 | spin_unlock_irqrestore(&dbf->rec_lock, flags); | 308 | spin_unlock_irqrestore(&dbf->rec_lock, flags); |
309 | } | 309 | } |
310 | 310 | ||
311 | /** | ||
312 | * zfcp_dbf_rec_trig_lock - trace event related to triggered recovery with lock | ||
313 | * @tag: identifier for event | ||
314 | * @adapter: adapter on which the erp_action should run | ||
315 | * @port: remote port involved in the erp_action | ||
316 | * @sdev: scsi device involved in the erp_action | ||
317 | * @want: wanted erp_action | ||
318 | * @need: required erp_action | ||
319 | * | ||
320 | * The adapter->erp_lock must not be held. | ||
321 | */ | ||
322 | void zfcp_dbf_rec_trig_lock(char *tag, struct zfcp_adapter *adapter, | ||
323 | struct zfcp_port *port, struct scsi_device *sdev, | ||
324 | u8 want, u8 need) | ||
325 | { | ||
326 | unsigned long flags; | ||
327 | |||
328 | read_lock_irqsave(&adapter->erp_lock, flags); | ||
329 | zfcp_dbf_rec_trig(tag, adapter, port, sdev, want, need); | ||
330 | read_unlock_irqrestore(&adapter->erp_lock, flags); | ||
331 | } | ||
311 | 332 | ||
312 | /** | 333 | /** |
313 | * zfcp_dbf_rec_run_lvl - trace event related to running recovery | 334 | * zfcp_dbf_rec_run_lvl - trace event related to running recovery |
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index bf8ea4df2bb8..e5eed8aac0ce 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * External function declarations. | 5 | * External function declarations. |
6 | * | 6 | * |
7 | * Copyright IBM Corp. 2002, 2016 | 7 | * Copyright IBM Corp. 2002, 2018 |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #ifndef ZFCP_EXT_H | 10 | #ifndef ZFCP_EXT_H |
@@ -35,6 +35,9 @@ extern int zfcp_dbf_adapter_register(struct zfcp_adapter *); | |||
35 | extern void zfcp_dbf_adapter_unregister(struct zfcp_adapter *); | 35 | extern void zfcp_dbf_adapter_unregister(struct zfcp_adapter *); |
36 | extern void zfcp_dbf_rec_trig(char *, struct zfcp_adapter *, | 36 | extern void zfcp_dbf_rec_trig(char *, struct zfcp_adapter *, |
37 | struct zfcp_port *, struct scsi_device *, u8, u8); | 37 | struct zfcp_port *, struct scsi_device *, u8, u8); |
38 | extern void zfcp_dbf_rec_trig_lock(char *tag, struct zfcp_adapter *adapter, | ||
39 | struct zfcp_port *port, | ||
40 | struct scsi_device *sdev, u8 want, u8 need); | ||
38 | extern void zfcp_dbf_rec_run(char *, struct zfcp_erp_action *); | 41 | extern void zfcp_dbf_rec_run(char *, struct zfcp_erp_action *); |
39 | extern void zfcp_dbf_rec_run_lvl(int level, char *tag, | 42 | extern void zfcp_dbf_rec_run_lvl(int level, char *tag, |
40 | struct zfcp_erp_action *erp); | 43 | struct zfcp_erp_action *erp); |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 4d2ba5682493..22f9562f415c 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Interface to Linux SCSI midlayer. | 5 | * Interface to Linux SCSI midlayer. |
6 | * | 6 | * |
7 | * Copyright IBM Corp. 2002, 2017 | 7 | * Copyright IBM Corp. 2002, 2018 |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define KMSG_COMPONENT "zfcp" | 10 | #define KMSG_COMPONENT "zfcp" |
@@ -618,9 +618,9 @@ static void zfcp_scsi_rport_register(struct zfcp_port *port) | |||
618 | ids.port_id = port->d_id; | 618 | ids.port_id = port->d_id; |
619 | ids.roles = FC_RPORT_ROLE_FCP_TARGET; | 619 | ids.roles = FC_RPORT_ROLE_FCP_TARGET; |
620 | 620 | ||
621 | zfcp_dbf_rec_trig("scpaddy", port->adapter, port, NULL, | 621 | zfcp_dbf_rec_trig_lock("scpaddy", port->adapter, port, NULL, |
622 | ZFCP_PSEUDO_ERP_ACTION_RPORT_ADD, | 622 | ZFCP_PSEUDO_ERP_ACTION_RPORT_ADD, |
623 | ZFCP_PSEUDO_ERP_ACTION_RPORT_ADD); | 623 | ZFCP_PSEUDO_ERP_ACTION_RPORT_ADD); |
624 | rport = fc_remote_port_add(port->adapter->scsi_host, 0, &ids); | 624 | rport = fc_remote_port_add(port->adapter->scsi_host, 0, &ids); |
625 | if (!rport) { | 625 | if (!rport) { |
626 | dev_err(&port->adapter->ccw_device->dev, | 626 | dev_err(&port->adapter->ccw_device->dev, |
@@ -642,9 +642,9 @@ static void zfcp_scsi_rport_block(struct zfcp_port *port) | |||
642 | struct fc_rport *rport = port->rport; | 642 | struct fc_rport *rport = port->rport; |
643 | 643 | ||
644 | if (rport) { | 644 | if (rport) { |
645 | zfcp_dbf_rec_trig("scpdely", port->adapter, port, NULL, | 645 | zfcp_dbf_rec_trig_lock("scpdely", port->adapter, port, NULL, |
646 | ZFCP_PSEUDO_ERP_ACTION_RPORT_DEL, | 646 | ZFCP_PSEUDO_ERP_ACTION_RPORT_DEL, |
647 | ZFCP_PSEUDO_ERP_ACTION_RPORT_DEL); | 647 | ZFCP_PSEUDO_ERP_ACTION_RPORT_DEL); |
648 | fc_remote_port_delete(rport); | 648 | fc_remote_port_delete(rport); |
649 | port->rport = NULL; | 649 | port->rport = NULL; |
650 | } | 650 | } |
diff --git a/drivers/scsi/Makefile b/drivers/scsi/Makefile index e29f9b8fd66d..56c940394729 100644 --- a/drivers/scsi/Makefile +++ b/drivers/scsi/Makefile | |||
@@ -182,7 +182,7 @@ zalon7xx-objs := zalon.o ncr53c8xx.o | |||
182 | NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o | 182 | NCR_Q720_mod-objs := NCR_Q720.o ncr53c8xx.o |
183 | 183 | ||
184 | # Files generated that shall be removed upon make clean | 184 | # Files generated that shall be removed upon make clean |
185 | clean-files := 53c700_d.h 53c700_u.h | 185 | clean-files := 53c700_d.h 53c700_u.h scsi_devinfo_tbl.c |
186 | 186 | ||
187 | $(obj)/53c700.o $(MODVERDIR)/$(obj)/53c700.ver: $(obj)/53c700_d.h | 187 | $(obj)/53c700.o $(MODVERDIR)/$(obj)/53c700.ver: $(obj)/53c700_d.h |
188 | 188 | ||
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index c198b96368dd..5c40d809830f 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1894,7 +1894,7 @@ retry: | |||
1894 | num = (rem_sz > scatter_elem_sz_prev) ? | 1894 | num = (rem_sz > scatter_elem_sz_prev) ? |
1895 | scatter_elem_sz_prev : rem_sz; | 1895 | scatter_elem_sz_prev : rem_sz; |
1896 | 1896 | ||
1897 | schp->pages[k] = alloc_pages(gfp_mask, order); | 1897 | schp->pages[k] = alloc_pages(gfp_mask | __GFP_ZERO, order); |
1898 | if (!schp->pages[k]) | 1898 | if (!schp->pages[k]) |
1899 | goto out; | 1899 | goto out; |
1900 | 1900 | ||
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c index 4ad89ea71a70..4f26bdc3d1dc 100644 --- a/drivers/target/target_core_user.c +++ b/drivers/target/target_core_user.c | |||
@@ -2121,6 +2121,8 @@ static ssize_t tcmu_qfull_time_out_store(struct config_item *item, | |||
2121 | 2121 | ||
2122 | if (val >= 0) { | 2122 | if (val >= 0) { |
2123 | udev->qfull_time_out = val * MSEC_PER_SEC; | 2123 | udev->qfull_time_out = val * MSEC_PER_SEC; |
2124 | } else if (val == -1) { | ||
2125 | udev->qfull_time_out = val; | ||
2124 | } else { | 2126 | } else { |
2125 | printk(KERN_ERR "Invalid qfull timeout value %d\n", val); | 2127 | printk(KERN_ERR "Invalid qfull timeout value %d\n", val); |
2126 | return -EINVAL; | 2128 | return -EINVAL; |