[PATCH] s390 (3/7): dasd driver.

Martin Schwidefsky (schwidefsky@de.ibm.com)
Fri, 7 Mar 2003 13:37:04 +0100


* Better take the request queue lock before calling dasd_end_request which in
turn calls end_that_request_first & end_that_request_last.
* Make it work with CONFIG_DEVFS_FS=y.

diffstat:
dasd.c | 10 ++++++++--
dasd_genhd.c | 3 ++-
2 files changed, 10 insertions(+), 3 deletions(-)

diff -urN linux-2.5.64/drivers/s390/block/dasd.c linux-2.5.64-s390/drivers/s390/block/dasd.c
--- linux-2.5.64/drivers/s390/block/dasd.c Wed Mar 5 04:29:18 2003
+++ linux-2.5.64-s390/drivers/s390/block/dasd.c Fri Mar 7 11:40:32 2003
@@ -7,7 +7,7 @@
* Bugreports.to..: <Linux390@de.ibm.com>
* (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
*
- * $Revision: 1.74 $
+ * $Revision: 1.79 $
*
* History of changes (starts July 2000)
* 11/09/00 complete redesign after code review
@@ -194,8 +194,10 @@

/* Add a proc directory and the dasd device entry to devfs. */
sprintf(buffer, "dasd/%04x", device->devno);
+#ifdef CONFIG_DEVFS_FS
dir = devfs_mk_dir(NULL, buffer, NULL);
device->gdp->de = dir;
+#endif
if (device->ro_flag)
devfs_perm = S_IFBLK | S_IRUSR;
else
@@ -1176,7 +1178,9 @@

req = (struct request *) data;
dasd_profile_end(cqr->device, cqr, req);
+ spin_lock_irq(&cqr->device->request_queue_lock);
dasd_end_request(req, (cqr->status == DASD_CQR_DONE));
+ spin_unlock_irq(&cqr->device->request_queue_lock);
dasd_sfree_request(cqr, cqr->device);
}

@@ -2077,11 +2081,13 @@

DBF_EVENT(DBF_EMERG, "%s", "debug area created");

- if (devfs_mk_dir(NULL, "dasd", NULL)) {
+#ifdef CONFIG_DEVFS_FS
+ if (!devfs_mk_dir(NULL, "dasd", NULL)) {
DBF_EVENT(DBF_ALERT, "%s", "no devfs");
rc = -ENOSYS;
goto failed;
}
+#endif
rc = dasd_devmap_init();
if (rc)
goto failed;
diff -urN linux-2.5.64/drivers/s390/block/dasd_genhd.c linux-2.5.64-s390/drivers/s390/block/dasd_genhd.c
--- linux-2.5.64/drivers/s390/block/dasd_genhd.c Wed Mar 5 04:29:32 2003
+++ linux-2.5.64-s390/drivers/s390/block/dasd_genhd.c Fri Mar 7 11:40:32 2003
@@ -9,7 +9,7 @@
*
* Dealing with devices registered to multiple major numbers.
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
* History of changes
* 05/04/02 split from dasd.c, code restructuring.
@@ -145,6 +145,7 @@
gdp->major = mi->major;
gdp->first_minor = index << DASD_PARTN_BITS;
gdp->fops = &dasd_device_operations;
+ gdp->flags |= GENHD_FL_DEVFS;

/*
* Set device name.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/