History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Martin Schwidefsky: "Bug fixes for 3.6-rc7, including some important patches for large page related memory management issues." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/dasd: fix read unit address configuration loop s390/dasd: fix pathgroup race s390/mm: fix user access page-table walk code s390/hwcaps: do not report high gprs for 31 bit kernel s390/cio: invalidate cdev pointer before deregistration s390/cio: fix IO subchannel event race s390/dasd: move wake_up call s390/hugetlb: use direct TLB flushing for hugetlbfs pages s390/mm: fix deadlock in unmap_hugepage_range()

Linus Torvalds committed 14 years ago

Commit 267b50f2 parents 8ca7de9 03429f38 files · +146 −107Browse files

Unified · Split

8 files
  1. arch/s390/include/asm/hugetlb.h +10 −14
  2. arch/s390/include/asm/tlbflush.h +0 −2
  3. arch/s390/kernel/setup.c +2 −0
  4. arch/s390/lib/uaccess_pt.c +63 −79
  5. drivers/s390/block/dasd.c +14 −3
  6. drivers/s390/block/dasd_alias.c +26 −1
  7. drivers/s390/block/dasd_eckd.c +25 −7
  8. drivers/s390/cio/device.c +6 −1
arch/s390/include/asm/hugetlb.h+10−14
@@ -66,16 +66,6 @@ static inline pte_t huge_ptep_get(pte_t *ptep) · 65 unmodified lines
6666 return pte;
6767 }
6868
69−static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
70− unsigned long addr, pte_t *ptep)
71−{
72− pte_t pte = huge_ptep_get(ptep);
73−
74− mm->context.flush_mm = 1;
75− pmd_clear((pmd_t *) ptep);
76− return pte;
77−}
78−
7969 static inline void __pmd_csp(pmd_t *pmdp)
8070 {
8171 register unsigned long reg2 asm("2") = pmd_val(*pmdp);
@@ -117,6 +107,15 @@ static inline void huge_ptep_invalidate(struct mm_struct *mm, · 35 unmodified lines
117107 __pmd_csp(pmdp);
118108 }
119109
110+static inline pte_t huge_ptep_get_and_clear(struct mm_struct *mm,
111+ unsigned long addr, pte_t *ptep)
112+{
113+ pte_t pte = huge_ptep_get(ptep);
114+
115+ huge_ptep_invalidate(mm, addr, ptep);
116+ return pte;
117+}
118+
120119 #define huge_ptep_set_access_flags(__vma, __addr, __ptep, __entry, __dirty) \
121120 ({ \
122121 int __changed = !pte_same(huge_ptep_get(__ptep), __entry); \
@@ -131,10 +130,7 @@ static inline void huge_ptep_invalidate(struct mm_struct *mm, · 8 unmodified lines
131130 ({ \
132131 pte_t __pte = huge_ptep_get(__ptep); \
133132 if (pte_write(__pte)) { \
134− (__mm)->context.flush_mm = 1; \
135− if (atomic_read(&(__mm)->context.attach_count) > 1 || \
136− (__mm) != current->active_mm) \
137− huge_ptep_invalidate(__mm, __addr, __ptep); \
133+ huge_ptep_invalidate(__mm, __addr, __ptep); \
138134 set_huge_pte_at(__mm, __addr, __ptep, \
139135 huge_pte_wrprotect(__pte)); \
140136 } \
arch/s390/include/asm/tlbflush.h+0−2
@@ -90,12 +90,10 @@ static inline void __tlb_flush_mm(struct mm_struct * mm) · 89 unmodified lines
9090
9191 static inline void __tlb_flush_mm_cond(struct mm_struct * mm)
9292 {
93− spin_lock(&mm->page_table_lock);
9493 if (mm->context.flush_mm) {
9594 __tlb_flush_mm(mm);
9695 mm->context.flush_mm = 0;
9796 }
98− spin_unlock(&mm->page_table_lock);
9997 }
10098
10199 /*
arch/s390/kernel/setup.c+2−0
@@ -974,11 +974,13 @@ static void __init setup_hwcaps(void) · 973 unmodified lines
974974 if (MACHINE_HAS_HPAGE)
975975 elf_hwcap |= HWCAP_S390_HPAGE;
976976
977+#if defined(CONFIG_64BIT)
977978 /*
978979 * 64-bit register support for 31-bit processes
979980 * HWCAP_S390_HIGH_GPRS is bit 9.
980981 */
981982 elf_hwcap |= HWCAP_S390_HIGH_GPRS;
983+#endif
982984
983985 get_cpu_id(&cpu_id);
984986 switch (cpu_id.machine) {
arch/s390/lib/uaccess_pt.c+63−79
@@ -2,69 +2,82 @@ · 1 unmodified line
22 * User access functions based on page table walks for enhanced
33 * system layout without hardware support.
44 *
5− * Copyright IBM Corp. 2006
5+ * Copyright IBM Corp. 2006, 2012
66 * Author(s): Gerald Schaefer (gerald.schaefer@de.ibm.com)
77 */
88
99 #include <linux/errno.h>
1010 #include <linux/hardirq.h>
1111 #include <linux/mm.h>
12+#include <linux/hugetlb.h>
1213 #include <asm/uaccess.h>
1314 #include <asm/futex.h>
1415 #include "uaccess.h"
1516
16−static inline pte_t *follow_table(struct mm_struct *mm, unsigned long addr)
17+
18+/*
19+ * Returns kernel address for user virtual address. If the returned address is
20+ * >= -4095 (IS_ERR_VALUE(x) returns true), a fault has occured and the address
21+ * contains the (negative) exception code.
22+ */
23+static __always_inline unsigned long follow_table(struct mm_struct *mm,
24+ unsigned long addr, int write)
1725 {
1826 pgd_t *pgd;
1927 pud_t *pud;
2028 pmd_t *pmd;
29+ pte_t *ptep;
2130
2231 pgd = pgd_offset(mm, addr);
2332 if (pgd_none(*pgd) || unlikely(pgd_bad(*pgd)))
24− return (pte_t *) 0x3a;
33+ return -0x3aUL;
2534
2635 pud = pud_offset(pgd, addr);
2736 if (pud_none(*pud) || unlikely(pud_bad(*pud)))
28− return (pte_t *) 0x3b;
37+ return -0x3bUL;
2938
3039 pmd = pmd_offset(pud, addr);
31− if (pmd_none(*pmd) || unlikely(pmd_bad(*pmd)))
32− return (pte_t *) 0x10;
40+ if (pmd_none(*pmd))
41+ return -0x10UL;
42+ if (pmd_huge(*pmd)) {
43+ if (write && (pmd_val(*pmd) & _SEGMENT_ENTRY_RO))
44+ return -0x04UL;
45+ return (pmd_val(*pmd) & HPAGE_MASK) + (addr & ~HPAGE_MASK);
46+ }
47+ if (unlikely(pmd_bad(*pmd)))
48+ return -0x10UL;
49+
50+ ptep = pte_offset_map(pmd, addr);
51+ if (!pte_present(*ptep))
52+ return -0x11UL;
53+ if (write && !pte_write(*ptep))
54+ return -0x04UL;
3355
34− return pte_offset_map(pmd, addr);
56+ return (pte_val(*ptep) & PAGE_MASK) + (addr & ~PAGE_MASK);
3557 }
3658
3759 static __always_inline size_t __user_copy_pt(unsigned long uaddr, void *kptr,
3860 size_t n, int write_user)
3961 {
4062 struct mm_struct *mm = current->mm;
41− unsigned long offset, pfn, done, size;
42− pte_t *pte;
63+ unsigned long offset, done, size, kaddr;
4364 void *from, *to;
4465
4566 done = 0;
4667 retry:
4768 spin_lock(&mm->page_table_lock);
4869 do {
49− pte = follow_table(mm, uaddr);
50− if ((unsigned long) pte < 0x1000)
70+ kaddr = follow_table(mm, uaddr, write_user);
71+ if (IS_ERR_VALUE(kaddr))
5172 goto fault;
52− if (!pte_present(*pte)) {
53− pte = (pte_t *) 0x11;
54− goto fault;
55− } else if (write_user && !pte_write(*pte)) {
56− pte = (pte_t *) 0x04;
57− goto fault;
58− }
5973
60− pfn = pte_pfn(*pte);
61− offset = uaddr & (PAGE_SIZE - 1);
74+ offset = uaddr & ~PAGE_MASK;
6275 size = min(n - done, PAGE_SIZE - offset);
6376 if (write_user) {
64− to = (void *)((pfn << PAGE_SHIFT) + offset);
77+ to = (void *) kaddr;
6578 from = kptr + done;
6679 } else {
67− from = (void *)((pfn << PAGE_SHIFT) + offset);
80+ from = (void *) kaddr;
6881 to = kptr + done;
6982 }
7083 memcpy(to, from, size);
@@ -75,7 +88,7 @@ retry: · 4 unmodified lines
7588 return n - done;
7689 fault:
7790 spin_unlock(&mm->page_table_lock);
78− if (__handle_fault(uaddr, (unsigned long) pte, write_user))
91+ if (__handle_fault(uaddr, -kaddr, write_user))
7992 return n - done;
8093 goto retry;
8194 }
@@ -84,27 +97,22 @@ fault: · 2 unmodified lines
8497 * Do DAT for user address by page table walk, return kernel address.
8598 * This function needs to be called with current->mm->page_table_lock held.
8699 */
87−static __always_inline unsigned long __dat_user_addr(unsigned long uaddr)
100+static __always_inline unsigned long __dat_user_addr(unsigned long uaddr,
101+ int write)
88102 {
89103 struct mm_struct *mm = current->mm;
90− unsigned long pfn;
91− pte_t *pte;
104+ unsigned long kaddr;
92105 int rc;
93106
94107 retry:
95− pte = follow_table(mm, uaddr);
96− if ((unsigned long) pte < 0x1000)
97− goto fault;
98− if (!pte_present(*pte)) {
99− pte = (pte_t *) 0x11;
108+ kaddr = follow_table(mm, uaddr, write);
109+ if (IS_ERR_VALUE(kaddr))
100110 goto fault;
101− }
102111
103− pfn = pte_pfn(*pte);
104− return (pfn << PAGE_SHIFT) + (uaddr & (PAGE_SIZE - 1));
112+ return kaddr;
105113 fault:
106114 spin_unlock(&mm->page_table_lock);
107− rc = __handle_fault(uaddr, (unsigned long) pte, 0);
115+ rc = __handle_fault(uaddr, -kaddr, write);
108116 spin_lock(&mm->page_table_lock);
109117 if (!rc)
110118 goto retry;
@@ -159,11 +167,9 @@ static size_t clear_user_pt(size_t n, void __user *to) · 48 unmodified lines
159167
160168 static size_t strnlen_user_pt(size_t count, const char __user *src)
161169 {
162− char *addr;
163170 unsigned long uaddr = (unsigned long) src;
164171 struct mm_struct *mm = current->mm;
165− unsigned long offset, pfn, done, len;
166− pte_t *pte;
172+ unsigned long offset, done, len, kaddr;
167173 size_t len_str;
168174
169175 if (segment_eq(get_fs(), KERNEL_DS))
@@ -172,19 +178,13 @@ static size_t strnlen_user_pt(size_t count, const char __user *src) · 2 unmodified lines
172178 retry:
173179 spin_lock(&mm->page_table_lock);
174180 do {
175− pte = follow_table(mm, uaddr);
176− if ((unsigned long) pte < 0x1000)
177− goto fault;
178− if (!pte_present(*pte)) {
179− pte = (pte_t *) 0x11;
181+ kaddr = follow_table(mm, uaddr, 0);
182+ if (IS_ERR_VALUE(kaddr))
180183 goto fault;
181− }
182184
183− pfn = pte_pfn(*pte);
184− offset = uaddr & (PAGE_SIZE-1);
185− addr = (char *)(pfn << PAGE_SHIFT) + offset;
185+ offset = uaddr & ~PAGE_MASK;
186186 len = min(count - done, PAGE_SIZE - offset);
187− len_str = strnlen(addr, len);
187+ len_str = strnlen((char *) kaddr, len);
188188 done += len_str;
189189 uaddr += len_str;
190190 } while ((len_str == len) && (done < count));
@@ -192,7 +192,7 @@ retry: · 1 unmodified line
192192 return done + 1;
193193 fault:
194194 spin_unlock(&mm->page_table_lock);
195− if (__handle_fault(uaddr, (unsigned long) pte, 0))
195+ if (__handle_fault(uaddr, -kaddr, 0))
196196 return 0;
197197 goto retry;
198198 }
@@ -225,11 +225,10 @@ static size_t copy_in_user_pt(size_t n, void __user *to, · 26 unmodified lines
225225 const void __user *from)
226226 {
227227 struct mm_struct *mm = current->mm;
228− unsigned long offset_from, offset_to, offset_max, pfn_from, pfn_to,
229− uaddr, done, size, error_code;
228+ unsigned long offset_max, uaddr, done, size, error_code;
230229 unsigned long uaddr_from = (unsigned long) from;
231230 unsigned long uaddr_to = (unsigned long) to;
232− pte_t *pte_from, *pte_to;
231+ unsigned long kaddr_to, kaddr_from;
233232 int write_user;
234233
235234 if (segment_eq(get_fs(), KERNEL_DS)) {
@@ -242,38 +241,23 @@ retry: · 6 unmodified lines
242241 do {
243242 write_user = 0;
244243 uaddr = uaddr_from;
245− pte_from = follow_table(mm, uaddr_from);
246− error_code = (unsigned long) pte_from;
247− if (error_code < 0x1000)
248− goto fault;
249− if (!pte_present(*pte_from)) {
250− error_code = 0x11;
244+ kaddr_from = follow_table(mm, uaddr_from, 0);
245+ error_code = kaddr_from;
246+ if (IS_ERR_VALUE(error_code))
251247 goto fault;
252− }
253248
254249 write_user = 1;
255250 uaddr = uaddr_to;
256− pte_to = follow_table(mm, uaddr_to);
257− error_code = (unsigned long) pte_to;
258− if (error_code < 0x1000)
259− goto fault;
260− if (!pte_present(*pte_to)) {
261− error_code = 0x11;
251+ kaddr_to = follow_table(mm, uaddr_to, 1);
252+ error_code = (unsigned long) kaddr_to;
253+ if (IS_ERR_VALUE(error_code))
262254 goto fault;
263− } else if (!pte_write(*pte_to)) {
264− error_code = 0x04;
265− goto fault;
266− }
267255
268− pfn_from = pte_pfn(*pte_from);
269− pfn_to = pte_pfn(*pte_to);
270− offset_from = uaddr_from & (PAGE_SIZE-1);
271− offset_to = uaddr_from & (PAGE_SIZE-1);
272− offset_max = max(offset_from, offset_to);
256+ offset_max = max(uaddr_from & ~PAGE_MASK,
257+ uaddr_to & ~PAGE_MASK);
273258 size = min(n - done, PAGE_SIZE - offset_max);
274259
275− memcpy((void *)(pfn_to << PAGE_SHIFT) + offset_to,
276− (void *)(pfn_from << PAGE_SHIFT) + offset_from, size);
260+ memcpy((void *) kaddr_to, (void *) kaddr_from, size);
277261 done += size;
278262 uaddr_from += size;
279263 uaddr_to += size;
@@ -282,7 +266,7 @@ retry: · 2 unmodified lines
282266 return n - done;
283267 fault:
284268 spin_unlock(&mm->page_table_lock);
285− if (__handle_fault(uaddr, error_code, write_user))
269+ if (__handle_fault(uaddr, -error_code, write_user))
286270 return n - done;
287271 goto retry;
288272 }
@@ -341,7 +325,7 @@ int futex_atomic_op_pt(int op, u32 __user *uaddr, int oparg, int *old) · 52 unmodified lines
341325 return __futex_atomic_op_pt(op, uaddr, oparg, old);
342326 spin_lock(&current->mm->page_table_lock);
343327 uaddr = (u32 __force __user *)
344− __dat_user_addr((__force unsigned long) uaddr);
328+ __dat_user_addr((__force unsigned long) uaddr, 1);
345329 if (!uaddr) {
346330 spin_unlock(&current->mm->page_table_lock);
347331 return -EFAULT;
@@ -378,7 +362,7 @@ int futex_atomic_cmpxchg_pt(u32 *uval, u32 __user *uaddr, · 30 unmodified lines
378362 return __futex_atomic_cmpxchg_pt(uval, uaddr, oldval, newval);
379363 spin_lock(&current->mm->page_table_lock);
380364 uaddr = (u32 __force __user *)
381− __dat_user_addr((__force unsigned long) uaddr);
365+ __dat_user_addr((__force unsigned long) uaddr, 1);
382366 if (!uaddr) {
383367 spin_unlock(&current->mm->page_table_lock);
384368 return -EFAULT;
drivers/s390/block/dasd.c+14−3
@@ -534,11 +534,11 @@ static void dasd_change_state(struct dasd_device *device) · 533 unmodified lines
534534 if (rc)
535535 device->target = device->state;
536536
537− if (device->state == device->target)
538− wake_up(&dasd_init_waitq);
539−
540537 /* let user-space know that the device status changed */
541538 kobject_uevent(&device->cdev->dev.kobj, KOBJ_CHANGE);
539+
540+ if (device->state == device->target)
541+ wake_up(&dasd_init_waitq);
542542 }
543543
544544 /*
@@ -2157,6 +2157,7 @@ static int _dasd_sleep_on(struct dasd_ccw_req *maincqr, int interruptible) · 1612 unmodified lines
21572157 test_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags) &&
21582158 (!dasd_eer_enabled(device))) {
21592159 cqr->status = DASD_CQR_FAILED;
2160+ cqr->intrc = -EAGAIN;
21602161 continue;
21612162 }
21622163 /* Don't try to start requests if device is stopped */
@@ -3270,6 +3271,16 @@ void dasd_generic_path_event(struct ccw_device *cdev, int *path_event) · 1107 unmodified lines
32703271 dasd_schedule_device_bh(device);
32713272 }
32723273 if (path_event[chp] & PE_PATHGROUP_ESTABLISHED) {
3274+ if (!(device->path_data.opm & eventlpm) &&
3275+ !(device->path_data.tbvpm & eventlpm)) {
3276+ /*
3277+ * we can not establish a pathgroup on an
3278+ * unavailable path, so trigger a path
3279+ * verification first
3280+ */
3281+ device->path_data.tbvpm |= eventlpm;
3282+ dasd_schedule_device_bh(device);
3283+ }
32733284 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
32743285 "Pathgroup re-established\n");
32753286 if (device->discipline->kick_validate)
drivers/s390/block/dasd_alias.c+26−1
@@ -384,6 +384,29 @@ static void _remove_device_from_lcu(struct alias_lcu *lcu, · 383 unmodified lines
384384 group->next = NULL;
385385 };
386386
387+static int
388+suborder_not_supported(struct dasd_ccw_req *cqr)
389+{
390+ char *sense;
391+ char reason;
392+ char msg_format;
393+ char msg_no;
394+
395+ sense = dasd_get_sense(&cqr->irb);
396+ if (!sense)
397+ return 0;
398+
399+ reason = sense[0];
400+ msg_format = (sense[7] & 0xF0);
401+ msg_no = (sense[7] & 0x0F);
402+
403+ /* command reject, Format 0 MSG 4 - invalid parameter */
404+ if ((reason == 0x80) && (msg_format == 0x00) && (msg_no == 0x04))
405+ return 1;
406+
407+ return 0;
408+}
409+
387410 static int read_unit_address_configuration(struct dasd_device *device,
388411 struct alias_lcu *lcu)
389412 {
@@ -435,6 +458,8 @@ static int read_unit_address_configuration(struct dasd_device *device, · 45 unmodified lines
435458
436459 do {
437460 rc = dasd_sleep_on(cqr);
461+ if (rc && suborder_not_supported(cqr))
462+ return -EOPNOTSUPP;
438463 } while (rc && (cqr->retries > 0));
439464 if (rc) {
440465 spin_lock_irqsave(&lcu->lock, flags);
@@ -521,7 +546,7 @@ static void lcu_update_work(struct work_struct *work) · 80 unmodified lines
521546 * processing the data
522547 */
523548 spin_lock_irqsave(&lcu->lock, flags);
524− if (rc || (lcu->flags & NEED_UAC_UPDATE)) {
549+ if ((rc && (rc != -EOPNOTSUPP)) || (lcu->flags & NEED_UAC_UPDATE)) {
525550 DBF_DEV_EVENT(DBF_WARNING, device, "could not update"
526551 " alias data in lcu (rc = %d), retry later", rc);
527552 schedule_delayed_work(&lcu->ruac_data.dwork, 30*HZ);
drivers/s390/block/dasd_eckd.c+25−7
@@ -1507,7 +1507,8 @@ static struct dasd_ccw_req *dasd_eckd_build_psf_ssc(struct dasd_device *device, · 1506 unmodified lines
15071507 * call might change behaviour of DASD devices.
15081508 */
15091509 static int
1510−dasd_eckd_psf_ssc(struct dasd_device *device, int enable_pav)
1510+dasd_eckd_psf_ssc(struct dasd_device *device, int enable_pav,
1511+ unsigned long flags)
15111512 {
15121513 struct dasd_ccw_req *cqr;
15131514 int rc;
@@ -1516,10 +1517,19 @@ dasd_eckd_psf_ssc(struct dasd_device *device, int enable_pav) · 2 unmodified lines
15161517 if (IS_ERR(cqr))
15171518 return PTR_ERR(cqr);
15181519
1520+ /*
1521+ * set flags e.g. turn on failfast, to prevent blocking
1522+ * the calling function should handle failed requests
1523+ */
1524+ cqr->flags |= flags;
1525+
15191526 rc = dasd_sleep_on(cqr);
15201527 if (!rc)
15211528 /* trigger CIO to reprobe devices */
15221529 css_schedule_reprobe();
1530+ else if (cqr->intrc == -EAGAIN)
1531+ rc = -EAGAIN;
1532+
15231533 dasd_sfree_request(cqr, cqr->memdev);
15241534 return rc;
15251535 }
@@ -1527,7 +1537,8 @@ dasd_eckd_psf_ssc(struct dasd_device *device, int enable_pav) · 1 unmodified line
15271537 /*
15281538 * Valide storage server of current device.
15291539 */
1530−static void dasd_eckd_validate_server(struct dasd_device *device)
1540+static int dasd_eckd_validate_server(struct dasd_device *device,
1541+ unsigned long flags)
15311542 {
15321543 int rc;
15331544 struct dasd_eckd_private *private;
@@ -1536,17 +1547,18 @@ static void dasd_eckd_validate_server(struct dasd_device *device) · 2 unmodified lines
15361547 private = (struct dasd_eckd_private *) device->private;
15371548 if (private->uid.type == UA_BASE_PAV_ALIAS ||
15381549 private->uid.type == UA_HYPER_PAV_ALIAS)
1539− return;
1550+ return 0;
15401551 if (dasd_nopav || MACHINE_IS_VM)
15411552 enable_pav = 0;
15421553 else
15431554 enable_pav = 1;
1544− rc = dasd_eckd_psf_ssc(device, enable_pav);
1555+ rc = dasd_eckd_psf_ssc(device, enable_pav, flags);
15451556
15461557 /* may be requested feature is not available on server,
15471558 * therefore just report error and go ahead */
15481559 DBF_EVENT_DEVID(DBF_WARNING, device->cdev, "PSF-SSC for SSID %04x "
15491560 "returned rc=%d", private->uid.ssid, rc);
1561+ return rc;
15501562 }
15511563
15521564 /*
@@ -1556,7 +1568,13 @@ static void dasd_eckd_do_validate_server(struct work_struct *work) · 3 unmodified lines
15561568 {
15571569 struct dasd_device *device = container_of(work, struct dasd_device,
15581570 kick_validate);
1559− dasd_eckd_validate_server(device);
1571+ if (dasd_eckd_validate_server(device, DASD_CQR_FLAGS_FAILFAST)
1572+ == -EAGAIN) {
1573+ /* schedule worker again if failed */
1574+ schedule_work(&device->kick_validate);
1575+ return;
1576+ }
1577+
15601578 dasd_put_device(device);
15611579 }
15621580
@@ -1685,7 +1703,7 @@ dasd_eckd_check_characteristics(struct dasd_device *device) · 122 unmodified lines
16851703 if (rc)
16861704 goto out_err2;
16871705
1688− dasd_eckd_validate_server(device);
1706+ dasd_eckd_validate_server(device, 0);
16891707
16901708 /* device may report different configuration data after LCU setup */
16911709 rc = dasd_eckd_read_conf(device);
@@ -4153,7 +4171,7 @@ static int dasd_eckd_restore_device(struct dasd_device *device) · 2461 unmodified lines
41534171 rc = dasd_alias_make_device_known_to_lcu(device);
41544172 if (rc)
41554173 return rc;
4156− dasd_eckd_validate_server(device);
4174+ dasd_eckd_validate_server(device, DASD_CQR_FLAGS_FAILFAST);
41574175
41584176 /* RE-Read Configuration Data */
41594177 rc = dasd_eckd_read_conf(device);
drivers/s390/cio/device.c+6−1
@@ -1426,6 +1426,8 @@ static enum io_sch_action sch_get_action(struct subchannel *sch) · 1425 unmodified lines
14261426 return IO_SCH_REPROBE;
14271427 if (cdev->online)
14281428 return IO_SCH_VERIFY;
1429+ if (cdev->private->state == DEV_STATE_NOT_OPER)
1430+ return IO_SCH_UNREG_ATTACH;
14291431 return IO_SCH_NOP;
14301432 }
14311433
@@ -1519,11 +1521,14 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process) · 87 unmodified lines
15191521 goto out;
15201522 break;
15211523 case IO_SCH_UNREG_ATTACH:
1524+ spin_lock_irqsave(sch->lock, flags);
15221525 if (cdev->private->flags.resuming) {
15231526 /* Device will be handled later. */
15241527 rc = 0;
1525− goto out;
1528+ goto out_unlock;
15261529 }
1530+ sch_set_cdev(sch, NULL);
1531+ spin_unlock_irqrestore(sch->lock, flags);
15271532 /* Unregister ccw device. */
15281533 ccw_device_unregister(cdev);
15291534 break;