diff options
author | Horst Hummel <horst.hummel@de.ibm.com> | 2006-06-29 09:08:18 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-06-29 09:08:18 -0400 |
commit | 405455734e1cdec09c37233216f9240cb1a058e5 (patch) | |
tree | 36e88909f646b635117041b19a851031fc8ffb41 /drivers/s390/block/dasd.c | |
parent | 8f27766a883149926e7c1f69d9f1d8f68efcd65f (diff) |
[S390] add PAV support to the dasd driver.
Add support for parallel-access-volumes to the dasd driver. This
allows concurrent access to dasd devices with multiple channel
programs.
Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r-- | drivers/s390/block/dasd.c | 51 |
1 files changed, 23 insertions, 28 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 7e9978ad1445..bafcd2f20ae2 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1855,15 +1855,34 @@ dasd_generic_probe (struct ccw_device *cdev, | |||
1855 | { | 1855 | { |
1856 | int ret; | 1856 | int ret; |
1857 | 1857 | ||
1858 | ret = ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP); | ||
1859 | if (ret) { | ||
1860 | printk(KERN_WARNING | ||
1861 | "dasd_generic_probe: could not set ccw-device options " | ||
1862 | "for %s\n", cdev->dev.bus_id); | ||
1863 | return ret; | ||
1864 | } | ||
1858 | ret = dasd_add_sysfs_files(cdev); | 1865 | ret = dasd_add_sysfs_files(cdev); |
1859 | if (ret) { | 1866 | if (ret) { |
1860 | printk(KERN_WARNING | 1867 | printk(KERN_WARNING |
1861 | "dasd_generic_probe: could not add sysfs entries " | 1868 | "dasd_generic_probe: could not add sysfs entries " |
1862 | "for %s\n", cdev->dev.bus_id); | 1869 | "for %s\n", cdev->dev.bus_id); |
1863 | } else { | 1870 | return ret; |
1864 | cdev->handler = &dasd_int_handler; | ||
1865 | } | 1871 | } |
1872 | cdev->handler = &dasd_int_handler; | ||
1866 | 1873 | ||
1874 | /* | ||
1875 | * Automatically online either all dasd devices (dasd_autodetect) | ||
1876 | * or all devices specified with dasd= parameters during | ||
1877 | * initial probe. | ||
1878 | */ | ||
1879 | if ((dasd_get_feature(cdev, DASD_FEATURE_INITIAL_ONLINE) > 0 ) || | ||
1880 | (dasd_autodetect && dasd_busid_known(cdev->dev.bus_id) != 0)) | ||
1881 | ret = ccw_device_set_online(cdev); | ||
1882 | if (ret) | ||
1883 | printk(KERN_WARNING | ||
1884 | "dasd_generic_probe: could not initially online " | ||
1885 | "ccw-device %s\n", cdev->dev.bus_id); | ||
1867 | return ret; | 1886 | return ret; |
1868 | } | 1887 | } |
1869 | 1888 | ||
@@ -1911,6 +1930,8 @@ dasd_generic_set_online (struct ccw_device *cdev, | |||
1911 | struct dasd_device *device; | 1930 | struct dasd_device *device; |
1912 | int rc; | 1931 | int rc; |
1913 | 1932 | ||
1933 | /* first online clears initial online feature flag */ | ||
1934 | dasd_set_feature(cdev, DASD_FEATURE_INITIAL_ONLINE, 0); | ||
1914 | device = dasd_create_device(cdev); | 1935 | device = dasd_create_device(cdev); |
1915 | if (IS_ERR(device)) | 1936 | if (IS_ERR(device)) |
1916 | return PTR_ERR(device); | 1937 | return PTR_ERR(device); |
@@ -2065,31 +2086,6 @@ dasd_generic_notify(struct ccw_device *cdev, int event) | |||
2065 | return ret; | 2086 | return ret; |
2066 | } | 2087 | } |
2067 | 2088 | ||
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 | 2089 | ||
2094 | static int __init | 2090 | static int __init |
2095 | dasd_init(void) | 2091 | dasd_init(void) |
@@ -2170,5 +2166,4 @@ EXPORT_SYMBOL_GPL(dasd_generic_remove); | |||
2170 | EXPORT_SYMBOL_GPL(dasd_generic_notify); | 2166 | EXPORT_SYMBOL_GPL(dasd_generic_notify); |
2171 | EXPORT_SYMBOL_GPL(dasd_generic_set_online); | 2167 | EXPORT_SYMBOL_GPL(dasd_generic_set_online); |
2172 | EXPORT_SYMBOL_GPL(dasd_generic_set_offline); | 2168 | EXPORT_SYMBOL_GPL(dasd_generic_set_offline); |
2173 | EXPORT_SYMBOL_GPL(dasd_generic_auto_online); | ||
2174 | 2169 | ||