From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: [PATCH] s390 (3/7): dasd driver.
Date: Fri, 7 Mar 2003 13:37:04 +0100 [thread overview]
Message-ID: <200303071337.04572.schwidefsky@de.ibm.com> (raw)
* 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.
next reply other threads:[~2003-03-07 12:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-07 12:37 Martin Schwidefsky [this message]
2003-10-06 9:25 Martin Schwidefsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200303071337.04572.schwidefsky@de.ibm.com \
--to=schwidefsky@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome