Skip to contentSkip to conversation

s390 (3/7): dasd driver.

PATCH New Martin Schwidefsky 1 participant 1 message Mar 7, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390 (3/7): dasd driver.

* 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(-)
drivers/s390/block/dasd.c +8 -2
diff -urN linux-2.5.64/drivers/s390/block/dasd.c linux-2.5.64-s390/drivers/s390/block/dasd.c
@@ -7,7 +7,7 @@
  * Bugreports.to..: <[email protected]>
  * (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;
drivers/s390/block/dasd_genhd.c +2 -1
diff -urN linux-2.5.64/drivers/s390/block/dasd_genhd.c linux-2.5.64-s390/drivers/s390/block/dasd_genhd.c
@@ -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.