Commit 9b2a15ef authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: block device drivers.

s390 block device driver fixes:
 - dasd: Don't continue on error in dasd_increase_state. Use hex_ascii view
         for the dasd debug area. Fix typo.
 - xpram: Fix setup of devfs_name.
parent 92d5d7b5
......@@ -7,7 +7,7 @@
* Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
*
* $Revision: 1.94 $
* $Revision: 1.99 $
*/
#include <linux/config.h>
......@@ -297,19 +297,23 @@ dasd_increase_state(struct dasd_device *device)
device->target >= DASD_STATE_KNOWN)
rc = dasd_state_new_to_known(device);
if (device->state == DASD_STATE_KNOWN &&
if (!rc &&
device->state == DASD_STATE_KNOWN &&
device->target >= DASD_STATE_BASIC)
rc = dasd_state_known_to_basic(device);
if (device->state == DASD_STATE_BASIC &&
if (!rc &&
device->state == DASD_STATE_BASIC &&
device->target >= DASD_STATE_ACCEPT)
rc = dasd_state_basic_to_accept(device);
if (device->state == DASD_STATE_ACCEPT &&
if (!rc &&
device->state == DASD_STATE_ACCEPT &&
device->target >= DASD_STATE_READY)
rc = dasd_state_accept_to_ready(device);
if (device->state == DASD_STATE_READY &&
if (!rc &&
device->state == DASD_STATE_READY &&
device->target >= DASD_STATE_ONLINE)
rc = dasd_state_ready_to_online(device);
......@@ -729,6 +733,7 @@ dasd_term_IO(struct dasd_ccw_req * cqr)
DBF_DEV_EVENT(DBF_ERR, device, "%s",
"I/O error, retry");
break;
case -EINVAL:
case -EBUSY:
DBF_DEV_EVENT(DBF_ERR, device, "%s",
"device busy, retry later");
......@@ -1727,7 +1732,7 @@ static int
dasd_release(struct inode *inp, struct file *filp)
{
struct gendisk *disk = inp->i_bdev->bd_disk;
struct dasd_device *device = isk->private_data;
struct dasd_device *device = disk->private_data;
if (device->state < DASD_STATE_ACCEPT) {
DBF_DEV_EVENT(DBF_ERR, device, " %s",
......@@ -2051,7 +2056,7 @@ dasd_init(void)
rc = -ENOMEM;
goto failed;
}
debug_register_view(dasd_debug_area, &debug_sprintf_view);
debug_register_view(dasd_debug_area, &debug_hex_ascii_view);
debug_set_level(dasd_debug_area, DBF_ERR);
DBF_EVENT(DBF_EMERG, "%s", "debug area created");
......
......@@ -36,6 +36,7 @@
#include <linux/hdreg.h> /* HDIO_GETGEO */
#include <linux/device.h>
#include <linux/bio.h>
#include <linux/devfs_fs_kernel.h>
#include <asm/uaccess.h>
#define XPRAM_NAME "xpram"
......@@ -459,7 +460,7 @@ static int __init xpram_setup_blkdev(void)
disk->private_data = &xpram_devices[i];
disk->queue = &xpram_queue;
sprintf(disk->disk_name, "slram%d", i);
sprintf(disk->disk_name, "slram/%d", i);
sprintf(disk->devfs_name, "slram/%d", i);
set_capacity(disk, xpram_sizes[i] << 1);
add_disk(disk);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment