svn commit: r188731 - head/sys/dev/ata

Alexander Motin mav at FreeBSD.org
Tue Feb 17 13:17:23 PST 2009


Author: mav
Date: Tue Feb 17 21:17:21 2009
New Revision: 188731
URL: http://svn.freebsd.org/changeset/base/188731

Log:
  ata_interrupt() does not need to return anything. It is not it's business
  to report request completion, expecially when it is not reliable.

Modified:
  head/sys/dev/ata/ata-all.c
  head/sys/dev/ata/ata-all.h
  head/sys/dev/ata/ata-queue.c

Modified: head/sys/dev/ata/ata-all.c
==============================================================================
--- head/sys/dev/ata/ata-all.c	Tue Feb 17 21:02:35 2009	(r188730)
+++ head/sys/dev/ata/ata-all.c	Tue Feb 17 21:17:21 2009	(r188731)
@@ -147,7 +147,7 @@ ata_attach(device_t dev)
 	return ENXIO;
     }
     if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL,
-				(driver_intr_t *)ata_interrupt, ch, &ch->ih))) {
+				ata_interrupt, ch, &ch->ih))) {
 	device_printf(dev, "unable to setup interrupt\n");
 	return error;
     }
@@ -319,7 +319,7 @@ ata_resume(device_t dev)
     return error;
 }
 
-int
+void
 ata_interrupt(void *data)
 {
     struct ata_channel *ch = (struct ata_channel *)data;
@@ -354,11 +354,11 @@ ata_interrupt(void *data)
 	    mtx_unlock(&ch->state_mtx);
 	    ATA_LOCKING(ch->dev, ATA_LF_UNLOCK);
 	    ata_finish(request);
-	    return 1;
+	    return;
 	}
     } while (0);
     mtx_unlock(&ch->state_mtx);
-    return 0;
+    return;
 }
 
 /*

Modified: head/sys/dev/ata/ata-all.h
==============================================================================
--- head/sys/dev/ata/ata-all.h	Tue Feb 17 21:02:35 2009	(r188730)
+++ head/sys/dev/ata/ata-all.h	Tue Feb 17 21:17:21 2009	(r188731)
@@ -554,7 +554,7 @@ int ata_detach(device_t dev);
 int ata_reinit(device_t dev);
 int ata_suspend(device_t dev);
 int ata_resume(device_t dev);
-int ata_interrupt(void *data);
+void ata_interrupt(void *data);
 int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data);
 int ata_getparam(struct ata_device *atadev, int init);
 int ata_identify(device_t dev);

Modified: head/sys/dev/ata/ata-queue.c
==============================================================================
--- head/sys/dev/ata/ata-queue.c	Tue Feb 17 21:02:35 2009	(r188730)
+++ head/sys/dev/ata/ata-queue.c	Tue Feb 17 21:17:21 2009	(r188731)
@@ -214,8 +214,10 @@ ata_start(device_t dev)
 		if (dumping) {
 		    mtx_unlock(&ch->state_mtx);
 		    mtx_unlock(&ch->queue_mtx);
-		    while (!ata_interrupt(ch) && ch->running)
+		    while (ch->running) {
+			ata_interrupt(ch);
 			DELAY(10);
+		    }
 		    return;
 		}       
 	    }


More information about the svn-src-head mailing list