diff options
Diffstat (limited to 'drivers/s390/block')
-rw-r--r-- | drivers/s390/block/dasd.c | 110 | ||||
-rw-r--r-- | drivers/s390/block/dasd_3370_erp.c | 27 | ||||
-rw-r--r-- | drivers/s390/block/dasd_3990_erp.c | 189 | ||||
-rw-r--r-- | drivers/s390/block/dasd_9336_erp.c | 27 | ||||
-rw-r--r-- | drivers/s390/block/dasd_9343_erp.c | 2 | ||||
-rw-r--r-- | drivers/s390/block/dasd_devmap.c | 103 | ||||
-rw-r--r-- | drivers/s390/block/dasd_diag.c | 7 | ||||
-rw-r--r-- | drivers/s390/block/dasd_diag.h | 2 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.c | 338 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eckd.h | 24 | ||||
-rw-r--r-- | drivers/s390/block/dasd_eer.c | 4 | ||||
-rw-r--r-- | drivers/s390/block/dasd_erp.c | 9 | ||||
-rw-r--r-- | drivers/s390/block/dasd_fba.c | 50 | ||||
-rw-r--r-- | drivers/s390/block/dasd_fba.h | 2 | ||||
-rw-r--r-- | drivers/s390/block/dasd_genhd.c | 3 | ||||
-rw-r--r-- | drivers/s390/block/dasd_int.h | 40 | ||||
-rw-r--r-- | drivers/s390/block/dasd_ioctl.c | 13 | ||||
-rw-r--r-- | drivers/s390/block/dasd_proc.c | 1 | ||||
-rw-r--r-- | drivers/s390/block/xpram.c | 6 |
19 files changed, 472 insertions, 485 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index cfb1fff3787c..4bf03fb67f8d 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/kmod.h> | 12 | #include <linux/kmod.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
@@ -95,7 +94,7 @@ dasd_alloc_device(void) | |||
95 | spin_lock_init(&device->mem_lock); | 94 | spin_lock_init(&device->mem_lock); |
96 | spin_lock_init(&device->request_queue_lock); | 95 | spin_lock_init(&device->request_queue_lock); |
97 | atomic_set (&device->tasklet_scheduled, 0); | 96 | atomic_set (&device->tasklet_scheduled, 0); |
98 | tasklet_init(&device->tasklet, | 97 | tasklet_init(&device->tasklet, |
99 | (void (*)(unsigned long)) dasd_tasklet, | 98 | (void (*)(unsigned long)) dasd_tasklet, |
100 | (unsigned long) device); | 99 | (unsigned long) device); |
101 | INIT_LIST_HEAD(&device->ccw_queue); | 100 | INIT_LIST_HEAD(&device->ccw_queue); |
@@ -128,7 +127,7 @@ dasd_state_new_to_known(struct dasd_device *device) | |||
128 | int rc; | 127 | int rc; |
129 | 128 | ||
130 | /* | 129 | /* |
131 | * As long as the device is not in state DASD_STATE_NEW we want to | 130 | * As long as the device is not in state DASD_STATE_NEW we want to |
132 | * keep the reference count > 0. | 131 | * keep the reference count > 0. |
133 | */ | 132 | */ |
134 | dasd_get_device(device); | 133 | dasd_get_device(device); |
@@ -336,7 +335,7 @@ dasd_decrease_state(struct dasd_device *device) | |||
336 | if (device->state == DASD_STATE_ONLINE && | 335 | if (device->state == DASD_STATE_ONLINE && |
337 | device->target <= DASD_STATE_READY) | 336 | device->target <= DASD_STATE_READY) |
338 | dasd_state_online_to_ready(device); | 337 | dasd_state_online_to_ready(device); |
339 | 338 | ||
340 | if (device->state == DASD_STATE_READY && | 339 | if (device->state == DASD_STATE_READY && |
341 | device->target <= DASD_STATE_BASIC) | 340 | device->target <= DASD_STATE_BASIC) |
342 | dasd_state_ready_to_basic(device); | 341 | dasd_state_ready_to_basic(device); |
@@ -348,7 +347,7 @@ dasd_decrease_state(struct dasd_device *device) | |||
348 | if (device->state == DASD_STATE_BASIC && | 347 | if (device->state == DASD_STATE_BASIC && |
349 | device->target <= DASD_STATE_KNOWN) | 348 | device->target <= DASD_STATE_KNOWN) |
350 | dasd_state_basic_to_known(device); | 349 | dasd_state_basic_to_known(device); |
351 | 350 | ||
352 | if (device->state == DASD_STATE_KNOWN && | 351 | if (device->state == DASD_STATE_KNOWN && |
353 | device->target <= DASD_STATE_NEW) | 352 | device->target <= DASD_STATE_NEW) |
354 | dasd_state_known_to_new(device); | 353 | dasd_state_known_to_new(device); |
@@ -994,7 +993,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
994 | ((irb->scsw.cstat << 8) | irb->scsw.dstat), cqr); | 993 | ((irb->scsw.cstat << 8) | irb->scsw.dstat), cqr); |
995 | 994 | ||
996 | /* Find out the appropriate era_action. */ | 995 | /* Find out the appropriate era_action. */ |
997 | if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) | 996 | if (irb->scsw.fctl & SCSW_FCTL_HALT_FUNC) |
998 | era = dasd_era_fatal; | 997 | era = dasd_era_fatal; |
999 | else if (irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) && | 998 | else if (irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END) && |
1000 | irb->scsw.cstat == 0 && | 999 | irb->scsw.cstat == 0 && |
@@ -1004,7 +1003,7 @@ dasd_int_handler(struct ccw_device *cdev, unsigned long intparm, | |||
1004 | era = dasd_era_fatal; /* don't recover this request */ | 1003 | era = dasd_era_fatal; /* don't recover this request */ |
1005 | else if (irb->esw.esw0.erw.cons) | 1004 | else if (irb->esw.esw0.erw.cons) |
1006 | era = device->discipline->examine_error(cqr, irb); | 1005 | era = device->discipline->examine_error(cqr, irb); |
1007 | else | 1006 | else |
1008 | era = dasd_era_recover; | 1007 | era = dasd_era_recover; |
1009 | 1008 | ||
1010 | DBF_DEV_EVENT(DBF_DEBUG, device, "era_code %d", era); | 1009 | DBF_DEV_EVENT(DBF_DEBUG, device, "era_code %d", era); |
@@ -1287,7 +1286,7 @@ __dasd_start_head(struct dasd_device * device) | |||
1287 | } | 1286 | } |
1288 | 1287 | ||
1289 | /* | 1288 | /* |
1290 | * Remove requests from the ccw queue. | 1289 | * Remove requests from the ccw queue. |
1291 | */ | 1290 | */ |
1292 | static void | 1291 | static void |
1293 | dasd_flush_ccw_queue(struct dasd_device * device, int all) | 1292 | dasd_flush_ccw_queue(struct dasd_device * device, int all) |
@@ -1450,23 +1449,23 @@ dasd_sleep_on(struct dasd_ccw_req * cqr) | |||
1450 | wait_queue_head_t wait_q; | 1449 | wait_queue_head_t wait_q; |
1451 | struct dasd_device *device; | 1450 | struct dasd_device *device; |
1452 | int rc; | 1451 | int rc; |
1453 | 1452 | ||
1454 | device = cqr->device; | 1453 | device = cqr->device; |
1455 | spin_lock_irq(get_ccwdev_lock(device->cdev)); | 1454 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
1456 | 1455 | ||
1457 | init_waitqueue_head (&wait_q); | 1456 | init_waitqueue_head (&wait_q); |
1458 | cqr->callback = dasd_wakeup_cb; | 1457 | cqr->callback = dasd_wakeup_cb; |
1459 | cqr->callback_data = (void *) &wait_q; | 1458 | cqr->callback_data = (void *) &wait_q; |
1460 | cqr->status = DASD_CQR_QUEUED; | 1459 | cqr->status = DASD_CQR_QUEUED; |
1461 | list_add_tail(&cqr->list, &device->ccw_queue); | 1460 | list_add_tail(&cqr->list, &device->ccw_queue); |
1462 | 1461 | ||
1463 | /* let the bh start the request to keep them in order */ | 1462 | /* let the bh start the request to keep them in order */ |
1464 | dasd_schedule_bh(device); | 1463 | dasd_schedule_bh(device); |
1465 | 1464 | ||
1466 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 1465 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1467 | 1466 | ||
1468 | wait_event(wait_q, _wait_for_wakeup(cqr)); | 1467 | wait_event(wait_q, _wait_for_wakeup(cqr)); |
1469 | 1468 | ||
1470 | /* Request status is either done or failed. */ | 1469 | /* Request status is either done or failed. */ |
1471 | rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0; | 1470 | rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0; |
1472 | return rc; | 1471 | return rc; |
@@ -1568,7 +1567,7 @@ dasd_sleep_on_immediatly(struct dasd_ccw_req * cqr) | |||
1568 | wait_queue_head_t wait_q; | 1567 | wait_queue_head_t wait_q; |
1569 | struct dasd_device *device; | 1568 | struct dasd_device *device; |
1570 | int rc; | 1569 | int rc; |
1571 | 1570 | ||
1572 | device = cqr->device; | 1571 | device = cqr->device; |
1573 | spin_lock_irq(get_ccwdev_lock(device->cdev)); | 1572 | spin_lock_irq(get_ccwdev_lock(device->cdev)); |
1574 | rc = _dasd_term_running_cqr(device); | 1573 | rc = _dasd_term_running_cqr(device); |
@@ -1576,20 +1575,20 @@ dasd_sleep_on_immediatly(struct dasd_ccw_req * cqr) | |||
1576 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 1575 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1577 | return rc; | 1576 | return rc; |
1578 | } | 1577 | } |
1579 | 1578 | ||
1580 | init_waitqueue_head (&wait_q); | 1579 | init_waitqueue_head (&wait_q); |
1581 | cqr->callback = dasd_wakeup_cb; | 1580 | cqr->callback = dasd_wakeup_cb; |
1582 | cqr->callback_data = (void *) &wait_q; | 1581 | cqr->callback_data = (void *) &wait_q; |
1583 | cqr->status = DASD_CQR_QUEUED; | 1582 | cqr->status = DASD_CQR_QUEUED; |
1584 | list_add(&cqr->list, &device->ccw_queue); | 1583 | list_add(&cqr->list, &device->ccw_queue); |
1585 | 1584 | ||
1586 | /* let the bh start the request to keep them in order */ | 1585 | /* let the bh start the request to keep them in order */ |
1587 | dasd_schedule_bh(device); | 1586 | dasd_schedule_bh(device); |
1588 | 1587 | ||
1589 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); | 1588 | spin_unlock_irq(get_ccwdev_lock(device->cdev)); |
1590 | 1589 | ||
1591 | wait_event(wait_q, _wait_for_wakeup(cqr)); | 1590 | wait_event(wait_q, _wait_for_wakeup(cqr)); |
1592 | 1591 | ||
1593 | /* Request status is either done or failed. */ | 1592 | /* Request status is either done or failed. */ |
1594 | rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0; | 1593 | rc = (cqr->status == DASD_CQR_FAILED) ? -EIO : 0; |
1595 | return rc; | 1594 | return rc; |
@@ -1725,7 +1724,7 @@ dasd_flush_request_queue(struct dasd_device * device) | |||
1725 | 1724 | ||
1726 | if (!device->request_queue) | 1725 | if (!device->request_queue) |
1727 | return; | 1726 | return; |
1728 | 1727 | ||
1729 | spin_lock_irq(&device->request_queue_lock); | 1728 | spin_lock_irq(&device->request_queue_lock); |
1730 | while (!list_empty(&device->request_queue->queue_head)) { | 1729 | while (!list_empty(&device->request_queue->queue_head)) { |
1731 | req = elv_next_request(device->request_queue); | 1730 | req = elv_next_request(device->request_queue); |
@@ -1834,7 +1833,6 @@ dasd_exit(void) | |||
1834 | } | 1833 | } |
1835 | dasd_gendisk_exit(); | 1834 | dasd_gendisk_exit(); |
1836 | dasd_devmap_exit(); | 1835 | dasd_devmap_exit(); |
1837 | devfs_remove("dasd"); | ||
1838 | if (dasd_debug_area != NULL) { | 1836 | if (dasd_debug_area != NULL) { |
1839 | debug_unregister(dasd_debug_area); | 1837 | debug_unregister(dasd_debug_area); |
1840 | dasd_debug_area = NULL; | 1838 | dasd_debug_area = NULL; |
@@ -1855,15 +1853,34 @@ dasd_generic_probe (struct ccw_device *cdev, | |||
1855 | { | 1853 | { |
1856 | int ret; | 1854 | int ret; |
1857 | 1855 | ||
1856 | ret = ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); | ||
1857 | if (ret) { | ||
1858 | printk(KERN_WARNING | ||
1859 | "dasd_generic_probe: could not set ccw-device options " | ||
1860 | "for %s\n", cdev->dev.bus_id); | ||
1861 | return ret; | ||
1862 | } | ||
1858 | ret = dasd_add_sysfs_files(cdev); | 1863 | ret = dasd_add_sysfs_files(cdev); |
1859 | if (ret) { | 1864 | if (ret) { |
1860 | printk(KERN_WARNING | 1865 | printk(KERN_WARNING |
1861 | "dasd_generic_probe: could not add sysfs entries " | 1866 | "dasd_generic_probe: could not add sysfs entries " |
1862 | "for %s\n", cdev->dev.bus_id); | 1867 | "for %s\n", cdev->dev.bus_id); |
1863 | } else { | 1868 | return ret; |
1864 | cdev->handler = &dasd_int_handler; | ||
1865 | } | 1869 | } |
1870 | cdev->handler = &dasd_int_handler; | ||
1866 | 1871 | ||
1872 | /* | ||
1873 | * Automatically online either all dasd devices (dasd_autodetect) | ||
1874 | * or all devices specified with dasd= parameters during | ||
1875 | * initial probe. | ||
1876 | */ | ||
1877 | if ((dasd_get_feature(cdev, DASD_FEATURE_INITIAL_ONLINE) > 0 ) || | ||
1878 | (dasd_autodetect && dasd_busid_known(cdev->dev.bus_id) != 0)) | ||
1879 | ret = ccw_device_set_online(cdev); | ||
1880 | if (ret) | ||
1881 | printk(KERN_WARNING | ||
1882 | "dasd_generic_probe: could not initially online " | ||
1883 | "ccw-device %s\n", cdev->dev.bus_id); | ||
1867 | return ret; | 1884 | return ret; |
1868 | } | 1885 | } |
1869 | 1886 | ||
@@ -1911,6 +1928,8 @@ dasd_generic_set_online (struct ccw_device *cdev, | |||
1911 | struct dasd_device *device; | 1928 | struct dasd_device *device; |
1912 | int rc; | 1929 | int rc; |
1913 | 1930 | ||
1931 | /* first online clears initial online feature flag */ | ||
1932 | dasd_set_feature(cdev, DASD_FEATURE_INITIAL_ONLINE, 0); | ||
1914 | device = dasd_create_device(cdev); | 1933 | device = dasd_create_device(cdev); |
1915 | if (IS_ERR(device)) | 1934 | if (IS_ERR(device)) |
1916 | return PTR_ERR(device); | 1935 | return PTR_ERR(device); |
@@ -2065,31 +2084,6 @@ dasd_generic_notify(struct ccw_device *cdev, int event) | |||
2065 | return ret; | 2084 | return ret; |
2066 | } | 2085 | } |
2067 | 2086 | ||
2068 | /* | ||
2069 | * Automatically online either all dasd devices (dasd_autodetect) or | ||
2070 | * all devices specified with dasd= parameters. | ||
2071 | */ | ||
2072 | static int | ||
2073 | __dasd_auto_online(struct device *dev, void *data) | ||
2074 | { | ||
2075 | struct ccw_device *cdev; | ||
2076 | |||
2077 | cdev = to_ccwdev(dev); | ||
2078 | if (dasd_autodetect || dasd_busid_known(cdev->dev.bus_id) == 0) | ||
2079 | ccw_device_set_online(cdev); | ||
2080 | return 0; | ||
2081 | } | ||
2082 | |||
2083 | void | ||
2084 | dasd_generic_auto_online (struct ccw_driver *dasd_discipline_driver) | ||
2085 | { | ||
2086 | struct device_driver *drv; | ||
2087 | |||
2088 | drv = get_driver(&dasd_discipline_driver->driver); | ||
2089 | driver_for_each_device(drv, NULL, NULL, __dasd_auto_online); | ||
2090 | put_driver(drv); | ||
2091 | } | ||
2092 | |||
2093 | 2087 | ||
2094 | static int __init | 2088 | static int __init |
2095 | dasd_init(void) | 2089 | dasd_init(void) |
@@ -2111,9 +2105,6 @@ dasd_init(void) | |||
2111 | 2105 | ||
2112 | dasd_diag_discipline_pointer = NULL; | 2106 | dasd_diag_discipline_pointer = NULL; |
2113 | 2107 | ||
2114 | rc = devfs_mk_dir("dasd"); | ||
2115 | if (rc) | ||
2116 | goto failed; | ||
2117 | rc = dasd_devmap_init(); | 2108 | rc = dasd_devmap_init(); |
2118 | if (rc) | 2109 | if (rc) |
2119 | goto failed; | 2110 | goto failed; |
@@ -2170,23 +2161,4 @@ EXPORT_SYMBOL_GPL(dasd_generic_remove); | |||
2170 | EXPORT_SYMBOL_GPL(dasd_generic_notify); | 2161 | EXPORT_SYMBOL_GPL(dasd_generic_notify); |
2171 | EXPORT_SYMBOL_GPL(dasd_generic_set_online); | 2162 | EXPORT_SYMBOL_GPL(dasd_generic_set_online); |
2172 | EXPORT_SYMBOL_GPL(dasd_generic_set_offline); | 2163 | EXPORT_SYMBOL_GPL(dasd_generic_set_offline); |
2173 | EXPORT_SYMBOL_GPL(dasd_generic_auto_online); | ||
2174 | 2164 | ||
2175 | /* | ||
2176 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
2177 | * Emacs will notice this stuff at the end of the file and automatically | ||
2178 | * adjust the settings for this buffer only. This must remain at the end | ||
2179 | * of the file. | ||
2180 | * --------------------------------------------------------------------------- | ||
2181 | * Local variables: | ||
2182 | * c-indent-level: 4 | ||
2183 | * c-brace-imaginary-offset: 0 | ||
2184 | * c-brace-offset: -4 | ||
2185 | * c-argdecl-indent: 4 | ||
2186 | * c-label-offset: -4 | ||
2187 | * c-continued-statement-offset: 4 | ||
2188 | * c-continued-brace-offset: 0 | ||
2189 | * indent-tabs-mode: 1 | ||
2190 | * tab-width: 8 | ||
2191 | * End: | ||
2192 | */ | ||
diff --git a/drivers/s390/block/dasd_3370_erp.c b/drivers/s390/block/dasd_3370_erp.c index 1d11c2a9525d..1ddab8991d92 100644 --- a/drivers/s390/block/dasd_3370_erp.c +++ b/drivers/s390/block/dasd_3370_erp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_3370_erp.c | 2 | * File...........: linux/drivers/s390/block/dasd_3370_erp.c |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Bugreports.to..: <Linux390@de.ibm.com> | 4 | * Bugreports.to..: <Linux390@de.ibm.com> |
@@ -12,10 +12,10 @@ | |||
12 | 12 | ||
13 | 13 | ||
14 | /* | 14 | /* |
15 | * DASD_3370_ERP_EXAMINE | 15 | * DASD_3370_ERP_EXAMINE |
16 | * | 16 | * |
17 | * DESCRIPTION | 17 | * DESCRIPTION |
18 | * Checks only for fatal/no/recover error. | 18 | * Checks only for fatal/no/recover error. |
19 | * A detailed examination of the sense data is done later outside | 19 | * A detailed examination of the sense data is done later outside |
20 | * the interrupt handler. | 20 | * the interrupt handler. |
21 | * | 21 | * |
@@ -23,7 +23,7 @@ | |||
23 | * 'Chapter 7. 3370 Sense Data'. | 23 | * 'Chapter 7. 3370 Sense Data'. |
24 | * | 24 | * |
25 | * RETURN VALUES | 25 | * RETURN VALUES |
26 | * dasd_era_none no error | 26 | * dasd_era_none no error |
27 | * dasd_era_fatal for all fatal (unrecoverable errors) | 27 | * dasd_era_fatal for all fatal (unrecoverable errors) |
28 | * dasd_era_recover for all others. | 28 | * dasd_era_recover for all others. |
29 | */ | 29 | */ |
@@ -82,22 +82,3 @@ dasd_3370_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb) | |||
82 | return dasd_era_recover; | 82 | return dasd_era_recover; |
83 | 83 | ||
84 | } /* END dasd_3370_erp_examine */ | 84 | } /* END dasd_3370_erp_examine */ |
85 | |||
86 | /* | ||
87 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
88 | * Emacs will notice this stuff at the end of the file and automatically | ||
89 | * adjust the settings for this buffer only. This must remain at the end | ||
90 | * of the file. | ||
91 | * --------------------------------------------------------------------------- | ||
92 | * Local variables: | ||
93 | * c-indent-level: 4 | ||
94 | * c-brace-imaginary-offset: 0 | ||
95 | * c-brace-offset: -4 | ||
96 | * c-argdecl-indent: 4 | ||
97 | * c-label-offset: -4 | ||
98 | * c-continued-statement-offset: 4 | ||
99 | * c-continued-brace-offset: 0 | ||
100 | * indent-tabs-mode: 1 | ||
101 | * tab-width: 8 | ||
102 | * End: | ||
103 | */ | ||
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index 2ed51562319e..669805d4402d 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_3990_erp.c | 2 | * File...........: linux/drivers/s390/block/dasd_3990_erp.c |
3 | * Author(s)......: Horst Hummel <Horst.Hummel@de.ibm.com> | 3 | * Author(s)......: Horst Hummel <Horst.Hummel@de.ibm.com> |
4 | * Holger Smolinski <Holger.Smolinski@de.ibm.com> | 4 | * Holger Smolinski <Holger.Smolinski@de.ibm.com> |
5 | * Bugreports.to..: <Linux390@de.ibm.com> | 5 | * Bugreports.to..: <Linux390@de.ibm.com> |
6 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000, 2001 | 6 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 2000, 2001 |
@@ -25,23 +25,23 @@ struct DCTL_data { | |||
25 | } __attribute__ ((packed)); | 25 | } __attribute__ ((packed)); |
26 | 26 | ||
27 | /* | 27 | /* |
28 | ***************************************************************************** | 28 | ***************************************************************************** |
29 | * SECTION ERP EXAMINATION | 29 | * SECTION ERP EXAMINATION |
30 | ***************************************************************************** | 30 | ***************************************************************************** |
31 | */ | 31 | */ |
32 | 32 | ||
33 | /* | 33 | /* |
34 | * DASD_3990_ERP_EXAMINE_24 | 34 | * DASD_3990_ERP_EXAMINE_24 |
35 | * | 35 | * |
36 | * DESCRIPTION | 36 | * DESCRIPTION |
37 | * Checks only for fatal (unrecoverable) error. | 37 | * Checks only for fatal (unrecoverable) error. |
38 | * A detailed examination of the sense data is done later outside | 38 | * A detailed examination of the sense data is done later outside |
39 | * the interrupt handler. | 39 | * the interrupt handler. |
40 | * | 40 | * |
41 | * Each bit configuration leading to an action code 2 (Exit with | 41 | * Each bit configuration leading to an action code 2 (Exit with |
42 | * programming error or unusual condition indication) | 42 | * programming error or unusual condition indication) |
43 | * are handled as fatal error´s. | 43 | * are handled as fatal error´s. |
44 | * | 44 | * |
45 | * All other configurations are handled as recoverable errors. | 45 | * All other configurations are handled as recoverable errors. |
46 | * | 46 | * |
47 | * RETURN VALUES | 47 | * RETURN VALUES |
@@ -93,15 +93,15 @@ dasd_3990_erp_examine_24(struct dasd_ccw_req * cqr, char *sense) | |||
93 | } /* END dasd_3990_erp_examine_24 */ | 93 | } /* END dasd_3990_erp_examine_24 */ |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * DASD_3990_ERP_EXAMINE_32 | 96 | * DASD_3990_ERP_EXAMINE_32 |
97 | * | 97 | * |
98 | * DESCRIPTION | 98 | * DESCRIPTION |
99 | * Checks only for fatal/no/recoverable error. | 99 | * Checks only for fatal/no/recoverable error. |
100 | * A detailed examination of the sense data is done later outside | 100 | * A detailed examination of the sense data is done later outside |
101 | * the interrupt handler. | 101 | * the interrupt handler. |
102 | * | 102 | * |
103 | * RETURN VALUES | 103 | * RETURN VALUES |
104 | * dasd_era_none no error | 104 | * dasd_era_none no error |
105 | * dasd_era_fatal for all fatal (unrecoverable errors) | 105 | * dasd_era_fatal for all fatal (unrecoverable errors) |
106 | * dasd_era_recover for recoverable others. | 106 | * dasd_era_recover for recoverable others. |
107 | */ | 107 | */ |
@@ -128,10 +128,10 @@ dasd_3990_erp_examine_32(struct dasd_ccw_req * cqr, char *sense) | |||
128 | } /* end dasd_3990_erp_examine_32 */ | 128 | } /* end dasd_3990_erp_examine_32 */ |
129 | 129 | ||
130 | /* | 130 | /* |
131 | * DASD_3990_ERP_EXAMINE | 131 | * DASD_3990_ERP_EXAMINE |
132 | * | 132 | * |
133 | * DESCRIPTION | 133 | * DESCRIPTION |
134 | * Checks only for fatal/no/recover error. | 134 | * Checks only for fatal/no/recover error. |
135 | * A detailed examination of the sense data is done later outside | 135 | * A detailed examination of the sense data is done later outside |
136 | * the interrupt handler. | 136 | * the interrupt handler. |
137 | * | 137 | * |
@@ -139,7 +139,7 @@ dasd_3990_erp_examine_32(struct dasd_ccw_req * cqr, char *sense) | |||
139 | * 'Chapter 7. Error Recovery Procedures'. | 139 | * 'Chapter 7. Error Recovery Procedures'. |
140 | * | 140 | * |
141 | * RETURN VALUES | 141 | * RETURN VALUES |
142 | * dasd_era_none no error | 142 | * dasd_era_none no error |
143 | * dasd_era_fatal for all fatal (unrecoverable errors) | 143 | * dasd_era_fatal for all fatal (unrecoverable errors) |
144 | * dasd_era_recover for all others. | 144 | * dasd_era_recover for all others. |
145 | */ | 145 | */ |
@@ -178,18 +178,18 @@ dasd_3990_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb) | |||
178 | } /* END dasd_3990_erp_examine */ | 178 | } /* END dasd_3990_erp_examine */ |
179 | 179 | ||
180 | /* | 180 | /* |
181 | ***************************************************************************** | 181 | ***************************************************************************** |
182 | * SECTION ERP HANDLING | 182 | * SECTION ERP HANDLING |
183 | ***************************************************************************** | 183 | ***************************************************************************** |
184 | */ | 184 | */ |
185 | /* | 185 | /* |
186 | ***************************************************************************** | 186 | ***************************************************************************** |
187 | * 24 and 32 byte sense ERP functions | 187 | * 24 and 32 byte sense ERP functions |
188 | ***************************************************************************** | 188 | ***************************************************************************** |
189 | */ | 189 | */ |
190 | 190 | ||
191 | /* | 191 | /* |
192 | * DASD_3990_ERP_CLEANUP | 192 | * DASD_3990_ERP_CLEANUP |
193 | * | 193 | * |
194 | * DESCRIPTION | 194 | * DESCRIPTION |
195 | * Removes the already build but not necessary ERP request and sets | 195 | * Removes the already build but not necessary ERP request and sets |
@@ -197,10 +197,10 @@ dasd_3990_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb) | |||
197 | * | 197 | * |
198 | * PARAMETER | 198 | * PARAMETER |
199 | * erp request to be blocked | 199 | * erp request to be blocked |
200 | * final_status either DASD_CQR_DONE or DASD_CQR_FAILED | 200 | * final_status either DASD_CQR_DONE or DASD_CQR_FAILED |
201 | * | 201 | * |
202 | * RETURN VALUES | 202 | * RETURN VALUES |
203 | * cqr original cqr | 203 | * cqr original cqr |
204 | */ | 204 | */ |
205 | static struct dasd_ccw_req * | 205 | static struct dasd_ccw_req * |
206 | dasd_3990_erp_cleanup(struct dasd_ccw_req * erp, char final_status) | 206 | dasd_3990_erp_cleanup(struct dasd_ccw_req * erp, char final_status) |
@@ -214,7 +214,7 @@ dasd_3990_erp_cleanup(struct dasd_ccw_req * erp, char final_status) | |||
214 | } /* end dasd_3990_erp_cleanup */ | 214 | } /* end dasd_3990_erp_cleanup */ |
215 | 215 | ||
216 | /* | 216 | /* |
217 | * DASD_3990_ERP_BLOCK_QUEUE | 217 | * DASD_3990_ERP_BLOCK_QUEUE |
218 | * | 218 | * |
219 | * DESCRIPTION | 219 | * DESCRIPTION |
220 | * Block the given device request queue to prevent from further | 220 | * Block the given device request queue to prevent from further |
@@ -237,7 +237,7 @@ dasd_3990_erp_block_queue(struct dasd_ccw_req * erp, int expires) | |||
237 | } | 237 | } |
238 | 238 | ||
239 | /* | 239 | /* |
240 | * DASD_3990_ERP_INT_REQ | 240 | * DASD_3990_ERP_INT_REQ |
241 | * | 241 | * |
242 | * DESCRIPTION | 242 | * DESCRIPTION |
243 | * Handles 'Intervention Required' error. | 243 | * Handles 'Intervention Required' error. |
@@ -277,7 +277,7 @@ dasd_3990_erp_int_req(struct dasd_ccw_req * erp) | |||
277 | } /* end dasd_3990_erp_int_req */ | 277 | } /* end dasd_3990_erp_int_req */ |
278 | 278 | ||
279 | /* | 279 | /* |
280 | * DASD_3990_ERP_ALTERNATE_PATH | 280 | * DASD_3990_ERP_ALTERNATE_PATH |
281 | * | 281 | * |
282 | * DESCRIPTION | 282 | * DESCRIPTION |
283 | * Repeat the operation on a different channel path. | 283 | * Repeat the operation on a different channel path. |
@@ -330,15 +330,15 @@ dasd_3990_erp_alternate_path(struct dasd_ccw_req * erp) | |||
330 | * DASD_3990_ERP_DCTL | 330 | * DASD_3990_ERP_DCTL |
331 | * | 331 | * |
332 | * DESCRIPTION | 332 | * DESCRIPTION |
333 | * Setup cqr to do the Diagnostic Control (DCTL) command with an | 333 | * Setup cqr to do the Diagnostic Control (DCTL) command with an |
334 | * Inhibit Write subcommand (0x20) and the given modifier. | 334 | * Inhibit Write subcommand (0x20) and the given modifier. |
335 | * | 335 | * |
336 | * PARAMETER | 336 | * PARAMETER |
337 | * erp pointer to the current (failed) ERP | 337 | * erp pointer to the current (failed) ERP |
338 | * modifier subcommand modifier | 338 | * modifier subcommand modifier |
339 | * | 339 | * |
340 | * RETURN VALUES | 340 | * RETURN VALUES |
341 | * dctl_cqr pointer to NEW dctl_cqr | 341 | * dctl_cqr pointer to NEW dctl_cqr |
342 | * | 342 | * |
343 | */ | 343 | */ |
344 | static struct dasd_ccw_req * | 344 | static struct dasd_ccw_req * |
@@ -386,7 +386,7 @@ dasd_3990_erp_DCTL(struct dasd_ccw_req * erp, char modifier) | |||
386 | } /* end dasd_3990_erp_DCTL */ | 386 | } /* end dasd_3990_erp_DCTL */ |
387 | 387 | ||
388 | /* | 388 | /* |
389 | * DASD_3990_ERP_ACTION_1 | 389 | * DASD_3990_ERP_ACTION_1 |
390 | * | 390 | * |
391 | * DESCRIPTION | 391 | * DESCRIPTION |
392 | * Setup ERP to do the ERP action 1 (see Reference manual). | 392 | * Setup ERP to do the ERP action 1 (see Reference manual). |
@@ -415,7 +415,7 @@ dasd_3990_erp_action_1(struct dasd_ccw_req * erp) | |||
415 | } /* end dasd_3990_erp_action_1 */ | 415 | } /* end dasd_3990_erp_action_1 */ |
416 | 416 | ||
417 | /* | 417 | /* |
418 | * DASD_3990_ERP_ACTION_4 | 418 | * DASD_3990_ERP_ACTION_4 |
419 | * | 419 | * |
420 | * DESCRIPTION | 420 | * DESCRIPTION |
421 | * Setup ERP to do the ERP action 4 (see Reference manual). | 421 | * Setup ERP to do the ERP action 4 (see Reference manual). |
@@ -453,11 +453,11 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) | |||
453 | 453 | ||
454 | if (sense[25] == 0x1D) { /* state change pending */ | 454 | if (sense[25] == 0x1D) { /* state change pending */ |
455 | 455 | ||
456 | DEV_MESSAGE(KERN_INFO, device, | 456 | DEV_MESSAGE(KERN_INFO, device, |
457 | "waiting for state change pending " | 457 | "waiting for state change pending " |
458 | "interrupt, %d retries left", | 458 | "interrupt, %d retries left", |
459 | erp->retries); | 459 | erp->retries); |
460 | 460 | ||
461 | dasd_3990_erp_block_queue(erp, 30*HZ); | 461 | dasd_3990_erp_block_queue(erp, 30*HZ); |
462 | 462 | ||
463 | } else if (sense[25] == 0x1E) { /* busy */ | 463 | } else if (sense[25] == 0x1E) { /* busy */ |
@@ -469,9 +469,9 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) | |||
469 | } else { | 469 | } else { |
470 | 470 | ||
471 | /* no state change pending - retry */ | 471 | /* no state change pending - retry */ |
472 | DEV_MESSAGE (KERN_INFO, device, | 472 | DEV_MESSAGE (KERN_INFO, device, |
473 | "redriving request immediately, " | 473 | "redriving request immediately, " |
474 | "%d retries left", | 474 | "%d retries left", |
475 | erp->retries); | 475 | erp->retries); |
476 | erp->status = DASD_CQR_QUEUED; | 476 | erp->status = DASD_CQR_QUEUED; |
477 | } | 477 | } |
@@ -482,13 +482,13 @@ dasd_3990_erp_action_4(struct dasd_ccw_req * erp, char *sense) | |||
482 | } /* end dasd_3990_erp_action_4 */ | 482 | } /* end dasd_3990_erp_action_4 */ |
483 | 483 | ||
484 | /* | 484 | /* |
485 | ***************************************************************************** | 485 | ***************************************************************************** |
486 | * 24 byte sense ERP functions (only) | 486 | * 24 byte sense ERP functions (only) |
487 | ***************************************************************************** | 487 | ***************************************************************************** |
488 | */ | 488 | */ |
489 | 489 | ||
490 | /* | 490 | /* |
491 | * DASD_3990_ERP_ACTION_5 | 491 | * DASD_3990_ERP_ACTION_5 |
492 | * | 492 | * |
493 | * DESCRIPTION | 493 | * DESCRIPTION |
494 | * Setup ERP to do the ERP action 5 (see Reference manual). | 494 | * Setup ERP to do the ERP action 5 (see Reference manual). |
@@ -523,7 +523,7 @@ dasd_3990_erp_action_5(struct dasd_ccw_req * erp) | |||
523 | * | 523 | * |
524 | * PARAMETER | 524 | * PARAMETER |
525 | * sense current sense data | 525 | * sense current sense data |
526 | * | 526 | * |
527 | * RETURN VALUES | 527 | * RETURN VALUES |
528 | * void | 528 | * void |
529 | */ | 529 | */ |
@@ -1150,9 +1150,9 @@ dasd_3990_handle_env_data(struct dasd_ccw_req * erp, char *sense) | |||
1150 | * PARAMETER | 1150 | * PARAMETER |
1151 | * erp current erp_head | 1151 | * erp current erp_head |
1152 | * sense current sense data | 1152 | * sense current sense data |
1153 | * | 1153 | * |
1154 | * RETURN VALUES | 1154 | * RETURN VALUES |
1155 | * erp 'new' erp_head - pointer to new ERP | 1155 | * erp 'new' erp_head - pointer to new ERP |
1156 | */ | 1156 | */ |
1157 | static struct dasd_ccw_req * | 1157 | static struct dasd_ccw_req * |
1158 | dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense) | 1158 | dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense) |
@@ -1185,7 +1185,7 @@ dasd_3990_erp_com_rej(struct dasd_ccw_req * erp, char *sense) | |||
1185 | } /* end dasd_3990_erp_com_rej */ | 1185 | } /* end dasd_3990_erp_com_rej */ |
1186 | 1186 | ||
1187 | /* | 1187 | /* |
1188 | * DASD_3990_ERP_BUS_OUT | 1188 | * DASD_3990_ERP_BUS_OUT |
1189 | * | 1189 | * |
1190 | * DESCRIPTION | 1190 | * DESCRIPTION |
1191 | * Handles 24 byte 'Bus Out Parity Check' error. | 1191 | * Handles 24 byte 'Bus Out Parity Check' error. |
@@ -1483,7 +1483,7 @@ dasd_3990_erp_env_data(struct dasd_ccw_req * erp, char *sense) | |||
1483 | * | 1483 | * |
1484 | * PARAMETER | 1484 | * PARAMETER |
1485 | * erp already added default ERP | 1485 | * erp already added default ERP |
1486 | * | 1486 | * |
1487 | * RETURN VALUES | 1487 | * RETURN VALUES |
1488 | * erp new erp_head - pointer to new ERP | 1488 | * erp new erp_head - pointer to new ERP |
1489 | */ | 1489 | */ |
@@ -1527,11 +1527,11 @@ dasd_3990_erp_file_prot(struct dasd_ccw_req * erp) | |||
1527 | } /* end dasd_3990_erp_file_prot */ | 1527 | } /* end dasd_3990_erp_file_prot */ |
1528 | 1528 | ||
1529 | /* | 1529 | /* |
1530 | * DASD_3990_ERP_INSPECT_24 | 1530 | * DASD_3990_ERP_INSPECT_24 |
1531 | * | 1531 | * |
1532 | * DESCRIPTION | 1532 | * DESCRIPTION |
1533 | * Does a detailed inspection of the 24 byte sense data | 1533 | * Does a detailed inspection of the 24 byte sense data |
1534 | * and sets up a related error recovery action. | 1534 | * and sets up a related error recovery action. |
1535 | * | 1535 | * |
1536 | * PARAMETER | 1536 | * PARAMETER |
1537 | * sense sense data of the actual error | 1537 | * sense sense data of the actual error |
@@ -1602,13 +1602,13 @@ dasd_3990_erp_inspect_24(struct dasd_ccw_req * erp, char *sense) | |||
1602 | } /* END dasd_3990_erp_inspect_24 */ | 1602 | } /* END dasd_3990_erp_inspect_24 */ |
1603 | 1603 | ||
1604 | /* | 1604 | /* |
1605 | ***************************************************************************** | 1605 | ***************************************************************************** |
1606 | * 32 byte sense ERP functions (only) | 1606 | * 32 byte sense ERP functions (only) |
1607 | ***************************************************************************** | 1607 | ***************************************************************************** |
1608 | */ | 1608 | */ |
1609 | 1609 | ||
1610 | /* | 1610 | /* |
1611 | * DASD_3990_ERPACTION_10_32 | 1611 | * DASD_3990_ERPACTION_10_32 |
1612 | * | 1612 | * |
1613 | * DESCRIPTION | 1613 | * DESCRIPTION |
1614 | * Handles 32 byte 'Action 10' of Single Program Action Codes. | 1614 | * Handles 32 byte 'Action 10' of Single Program Action Codes. |
@@ -1616,7 +1616,7 @@ dasd_3990_erp_inspect_24(struct dasd_ccw_req * erp, char *sense) | |||
1616 | * | 1616 | * |
1617 | * PARAMETER | 1617 | * PARAMETER |
1618 | * erp current erp_head | 1618 | * erp current erp_head |
1619 | * sense current sense data | 1619 | * sense current sense data |
1620 | * RETURN VALUES | 1620 | * RETURN VALUES |
1621 | * erp modified erp_head | 1621 | * erp modified erp_head |
1622 | */ | 1622 | */ |
@@ -1640,18 +1640,18 @@ dasd_3990_erp_action_10_32(struct dasd_ccw_req * erp, char *sense) | |||
1640 | * | 1640 | * |
1641 | * DESCRIPTION | 1641 | * DESCRIPTION |
1642 | * Handles 32 byte 'Action 1B' of Single Program Action Codes. | 1642 | * Handles 32 byte 'Action 1B' of Single Program Action Codes. |
1643 | * A write operation could not be finished because of an unexpected | 1643 | * A write operation could not be finished because of an unexpected |
1644 | * condition. | 1644 | * condition. |
1645 | * The already created 'default erp' is used to get the link to | 1645 | * The already created 'default erp' is used to get the link to |
1646 | * the erp chain, but it can not be used for this recovery | 1646 | * the erp chain, but it can not be used for this recovery |
1647 | * action because it contains no DE/LO data space. | 1647 | * action because it contains no DE/LO data space. |
1648 | * | 1648 | * |
1649 | * PARAMETER | 1649 | * PARAMETER |
1650 | * default_erp already added default erp. | 1650 | * default_erp already added default erp. |
1651 | * sense current sense data | 1651 | * sense current sense data |
1652 | * | 1652 | * |
1653 | * RETURN VALUES | 1653 | * RETURN VALUES |
1654 | * erp new erp or | 1654 | * erp new erp or |
1655 | * default_erp in case of imprecise ending or error | 1655 | * default_erp in case of imprecise ending or error |
1656 | */ | 1656 | */ |
1657 | static struct dasd_ccw_req * | 1657 | static struct dasd_ccw_req * |
@@ -1789,16 +1789,16 @@ dasd_3990_erp_action_1B_32(struct dasd_ccw_req * default_erp, char *sense) | |||
1789 | * DASD_3990_UPDATE_1B | 1789 | * DASD_3990_UPDATE_1B |
1790 | * | 1790 | * |
1791 | * DESCRIPTION | 1791 | * DESCRIPTION |
1792 | * Handles the update to the 32 byte 'Action 1B' of Single Program | 1792 | * Handles the update to the 32 byte 'Action 1B' of Single Program |
1793 | * Action Codes in case the first action was not successful. | 1793 | * Action Codes in case the first action was not successful. |
1794 | * The already created 'previous_erp' is the currently not successful | 1794 | * The already created 'previous_erp' is the currently not successful |
1795 | * ERP. | 1795 | * ERP. |
1796 | * | 1796 | * |
1797 | * PARAMETER | 1797 | * PARAMETER |
1798 | * previous_erp already created previous erp. | 1798 | * previous_erp already created previous erp. |
1799 | * sense current sense data | 1799 | * sense current sense data |
1800 | * RETURN VALUES | 1800 | * RETURN VALUES |
1801 | * erp modified erp | 1801 | * erp modified erp |
1802 | */ | 1802 | */ |
1803 | static struct dasd_ccw_req * | 1803 | static struct dasd_ccw_req * |
1804 | dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) | 1804 | dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) |
@@ -1897,7 +1897,7 @@ dasd_3990_update_1B(struct dasd_ccw_req * previous_erp, char *sense) | |||
1897 | } /* end dasd_3990_update_1B */ | 1897 | } /* end dasd_3990_update_1B */ |
1898 | 1898 | ||
1899 | /* | 1899 | /* |
1900 | * DASD_3990_ERP_COMPOUND_RETRY | 1900 | * DASD_3990_ERP_COMPOUND_RETRY |
1901 | * | 1901 | * |
1902 | * DESCRIPTION | 1902 | * DESCRIPTION |
1903 | * Handles the compound ERP action retry code. | 1903 | * Handles the compound ERP action retry code. |
@@ -1943,7 +1943,7 @@ dasd_3990_erp_compound_retry(struct dasd_ccw_req * erp, char *sense) | |||
1943 | } /* end dasd_3990_erp_compound_retry */ | 1943 | } /* end dasd_3990_erp_compound_retry */ |
1944 | 1944 | ||
1945 | /* | 1945 | /* |
1946 | * DASD_3990_ERP_COMPOUND_PATH | 1946 | * DASD_3990_ERP_COMPOUND_PATH |
1947 | * | 1947 | * |
1948 | * DESCRIPTION | 1948 | * DESCRIPTION |
1949 | * Handles the compound ERP action for retry on alternate | 1949 | * Handles the compound ERP action for retry on alternate |
@@ -1965,7 +1965,7 @@ dasd_3990_erp_compound_path(struct dasd_ccw_req * erp, char *sense) | |||
1965 | dasd_3990_erp_alternate_path(erp); | 1965 | dasd_3990_erp_alternate_path(erp); |
1966 | 1966 | ||
1967 | if (erp->status == DASD_CQR_FAILED) { | 1967 | if (erp->status == DASD_CQR_FAILED) { |
1968 | /* reset the lpm and the status to be able to | 1968 | /* reset the lpm and the status to be able to |
1969 | * try further actions. */ | 1969 | * try further actions. */ |
1970 | 1970 | ||
1971 | erp->lpm = 0; | 1971 | erp->lpm = 0; |
@@ -1980,7 +1980,7 @@ dasd_3990_erp_compound_path(struct dasd_ccw_req * erp, char *sense) | |||
1980 | } /* end dasd_3990_erp_compound_path */ | 1980 | } /* end dasd_3990_erp_compound_path */ |
1981 | 1981 | ||
1982 | /* | 1982 | /* |
1983 | * DASD_3990_ERP_COMPOUND_CODE | 1983 | * DASD_3990_ERP_COMPOUND_CODE |
1984 | * | 1984 | * |
1985 | * DESCRIPTION | 1985 | * DESCRIPTION |
1986 | * Handles the compound ERP action for retry code. | 1986 | * Handles the compound ERP action for retry code. |
@@ -2001,18 +2001,18 @@ dasd_3990_erp_compound_code(struct dasd_ccw_req * erp, char *sense) | |||
2001 | 2001 | ||
2002 | switch (sense[28]) { | 2002 | switch (sense[28]) { |
2003 | case 0x17: | 2003 | case 0x17: |
2004 | /* issue a Diagnostic Control command with an | 2004 | /* issue a Diagnostic Control command with an |
2005 | * Inhibit Write subcommand and controler modifier */ | 2005 | * Inhibit Write subcommand and controler modifier */ |
2006 | erp = dasd_3990_erp_DCTL(erp, 0x20); | 2006 | erp = dasd_3990_erp_DCTL(erp, 0x20); |
2007 | break; | 2007 | break; |
2008 | 2008 | ||
2009 | case 0x25: | 2009 | case 0x25: |
2010 | /* wait for 5 seconds and retry again */ | 2010 | /* wait for 5 seconds and retry again */ |
2011 | erp->retries = 1; | 2011 | erp->retries = 1; |
2012 | 2012 | ||
2013 | dasd_3990_erp_block_queue (erp, 5*HZ); | 2013 | dasd_3990_erp_block_queue (erp, 5*HZ); |
2014 | break; | 2014 | break; |
2015 | 2015 | ||
2016 | default: | 2016 | default: |
2017 | /* should not happen - continue */ | 2017 | /* should not happen - continue */ |
2018 | break; | 2018 | break; |
@@ -2026,7 +2026,7 @@ dasd_3990_erp_compound_code(struct dasd_ccw_req * erp, char *sense) | |||
2026 | } /* end dasd_3990_erp_compound_code */ | 2026 | } /* end dasd_3990_erp_compound_code */ |
2027 | 2027 | ||
2028 | /* | 2028 | /* |
2029 | * DASD_3990_ERP_COMPOUND_CONFIG | 2029 | * DASD_3990_ERP_COMPOUND_CONFIG |
2030 | * | 2030 | * |
2031 | * DESCRIPTION | 2031 | * DESCRIPTION |
2032 | * Handles the compound ERP action for configruation | 2032 | * Handles the compound ERP action for configruation |
@@ -2063,10 +2063,10 @@ dasd_3990_erp_compound_config(struct dasd_ccw_req * erp, char *sense) | |||
2063 | } /* end dasd_3990_erp_compound_config */ | 2063 | } /* end dasd_3990_erp_compound_config */ |
2064 | 2064 | ||
2065 | /* | 2065 | /* |
2066 | * DASD_3990_ERP_COMPOUND | 2066 | * DASD_3990_ERP_COMPOUND |
2067 | * | 2067 | * |
2068 | * DESCRIPTION | 2068 | * DESCRIPTION |
2069 | * Does the further compound program action if | 2069 | * Does the further compound program action if |
2070 | * compound retry was not successful. | 2070 | * compound retry was not successful. |
2071 | * | 2071 | * |
2072 | * PARAMETER | 2072 | * PARAMETER |
@@ -2110,11 +2110,11 @@ dasd_3990_erp_compound(struct dasd_ccw_req * erp, char *sense) | |||
2110 | } /* end dasd_3990_erp_compound */ | 2110 | } /* end dasd_3990_erp_compound */ |
2111 | 2111 | ||
2112 | /* | 2112 | /* |
2113 | * DASD_3990_ERP_INSPECT_32 | 2113 | * DASD_3990_ERP_INSPECT_32 |
2114 | * | 2114 | * |
2115 | * DESCRIPTION | 2115 | * DESCRIPTION |
2116 | * Does a detailed inspection of the 32 byte sense data | 2116 | * Does a detailed inspection of the 32 byte sense data |
2117 | * and sets up a related error recovery action. | 2117 | * and sets up a related error recovery action. |
2118 | * | 2118 | * |
2119 | * PARAMETER | 2119 | * PARAMETER |
2120 | * sense sense data of the actual error | 2120 | * sense sense data of the actual error |
@@ -2228,9 +2228,9 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
2228 | } /* end dasd_3990_erp_inspect_32 */ | 2228 | } /* end dasd_3990_erp_inspect_32 */ |
2229 | 2229 | ||
2230 | /* | 2230 | /* |
2231 | ***************************************************************************** | 2231 | ***************************************************************************** |
2232 | * main ERP control fuctions (24 and 32 byte sense) | 2232 | * main ERP control fuctions (24 and 32 byte sense) |
2233 | ***************************************************************************** | 2233 | ***************************************************************************** |
2234 | */ | 2234 | */ |
2235 | 2235 | ||
2236 | /* | 2236 | /* |
@@ -2243,7 +2243,7 @@ dasd_3990_erp_inspect_32(struct dasd_ccw_req * erp, char *sense) | |||
2243 | * PARAMETER | 2243 | * PARAMETER |
2244 | * erp pointer to the currently created default ERP | 2244 | * erp pointer to the currently created default ERP |
2245 | * RETURN VALUES | 2245 | * RETURN VALUES |
2246 | * erp_new contens was possibly modified | 2246 | * erp_new contens was possibly modified |
2247 | */ | 2247 | */ |
2248 | static struct dasd_ccw_req * | 2248 | static struct dasd_ccw_req * |
2249 | dasd_3990_erp_inspect(struct dasd_ccw_req * erp) | 2249 | dasd_3990_erp_inspect(struct dasd_ccw_req * erp) |
@@ -2272,14 +2272,14 @@ dasd_3990_erp_inspect(struct dasd_ccw_req * erp) | |||
2272 | 2272 | ||
2273 | /* | 2273 | /* |
2274 | * DASD_3990_ERP_ADD_ERP | 2274 | * DASD_3990_ERP_ADD_ERP |
2275 | * | 2275 | * |
2276 | * DESCRIPTION | 2276 | * DESCRIPTION |
2277 | * This funtion adds an additional request block (ERP) to the head of | 2277 | * This funtion adds an additional request block (ERP) to the head of |
2278 | * the given cqr (or erp). | 2278 | * the given cqr (or erp). |
2279 | * This erp is initialized as an default erp (retry TIC) | 2279 | * This erp is initialized as an default erp (retry TIC) |
2280 | * | 2280 | * |
2281 | * PARAMETER | 2281 | * PARAMETER |
2282 | * cqr head of the current ERP-chain (or single cqr if | 2282 | * cqr head of the current ERP-chain (or single cqr if |
2283 | * first error) | 2283 | * first error) |
2284 | * RETURN VALUES | 2284 | * RETURN VALUES |
2285 | * erp pointer to new ERP-chain head | 2285 | * erp pointer to new ERP-chain head |
@@ -2332,15 +2332,15 @@ dasd_3990_erp_add_erp(struct dasd_ccw_req * cqr) | |||
2332 | } | 2332 | } |
2333 | 2333 | ||
2334 | /* | 2334 | /* |
2335 | * DASD_3990_ERP_ADDITIONAL_ERP | 2335 | * DASD_3990_ERP_ADDITIONAL_ERP |
2336 | * | 2336 | * |
2337 | * DESCRIPTION | 2337 | * DESCRIPTION |
2338 | * An additional ERP is needed to handle the current error. | 2338 | * An additional ERP is needed to handle the current error. |
2339 | * Add ERP to the head of the ERP-chain containing the ERP processing | 2339 | * Add ERP to the head of the ERP-chain containing the ERP processing |
2340 | * determined based on the sense data. | 2340 | * determined based on the sense data. |
2341 | * | 2341 | * |
2342 | * PARAMETER | 2342 | * PARAMETER |
2343 | * cqr head of the current ERP-chain (or single cqr if | 2343 | * cqr head of the current ERP-chain (or single cqr if |
2344 | * first error) | 2344 | * first error) |
2345 | * | 2345 | * |
2346 | * RETURN VALUES | 2346 | * RETURN VALUES |
@@ -2376,7 +2376,7 @@ dasd_3990_erp_additional_erp(struct dasd_ccw_req * cqr) | |||
2376 | * 24 byte sense byte 25 and 27 is set as well. | 2376 | * 24 byte sense byte 25 and 27 is set as well. |
2377 | * | 2377 | * |
2378 | * PARAMETER | 2378 | * PARAMETER |
2379 | * cqr1 first cqr, which will be compared with the | 2379 | * cqr1 first cqr, which will be compared with the |
2380 | * cqr2 second cqr. | 2380 | * cqr2 second cqr. |
2381 | * | 2381 | * |
2382 | * RETURN VALUES | 2382 | * RETURN VALUES |
@@ -2415,7 +2415,7 @@ dasd_3990_erp_error_match(struct dasd_ccw_req *cqr1, struct dasd_ccw_req *cqr2) | |||
2415 | * cqr failed cqr (either original cqr or already an erp) | 2415 | * cqr failed cqr (either original cqr or already an erp) |
2416 | * | 2416 | * |
2417 | * RETURN VALUES | 2417 | * RETURN VALUES |
2418 | * erp erp-pointer to the already defined error | 2418 | * erp erp-pointer to the already defined error |
2419 | * recovery procedure OR | 2419 | * recovery procedure OR |
2420 | * NULL if a 'new' error occurred. | 2420 | * NULL if a 'new' error occurred. |
2421 | */ | 2421 | */ |
@@ -2451,10 +2451,10 @@ dasd_3990_erp_in_erp(struct dasd_ccw_req *cqr) | |||
2451 | * DASD_3990_ERP_FURTHER_ERP (24 & 32 byte sense) | 2451 | * DASD_3990_ERP_FURTHER_ERP (24 & 32 byte sense) |
2452 | * | 2452 | * |
2453 | * DESCRIPTION | 2453 | * DESCRIPTION |
2454 | * No retry is left for the current ERP. Check what has to be done | 2454 | * No retry is left for the current ERP. Check what has to be done |
2455 | * with the ERP. | 2455 | * with the ERP. |
2456 | * - do further defined ERP action or | 2456 | * - do further defined ERP action or |
2457 | * - wait for interrupt or | 2457 | * - wait for interrupt or |
2458 | * - exit with permanent error | 2458 | * - exit with permanent error |
2459 | * | 2459 | * |
2460 | * PARAMETER | 2460 | * PARAMETER |
@@ -2485,7 +2485,7 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp) | |||
2485 | 2485 | ||
2486 | if (!(sense[2] & DASD_SENSE_BIT_0)) { | 2486 | if (!(sense[2] & DASD_SENSE_BIT_0)) { |
2487 | 2487 | ||
2488 | /* issue a Diagnostic Control command with an | 2488 | /* issue a Diagnostic Control command with an |
2489 | * Inhibit Write subcommand */ | 2489 | * Inhibit Write subcommand */ |
2490 | 2490 | ||
2491 | switch (sense[25]) { | 2491 | switch (sense[25]) { |
@@ -2535,14 +2535,14 @@ dasd_3990_erp_further_erp(struct dasd_ccw_req *erp) | |||
2535 | } /* end dasd_3990_erp_further_erp */ | 2535 | } /* end dasd_3990_erp_further_erp */ |
2536 | 2536 | ||
2537 | /* | 2537 | /* |
2538 | * DASD_3990_ERP_HANDLE_MATCH_ERP | 2538 | * DASD_3990_ERP_HANDLE_MATCH_ERP |
2539 | * | 2539 | * |
2540 | * DESCRIPTION | 2540 | * DESCRIPTION |
2541 | * An error occurred again and an ERP has been detected which is already | 2541 | * An error occurred again and an ERP has been detected which is already |
2542 | * used to handle this error (e.g. retries). | 2542 | * used to handle this error (e.g. retries). |
2543 | * All prior ERP's are asumed to be successful and therefore removed | 2543 | * All prior ERP's are asumed to be successful and therefore removed |
2544 | * from queue. | 2544 | * from queue. |
2545 | * If retry counter of matching erp is already 0, it is checked if further | 2545 | * If retry counter of matching erp is already 0, it is checked if further |
2546 | * action is needed (besides retry) or if the ERP has failed. | 2546 | * action is needed (besides retry) or if the ERP has failed. |
2547 | * | 2547 | * |
2548 | * PARAMETER | 2548 | * PARAMETER |
@@ -2631,7 +2631,7 @@ dasd_3990_erp_handle_match_erp(struct dasd_ccw_req *erp_head, | |||
2631 | * erp erp-pointer to the head of the ERP action chain. | 2631 | * erp erp-pointer to the head of the ERP action chain. |
2632 | * This means: | 2632 | * This means: |
2633 | * - either a ptr to an additional ERP cqr or | 2633 | * - either a ptr to an additional ERP cqr or |
2634 | * - the original given cqr (which's status might | 2634 | * - the original given cqr (which's status might |
2635 | * be modified) | 2635 | * be modified) |
2636 | */ | 2636 | */ |
2637 | struct dasd_ccw_req * | 2637 | struct dasd_ccw_req * |
@@ -2723,22 +2723,3 @@ dasd_3990_erp_action(struct dasd_ccw_req * cqr) | |||
2723 | return erp; | 2723 | return erp; |
2724 | 2724 | ||
2725 | } /* end dasd_3990_erp_action */ | 2725 | } /* end dasd_3990_erp_action */ |
2726 | |||
2727 | /* | ||
2728 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
2729 | * Emacs will notice this stuff at the end of the file and automatically | ||
2730 | * adjust the settings for this buffer only. This must remain at the end | ||
2731 | * of the file. | ||
2732 | * --------------------------------------------------------------------------- | ||
2733 | * Local variables: | ||
2734 | * c-indent-level: 4 | ||
2735 | * c-brace-imaginary-offset: 0 | ||
2736 | * c-brace-offset: -4 | ||
2737 | * c-argdecl-indent: 4 | ||
2738 | * c-label-offset: -4 | ||
2739 | * c-continued-statement-offset: 4 | ||
2740 | * c-continued-brace-offset: 0 | ||
2741 | * indent-tabs-mode: 1 | ||
2742 | * tab-width: 8 | ||
2743 | * End: | ||
2744 | */ | ||
diff --git a/drivers/s390/block/dasd_9336_erp.c b/drivers/s390/block/dasd_9336_erp.c index dc861446d056..6e082688475a 100644 --- a/drivers/s390/block/dasd_9336_erp.c +++ b/drivers/s390/block/dasd_9336_erp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_9336_erp.c | 2 | * File...........: linux/drivers/s390/block/dasd_9336_erp.c |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Bugreports.to..: <Linux390@de.ibm.com> | 4 | * Bugreports.to..: <Linux390@de.ibm.com> |
@@ -12,10 +12,10 @@ | |||
12 | 12 | ||
13 | 13 | ||
14 | /* | 14 | /* |
15 | * DASD_9336_ERP_EXAMINE | 15 | * DASD_9336_ERP_EXAMINE |
16 | * | 16 | * |
17 | * DESCRIPTION | 17 | * DESCRIPTION |
18 | * Checks only for fatal/no/recover error. | 18 | * Checks only for fatal/no/recover error. |
19 | * A detailed examination of the sense data is done later outside | 19 | * A detailed examination of the sense data is done later outside |
20 | * the interrupt handler. | 20 | * the interrupt handler. |
21 | * | 21 | * |
@@ -23,7 +23,7 @@ | |||
23 | * 'Chapter 7. 9336 Sense Data'. | 23 | * 'Chapter 7. 9336 Sense Data'. |
24 | * | 24 | * |
25 | * RETURN VALUES | 25 | * RETURN VALUES |
26 | * dasd_era_none no error | 26 | * dasd_era_none no error |
27 | * dasd_era_fatal for all fatal (unrecoverable errors) | 27 | * dasd_era_fatal for all fatal (unrecoverable errors) |
28 | * dasd_era_recover for all others. | 28 | * dasd_era_recover for all others. |
29 | */ | 29 | */ |
@@ -39,22 +39,3 @@ dasd_9336_erp_examine(struct dasd_ccw_req * cqr, struct irb * irb) | |||
39 | return dasd_era_recover; | 39 | return dasd_era_recover; |
40 | 40 | ||
41 | } /* END dasd_9336_erp_examine */ | 41 | } /* END dasd_9336_erp_examine */ |
42 | |||
43 | /* | ||
44 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
45 | * Emacs will notice this stuff at the end of the file and automatically | ||
46 | * adjust the settings for this buffer only. This must remain at the end | ||
47 | * of the file. | ||
48 | * --------------------------------------------------------------------------- | ||
49 | * Local variables: | ||
50 | * c-indent-level: 4 | ||
51 | * c-brace-imaginary-offset: 0 | ||
52 | * c-brace-offset: -4 | ||
53 | * c-argdecl-indent: 4 | ||
54 | * c-label-offset: -4 | ||
55 | * c-continued-statement-offset: 4 | ||
56 | * c-continued-brace-offset: 0 | ||
57 | * indent-tabs-mode: 1 | ||
58 | * tab-width: 8 | ||
59 | * End: | ||
60 | */ | ||
diff --git a/drivers/s390/block/dasd_9343_erp.c b/drivers/s390/block/dasd_9343_erp.c index 4a5b79569aaa..ddecb9808ed4 100644 --- a/drivers/s390/block/dasd_9343_erp.c +++ b/drivers/s390/block/dasd_9343_erp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_9345_erp.c | 2 | * File...........: linux/drivers/s390/block/dasd_9345_erp.c |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Bugreports.to..: <Linux390@de.ibm.com> | 4 | * Bugreports.to..: <Linux390@de.ibm.com> |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index 216bc4fba199..d7295386821c 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -13,7 +13,6 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/ctype.h> | 16 | #include <linux/ctype.h> |
18 | #include <linux/init.h> | 17 | #include <linux/init.h> |
19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
@@ -27,7 +26,7 @@ | |||
27 | #include "dasd_int.h" | 26 | #include "dasd_int.h" |
28 | 27 | ||
29 | kmem_cache_t *dasd_page_cache; | 28 | kmem_cache_t *dasd_page_cache; |
30 | EXPORT_SYMBOL(dasd_page_cache); | 29 | EXPORT_SYMBOL_GPL(dasd_page_cache); |
31 | 30 | ||
32 | /* | 31 | /* |
33 | * dasd_devmap_t is used to store the features and the relation | 32 | * dasd_devmap_t is used to store the features and the relation |
@@ -49,6 +48,20 @@ struct dasd_devmap { | |||
49 | }; | 48 | }; |
50 | 49 | ||
51 | /* | 50 | /* |
51 | * dasd_servermap is used to store the server_id of all storage servers | ||
52 | * accessed by DASD device driver. | ||
53 | */ | ||
54 | struct dasd_servermap { | ||
55 | struct list_head list; | ||
56 | struct server_id { | ||
57 | char vendor[4]; | ||
58 | char serial[15]; | ||
59 | } sid; | ||
60 | }; | ||
61 | |||
62 | static struct list_head dasd_serverlist; | ||
63 | |||
64 | /* | ||
52 | * Parameter parsing functions for dasd= parameter. The syntax is: | 65 | * Parameter parsing functions for dasd= parameter. The syntax is: |
53 | * <devno> : (0x)?[0-9a-fA-F]+ | 66 | * <devno> : (0x)?[0-9a-fA-F]+ |
54 | * <busid> : [0-0a-f]\.[0-9a-f]\.(0x)?[0-9a-fA-F]+ | 67 | * <busid> : [0-0a-f]\.[0-9a-f]\.(0x)?[0-9a-fA-F]+ |
@@ -64,6 +77,8 @@ struct dasd_devmap { | |||
64 | 77 | ||
65 | int dasd_probeonly = 0; /* is true, when probeonly mode is active */ | 78 | int dasd_probeonly = 0; /* is true, when probeonly mode is active */ |
66 | int dasd_autodetect = 0; /* is true, when autodetection is active */ | 79 | int dasd_autodetect = 0; /* is true, when autodetection is active */ |
80 | int dasd_nopav = 0; /* is true, when PAV is disabled */ | ||
81 | EXPORT_SYMBOL_GPL(dasd_nopav); | ||
67 | 82 | ||
68 | /* | 83 | /* |
69 | * char *dasd[] is intended to hold the ranges supplied by the dasd= statement | 84 | * char *dasd[] is intended to hold the ranges supplied by the dasd= statement |
@@ -123,7 +138,7 @@ static inline int | |||
123 | dasd_busid(char **str, int *id0, int *id1, int *devno) | 138 | dasd_busid(char **str, int *id0, int *id1, int *devno) |
124 | { | 139 | { |
125 | int val, old_style; | 140 | int val, old_style; |
126 | 141 | ||
127 | /* check for leading '0x' */ | 142 | /* check for leading '0x' */ |
128 | old_style = 0; | 143 | old_style = 0; |
129 | if ((*str)[0] == '0' && (*str)[1] == 'x') { | 144 | if ((*str)[0] == '0' && (*str)[1] == 'x') { |
@@ -179,7 +194,7 @@ dasd_feature_list(char *str, char **endp) | |||
179 | features = 0; | 194 | features = 0; |
180 | 195 | ||
181 | while (1) { | 196 | while (1) { |
182 | for (len = 0; | 197 | for (len = 0; |
183 | str[len] && str[len] != ':' && str[len] != ')'; len++); | 198 | str[len] && str[len] != ':' && str[len] != ')'; len++); |
184 | if (len == 2 && !strncmp(str, "ro", 2)) | 199 | if (len == 2 && !strncmp(str, "ro", 2)) |
185 | features |= DASD_FEATURE_READONLY; | 200 | features |= DASD_FEATURE_READONLY; |
@@ -228,19 +243,24 @@ dasd_parse_keyword( char *parsestring ) { | |||
228 | length = strlen(parsestring); | 243 | length = strlen(parsestring); |
229 | residual_str = parsestring + length; | 244 | residual_str = parsestring + length; |
230 | } | 245 | } |
231 | if (strncmp ("autodetect", parsestring, length) == 0) { | 246 | if (strncmp("autodetect", parsestring, length) == 0) { |
232 | dasd_autodetect = 1; | 247 | dasd_autodetect = 1; |
233 | MESSAGE (KERN_INFO, "%s", | 248 | MESSAGE (KERN_INFO, "%s", |
234 | "turning to autodetection mode"); | 249 | "turning to autodetection mode"); |
235 | return residual_str; | 250 | return residual_str; |
236 | } | 251 | } |
237 | if (strncmp ("probeonly", parsestring, length) == 0) { | 252 | if (strncmp("probeonly", parsestring, length) == 0) { |
238 | dasd_probeonly = 1; | 253 | dasd_probeonly = 1; |
239 | MESSAGE(KERN_INFO, "%s", | 254 | MESSAGE(KERN_INFO, "%s", |
240 | "turning to probeonly mode"); | 255 | "turning to probeonly mode"); |
241 | return residual_str; | 256 | return residual_str; |
242 | } | 257 | } |
243 | if (strncmp ("fixedbuffers", parsestring, length) == 0) { | 258 | if (strncmp("nopav", parsestring, length) == 0) { |
259 | dasd_nopav = 1; | ||
260 | MESSAGE(KERN_INFO, "%s", "disable PAV mode"); | ||
261 | return residual_str; | ||
262 | } | ||
263 | if (strncmp("fixedbuffers", parsestring, length) == 0) { | ||
244 | if (dasd_page_cache) | 264 | if (dasd_page_cache) |
245 | return residual_str; | 265 | return residual_str; |
246 | dasd_page_cache = | 266 | dasd_page_cache = |
@@ -294,6 +314,8 @@ dasd_parse_range( char *parsestring ) { | |||
294 | features = dasd_feature_list(str, &str); | 314 | features = dasd_feature_list(str, &str); |
295 | if (features < 0) | 315 | if (features < 0) |
296 | return ERR_PTR(-EINVAL); | 316 | return ERR_PTR(-EINVAL); |
317 | /* each device in dasd= parameter should be set initially online */ | ||
318 | features |= DASD_FEATURE_INITIAL_ONLINE; | ||
297 | while (from <= to) { | 319 | while (from <= to) { |
298 | sprintf(bus_id, "%01x.%01x.%04x", | 320 | sprintf(bus_id, "%01x.%01x.%04x", |
299 | from_id0, from_id1, from++); | 321 | from_id0, from_id1, from++); |
@@ -359,7 +381,7 @@ dasd_parse(void) | |||
359 | * Add a devmap for the device specified by busid. It is possible that | 381 | * Add a devmap for the device specified by busid. It is possible that |
360 | * the devmap already exists (dasd= parameter). The order of the devices | 382 | * the devmap already exists (dasd= parameter). The order of the devices |
361 | * added through this function will define the kdevs for the individual | 383 | * added through this function will define the kdevs for the individual |
362 | * devices. | 384 | * devices. |
363 | */ | 385 | */ |
364 | static struct dasd_devmap * | 386 | static struct dasd_devmap * |
365 | dasd_add_busid(char *bus_id, int features) | 387 | dasd_add_busid(char *bus_id, int features) |
@@ -368,7 +390,7 @@ dasd_add_busid(char *bus_id, int features) | |||
368 | int hash; | 390 | int hash; |
369 | 391 | ||
370 | new = (struct dasd_devmap *) | 392 | new = (struct dasd_devmap *) |
371 | kmalloc(sizeof(struct dasd_devmap), GFP_KERNEL); | 393 | kzalloc(sizeof(struct dasd_devmap), GFP_KERNEL); |
372 | if (!new) | 394 | if (!new) |
373 | return ERR_PTR(-ENOMEM); | 395 | return ERR_PTR(-ENOMEM); |
374 | spin_lock(&dasd_devmap_lock); | 396 | spin_lock(&dasd_devmap_lock); |
@@ -630,7 +652,8 @@ dasd_ro_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
630 | } | 652 | } |
631 | 653 | ||
632 | static ssize_t | 654 | static ssize_t |
633 | dasd_ro_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 655 | dasd_ro_store(struct device *dev, struct device_attribute *attr, |
656 | const char *buf, size_t count) | ||
634 | { | 657 | { |
635 | struct dasd_devmap *devmap; | 658 | struct dasd_devmap *devmap; |
636 | int ro_flag; | 659 | int ro_flag; |
@@ -658,7 +681,7 @@ static DEVICE_ATTR(readonly, 0644, dasd_ro_show, dasd_ro_store); | |||
658 | * use_diag controls whether the driver should use diag rather than ssch | 681 | * use_diag controls whether the driver should use diag rather than ssch |
659 | * to talk to the device | 682 | * to talk to the device |
660 | */ | 683 | */ |
661 | static ssize_t | 684 | static ssize_t |
662 | dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) | 685 | dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) |
663 | { | 686 | { |
664 | struct dasd_devmap *devmap; | 687 | struct dasd_devmap *devmap; |
@@ -673,7 +696,8 @@ dasd_use_diag_show(struct device *dev, struct device_attribute *attr, char *buf) | |||
673 | } | 696 | } |
674 | 697 | ||
675 | static ssize_t | 698 | static ssize_t |
676 | dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) | 699 | dasd_use_diag_store(struct device *dev, struct device_attribute *attr, |
700 | const char *buf, size_t count) | ||
677 | { | 701 | { |
678 | struct dasd_devmap *devmap; | 702 | struct dasd_devmap *devmap; |
679 | ssize_t rc; | 703 | ssize_t rc; |
@@ -697,11 +721,11 @@ dasd_use_diag_store(struct device *dev, struct device_attribute *attr, const cha | |||
697 | return rc; | 721 | return rc; |
698 | } | 722 | } |
699 | 723 | ||
700 | static | 724 | static DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store); |
701 | DEVICE_ATTR(use_diag, 0644, dasd_use_diag_show, dasd_use_diag_store); | ||
702 | 725 | ||
703 | static ssize_t | 726 | static ssize_t |
704 | dasd_discipline_show(struct device *dev, struct device_attribute *attr, char *buf) | 727 | dasd_discipline_show(struct device *dev, struct device_attribute *attr, |
728 | char *buf) | ||
705 | { | 729 | { |
706 | struct dasd_devmap *devmap; | 730 | struct dasd_devmap *devmap; |
707 | char *dname; | 731 | char *dname; |
@@ -834,6 +858,38 @@ static struct attribute_group dasd_attr_group = { | |||
834 | .attrs = dasd_attrs, | 858 | .attrs = dasd_attrs, |
835 | }; | 859 | }; |
836 | 860 | ||
861 | /* | ||
862 | * Check if the related storage server is already contained in the | ||
863 | * dasd_serverlist. If server is not contained, create new entry. | ||
864 | * Return 0 if server was already in serverlist, | ||
865 | * 1 if the server was added successfully | ||
866 | * <0 in case of error. | ||
867 | */ | ||
868 | static int | ||
869 | dasd_add_server(struct dasd_uid *uid) | ||
870 | { | ||
871 | struct dasd_servermap *new, *tmp; | ||
872 | |||
873 | /* check if server is already contained */ | ||
874 | list_for_each_entry(tmp, &dasd_serverlist, list) | ||
875 | // normale cmp? | ||
876 | if (strncmp(tmp->sid.vendor, uid->vendor, | ||
877 | sizeof(tmp->sid.vendor)) == 0 | ||
878 | && strncmp(tmp->sid.serial, uid->serial, | ||
879 | sizeof(tmp->sid.serial)) == 0) | ||
880 | return 0; | ||
881 | |||
882 | new = (struct dasd_servermap *) | ||
883 | kzalloc(sizeof(struct dasd_servermap), GFP_KERNEL); | ||
884 | if (!new) | ||
885 | return -ENOMEM; | ||
886 | |||
887 | strncpy(new->sid.vendor, uid->vendor, sizeof(new->sid.vendor)); | ||
888 | strncpy(new->sid.serial, uid->serial, sizeof(new->sid.serial)); | ||
889 | list_add(&new->list, &dasd_serverlist); | ||
890 | return 1; | ||
891 | } | ||
892 | |||
837 | 893 | ||
838 | /* | 894 | /* |
839 | * Return copy of the device unique identifier. | 895 | * Return copy of the device unique identifier. |
@@ -854,21 +910,26 @@ dasd_get_uid(struct ccw_device *cdev, struct dasd_uid *uid) | |||
854 | 910 | ||
855 | /* | 911 | /* |
856 | * Register the given device unique identifier into devmap struct. | 912 | * Register the given device unique identifier into devmap struct. |
913 | * Return 0 if server was already in serverlist, | ||
914 | * 1 if the server was added successful | ||
915 | * <0 in case of error. | ||
857 | */ | 916 | */ |
858 | int | 917 | int |
859 | dasd_set_uid(struct ccw_device *cdev, struct dasd_uid *uid) | 918 | dasd_set_uid(struct ccw_device *cdev, struct dasd_uid *uid) |
860 | { | 919 | { |
861 | struct dasd_devmap *devmap; | 920 | struct dasd_devmap *devmap; |
921 | int rc; | ||
862 | 922 | ||
863 | devmap = dasd_find_busid(cdev->dev.bus_id); | 923 | devmap = dasd_find_busid(cdev->dev.bus_id); |
864 | if (IS_ERR(devmap)) | 924 | if (IS_ERR(devmap)) |
865 | return PTR_ERR(devmap); | 925 | return PTR_ERR(devmap); |
866 | spin_lock(&dasd_devmap_lock); | 926 | spin_lock(&dasd_devmap_lock); |
867 | devmap->uid = *uid; | 927 | devmap->uid = *uid; |
928 | rc = dasd_add_server(uid); | ||
868 | spin_unlock(&dasd_devmap_lock); | 929 | spin_unlock(&dasd_devmap_lock); |
869 | return 0; | 930 | return rc; |
870 | } | 931 | } |
871 | EXPORT_SYMBOL(dasd_set_uid); | 932 | EXPORT_SYMBOL_GPL(dasd_set_uid); |
872 | 933 | ||
873 | /* | 934 | /* |
874 | * Return value of the specified feature. | 935 | * Return value of the specified feature. |
@@ -880,7 +941,7 @@ dasd_get_feature(struct ccw_device *cdev, int feature) | |||
880 | 941 | ||
881 | devmap = dasd_find_busid(cdev->dev.bus_id); | 942 | devmap = dasd_find_busid(cdev->dev.bus_id); |
882 | if (IS_ERR(devmap)) | 943 | if (IS_ERR(devmap)) |
883 | return (int) PTR_ERR(devmap); | 944 | return PTR_ERR(devmap); |
884 | 945 | ||
885 | return ((devmap->features & feature) != 0); | 946 | return ((devmap->features & feature) != 0); |
886 | } | 947 | } |
@@ -896,7 +957,7 @@ dasd_set_feature(struct ccw_device *cdev, int feature, int flag) | |||
896 | 957 | ||
897 | devmap = dasd_find_busid(cdev->dev.bus_id); | 958 | devmap = dasd_find_busid(cdev->dev.bus_id); |
898 | if (IS_ERR(devmap)) | 959 | if (IS_ERR(devmap)) |
899 | return (int) PTR_ERR(devmap); | 960 | return PTR_ERR(devmap); |
900 | 961 | ||
901 | spin_lock(&dasd_devmap_lock); | 962 | spin_lock(&dasd_devmap_lock); |
902 | if (flag) | 963 | if (flag) |
@@ -932,8 +993,10 @@ dasd_devmap_init(void) | |||
932 | dasd_max_devindex = 0; | 993 | dasd_max_devindex = 0; |
933 | for (i = 0; i < 256; i++) | 994 | for (i = 0; i < 256; i++) |
934 | INIT_LIST_HEAD(&dasd_hashlists[i]); | 995 | INIT_LIST_HEAD(&dasd_hashlists[i]); |
935 | return 0; | ||
936 | 996 | ||
997 | /* Initialize servermap structure. */ | ||
998 | INIT_LIST_HEAD(&dasd_serverlist); | ||
999 | return 0; | ||
937 | } | 1000 | } |
938 | 1001 | ||
939 | void | 1002 | void |
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 3f9d704d2657..23fa0b289173 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_diag.c | 2 | * File...........: linux/drivers/s390/block/dasd_diag.c |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Based on.......: linux/drivers/s390/block/mdisk.c | 4 | * Based on.......: linux/drivers/s390/block/mdisk.c |
@@ -8,7 +8,6 @@ | |||
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/stddef.h> | 11 | #include <linux/stddef.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
@@ -336,7 +335,7 @@ dasd_diag_check_device(struct dasd_device *device) | |||
336 | 335 | ||
337 | private = (struct dasd_diag_private *) device->private; | 336 | private = (struct dasd_diag_private *) device->private; |
338 | if (private == NULL) { | 337 | if (private == NULL) { |
339 | private = kmalloc(sizeof(struct dasd_diag_private),GFP_KERNEL); | 338 | private = kzalloc(sizeof(struct dasd_diag_private),GFP_KERNEL); |
340 | if (private == NULL) { | 339 | if (private == NULL) { |
341 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 340 | DEV_MESSAGE(KERN_WARNING, device, "%s", |
342 | "memory allocation failed for private data"); | 341 | "memory allocation failed for private data"); |
@@ -527,7 +526,7 @@ dasd_diag_build_cp(struct dasd_device * device, struct request *req) | |||
527 | datasize, device); | 526 | datasize, device); |
528 | if (IS_ERR(cqr)) | 527 | if (IS_ERR(cqr)) |
529 | return cqr; | 528 | return cqr; |
530 | 529 | ||
531 | dreq = (struct dasd_diag_req *) cqr->data; | 530 | dreq = (struct dasd_diag_req *) cqr->data; |
532 | dreq->block_count = count; | 531 | dreq->block_count = count; |
533 | dbio = dreq->bio; | 532 | dbio = dreq->bio; |
diff --git a/drivers/s390/block/dasd_diag.h b/drivers/s390/block/dasd_diag.h index 38a4e55f8953..b8c78267ff3e 100644 --- a/drivers/s390/block/dasd_diag.h +++ b/drivers/s390/block/dasd_diag.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_diag.h | 2 | * File...........: linux/drivers/s390/block/dasd_diag.h |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Based on.......: linux/drivers/s390/block/mdisk.h | 4 | * Based on.......: linux/drivers/s390/block/mdisk.h |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 7d5a6cee4bd8..2e655f466743 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_eckd.c | 2 | * File...........: linux/drivers/s390/block/dasd_eckd.c |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Horst Hummel <Horst.Hummel@de.ibm.com> | 4 | * Horst Hummel <Horst.Hummel@de.ibm.com> |
5 | * Carsten Otte <Cotte@de.ibm.com> | 5 | * Carsten Otte <Cotte@de.ibm.com> |
6 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 6 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
7 | * Bugreports.to..: <Linux390@de.ibm.com> | 7 | * Bugreports.to..: <Linux390@de.ibm.com> |
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | 12 | #include <linux/stddef.h> |
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
@@ -24,6 +23,7 @@ | |||
24 | #include <asm/io.h> | 23 | #include <asm/io.h> |
25 | #include <asm/todclk.h> | 24 | #include <asm/todclk.h> |
26 | #include <asm/uaccess.h> | 25 | #include <asm/uaccess.h> |
26 | #include <asm/cio.h> | ||
27 | #include <asm/ccwdev.h> | 27 | #include <asm/ccwdev.h> |
28 | 28 | ||
29 | #include "dasd_int.h" | 29 | #include "dasd_int.h" |
@@ -89,17 +89,22 @@ dasd_eckd_probe (struct ccw_device *cdev) | |||
89 | { | 89 | { |
90 | int ret; | 90 | int ret; |
91 | 91 | ||
92 | ret = dasd_generic_probe (cdev, &dasd_eckd_discipline); | 92 | /* set ECKD specific ccw-device options */ |
93 | if (ret) | 93 | ret = ccw_device_set_options(cdev, CCWDEV_ALLOW_FORCE); |
94 | if (ret) { | ||
95 | printk(KERN_WARNING | ||
96 | "dasd_eckd_probe: could not set ccw-device options " | ||
97 | "for %s\n", cdev->dev.bus_id); | ||
94 | return ret; | 98 | return ret; |
95 | ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP | CCWDEV_ALLOW_FORCE); | 99 | } |
96 | return 0; | 100 | ret = dasd_generic_probe(cdev, &dasd_eckd_discipline); |
101 | return ret; | ||
97 | } | 102 | } |
98 | 103 | ||
99 | static int | 104 | static int |
100 | dasd_eckd_set_online(struct ccw_device *cdev) | 105 | dasd_eckd_set_online(struct ccw_device *cdev) |
101 | { | 106 | { |
102 | return dasd_generic_set_online (cdev, &dasd_eckd_discipline); | 107 | return dasd_generic_set_online(cdev, &dasd_eckd_discipline); |
103 | } | 108 | } |
104 | 109 | ||
105 | static struct ccw_driver dasd_eckd_driver = { | 110 | static struct ccw_driver dasd_eckd_driver = { |
@@ -210,14 +215,14 @@ check_XRC (struct ccw1 *de_ccw, | |||
210 | 215 | ||
211 | /* switch on System Time Stamp - needed for XRC Support */ | 216 | /* switch on System Time Stamp - needed for XRC Support */ |
212 | if (private->rdc_data.facilities.XRC_supported) { | 217 | if (private->rdc_data.facilities.XRC_supported) { |
213 | 218 | ||
214 | data->ga_extended |= 0x08; /* switch on 'Time Stamp Valid' */ | 219 | data->ga_extended |= 0x08; /* switch on 'Time Stamp Valid' */ |
215 | data->ga_extended |= 0x02; /* switch on 'Extended Parameter' */ | 220 | data->ga_extended |= 0x02; /* switch on 'Extended Parameter' */ |
216 | 221 | ||
217 | data->ep_sys_time = get_clock (); | 222 | data->ep_sys_time = get_clock (); |
218 | 223 | ||
219 | de_ccw->count = sizeof (struct DE_eckd_data); | 224 | de_ccw->count = sizeof (struct DE_eckd_data); |
220 | de_ccw->flags |= CCW_FLAG_SLI; | 225 | de_ccw->flags |= CCW_FLAG_SLI; |
221 | } | 226 | } |
222 | 227 | ||
223 | return; | 228 | return; |
@@ -296,8 +301,8 @@ define_extent(struct ccw1 * ccw, struct DE_eckd_data * data, int trk, | |||
296 | /* check for sequential prestage - enhance cylinder range */ | 301 | /* check for sequential prestage - enhance cylinder range */ |
297 | if (data->attributes.operation == DASD_SEQ_PRESTAGE || | 302 | if (data->attributes.operation == DASD_SEQ_PRESTAGE || |
298 | data->attributes.operation == DASD_SEQ_ACCESS) { | 303 | data->attributes.operation == DASD_SEQ_ACCESS) { |
299 | 304 | ||
300 | if (end.cyl + private->attrib.nr_cyl < geo.cyl) | 305 | if (end.cyl + private->attrib.nr_cyl < geo.cyl) |
301 | end.cyl += private->attrib.nr_cyl; | 306 | end.cyl += private->attrib.nr_cyl; |
302 | else | 307 | else |
303 | end.cyl = (geo.cyl - 1); | 308 | end.cyl = (geo.cyl - 1); |
@@ -317,7 +322,7 @@ locate_record(struct ccw1 *ccw, struct LO_eckd_data *data, int trk, | |||
317 | struct dasd_eckd_private *private; | 322 | struct dasd_eckd_private *private; |
318 | int sector; | 323 | int sector; |
319 | int dn, d; | 324 | int dn, d; |
320 | 325 | ||
321 | private = (struct dasd_eckd_private *) device->private; | 326 | private = (struct dasd_eckd_private *) device->private; |
322 | 327 | ||
323 | DBF_DEV_EVENT(DBF_INFO, device, | 328 | DBF_DEV_EVENT(DBF_INFO, device, |
@@ -541,6 +546,86 @@ dasd_eckd_read_conf(struct dasd_device *device) | |||
541 | } | 546 | } |
542 | 547 | ||
543 | /* | 548 | /* |
549 | * Build CP for Perform Subsystem Function - SSC. | ||
550 | */ | ||
551 | struct dasd_ccw_req * | ||
552 | dasd_eckd_build_psf_ssc(struct dasd_device *device) | ||
553 | { | ||
554 | struct dasd_ccw_req *cqr; | ||
555 | struct dasd_psf_ssc_data *psf_ssc_data; | ||
556 | struct ccw1 *ccw; | ||
557 | |||
558 | cqr = dasd_smalloc_request("ECKD", 1 /* PSF */ , | ||
559 | sizeof(struct dasd_psf_ssc_data), | ||
560 | device); | ||
561 | |||
562 | if (IS_ERR(cqr)) { | ||
563 | DEV_MESSAGE(KERN_WARNING, device, "%s", | ||
564 | "Could not allocate PSF-SSC request"); | ||
565 | return cqr; | ||
566 | } | ||
567 | psf_ssc_data = (struct dasd_psf_ssc_data *)cqr->data; | ||
568 | psf_ssc_data->order = PSF_ORDER_SSC; | ||
569 | psf_ssc_data->suborder = 0x08; | ||
570 | |||
571 | ccw = cqr->cpaddr; | ||
572 | ccw->cmd_code = DASD_ECKD_CCW_PSF; | ||
573 | ccw->cda = (__u32)(addr_t)psf_ssc_data; | ||
574 | ccw->count = 66; | ||
575 | |||
576 | cqr->device = device; | ||
577 | cqr->expires = 10*HZ; | ||
578 | cqr->buildclk = get_clock(); | ||
579 | cqr->status = DASD_CQR_FILLED; | ||
580 | return cqr; | ||
581 | } | ||
582 | |||
583 | /* | ||
584 | * Perform Subsystem Function. | ||
585 | * It is necessary to trigger CIO for channel revalidation since this | ||
586 | * call might change behaviour of DASD devices. | ||
587 | */ | ||
588 | static int | ||
589 | dasd_eckd_psf_ssc(struct dasd_device *device) | ||
590 | { | ||
591 | struct dasd_ccw_req *cqr; | ||
592 | int rc; | ||
593 | |||
594 | cqr = dasd_eckd_build_psf_ssc(device); | ||
595 | if (IS_ERR(cqr)) | ||
596 | return PTR_ERR(cqr); | ||
597 | |||
598 | rc = dasd_sleep_on(cqr); | ||
599 | if (!rc) | ||
600 | /* trigger CIO to reprobe devices */ | ||
601 | css_schedule_reprobe(); | ||
602 | dasd_sfree_request(cqr, cqr->device); | ||
603 | return rc; | ||
604 | } | ||
605 | |||
606 | /* | ||
607 | * Valide storage server of current device. | ||
608 | */ | ||
609 | static int | ||
610 | dasd_eckd_validate_server(struct dasd_device *device) | ||
611 | { | ||
612 | int rc; | ||
613 | |||
614 | /* Currently PAV is the only reason to 'validate' server on LPAR */ | ||
615 | if (dasd_nopav || MACHINE_IS_VM) | ||
616 | return 0; | ||
617 | |||
618 | rc = dasd_eckd_psf_ssc(device); | ||
619 | if (rc) | ||
620 | /* may be requested feature is not available on server, | ||
621 | * therefore just report error and go ahead */ | ||
622 | DEV_MESSAGE(KERN_INFO, device, | ||
623 | "Perform Subsystem Function returned rc=%d", rc); | ||
624 | /* RE-Read Configuration Data */ | ||
625 | return dasd_eckd_read_conf(device); | ||
626 | } | ||
627 | |||
628 | /* | ||
544 | * Check device characteristics. | 629 | * Check device characteristics. |
545 | * If the device is accessible using ECKD discipline, the device is enabled. | 630 | * If the device is accessible using ECKD discipline, the device is enabled. |
546 | */ | 631 | */ |
@@ -554,7 +639,7 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
554 | 639 | ||
555 | private = (struct dasd_eckd_private *) device->private; | 640 | private = (struct dasd_eckd_private *) device->private; |
556 | if (private == NULL) { | 641 | if (private == NULL) { |
557 | private = kmalloc(sizeof(struct dasd_eckd_private), | 642 | private = kzalloc(sizeof(struct dasd_eckd_private), |
558 | GFP_KERNEL | GFP_DMA); | 643 | GFP_KERNEL | GFP_DMA); |
559 | if (private == NULL) { | 644 | if (private == NULL) { |
560 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 645 | DEV_MESSAGE(KERN_WARNING, device, "%s", |
@@ -562,7 +647,6 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
562 | "data"); | 647 | "data"); |
563 | return -ENOMEM; | 648 | return -ENOMEM; |
564 | } | 649 | } |
565 | memset(private, 0, sizeof(struct dasd_eckd_private)); | ||
566 | device->private = (void *) private; | 650 | device->private = (void *) private; |
567 | } | 651 | } |
568 | /* Invalidate status of initial analysis. */ | 652 | /* Invalidate status of initial analysis. */ |
@@ -571,16 +655,29 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
571 | private->attrib.operation = DASD_NORMAL_CACHE; | 655 | private->attrib.operation = DASD_NORMAL_CACHE; |
572 | private->attrib.nr_cyl = 0; | 656 | private->attrib.nr_cyl = 0; |
573 | 657 | ||
658 | /* Read Configuration Data */ | ||
659 | rc = dasd_eckd_read_conf(device); | ||
660 | if (rc) | ||
661 | return rc; | ||
662 | |||
663 | /* Generate device unique id and register in devmap */ | ||
664 | rc = dasd_eckd_generate_uid(device, &uid); | ||
665 | if (rc) | ||
666 | return rc; | ||
667 | rc = dasd_set_uid(device->cdev, &uid); | ||
668 | if (rc == 1) /* new server found */ | ||
669 | rc = dasd_eckd_validate_server(device); | ||
670 | if (rc) | ||
671 | return rc; | ||
672 | |||
574 | /* Read Device Characteristics */ | 673 | /* Read Device Characteristics */ |
575 | rdc_data = (void *) &(private->rdc_data); | 674 | rdc_data = (void *) &(private->rdc_data); |
576 | memset(rdc_data, 0, sizeof(rdc_data)); | 675 | memset(rdc_data, 0, sizeof(rdc_data)); |
577 | rc = read_dev_chars(device->cdev, &rdc_data, 64); | 676 | rc = read_dev_chars(device->cdev, &rdc_data, 64); |
578 | if (rc) { | 677 | if (rc) |
579 | DEV_MESSAGE(KERN_WARNING, device, | 678 | DEV_MESSAGE(KERN_WARNING, device, |
580 | "Read device characteristics returned error %d", | 679 | "Read device characteristics returned " |
581 | rc); | 680 | "rc=%d", rc); |
582 | return rc; | ||
583 | } | ||
584 | 681 | ||
585 | DEV_MESSAGE(KERN_INFO, device, | 682 | DEV_MESSAGE(KERN_INFO, device, |
586 | "%04X/%02X(CU:%04X/%02X) Cyl:%d Head:%d Sec:%d", | 683 | "%04X/%02X(CU:%04X/%02X) Cyl:%d Head:%d Sec:%d", |
@@ -591,19 +688,6 @@ dasd_eckd_check_characteristics(struct dasd_device *device) | |||
591 | private->rdc_data.no_cyl, | 688 | private->rdc_data.no_cyl, |
592 | private->rdc_data.trk_per_cyl, | 689 | private->rdc_data.trk_per_cyl, |
593 | private->rdc_data.sec_per_trk); | 690 | private->rdc_data.sec_per_trk); |
594 | |||
595 | /* Read Configuration Data */ | ||
596 | rc = dasd_eckd_read_conf (device); | ||
597 | if (rc) | ||
598 | return rc; | ||
599 | |||
600 | /* Generate device unique id and register in devmap */ | ||
601 | rc = dasd_eckd_generate_uid(device, &uid); | ||
602 | if (rc) | ||
603 | return rc; | ||
604 | |||
605 | rc = dasd_set_uid(device->cdev, &uid); | ||
606 | |||
607 | return rc; | 691 | return rc; |
608 | } | 692 | } |
609 | 693 | ||
@@ -773,7 +857,7 @@ dasd_eckd_end_analysis(struct dasd_device *device) | |||
773 | ((private->rdc_data.no_cyl * | 857 | ((private->rdc_data.no_cyl * |
774 | private->rdc_data.trk_per_cyl * | 858 | private->rdc_data.trk_per_cyl * |
775 | blk_per_trk * (device->bp_block >> 9)) >> 1), | 859 | blk_per_trk * (device->bp_block >> 9)) >> 1), |
776 | ((blk_per_trk * device->bp_block) >> 10), | 860 | ((blk_per_trk * device->bp_block) >> 10), |
777 | private->uses_cdl ? | 861 | private->uses_cdl ? |
778 | "compatible disk layout" : "linux disk layout"); | 862 | "compatible disk layout" : "linux disk layout"); |
779 | 863 | ||
@@ -970,7 +1054,7 @@ dasd_eckd_format_device(struct dasd_device * device, | |||
970 | if (i < 3) { | 1054 | if (i < 3) { |
971 | ect->kl = 4; | 1055 | ect->kl = 4; |
972 | ect->dl = sizes_trk0[i] - 4; | 1056 | ect->dl = sizes_trk0[i] - 4; |
973 | } | 1057 | } |
974 | } | 1058 | } |
975 | if ((fdata->intensity & 0x08) && | 1059 | if ((fdata->intensity & 0x08) && |
976 | fdata->start_unit == 1) { | 1060 | fdata->start_unit == 1) { |
@@ -1270,7 +1354,7 @@ dasd_eckd_fill_info(struct dasd_device * device, | |||
1270 | 1354 | ||
1271 | /* | 1355 | /* |
1272 | * Release device ioctl. | 1356 | * Release device ioctl. |
1273 | * Buils a channel programm to releases a prior reserved | 1357 | * Buils a channel programm to releases a prior reserved |
1274 | * (see dasd_eckd_reserve) device. | 1358 | * (see dasd_eckd_reserve) device. |
1275 | */ | 1359 | */ |
1276 | static int | 1360 | static int |
@@ -1310,8 +1394,8 @@ dasd_eckd_release(struct dasd_device *device) | |||
1310 | /* | 1394 | /* |
1311 | * Reserve device ioctl. | 1395 | * Reserve device ioctl. |
1312 | * Options are set to 'synchronous wait for interrupt' and | 1396 | * Options are set to 'synchronous wait for interrupt' and |
1313 | * 'timeout the request'. This leads to a terminate IO if | 1397 | * 'timeout the request'. This leads to a terminate IO if |
1314 | * the interrupt is outstanding for a certain time. | 1398 | * the interrupt is outstanding for a certain time. |
1315 | */ | 1399 | */ |
1316 | static int | 1400 | static int |
1317 | dasd_eckd_reserve(struct dasd_device *device) | 1401 | dasd_eckd_reserve(struct dasd_device *device) |
@@ -1349,7 +1433,7 @@ dasd_eckd_reserve(struct dasd_device *device) | |||
1349 | 1433 | ||
1350 | /* | 1434 | /* |
1351 | * Steal lock ioctl - unconditional reserve device. | 1435 | * Steal lock ioctl - unconditional reserve device. |
1352 | * Buils a channel programm to break a device's reservation. | 1436 | * Buils a channel programm to break a device's reservation. |
1353 | * (unconditional reserve) | 1437 | * (unconditional reserve) |
1354 | */ | 1438 | */ |
1355 | static int | 1439 | static int |
@@ -1522,6 +1606,40 @@ dasd_eckd_ioctl(struct dasd_device *device, unsigned int cmd, void __user *argp) | |||
1522 | } | 1606 | } |
1523 | 1607 | ||
1524 | /* | 1608 | /* |
1609 | * Dump the range of CCWs into 'page' buffer | ||
1610 | * and return number of printed chars. | ||
1611 | */ | ||
1612 | static inline int | ||
1613 | dasd_eckd_dump_ccw_range(struct ccw1 *from, struct ccw1 *to, char *page) | ||
1614 | { | ||
1615 | int len, count; | ||
1616 | char *datap; | ||
1617 | |||
1618 | len = 0; | ||
1619 | while (from <= to) { | ||
1620 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | ||
1621 | " CCW %p: %08X %08X DAT:", | ||
1622 | from, ((int *) from)[0], ((int *) from)[1]); | ||
1623 | |||
1624 | /* get pointer to data (consider IDALs) */ | ||
1625 | if (from->flags & CCW_FLAG_IDA) | ||
1626 | datap = (char *) *((addr_t *) (addr_t) from->cda); | ||
1627 | else | ||
1628 | datap = (char *) ((addr_t) from->cda); | ||
1629 | |||
1630 | /* dump data (max 32 bytes) */ | ||
1631 | for (count = 0; count < from->count && count < 32; count++) { | ||
1632 | if (count % 8 == 0) len += sprintf(page + len, " "); | ||
1633 | if (count % 4 == 0) len += sprintf(page + len, " "); | ||
1634 | len += sprintf(page + len, "%02x", datap[count]); | ||
1635 | } | ||
1636 | len += sprintf(page + len, "\n"); | ||
1637 | from++; | ||
1638 | } | ||
1639 | return len; | ||
1640 | } | ||
1641 | |||
1642 | /* | ||
1525 | * Print sense data and related channel program. | 1643 | * Print sense data and related channel program. |
1526 | * Parts are printed because printk buffer is only 1024 bytes. | 1644 | * Parts are printed because printk buffer is only 1024 bytes. |
1527 | */ | 1645 | */ |
@@ -1530,8 +1648,8 @@ dasd_eckd_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
1530 | struct irb *irb) | 1648 | struct irb *irb) |
1531 | { | 1649 | { |
1532 | char *page; | 1650 | char *page; |
1533 | struct ccw1 *act, *end, *last; | 1651 | struct ccw1 *first, *last, *fail, *from, *to; |
1534 | int len, sl, sct, count; | 1652 | int len, sl, sct; |
1535 | 1653 | ||
1536 | page = (char *) get_zeroed_page(GFP_ATOMIC); | 1654 | page = (char *) get_zeroed_page(GFP_ATOMIC); |
1537 | if (page == NULL) { | 1655 | if (page == NULL) { |
@@ -1539,7 +1657,8 @@ dasd_eckd_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
1539 | "No memory to dump sense data"); | 1657 | "No memory to dump sense data"); |
1540 | return; | 1658 | return; |
1541 | } | 1659 | } |
1542 | len = sprintf(page, KERN_ERR PRINTK_HEADER | 1660 | /* dump the sense data */ |
1661 | len = sprintf(page, KERN_ERR PRINTK_HEADER | ||
1543 | " I/O status report for device %s:\n", | 1662 | " I/O status report for device %s:\n", |
1544 | device->cdev->dev.bus_id); | 1663 | device->cdev->dev.bus_id); |
1545 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 1664 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER |
@@ -1564,87 +1683,55 @@ dasd_eckd_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
1564 | 1683 | ||
1565 | if (irb->ecw[27] & DASD_SENSE_BIT_0) { | 1684 | if (irb->ecw[27] & DASD_SENSE_BIT_0) { |
1566 | /* 24 Byte Sense Data */ | 1685 | /* 24 Byte Sense Data */ |
1567 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 1686 | sprintf(page + len, KERN_ERR PRINTK_HEADER |
1568 | " 24 Byte: %x MSG %x, " | 1687 | " 24 Byte: %x MSG %x, " |
1569 | "%s MSGb to SYSOP\n", | 1688 | "%s MSGb to SYSOP\n", |
1570 | irb->ecw[7] >> 4, irb->ecw[7] & 0x0f, | 1689 | irb->ecw[7] >> 4, irb->ecw[7] & 0x0f, |
1571 | irb->ecw[1] & 0x10 ? "" : "no"); | 1690 | irb->ecw[1] & 0x10 ? "" : "no"); |
1572 | } else { | 1691 | } else { |
1573 | /* 32 Byte Sense Data */ | 1692 | /* 32 Byte Sense Data */ |
1574 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 1693 | sprintf(page + len, KERN_ERR PRINTK_HEADER |
1575 | " 32 Byte: Format: %x " | 1694 | " 32 Byte: Format: %x " |
1576 | "Exception class %x\n", | 1695 | "Exception class %x\n", |
1577 | irb->ecw[6] & 0x0f, irb->ecw[22] >> 4); | 1696 | irb->ecw[6] & 0x0f, irb->ecw[22] >> 4); |
1578 | } | 1697 | } |
1579 | } else { | 1698 | } else { |
1580 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 1699 | sprintf(page + len, KERN_ERR PRINTK_HEADER |
1581 | " SORRY - NO VALID SENSE AVAILABLE\n"); | 1700 | " SORRY - NO VALID SENSE AVAILABLE\n"); |
1582 | } | 1701 | } |
1583 | MESSAGE_LOG(KERN_ERR, "%s", | 1702 | printk("%s", page); |
1584 | page + sizeof(KERN_ERR PRINTK_HEADER)); | 1703 | |
1585 | 1704 | /* dump the Channel Program (max 140 Bytes per line) */ | |
1586 | /* dump the Channel Program */ | 1705 | /* Count CCW and print first CCWs (maximum 1024 % 140 = 7) */ |
1587 | /* print first CCWs (maximum 8) */ | 1706 | first = req->cpaddr; |
1588 | act = req->cpaddr; | 1707 | for (last = first; last->flags & (CCW_FLAG_CC | CCW_FLAG_DC); last++); |
1589 | for (last = act; last->flags & (CCW_FLAG_CC | CCW_FLAG_DC); last++); | 1708 | to = min(first + 6, last); |
1590 | end = min(act + 8, last); | 1709 | len = sprintf(page, KERN_ERR PRINTK_HEADER |
1591 | len = sprintf(page, KERN_ERR PRINTK_HEADER | ||
1592 | " Related CP in req: %p\n", req); | 1710 | " Related CP in req: %p\n", req); |
1593 | while (act <= end) { | 1711 | dasd_eckd_dump_ccw_range(first, to, page + len); |
1594 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 1712 | printk("%s", page); |
1595 | " CCW %p: %08X %08X DAT:", | ||
1596 | act, ((int *) act)[0], ((int *) act)[1]); | ||
1597 | for (count = 0; count < 32 && count < act->count; | ||
1598 | count += sizeof(int)) | ||
1599 | len += sprintf(page + len, " %08X", | ||
1600 | ((int *) (addr_t) act->cda) | ||
1601 | [(count>>2)]); | ||
1602 | len += sprintf(page + len, "\n"); | ||
1603 | act++; | ||
1604 | } | ||
1605 | MESSAGE_LOG(KERN_ERR, "%s", | ||
1606 | page + sizeof(KERN_ERR PRINTK_HEADER)); | ||
1607 | 1713 | ||
1608 | /* print failing CCW area */ | 1714 | /* print failing CCW area (maximum 4) */ |
1715 | /* scsw->cda is either valid or zero */ | ||
1609 | len = 0; | 1716 | len = 0; |
1610 | if (act < ((struct ccw1 *)(addr_t) irb->scsw.cpa) - 2) { | 1717 | from = ++to; |
1611 | act = ((struct ccw1 *)(addr_t) irb->scsw.cpa) - 2; | 1718 | fail = (struct ccw1 *)(addr_t) irb->scsw.cpa; /* failing CCW */ |
1612 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n"); | 1719 | if (from < fail - 2) { |
1613 | } | 1720 | from = fail - 2; /* there is a gap - print header */ |
1614 | end = min((struct ccw1 *)(addr_t) irb->scsw.cpa + 2, last); | 1721 | len += sprintf(page, KERN_ERR PRINTK_HEADER "......\n"); |
1615 | while (act <= end) { | ||
1616 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | ||
1617 | " CCW %p: %08X %08X DAT:", | ||
1618 | act, ((int *) act)[0], ((int *) act)[1]); | ||
1619 | for (count = 0; count < 32 && count < act->count; | ||
1620 | count += sizeof(int)) | ||
1621 | len += sprintf(page + len, " %08X", | ||
1622 | ((int *) (addr_t) act->cda) | ||
1623 | [(count>>2)]); | ||
1624 | len += sprintf(page + len, "\n"); | ||
1625 | act++; | ||
1626 | } | 1722 | } |
1723 | to = min(fail + 1, last); | ||
1724 | len += dasd_eckd_dump_ccw_range(from, to, page + len); | ||
1627 | 1725 | ||
1628 | /* print last CCWs */ | 1726 | /* print last CCWs (maximum 2) */ |
1629 | if (act < last - 2) { | 1727 | from = max(from, ++to); |
1630 | act = last - 2; | 1728 | if (from < last - 1) { |
1729 | from = last - 1; /* there is a gap - print header */ | ||
1631 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n"); | 1730 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n"); |
1632 | } | 1731 | } |
1633 | while (act <= last) { | 1732 | len += dasd_eckd_dump_ccw_range(from, last, page + len); |
1634 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | ||
1635 | " CCW %p: %08X %08X DAT:", | ||
1636 | act, ((int *) act)[0], ((int *) act)[1]); | ||
1637 | for (count = 0; count < 32 && count < act->count; | ||
1638 | count += sizeof(int)) | ||
1639 | len += sprintf(page + len, " %08X", | ||
1640 | ((int *) (addr_t) act->cda) | ||
1641 | [(count>>2)]); | ||
1642 | len += sprintf(page + len, "\n"); | ||
1643 | act++; | ||
1644 | } | ||
1645 | if (len > 0) | 1733 | if (len > 0) |
1646 | MESSAGE_LOG(KERN_ERR, "%s", | 1734 | printk("%s", page); |
1647 | page + sizeof(KERN_ERR PRINTK_HEADER)); | ||
1648 | free_page((unsigned long) page); | 1735 | free_page((unsigned long) page); |
1649 | } | 1736 | } |
1650 | 1737 | ||
@@ -1685,14 +1772,8 @@ static struct dasd_discipline dasd_eckd_discipline = { | |||
1685 | static int __init | 1772 | static int __init |
1686 | dasd_eckd_init(void) | 1773 | dasd_eckd_init(void) |
1687 | { | 1774 | { |
1688 | int ret; | ||
1689 | |||
1690 | ASCEBC(dasd_eckd_discipline.ebcname, 4); | 1775 | ASCEBC(dasd_eckd_discipline.ebcname, 4); |
1691 | 1776 | return ccw_driver_register(&dasd_eckd_driver); | |
1692 | ret = ccw_driver_register(&dasd_eckd_driver); | ||
1693 | if (!ret) | ||
1694 | dasd_generic_auto_online(&dasd_eckd_driver); | ||
1695 | return ret; | ||
1696 | } | 1777 | } |
1697 | 1778 | ||
1698 | static void __exit | 1779 | static void __exit |
@@ -1703,22 +1784,3 @@ dasd_eckd_cleanup(void) | |||
1703 | 1784 | ||
1704 | module_init(dasd_eckd_init); | 1785 | module_init(dasd_eckd_init); |
1705 | module_exit(dasd_eckd_cleanup); | 1786 | module_exit(dasd_eckd_cleanup); |
1706 | |||
1707 | /* | ||
1708 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
1709 | * Emacs will notice this stuff at the end of the file and automatically | ||
1710 | * adjust the settings for this buffer only. This must remain at the end | ||
1711 | * of the file. | ||
1712 | * --------------------------------------------------------------------------- | ||
1713 | * Local variables: | ||
1714 | * c-indent-level: 4 | ||
1715 | * c-brace-imaginary-offset: 0 | ||
1716 | * c-brace-offset: -4 | ||
1717 | * c-argdecl-indent: 4 | ||
1718 | * c-label-offset: -4 | ||
1719 | * c-continued-statement-offset: 4 | ||
1720 | * c-continued-brace-offset: 0 | ||
1721 | * indent-tabs-mode: 1 | ||
1722 | * tab-width: 8 | ||
1723 | * End: | ||
1724 | */ | ||
diff --git a/drivers/s390/block/dasd_eckd.h b/drivers/s390/block/dasd_eckd.h index d5734e976e1c..712ff1650134 100644 --- a/drivers/s390/block/dasd_eckd.h +++ b/drivers/s390/block/dasd_eckd.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_eckd.h | 2 | * File...........: linux/drivers/s390/block/dasd_eckd.h |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Horst Hummel <Horst.Hummel@de.ibm.com> | 4 | * Horst Hummel <Horst.Hummel@de.ibm.com> |
5 | * Bugreports.to..: <Linux390@de.ibm.com> | 5 | * Bugreports.to..: <Linux390@de.ibm.com> |
6 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 | 6 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 |
7 | * | 7 | * |
@@ -41,9 +41,10 @@ | |||
41 | #define DASD_ECKD_CCW_RESERVE 0xB4 | 41 | #define DASD_ECKD_CCW_RESERVE 0xB4 |
42 | 42 | ||
43 | /* | 43 | /* |
44 | *Perform Subsystem Function / Sub-Orders | 44 | * Perform Subsystem Function / Sub-Orders |
45 | */ | 45 | */ |
46 | #define PSF_ORDER_PRSSD 0x18 | 46 | #define PSF_ORDER_PRSSD 0x18 |
47 | #define PSF_ORDER_SSC 0x1D | ||
47 | 48 | ||
48 | /***************************************************************************** | 49 | /***************************************************************************** |
49 | * SECTION: Type Definitions | 50 | * SECTION: Type Definitions |
@@ -155,7 +156,7 @@ struct dasd_eckd_characteristics { | |||
155 | unsigned char reserved2:4; | 156 | unsigned char reserved2:4; |
156 | unsigned char reserved3:8; | 157 | unsigned char reserved3:8; |
157 | unsigned char defect_wr:1; | 158 | unsigned char defect_wr:1; |
158 | unsigned char XRC_supported:1; | 159 | unsigned char XRC_supported:1; |
159 | unsigned char reserved4:1; | 160 | unsigned char reserved4:1; |
160 | unsigned char striping:1; | 161 | unsigned char striping:1; |
161 | unsigned char reserved5:4; | 162 | unsigned char reserved5:4; |
@@ -343,7 +344,7 @@ struct dasd_eckd_path { | |||
343 | }; | 344 | }; |
344 | 345 | ||
345 | /* | 346 | /* |
346 | * Perform Subsystem Function - Prepare for Read Subsystem Data | 347 | * Perform Subsystem Function - Prepare for Read Subsystem Data |
347 | */ | 348 | */ |
348 | struct dasd_psf_prssd_data { | 349 | struct dasd_psf_prssd_data { |
349 | unsigned char order; | 350 | unsigned char order; |
@@ -353,4 +354,15 @@ struct dasd_psf_prssd_data { | |||
353 | unsigned char varies[9]; | 354 | unsigned char varies[9]; |
354 | } __attribute__ ((packed)); | 355 | } __attribute__ ((packed)); |
355 | 356 | ||
357 | /* | ||
358 | * Perform Subsystem Function - Set Subsystem Characteristics | ||
359 | */ | ||
360 | struct dasd_psf_ssc_data { | ||
361 | unsigned char order; | ||
362 | unsigned char flags; | ||
363 | unsigned char cu_type[4]; | ||
364 | unsigned char suborder; | ||
365 | unsigned char reserved[59]; | ||
366 | } __attribute__((packed)); | ||
367 | |||
356 | #endif /* DASD_ECKD_H */ | 368 | #endif /* DASD_ECKD_H */ |
diff --git a/drivers/s390/block/dasd_eer.c b/drivers/s390/block/dasd_eer.c index 2d8af709947f..da65f1b032f5 100644 --- a/drivers/s390/block/dasd_eer.c +++ b/drivers/s390/block/dasd_eer.c | |||
@@ -276,7 +276,7 @@ struct dasd_eer_header { | |||
276 | __u64 tv_sec; | 276 | __u64 tv_sec; |
277 | __u64 tv_usec; | 277 | __u64 tv_usec; |
278 | char busid[DASD_EER_BUSID_SIZE]; | 278 | char busid[DASD_EER_BUSID_SIZE]; |
279 | }; | 279 | } __attribute__ ((packed)); |
280 | 280 | ||
281 | /* | 281 | /* |
282 | * The following function can be used for those triggers that have | 282 | * The following function can be used for those triggers that have |
@@ -521,6 +521,8 @@ static int dasd_eer_open(struct inode *inp, struct file *filp) | |||
521 | unsigned long flags; | 521 | unsigned long flags; |
522 | 522 | ||
523 | eerb = kzalloc(sizeof(struct eerbuffer), GFP_KERNEL); | 523 | eerb = kzalloc(sizeof(struct eerbuffer), GFP_KERNEL); |
524 | if (!eerb) | ||
525 | return -ENOMEM; | ||
524 | eerb->buffer_page_count = eer_pages; | 526 | eerb->buffer_page_count = eer_pages; |
525 | if (eerb->buffer_page_count < 1 || | 527 | if (eerb->buffer_page_count < 1 || |
526 | eerb->buffer_page_count > INT_MAX / PAGE_SIZE) { | 528 | eerb->buffer_page_count > INT_MAX / PAGE_SIZE) { |
diff --git a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c index b842377cb0c6..58a65097922b 100644 --- a/drivers/s390/block/dasd_erp.c +++ b/drivers/s390/block/dasd_erp.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/ctype.h> | 12 | #include <linux/ctype.h> |
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | 14 | ||
@@ -90,7 +89,7 @@ dasd_default_erp_action(struct dasd_ccw_req * cqr) | |||
90 | 89 | ||
91 | /* just retry - there is nothing to save ... I got no sense data.... */ | 90 | /* just retry - there is nothing to save ... I got no sense data.... */ |
92 | if (cqr->retries > 0) { | 91 | if (cqr->retries > 0) { |
93 | DEV_MESSAGE (KERN_DEBUG, device, | 92 | DEV_MESSAGE (KERN_DEBUG, device, |
94 | "default ERP called (%i retries left)", | 93 | "default ERP called (%i retries left)", |
95 | cqr->retries); | 94 | cqr->retries); |
96 | cqr->lpm = LPM_ANYPATH; | 95 | cqr->lpm = LPM_ANYPATH; |
@@ -155,7 +154,7 @@ dasd_default_erp_postaction(struct dasd_ccw_req * cqr) | |||
155 | 154 | ||
156 | /* | 155 | /* |
157 | * Print the hex dump of the memory used by a request. This includes | 156 | * Print the hex dump of the memory used by a request. This includes |
158 | * all error recovery ccws that have been chained in from of the | 157 | * all error recovery ccws that have been chained in from of the |
159 | * real request. | 158 | * real request. |
160 | */ | 159 | */ |
161 | static inline void | 160 | static inline void |
@@ -227,12 +226,12 @@ dasd_log_ccw(struct dasd_ccw_req * cqr, int caller, __u32 cpa) | |||
227 | /* | 226 | /* |
228 | * Log bytes arround failed CCW but only if we did | 227 | * Log bytes arround failed CCW but only if we did |
229 | * not log the whole CP of the CCW is outside the | 228 | * not log the whole CP of the CCW is outside the |
230 | * logged CP. | 229 | * logged CP. |
231 | */ | 230 | */ |
232 | if (cplength > 40 || | 231 | if (cplength > 40 || |
233 | ((addr_t) cpa < (addr_t) lcqr->cpaddr && | 232 | ((addr_t) cpa < (addr_t) lcqr->cpaddr && |
234 | (addr_t) cpa > (addr_t) (lcqr->cpaddr + cplength + 4))) { | 233 | (addr_t) cpa > (addr_t) (lcqr->cpaddr + cplength + 4))) { |
235 | 234 | ||
236 | DEV_MESSAGE(KERN_ERR, device, | 235 | DEV_MESSAGE(KERN_ERR, device, |
237 | "Failed CCW (%p) (area):", | 236 | "Failed CCW (%p) (area):", |
238 | (void *) (long) cpa); | 237 | (void *) (long) cpa); |
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c index 91145698f8e9..808434d38526 100644 --- a/drivers/s390/block/dasd_fba.c +++ b/drivers/s390/block/dasd_fba.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_fba.c | 2 | * File...........: linux/drivers/s390/block/dasd_fba.c |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Bugreports.to..: <Linux390@de.ibm.com> | 4 | * Bugreports.to..: <Linux390@de.ibm.com> |
@@ -6,7 +6,6 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
11 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
12 | #include <asm/debug.h> | 11 | #include <asm/debug.h> |
@@ -56,19 +55,13 @@ static struct ccw_driver dasd_fba_driver; /* see below */ | |||
56 | static int | 55 | static int |
57 | dasd_fba_probe(struct ccw_device *cdev) | 56 | dasd_fba_probe(struct ccw_device *cdev) |
58 | { | 57 | { |
59 | int ret; | 58 | return dasd_generic_probe(cdev, &dasd_fba_discipline); |
60 | |||
61 | ret = dasd_generic_probe (cdev, &dasd_fba_discipline); | ||
62 | if (ret) | ||
63 | return ret; | ||
64 | ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); | ||
65 | return 0; | ||
66 | } | 59 | } |
67 | 60 | ||
68 | static int | 61 | static int |
69 | dasd_fba_set_online(struct ccw_device *cdev) | 62 | dasd_fba_set_online(struct ccw_device *cdev) |
70 | { | 63 | { |
71 | return dasd_generic_set_online (cdev, &dasd_fba_discipline); | 64 | return dasd_generic_set_online(cdev, &dasd_fba_discipline); |
72 | } | 65 | } |
73 | 66 | ||
74 | static struct ccw_driver dasd_fba_driver = { | 67 | static struct ccw_driver dasd_fba_driver = { |
@@ -125,13 +118,13 @@ static int | |||
125 | dasd_fba_check_characteristics(struct dasd_device *device) | 118 | dasd_fba_check_characteristics(struct dasd_device *device) |
126 | { | 119 | { |
127 | struct dasd_fba_private *private; | 120 | struct dasd_fba_private *private; |
128 | struct ccw_device *cdev = device->cdev; | 121 | struct ccw_device *cdev = device->cdev; |
129 | void *rdc_data; | 122 | void *rdc_data; |
130 | int rc; | 123 | int rc; |
131 | 124 | ||
132 | private = (struct dasd_fba_private *) device->private; | 125 | private = (struct dasd_fba_private *) device->private; |
133 | if (private == NULL) { | 126 | if (private == NULL) { |
134 | private = kmalloc(sizeof(struct dasd_fba_private), GFP_KERNEL); | 127 | private = kzalloc(sizeof(struct dasd_fba_private), GFP_KERNEL); |
135 | if (private == NULL) { | 128 | if (private == NULL) { |
136 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 129 | DEV_MESSAGE(KERN_WARNING, device, "%s", |
137 | "memory allocation failed for private " | 130 | "memory allocation failed for private " |
@@ -204,7 +197,7 @@ dasd_fba_examine_error(struct dasd_ccw_req * cqr, struct irb * irb) | |||
204 | if (irb->scsw.cstat == 0x00 && | 197 | if (irb->scsw.cstat == 0x00 && |
205 | irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) | 198 | irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END)) |
206 | return dasd_era_none; | 199 | return dasd_era_none; |
207 | 200 | ||
208 | cdev = device->cdev; | 201 | cdev = device->cdev; |
209 | switch (cdev->id.dev_type) { | 202 | switch (cdev->id.dev_type) { |
210 | case 0x3370: | 203 | case 0x3370: |
@@ -539,7 +532,7 @@ dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
539 | * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has | 532 | * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has |
540 | * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use | 533 | * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use |
541 | * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In | 534 | * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In |
542 | * addition we have one define extent ccw + 16 bytes of data and a | 535 | * addition we have one define extent ccw + 16 bytes of data and a |
543 | * locate record ccw for each block (stupid devices!) + 16 bytes of data. | 536 | * locate record ccw for each block (stupid devices!) + 16 bytes of data. |
544 | * That makes: | 537 | * That makes: |
545 | * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum. | 538 | * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum. |
@@ -569,16 +562,8 @@ static struct dasd_discipline dasd_fba_discipline = { | |||
569 | static int __init | 562 | static int __init |
570 | dasd_fba_init(void) | 563 | dasd_fba_init(void) |
571 | { | 564 | { |
572 | int ret; | ||
573 | |||
574 | ASCEBC(dasd_fba_discipline.ebcname, 4); | 565 | ASCEBC(dasd_fba_discipline.ebcname, 4); |
575 | 566 | return ccw_driver_register(&dasd_fba_driver); | |
576 | ret = ccw_driver_register(&dasd_fba_driver); | ||
577 | if (ret) | ||
578 | return ret; | ||
579 | |||
580 | dasd_generic_auto_online(&dasd_fba_driver); | ||
581 | return 0; | ||
582 | } | 567 | } |
583 | 568 | ||
584 | static void __exit | 569 | static void __exit |
@@ -589,22 +574,3 @@ dasd_fba_cleanup(void) | |||
589 | 574 | ||
590 | module_init(dasd_fba_init); | 575 | module_init(dasd_fba_init); |
591 | module_exit(dasd_fba_cleanup); | 576 | module_exit(dasd_fba_cleanup); |
592 | |||
593 | /* | ||
594 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
595 | * Emacs will notice this stuff at the end of the file and automatically | ||
596 | * adjust the settings for this buffer only. This must remain at the end | ||
597 | * of the file. | ||
598 | * --------------------------------------------------------------------------- | ||
599 | * Local variables: | ||
600 | * c-indent-level: 4 | ||
601 | * c-brace-imaginary-offset: 0 | ||
602 | * c-brace-offset: -4 | ||
603 | * c-argdecl-indent: 4 | ||
604 | * c-label-offset: -4 | ||
605 | * c-continued-statement-offset: 4 | ||
606 | * c-continued-brace-offset: 0 | ||
607 | * indent-tabs-mode: 1 | ||
608 | * tab-width: 8 | ||
609 | * End: | ||
610 | */ | ||
diff --git a/drivers/s390/block/dasd_fba.h b/drivers/s390/block/dasd_fba.h index da1fa91fc01d..14c910baa5fe 100644 --- a/drivers/s390/block/dasd_fba.h +++ b/drivers/s390/block/dasd_fba.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_fba.h | 2 | * File...........: linux/drivers/s390/block/dasd_fba.h |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Bugreports.to..: <Linux390@de.ibm.com> | 4 | * Bugreports.to..: <Linux390@de.ibm.com> |
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index fce2835e7d19..12c7d296eaa8 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
16 | #include <linux/fs.h> | 15 | #include <linux/fs.h> |
17 | #include <linux/blkpg.h> | 16 | #include <linux/blkpg.h> |
@@ -68,8 +67,6 @@ dasd_gendisk_alloc(struct dasd_device *device) | |||
68 | } | 67 | } |
69 | len += sprintf(gdp->disk_name + len, "%c", 'a'+(device->devindex%26)); | 68 | len += sprintf(gdp->disk_name + len, "%c", 'a'+(device->devindex%26)); |
70 | 69 | ||
71 | sprintf(gdp->devfs_name, "dasd/%s", device->cdev->dev.bus_id); | ||
72 | |||
73 | if (device->features & DASD_FEATURE_READONLY) | 70 | if (device->features & DASD_FEATURE_READONLY) |
74 | set_disk_ro(gdp, 1); | 71 | set_disk_ro(gdp, 1); |
75 | gdp->private_data = device; | 72 | gdp->private_data = device; |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index d4b13e300a76..3ccf06d28ba1 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * File...........: linux/drivers/s390/block/dasd_int.h | 2 | * File...........: linux/drivers/s390/block/dasd_int.h |
3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> | 3 | * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com> |
4 | * Horst Hummel <Horst.Hummel@de.ibm.com> | 4 | * Horst Hummel <Horst.Hummel@de.ibm.com> |
5 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 5 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
6 | * Bugreports.to..: <Linux390@de.ibm.com> | 6 | * Bugreports.to..: <Linux390@de.ibm.com> |
7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 | 7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 |
@@ -54,7 +54,6 @@ | |||
54 | #include <linux/module.h> | 54 | #include <linux/module.h> |
55 | #include <linux/wait.h> | 55 | #include <linux/wait.h> |
56 | #include <linux/blkdev.h> | 56 | #include <linux/blkdev.h> |
57 | #include <linux/devfs_fs_kernel.h> | ||
58 | #include <linux/genhd.h> | 57 | #include <linux/genhd.h> |
59 | #include <linux/hdreg.h> | 58 | #include <linux/hdreg.h> |
60 | #include <linux/interrupt.h> | 59 | #include <linux/interrupt.h> |
@@ -186,7 +185,7 @@ struct dasd_ccw_req { | |||
186 | void *callback_data; | 185 | void *callback_data; |
187 | }; | 186 | }; |
188 | 187 | ||
189 | /* | 188 | /* |
190 | * dasd_ccw_req -> status can be: | 189 | * dasd_ccw_req -> status can be: |
191 | */ | 190 | */ |
192 | #define DASD_CQR_FILLED 0x00 /* request is ready to be processed */ | 191 | #define DASD_CQR_FILLED 0x00 /* request is ready to be processed */ |
@@ -248,7 +247,7 @@ struct dasd_discipline { | |||
248 | /* | 247 | /* |
249 | * Error recovery functions. examine_error() returns a value that | 248 | * Error recovery functions. examine_error() returns a value that |
250 | * indicates what to do for an error condition. If examine_error() | 249 | * indicates what to do for an error condition. If examine_error() |
251 | * returns 'dasd_era_recover' erp_action() is called to create a | 250 | * returns 'dasd_era_recover' erp_action() is called to create a |
252 | * special error recovery ccw. erp_postaction() is called after | 251 | * special error recovery ccw. erp_postaction() is called after |
253 | * an error recovery ccw has finished its execution. dump_sense | 252 | * an error recovery ccw has finished its execution. dump_sense |
254 | * is called for every error condition to print the sense data | 253 | * is called for every error condition to print the sense data |
@@ -302,11 +301,11 @@ struct dasd_device { | |||
302 | spinlock_t request_queue_lock; | 301 | spinlock_t request_queue_lock; |
303 | struct block_device *bdev; | 302 | struct block_device *bdev; |
304 | unsigned int devindex; | 303 | unsigned int devindex; |
305 | unsigned long blocks; /* size of volume in blocks */ | 304 | unsigned long blocks; /* size of volume in blocks */ |
306 | unsigned int bp_block; /* bytes per block */ | 305 | unsigned int bp_block; /* bytes per block */ |
307 | unsigned int s2b_shift; /* log2 (bp_block/512) */ | 306 | unsigned int s2b_shift; /* log2 (bp_block/512) */ |
308 | unsigned long flags; /* per device flags */ | 307 | unsigned long flags; /* per device flags */ |
309 | unsigned short features; /* copy of devmap-features (read-only!) */ | 308 | unsigned short features; /* copy of devmap-features (read-only!) */ |
310 | 309 | ||
311 | /* extended error reporting stuff (eer) */ | 310 | /* extended error reporting stuff (eer) */ |
312 | struct dasd_ccw_req *eer_cqr; | 311 | struct dasd_ccw_req *eer_cqr; |
@@ -513,12 +512,12 @@ void dasd_generic_remove (struct ccw_device *cdev); | |||
513 | int dasd_generic_set_online(struct ccw_device *, struct dasd_discipline *); | 512 | int dasd_generic_set_online(struct ccw_device *, struct dasd_discipline *); |
514 | int dasd_generic_set_offline (struct ccw_device *cdev); | 513 | int dasd_generic_set_offline (struct ccw_device *cdev); |
515 | int dasd_generic_notify(struct ccw_device *, int); | 514 | int dasd_generic_notify(struct ccw_device *, int); |
516 | void dasd_generic_auto_online (struct ccw_driver *); | ||
517 | 515 | ||
518 | /* externals in dasd_devmap.c */ | 516 | /* externals in dasd_devmap.c */ |
519 | extern int dasd_max_devindex; | 517 | extern int dasd_max_devindex; |
520 | extern int dasd_probeonly; | 518 | extern int dasd_probeonly; |
521 | extern int dasd_autodetect; | 519 | extern int dasd_autodetect; |
520 | extern int dasd_nopav; | ||
522 | 521 | ||
523 | int dasd_devmap_init(void); | 522 | int dasd_devmap_init(void); |
524 | void dasd_devmap_exit(void); | 523 | void dasd_devmap_exit(void); |
@@ -606,22 +605,3 @@ static inline int dasd_eer_enabled(struct dasd_device *device) | |||
606 | #endif /* __KERNEL__ */ | 605 | #endif /* __KERNEL__ */ |
607 | 606 | ||
608 | #endif /* DASD_H */ | 607 | #endif /* DASD_H */ |
609 | |||
610 | /* | ||
611 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
612 | * Emacs will notice this stuff at the end of the file and automatically | ||
613 | * adjust the settings for this buffer only. This must remain at the end | ||
614 | * of the file. | ||
615 | * --------------------------------------------------------------------------- | ||
616 | * Local variables: | ||
617 | * c-indent-level: 4 | ||
618 | * c-brace-imaginary-offset: 0 | ||
619 | * c-brace-offset: -4 | ||
620 | * c-argdecl-indent: 4 | ||
621 | * c-label-offset: -4 | ||
622 | * c-continued-statement-offset: 4 | ||
623 | * c-continued-brace-offset: 0 | ||
624 | * indent-tabs-mode: 1 | ||
625 | * tab-width: 8 | ||
626 | * End: | ||
627 | */ | ||
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index b8c80d28df41..e97f5316ad2d 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | * i/o controls for the dasd driver. | 10 | * i/o controls for the dasd driver. |
11 | */ | 11 | */ |
12 | #include <linux/config.h> | ||
13 | #include <linux/interrupt.h> | 12 | #include <linux/interrupt.h> |
14 | #include <linux/major.h> | 13 | #include <linux/major.h> |
15 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
@@ -90,10 +89,10 @@ static int | |||
90 | dasd_ioctl_quiesce(struct dasd_device *device) | 89 | dasd_ioctl_quiesce(struct dasd_device *device) |
91 | { | 90 | { |
92 | unsigned long flags; | 91 | unsigned long flags; |
93 | 92 | ||
94 | if (!capable (CAP_SYS_ADMIN)) | 93 | if (!capable (CAP_SYS_ADMIN)) |
95 | return -EACCES; | 94 | return -EACCES; |
96 | 95 | ||
97 | DEV_MESSAGE (KERN_DEBUG, device, "%s", | 96 | DEV_MESSAGE (KERN_DEBUG, device, "%s", |
98 | "Quiesce IO on device"); | 97 | "Quiesce IO on device"); |
99 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); | 98 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); |
@@ -110,13 +109,13 @@ static int | |||
110 | dasd_ioctl_resume(struct dasd_device *device) | 109 | dasd_ioctl_resume(struct dasd_device *device) |
111 | { | 110 | { |
112 | unsigned long flags; | 111 | unsigned long flags; |
113 | 112 | ||
114 | if (!capable (CAP_SYS_ADMIN)) | 113 | if (!capable (CAP_SYS_ADMIN)) |
115 | return -EACCES; | 114 | return -EACCES; |
116 | 115 | ||
117 | DEV_MESSAGE (KERN_DEBUG, device, "%s", | 116 | DEV_MESSAGE (KERN_DEBUG, device, "%s", |
118 | "resume IO on device"); | 117 | "resume IO on device"); |
119 | 118 | ||
120 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); | 119 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); |
121 | device->stopped &= ~DASD_STOPPED_QUIESCE; | 120 | device->stopped &= ~DASD_STOPPED_QUIESCE; |
122 | spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); | 121 | spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); |
@@ -287,7 +286,7 @@ dasd_ioctl_information(struct dasd_device *device, | |||
287 | dasd_info->open_count = atomic_read(&device->open_count); | 286 | dasd_info->open_count = atomic_read(&device->open_count); |
288 | if (!device->bdev) | 287 | if (!device->bdev) |
289 | dasd_info->open_count++; | 288 | dasd_info->open_count++; |
290 | 289 | ||
291 | /* | 290 | /* |
292 | * check if device is really formatted | 291 | * check if device is really formatted |
293 | * LDL / CDL was returned by 'fill_info' | 292 | * LDL / CDL was returned by 'fill_info' |
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index ad23aede356c..bfa010f6dab2 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -11,7 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/ctype.h> | 14 | #include <linux/ctype.h> |
16 | #include <linux/seq_file.h> | 15 | #include <linux/seq_file.h> |
17 | #include <linux/vmalloc.h> | 16 | #include <linux/vmalloc.h> |
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index 54ecd548c318..4c1e56b9b98d 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/hdreg.h> /* HDIO_GETGEO */ | 36 | #include <linux/hdreg.h> /* HDIO_GETGEO */ |
37 | #include <linux/sysdev.h> | 37 | #include <linux/sysdev.h> |
38 | #include <linux/bio.h> | 38 | #include <linux/bio.h> |
39 | #include <linux/devfs_fs_kernel.h> | ||
40 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> |
41 | 40 | ||
42 | #define XPRAM_NAME "xpram" | 41 | #define XPRAM_NAME "xpram" |
@@ -439,8 +438,6 @@ static int __init xpram_setup_blkdev(void) | |||
439 | if (rc < 0) | 438 | if (rc < 0) |
440 | goto out; | 439 | goto out; |
441 | 440 | ||
442 | devfs_mk_dir("slram"); | ||
443 | |||
444 | /* | 441 | /* |
445 | * Assign the other needed values: make request function, sizes and | 442 | * Assign the other needed values: make request function, sizes and |
446 | * hardsect size. All the minor devices feature the same value. | 443 | * hardsect size. All the minor devices feature the same value. |
@@ -469,14 +466,12 @@ static int __init xpram_setup_blkdev(void) | |||
469 | disk->private_data = &xpram_devices[i]; | 466 | disk->private_data = &xpram_devices[i]; |
470 | disk->queue = xpram_queue; | 467 | disk->queue = xpram_queue; |
471 | sprintf(disk->disk_name, "slram%d", i); | 468 | sprintf(disk->disk_name, "slram%d", i); |
472 | sprintf(disk->devfs_name, "slram/%d", i); | ||
473 | set_capacity(disk, xpram_sizes[i] << 1); | 469 | set_capacity(disk, xpram_sizes[i] << 1); |
474 | add_disk(disk); | 470 | add_disk(disk); |
475 | } | 471 | } |
476 | 472 | ||
477 | return 0; | 473 | return 0; |
478 | out_unreg: | 474 | out_unreg: |
479 | devfs_remove("slram"); | ||
480 | unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); | 475 | unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); |
481 | out: | 476 | out: |
482 | while (i--) | 477 | while (i--) |
@@ -495,7 +490,6 @@ static void __exit xpram_exit(void) | |||
495 | put_disk(xpram_disks[i]); | 490 | put_disk(xpram_disks[i]); |
496 | } | 491 | } |
497 | unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); | 492 | unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); |
498 | devfs_remove("slram"); | ||
499 | blk_cleanup_queue(xpram_queue); | 493 | blk_cleanup_queue(xpram_queue); |
500 | sysdev_unregister(&xpram_sys_device); | 494 | sysdev_unregister(&xpram_sys_device); |
501 | sysdev_class_unregister(&xpram_sysclass); | 495 | sysdev_class_unregister(&xpram_sysclass); |