mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] s390 (3/6): dasd driver.
@ 2004-05-13 19:14 Martin Schwidefsky
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Schwidefsky @ 2004-05-13 19:14 UTC (permalink / raw)
  To: akpm, linux-kernel

[PATCH] s390: dasd driver.

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

dasd driver changes:
 - Do error recovery for error recovery requests.
 - Retry request if the start_IO failed because of a timeout.

diffstat:
 drivers/s390/block/dasd.c      |   21 +++++++++++----------
 drivers/s390/block/dasd_eckd.c |    4 ++--
 drivers/s390/block/dasd_erp.c  |    5 +++--
 3 files changed, 16 insertions(+), 14 deletions(-)

diff -urN linux-2.6/drivers/s390/block/dasd.c linux-2.6-s390/drivers/s390/block/dasd.c
--- linux-2.6/drivers/s390/block/dasd.c	Mon May 10 04:32:29 2004
+++ linux-2.6-s390/drivers/s390/block/dasd.c	Thu May 13 21:01:00 2004
@@ -7,7 +7,7 @@
  * Bugreports.to..: <Linux390@de.ibm.com>
  * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
  *
- * $Revision: 1.139 $
+ * $Revision: 1.141 $
  */
 
 #include <linux/config.h>
@@ -751,16 +751,16 @@
 		break;
 	case -EBUSY:
 		DBF_DEV_EVENT(DBF_ERR, device, "%s",
-			      "device busy, retry later");
+			      "start_IO: device busy, retry later");
 		break;
 	case -ETIMEDOUT:
 		DBF_DEV_EVENT(DBF_ERR, device, "%s",
-			      "request timeout - terminated");
+			      "start_IO: request timeout, retry later");
+		break;
 	case -ENODEV:
 	case -EIO:
-		cqr->status = DASD_CQR_FAILED;
-		cqr->stopclk = cqr->startclk;
-		dasd_schedule_bh(device);
+		DBF_DEV_EVENT(DBF_ERR, device, "%s",
+			      "start_IO: device gone, retry");
 		break;
 	default:
 		DEV_MESSAGE(KERN_ERR, device,
@@ -1008,8 +1008,9 @@
 				if (device->discipline->start_IO(next) == 0)
 					expires = next->expires;
 				else
-					MESSAGE(KERN_WARNING, "%s",
-						"Interrupt fastpath failed!");
+					DEV_MESSAGE(KERN_DEBUG, device, "%s",
+						    "Interrupt fastpath "
+						    "failed!");
 			}
 		}
 	} else {		/* error */
@@ -1018,8 +1019,8 @@
 		if (cqr->dstat)
 			memcpy(cqr->dstat, irb, sizeof (struct irb));
 		else
-			MESSAGE(KERN_ERR, "%s",
-				"no memory for dstat...ignoring");
+			DEV_MESSAGE(KERN_ERR, device, "%s",
+				    "no memory for dstat...ignoring");
 #ifdef ERP_DEBUG
 		/* dump sense data */
 		dasd_log_sense(cqr, irb);
diff -urN linux-2.6/drivers/s390/block/dasd_eckd.c linux-2.6-s390/drivers/s390/block/dasd_eckd.c
--- linux-2.6/drivers/s390/block/dasd_eckd.c	Mon May 10 04:31:57 2004
+++ linux-2.6-s390/drivers/s390/block/dasd_eckd.c	Thu May 13 21:01:00 2004
@@ -7,7 +7,7 @@
  * Bugreports.to..: <Linux390@de.ibm.com>
  * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
  *
- * $Revision: 1.54 $
+ * $Revision: 1.55 $
  */
 
 #include <linux/config.h>
@@ -1070,7 +1070,7 @@
 	cqr->device = device;
 	cqr->expires = 5 * 60 * HZ;	/* 5 minutes */
 	cqr->lpm = LPM_ANYPATH;
-	cqr->retries = 2;
+	cqr->retries = 256;
 	cqr->buildclk = get_clock();
 	cqr->status = DASD_CQR_FILLED;
 	return cqr;
diff -urN linux-2.6/drivers/s390/block/dasd_erp.c linux-2.6-s390/drivers/s390/block/dasd_erp.c
--- linux-2.6/drivers/s390/block/dasd_erp.c	Mon May 10 04:32:01 2004
+++ linux-2.6-s390/drivers/s390/block/dasd_erp.c	Thu May 13 21:01:00 2004
@@ -7,7 +7,7 @@
  * Bugreports.to..: <Linux390@de.ibm.com>
  * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001
  *
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
  */
 
 #include <linux/config.h>
@@ -67,7 +67,8 @@
 	}
 	strncpy((char *) &cqr->magic, magic, 4);
 	ASCEBC((char *) &cqr->magic, 4);
-	atomic_inc(&device->ref_count);
+	set_bit(DASD_CQR_FLAGS_USE_ERP, &cqr->flags);
+	dasd_get_device(device);
 	return cqr;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] s390 (3/6): dasd driver.
@ 2003-07-17 16:38 Martin Schwidefsky
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Schwidefsky @ 2003-07-17 16:38 UTC (permalink / raw)
  To: linux-kernel, torvalds

Remove put_disk from dasd_destroy_partitions. This is done in dasd_free_device.

diffstat:
 drivers/s390/block/dasd_genhd.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -urN linux-2.6.0-test1/drivers/s390/block/dasd_genhd.c linux-2.6.0-s390/drivers/s390/block/dasd_genhd.c
--- linux-2.6.0-test1/drivers/s390/block/dasd_genhd.c	Mon Jul 14 05:36:47 2003
+++ linux-2.6.0-s390/drivers/s390/block/dasd_genhd.c	Thu Jul 17 17:27:31 2003
@@ -9,7 +9,7 @@
  *
  * Dealing with devices registered to multiple major numbers.
  *
- * $Revision: 1.29 $
+ * $Revision: 1.31 $
  */
 
 #include <linux/config.h>
@@ -200,7 +200,6 @@
 dasd_destroy_partitions(struct dasd_device * device)
 {
 	del_gendisk(device->gdp);
-	put_disk(device->gdp);
 }
 
 int

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-13 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-13 19:14 [PATCH] s390 (3/6): dasd driver Martin Schwidefsky
  -- strict thread matches above, loose matches on Subject: below --
2003-07-17 16:38 Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®