Skip to contentSkip to conversation

s390 patches for 4.6-rc2

GIT PULL Martin Schwidefsky 2 participants 5 messages Mar 31, 2016 – Apr 1, 2016

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

Hi Linus,

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

to receive the following updates:

* An interface for dasd driver to query if a volume is online to another operating system
* A proper fix for the lcu locking issue in the dasd driver
* Add the new preadv2 and pwritev2 system calls
* Define the mark_rodata_ro function and set DEBUG_RODATA=y
* A few more bug fixes.

Anna-Maria Gleixner (2):
s390/cpum_cf: Fix missing cpu hotplug notifier transition s390/cpum_sf: Fix cpu hotplug notifier transitions

Gerald Schaefer (1):
s390/mm: handle PTE-mapped tail pages in fast gup

Harald Freudenberger (1):
Provide correct file mode at device register.

Heiko Carstens (2):
s390: add DEBUG_RODATA support
s390: wire up preadv2/pwritev2 syscalls

Kees Cook (1):
s390: disable postinit-readonly for now

Pierre Morel (1):
clp_query_pci_fn: PCI function group 0 is valid

Stefan Haberland (2):
s390/dasd: reorder lcu and device lock s390/dasd: add query host access to volume support

 arch/s390/Kconfig                   |   3 +
 arch/s390/crypto/prng.c             |   2 +
 arch/s390/include/asm/cache.h       |   3 +
 arch/s390/include/uapi/asm/unistd.h |   4 +-
 arch/s390/kernel/perf_cpum_cf.c     |   1 +
 arch/s390/kernel/perf_cpum_sf.c     |   2 +-
 arch/s390/kernel/syscalls.S         |   2 +
 arch/s390/mm/gup.c                  |   8 +-
 arch/s390/mm/init.c                 |  10 +-
 arch/s390/pci/pci_clp.c             |   3 +-
 drivers/s390/block/dasd.c           |  56 +++++++++
 drivers/s390/block/dasd_alias.c     | 226 +++++++++---------------------------
 drivers/s390/block/dasd_devmap.c    |  27 +++++
 drivers/s390/block/dasd_eckd.c      | 202 ++++++++++++++++++++++++++++++--
 drivers/s390/block/dasd_eckd.h      |  36 +++++-
 drivers/s390/block/dasd_int.h       |   5 +
 16 files changed, 396 insertions(+), 194 deletions(-)
arch/s390/Kconfig +3 -0
index 7e3e8a8..f8dea16 100644
@@ -59,6 +59,9 @@ config PCI_QUIRKS
 config ARCH_SUPPORTS_UPROBES
 	def_bool y
 
+config DEBUG_RODATA
+	def_bool y
+
 config S390
 	def_bool y
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
arch/s390/crypto/prng.c +2 -0
index b8045b9..d750cc0 100644
@@ -669,11 +669,13 @@ static const struct file_operations prng_tdes_fops = {
 static struct miscdevice prng_sha512_dev = {
 	.name	= "prandom",
 	.minor	= MISC_DYNAMIC_MINOR,
+	.mode	= 0644,
 	.fops	= &prng_sha512_fops,
 };
 static struct miscdevice prng_tdes_dev = {
 	.name	= "prandom",
 	.minor	= MISC_DYNAMIC_MINOR,
+	.mode	= 0644,
 	.fops	= &prng_tdes_fops,
 };
 
arch/s390/include/asm/cache.h +3 -0
index 4d7ccac..22da3b3 100644
@@ -15,4 +15,7 @@
 
 #define __read_mostly __attribute__((__section__(".data..read_mostly")))
 
+/* Read-only memory is marked before mark_rodata_ro() is called. */
+#define __ro_after_init __read_mostly
+
 #endif
arch/s390/include/uapi/asm/unistd.h +3 -1
index ab3aa68..4384bc7 100644
@@ -311,7 +311,9 @@
 #define __NR_shutdown		373
 #define __NR_mlock2		374
 #define __NR_copy_file_range	375
-#define NR_syscalls 376
+#define __NR_preadv2		376
+#define __NR_pwritev2		377
+#define NR_syscalls 378
 
 /* 
  * There are some system calls that are not present on 64 bit, some
arch/s390/kernel/perf_cpum_cf.c +1 -0
index 58bf457..62f066b 100644
@@ -670,6 +670,7 @@ static int cpumf_pmu_notifier(struct notifier_block *self, unsigned long action,
 
 	switch (action & ~CPU_TASKS_FROZEN) {
 	case CPU_ONLINE:
+	case CPU_DOWN_FAILED:
 		flags = PMC_INIT;
 		smp_call_function_single(cpu, setup_pmc_cpu, &flags, 1);
 		break;
arch/s390/kernel/perf_cpum_sf.c +1 -1
index 1a43474..eaab9a7 100644
@@ -1521,7 +1521,7 @@ static int cpumf_pmu_notifier(struct notifier_block *self,
 
 	switch (action & ~CPU_TASKS_FROZEN) {
 	case CPU_ONLINE:
-	case CPU_ONLINE_FROZEN:
+	case CPU_DOWN_FAILED:
 		flags = PMC_INIT;
 		smp_call_function_single(cpu, setup_pmc_cpu, &flags, 1);
 		break;
arch/s390/kernel/syscalls.S +2 -0
index 293d8b9..9b59e62 100644
@@ -384,3 +384,5 @@ SYSCALL(sys_recvmsg,compat_sys_recvmsg)
 SYSCALL(sys_shutdown,sys_shutdown)
 SYSCALL(sys_mlock2,compat_sys_mlock2)
 SYSCALL(sys_copy_file_range,compat_sys_copy_file_range) /* 375 */
+SYSCALL(sys_preadv2,compat_sys_preadv2)
+SYSCALL(sys_pwritev2,compat_sys_pwritev2)
arch/s390/mm/gup.c +5 -3
index 13dab0c..3776aca 100644
@@ -20,9 +20,9 @@
 static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
 		unsigned long end, int write, struct page **pages, int *nr)
 {
+	struct page *head, *page;
 	unsigned long mask;
 	pte_t *ptep, pte;
-	struct page *page;
 
 	mask = (write ? _PAGE_PROTECT : 0) | _PAGE_INVALID | _PAGE_SPECIAL;
 
@@ -37,12 +37,14 @@ static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
 			return 0;
 		VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
 		page = pte_page(pte);
-		if (!page_cache_get_speculative(page))
+		head = compound_head(page);
+		if (!page_cache_get_speculative(head))
 			return 0;
 		if (unlikely(pte_val(pte) != pte_val(*ptep))) {
-			put_page(page);
+			put_page(head);
 			return 0;
 		}
+		VM_BUG_ON_PAGE(compound_head(page) != head, page);
 		pages[*nr] = page;
 		(*nr)++;
 
arch/s390/mm/init.c +7 -3
index 73e2903..c7b0451 100644
@@ -108,6 +108,13 @@ void __init paging_init(void)
 	free_area_init_nodes(max_zone_pfns);
 }
 
+void mark_rodata_ro(void)
+{
+	/* Text and rodata are already protected. Nothing to do here. */
+	pr_info("Write protecting the kernel read-only data: %luk\n",
+		((unsigned long)&_eshared - (unsigned long)&_stext) >> 10);
+}
+
 void __init mem_init(void)
 {
 	if (MACHINE_HAS_TLB_LC)
@@ -126,9 +133,6 @@ void __init mem_init(void)
 	setup_zero_pages();	/* Setup zeroed pages. */
 
 	mem_init_print_info(NULL);
-	printk("Write protected kernel read-only data: %#lx - %#lx\n",
-	       (unsigned long)&_stext,
-	       PFN_ALIGN((unsigned long)&_eshared) - 1);
 }
 
 void free_initmem(void)
arch/s390/pci/pci_clp.c +1 -2
index 21591dd..1a4512c 100644
@@ -176,8 +176,7 @@ static int clp_query_pci_fn(struct zpci_dev *zdev, u32 fh)
 		rc = clp_store_query_pci_fn(zdev, &rrb->response);
 		if (rc)
 			goto out;
-		if (rrb->response.pfgid)
-			rc = clp_query_pci_fngrp(zdev, rrb->response.pfgid);
+		rc = clp_query_pci_fngrp(zdev, rrb->response.pfgid);
 	} else {
 		zpci_err("Q PCI FN:\n");
 		zpci_err_clp(rrb->response.hdr.rsp, rc);
drivers/s390/block/dasd.c +56 -0

80 lines not on this page · raw message

drivers/s390/block/dasd_alias.c +53 -173

335 lines not on this page · raw message

drivers/s390/block/dasd_devmap.c +27 -0
index 2f18f61..3cdbce4 100644
@@ -982,6 +982,32 @@ out:
 static DEVICE_ATTR(safe_offline, 0200, NULL, dasd_safe_offline_store);
 
 static ssize_t
+dasd_access_show(struct device *dev, struct device_attribute *attr,
+		 char *buf)
+{
+	struct ccw_device *cdev = to_ccwdev(dev);
+	struct dasd_device *device;
+	int count;
+
+	device = dasd_device_from_cdev(cdev);
+	if (IS_ERR(device))
+		return PTR_ERR(device);
+
+	if (device->discipline->host_access_count)
+		count = device->discipline->host_access_count(device);
+	else
+		count = -EOPNOTSUPP;
+
+	dasd_put_device(device);
+	if (count < 0)
+		return count;
+
+	return sprintf(buf, "%d\n", count);
+}
+
+static DEVICE_ATTR(host_access_count, 0444, dasd_access_show, NULL);
+
+static ssize_t
 dasd_discipline_show(struct device *dev, struct device_attribute *attr,
 		     char *buf)
 {
@@ -1471,6 +1497,7 @@ static struct attribute * dasd_attrs[] = {
 	&dev_attr_reservation_policy.attr,
 	&dev_attr_last_known_reservation_state.attr,
 	&dev_attr_safe_offline.attr,
+	&dev_attr_host_access_count.attr,
 	&dev_attr_path_masks.attr,
 	NULL,
 };
drivers/s390/block/dasd_eckd.c +193 -9

244 lines not on this page · raw message

drivers/s390/block/dasd_eckd.h +34 -2
index f8f91ee..862ee42 100644
@@ -53,6 +53,7 @@
  */
 #define PSF_ORDER_PRSSD			 0x18
 #define PSF_ORDER_CUIR_RESPONSE		 0x1A
+#define PSF_SUBORDER_QHA		 0x1C
 #define PSF_ORDER_SSC			 0x1D
 
 /*
@@ -81,6 +82,8 @@
 #define ATTENTION_LENGTH_CUIR		 0x0e
 #define ATTENTION_FORMAT_CUIR		 0x01
 
+#define DASD_ECKD_PG_GROUPED		 0x10
+
 /*
  * Size that is reportet for large volumes in the old 16-bit no_cyl field
  */
@@ -403,13 +406,41 @@ struct dasd_psf_cuir_response {
 	__u8 ssid;
 } __packed;
 
+struct dasd_ckd_path_group_entry {
+	__u8 status_flags;
+	__u8 pgid[11];
+	__u8 sysplex_name[8];
+	__u32 timestamp;
+	__u32 cylinder;
+	__u8 reserved[4];
+} __packed;
+
+struct dasd_ckd_host_information {
+	__u8 access_flags;
+	__u8 entry_size;
+	__u16 entry_count;
+	__u8 entry[16390];
+} __packed;
+
+struct dasd_psf_query_host_access {
+	__u8 access_flag;
+	__u8 version;
+	__u16 CKD_length;
+	__u16 SCSI_length;
+	__u8 unused[10];
+	__u8 host_access_information[16394];
+} __packed;
+
 /*
  * Perform Subsystem Function - Prepare for Read Subsystem Data
  */
 struct dasd_psf_prssd_data {
 	unsigned char order;
 	unsigned char flags;
-	unsigned char reserved[4];
+	unsigned char reserved1;
+	unsigned char reserved2;
+	unsigned char lss;
+	unsigned char volume;
 	unsigned char suborder;
 	unsigned char varies[5];
 } __attribute__ ((packed));
@@ -525,6 +556,7 @@ struct dasd_eckd_private {
 	int count;
 
 	u32 fcx_max_data;
+	char suc_reason;
 };
 
 
@@ -534,7 +566,7 @@ void dasd_alias_disconnect_device_from_lcu(struct dasd_device *);
 int dasd_alias_add_device(struct dasd_device *);
 int dasd_alias_remove_device(struct dasd_device *);
 struct dasd_device *dasd_alias_get_start_dev(struct dasd_device *);
-void dasd_alias_handle_summary_unit_check(struct dasd_device *, struct irb *);
+void dasd_alias_handle_summary_unit_check(struct work_struct *);
 void dasd_eckd_reset_ccw_to_base_io(struct dasd_ccw_req *);
 void dasd_alias_lcu_setup_complete(struct dasd_device *);
 void dasd_alias_wait_for_lcu_setup(struct dasd_device *);
drivers/s390/block/dasd_int.h +5 -0
index 8de29be..6132733 100644
@@ -365,6 +365,8 @@ struct dasd_discipline {
 	int (*get_uid) (struct dasd_device *, struct dasd_uid *);
 	void (*kick_validate) (struct dasd_device *);
 	int (*check_attention)(struct dasd_device *, __u8);
+	int (*host_access_count)(struct dasd_device *);
+	int (*hosts_print)(struct dasd_device *, struct seq_file *);
 };
 
 extern struct dasd_discipline *dasd_diag_discipline_pointer;
@@ -470,6 +472,7 @@ struct dasd_device {
 	struct work_struct restore_device;
 	struct work_struct reload_device;
 	struct work_struct kick_validate;
+	struct work_struct suc_work;
 	struct timer_list timer;
 
 	debug_info_t *debug_area;
@@ -486,6 +489,7 @@ struct dasd_device {
 	unsigned long blk_timeout;
 
 	struct dentry *debugfs_dentry;
+	struct dentry *hosts_dentry;
 	struct dasd_profile profile;
 };
 
@@ -542,6 +546,7 @@ struct dasd_attention_data {
 #define DASD_FLAG_SAFE_OFFLINE_RUNNING	11	/* safe offline running */
 #define DASD_FLAG_ABORTALL	12	/* Abort all noretry requests */
 #define DASD_FLAG_PATH_VERIFY	13	/* Path verification worker running */
+#define DASD_FLAG_SUC		14	/* unhandled summary unit check */
 
 #define DASD_SLEEPON_START_TAG	((void *) 1)
 #define DASD_SLEEPON_END_TAG	((void *) 2)
#1 lore raw
Quoted 9 lines · Martin Schwidefsky

to receive the following updates:

* An interface for dasd driver to query if a volume is online to another operating system
* A proper fix for the lcu locking issue in the dasd driver
* Add the new preadv2 and pwritev2 system calls
* Define the mark_rodata_ro function and set DEBUG_RODATA=y
* A few more bug fixes.

I'm not seeing that the dasd changes are bugfixes.

Not pulled. You can try to explain more, but on the whole this looks more like a new feature than anything else.

Linus

#2 lore raw
Quoted 12 lines · On Thu, 31 Mar 2016 07:59:56 -0500 Linus Torvalds…
Quoted 9 lines · Martin Schwidefsky

to receive the following updates:

* An interface for dasd driver to query if a volume is online to another operating system
* A proper fix for the lcu locking issue in the dasd driver
* Add the new preadv2 and pwritev2 system calls
* Define the mark_rodata_ro function and set DEBUG_RODATA=y
* A few more bug fixes.

Quoted 4 lines

I'm not seeing that the dasd changes are bugfixes.

Not pulled. You can try to explain more, but on the whole this looks more like a new feature than anything else.

The commit "s390/dasd: add query host access to volume support" introduces is an attribute 'host_access_count' to find out how many systems are using a particular device. This is indeed a new feature.

The other large dasd patch "s390/dasd: reorder lcu and device lock" is a far better solution for the LCU locking that the git commit 9bfefde718c1352d "s390/dasd: fix incorrect locking order for LCU device add/remove" tries to solve. That commit has been added with the merge window patches for 4.6.

I really would like to see the "s390/dasd: reorder lcu and device lock" go into 4.6 as the current solution is really ugly. But I'll remove the patch with the new attribute. Would that be acceptable?

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.
#3 lore raw
Quoted 4 lines · Martin Schwidefsky

I really would like to see the "s390/dasd: reorder lcu and device lock" go into 4.6 as the current solution is really ugly. But I'll remove the patch with the new attribute. Would that be acceptable?

That sounds better, yes.

Thanks,

Linus

#4 lore raw
Quoted 8 lines · On Thu, 31 Mar 2016 14:29:09 -0500 Linus Torvalds…
Quoted 4 lines · Martin Schwidefsky

I really would like to see the "s390/dasd: reorder lcu and device lock" go into 4.6 as the current solution is really ugly. But I'll remove the patch with the new attribute. Would that be acceptable?

That sounds better, yes.

Ok, here we go:

please pull from the 'for-linus' branch of

git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-linus

to receive the following updates:

* A proper fix for the locking issue in the dasd driver
* Wire up the new preadv2 nad pwritev2 system calls
* Add the mark_rodata_ro function and set DEBUG_RODATA=y
* A few more bug fixes.

Anna-Maria Gleixner (2):
s390/cpum_cf: Fix missing cpu hotplug notifier transition s390/cpum_sf: Fix cpu hotplug notifier transitions

Gerald Schaefer (1):
s390/mm: handle PTE-mapped tail pages in fast gup

Harald Freudenberger (1):
s390/crypto: provide correct file mode at device register.

Heiko Carstens (2):
s390: add DEBUG_RODATA support
s390: wire up preadv2/pwritev2 syscalls

Kees Cook (1):
s390: disable postinit-readonly for now

Pierre Morel (1):
s390/pci: PCI function group 0 is valid for clp_query_pci_fn

Stefan Haberland (1):
s390/dasd: reorder lcu and device lock

 arch/s390/Kconfig                   |   3 +
 arch/s390/crypto/prng.c             |   2 +
 arch/s390/include/asm/cache.h       |   3 +
 arch/s390/include/uapi/asm/unistd.h |   4 +-
 arch/s390/kernel/perf_cpum_cf.c     |   1 +
 arch/s390/kernel/perf_cpum_sf.c     |   2 +-
 arch/s390/kernel/syscalls.S         |   2 +
 arch/s390/mm/gup.c                  |   8 +-
 arch/s390/mm/init.c                 |  10 +-
 arch/s390/pci/pci_clp.c             |   3 +-
 drivers/s390/block/dasd_alias.c     | 226 +++++++++---------------------------
 drivers/s390/block/dasd_eckd.c      |  38 ++++--
 drivers/s390/block/dasd_eckd.h      |   3 +-
 drivers/s390/block/dasd_int.h       |   2 +
 14 files changed, 114 insertions(+), 193 deletions(-)
arch/s390/Kconfig +3 -0
index 7e3e8a8..f8dea16 100644
@@ -59,6 +59,9 @@ config PCI_QUIRKS
 config ARCH_SUPPORTS_UPROBES
 	def_bool y
 
+config DEBUG_RODATA
+	def_bool y
+
 config S390
 	def_bool y
 	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
arch/s390/crypto/prng.c +2 -0
index b8045b9..d750cc0 100644
@@ -669,11 +669,13 @@ static const struct file_operations prng_tdes_fops = {
 static struct miscdevice prng_sha512_dev = {
 	.name	= "prandom",
 	.minor	= MISC_DYNAMIC_MINOR,
+	.mode	= 0644,
 	.fops	= &prng_sha512_fops,
 };
 static struct miscdevice prng_tdes_dev = {
 	.name	= "prandom",
 	.minor	= MISC_DYNAMIC_MINOR,
+	.mode	= 0644,
 	.fops	= &prng_tdes_fops,
 };
 
arch/s390/include/asm/cache.h +3 -0
index 4d7ccac..22da3b3 100644
@@ -15,4 +15,7 @@
 
 #define __read_mostly __attribute__((__section__(".data..read_mostly")))
 
+/* Read-only memory is marked before mark_rodata_ro() is called. */
+#define __ro_after_init __read_mostly
+
 #endif
arch/s390/include/uapi/asm/unistd.h +3 -1
index ab3aa68..4384bc7 100644
@@ -311,7 +311,9 @@
 #define __NR_shutdown		373
 #define __NR_mlock2		374
 #define __NR_copy_file_range	375
-#define NR_syscalls 376
+#define __NR_preadv2		376
+#define __NR_pwritev2		377
+#define NR_syscalls 378
 
 /* 
  * There are some system calls that are not present on 64 bit, some
arch/s390/kernel/perf_cpum_cf.c +1 -0
index 58bf457..62f066b 100644
@@ -670,6 +670,7 @@ static int cpumf_pmu_notifier(struct notifier_block *self, unsigned long action,
 
 	switch (action & ~CPU_TASKS_FROZEN) {
 	case CPU_ONLINE:
+	case CPU_DOWN_FAILED:
 		flags = PMC_INIT;
 		smp_call_function_single(cpu, setup_pmc_cpu, &flags, 1);
 		break;
arch/s390/kernel/perf_cpum_sf.c +1 -1
index 1a43474..eaab9a7 100644
@@ -1521,7 +1521,7 @@ static int cpumf_pmu_notifier(struct notifier_block *self,
 
 	switch (action & ~CPU_TASKS_FROZEN) {
 	case CPU_ONLINE:
-	case CPU_ONLINE_FROZEN:
+	case CPU_DOWN_FAILED:
 		flags = PMC_INIT;
 		smp_call_function_single(cpu, setup_pmc_cpu, &flags, 1);
 		break;
arch/s390/kernel/syscalls.S +2 -0
index 293d8b9..9b59e62 100644
@@ -384,3 +384,5 @@ SYSCALL(sys_recvmsg,compat_sys_recvmsg)
 SYSCALL(sys_shutdown,sys_shutdown)
 SYSCALL(sys_mlock2,compat_sys_mlock2)
 SYSCALL(sys_copy_file_range,compat_sys_copy_file_range) /* 375 */
+SYSCALL(sys_preadv2,compat_sys_preadv2)
+SYSCALL(sys_pwritev2,compat_sys_pwritev2)
arch/s390/mm/gup.c +5 -3
index 13dab0c..3776aca 100644
@@ -20,9 +20,9 @@
 static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
 		unsigned long end, int write, struct page **pages, int *nr)
 {
+	struct page *head, *page;
 	unsigned long mask;
 	pte_t *ptep, pte;
-	struct page *page;
 
 	mask = (write ? _PAGE_PROTECT : 0) | _PAGE_INVALID | _PAGE_SPECIAL;
 
@@ -37,12 +37,14 @@ static inline int gup_pte_range(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
 			return 0;
 		VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
 		page = pte_page(pte);
-		if (!page_cache_get_speculative(page))
+		head = compound_head(page);
+		if (!page_cache_get_speculative(head))
 			return 0;
 		if (unlikely(pte_val(pte) != pte_val(*ptep))) {
-			put_page(page);
+			put_page(head);
 			return 0;
 		}
+		VM_BUG_ON_PAGE(compound_head(page) != head, page);
 		pages[*nr] = page;
 		(*nr)++;
 
arch/s390/mm/init.c +7 -3
index 73e2903..c7b0451 100644
@@ -108,6 +108,13 @@ void __init paging_init(void)
 	free_area_init_nodes(max_zone_pfns);
 }
 
+void mark_rodata_ro(void)
+{
+	/* Text and rodata are already protected. Nothing to do here. */
+	pr_info("Write protecting the kernel read-only data: %luk\n",
+		((unsigned long)&_eshared - (unsigned long)&_stext) >> 10);
+}
+
 void __init mem_init(void)
 {
 	if (MACHINE_HAS_TLB_LC)
@@ -126,9 +133,6 @@ void __init mem_init(void)
 	setup_zero_pages();	/* Setup zeroed pages. */
 
 	mem_init_print_info(NULL);
-	printk("Write protected kernel read-only data: %#lx - %#lx\n",
-	       (unsigned long)&_stext,
-	       PFN_ALIGN((unsigned long)&_eshared) - 1);
 }
 
 void free_initmem(void)
arch/s390/pci/pci_clp.c +1 -2
index 21591dd..1a4512c 100644
@@ -176,8 +176,7 @@ static int clp_query_pci_fn(struct zpci_dev *zdev, u32 fh)
 		rc = clp_store_query_pci_fn(zdev, &rrb->response);
 		if (rc)
 			goto out;
-		if (rrb->response.pfgid)
-			rc = clp_query_pci_fngrp(zdev, rrb->response.pfgid);
+		rc = clp_query_pci_fngrp(zdev, rrb->response.pfgid);
 	} else {
 		zpci_err("Q PCI FN:\n");
 		zpci_err_clp(rrb->response.hdr.rsp, rc);
drivers/s390/block/dasd_alias.c +53 -173

335 lines not on this page · raw message

drivers/s390/block/dasd_eckd.c +29 -9
index 75c032d..c1b4ae5 100644
@@ -1682,6 +1682,8 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
 
 	/* setup work queue for validate server*/
 	INIT_WORK(&device->kick_validate, dasd_eckd_do_validate_server);
+	/* setup work queue for summary unit check */
+	INIT_WORK(&device->suc_work, dasd_alias_handle_summary_unit_check);
 
 	if (!ccw_device_is_pathgroup(device->cdev)) {
 		dev_warn(&device->cdev->dev,
@@ -2549,14 +2551,6 @@ static void dasd_eckd_check_for_device_change(struct dasd_device *device,
 		    device->state == DASD_STATE_ONLINE &&
 		    !test_bit(DASD_FLAG_OFFLINE, &device->flags) &&
 		    !test_bit(DASD_FLAG_SUSPENDED, &device->flags)) {
-			/*
-			 * the state change could be caused by an alias
-			 * reassignment remove device from alias handling
-			 * to prevent new requests from being scheduled on
-			 * the wrong alias device
-			 */
-			dasd_alias_remove_device(device);
-
 			/* schedule worker to reload device */
 			dasd_reload_device(device);
 		}
@@ -2571,7 +2565,27 @@ static void dasd_eckd_check_for_device_change(struct dasd_device *device,
 	/* summary unit check */
 	if ((sense[27] & DASD_SENSE_BIT_0) && (sense[7] == 0x0D) &&
 	    (scsw_dstat(&irb->scsw) & DEV_STAT_UNIT_CHECK)) {
-		dasd_alias_handle_summary_unit_check(device, irb);
+		if (test_and_set_bit(DASD_FLAG_SUC, &device->flags)) {
+			DBF_DEV_EVENT(DBF_WARNING, device, "%s",
+				      "eckd suc: device already notified");
+			return;
+		}
+		sense = dasd_get_sense(irb);
+		if (!sense) {
+			DBF_DEV_EVENT(DBF_WARNING, device, "%s",
+				      "eckd suc: no reason code available");
+			clear_bit(DASD_FLAG_SUC, &device->flags);
+			return;
+
+		}
+		private->suc_reason = sense[8];
+		DBF_DEV_EVENT(DBF_NOTICE, device, "%s %x",
+			      "eckd handle summary unit check: reason",
+			      private->suc_reason);
+		dasd_get_device(device);
+		if (!schedule_work(&device->suc_work))
+			dasd_put_device(device);
+
 		return;
 	}
 
@@ -4495,6 +4509,12 @@ static int dasd_eckd_reload_device(struct dasd_device *device)
 	struct dasd_uid uid;
 	unsigned long flags;
 
+	/*
+	 * remove device from alias handling to prevent new requests
+	 * from being scheduled on the wrong alias device
+	 */
+	dasd_alias_remove_device(device);
+
 	spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags);
 	old_base = private->uid.base_unit_addr;
 	spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags);
drivers/s390/block/dasd_eckd.h +2 -1
index f8f91ee..6d9a6d3 100644
@@ -525,6 +525,7 @@ struct dasd_eckd_private {
 	int count;
 
 	u32 fcx_max_data;
+	char suc_reason;
 };
 
 
@@ -534,7 +535,7 @@ void dasd_alias_disconnect_device_from_lcu(struct dasd_device *);
 int dasd_alias_add_device(struct dasd_device *);
 int dasd_alias_remove_device(struct dasd_device *);
 struct dasd_device *dasd_alias_get_start_dev(struct dasd_device *);
-void dasd_alias_handle_summary_unit_check(struct dasd_device *, struct irb *);
+void dasd_alias_handle_summary_unit_check(struct work_struct *);
 void dasd_eckd_reset_ccw_to_base_io(struct dasd_ccw_req *);
 void dasd_alias_lcu_setup_complete(struct dasd_device *);
 void dasd_alias_wait_for_lcu_setup(struct dasd_device *);
drivers/s390/block/dasd_int.h +2 -0
index 8de29be..0f0add9 100644
@@ -470,6 +470,7 @@ struct dasd_device {
 	struct work_struct restore_device;
 	struct work_struct reload_device;
 	struct work_struct kick_validate;
+	struct work_struct suc_work;
 	struct timer_list timer;
 
 	debug_info_t *debug_area;
@@ -542,6 +543,7 @@ struct dasd_attention_data {
 #define DASD_FLAG_SAFE_OFFLINE_RUNNING	11	/* safe offline running */
 #define DASD_FLAG_ABORTALL	12	/* Abort all noretry requests */
 #define DASD_FLAG_PATH_VERIFY	13	/* Path verification worker running */
+#define DASD_FLAG_SUC		14	/* unhandled summary unit check */
 
 #define DASD_SLEEPON_START_TAG	((void *) 1)
 #define DASD_SLEEPON_END_TAG	((void *) 2)