PERFORCE change 111899 for review

Paolo Pisati piso at FreeBSD.org
Mon Dec 18 08:26:40 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=111899

Change 111899 by piso at piso_newluxor on 2006/12/18 16:26:17

	We cannot use filters in the ata subsystem, so put
	a check to verify the condition.

Affected files ...

.. //depot/projects/soc2006/intr_filter/dev/ata/ata-cbus.c#5 edit
.. //depot/projects/soc2006/intr_filter/dev/ata/ata-pci.c#4 edit

Differences ...

==== //depot/projects/soc2006/intr_filter/dev/ata/ata-cbus.c#5 (text+ko) ====

@@ -188,15 +188,16 @@
 
 static int
 ata_cbus_setup_intr(device_t dev, device_t child, struct resource *irq,
-	       int flags, driver_filter_t *filter __unused, driver_intr_t *intr, 
+	       int flags, driver_filter_t *filter, driver_intr_t *intr, 
 	       void *arg, void **cookiep)
 {
     struct ata_cbus_controller *controller = device_get_softc(dev);
     int unit = ((struct ata_channel *)device_get_softc(child))->unit;
 
-    /*
-     * XXX_FILTER this code doesn't take care of filters.
-     */
+    if (filter != NULL) {
+	    printf("ata-cbus.c: we cannot use a filter here\n");
+	    return (EINVAL);
+    }
     controller->interrupt[unit].function = intr;
     controller->interrupt[unit].argument = arg;
     *cookiep = controller;

==== //depot/projects/soc2006/intr_filter/dev/ata/ata-pci.c#4 (text+ko) ====

@@ -345,10 +345,11 @@
     else {
 	struct ata_pci_controller *controller = device_get_softc(dev);
 	int unit = ((struct ata_channel *)device_get_softc(child))->unit;
-	
-	/*
-	 * XXX_FILTER this code doesn't take care of filters.
-	 */
+
+	if (filter != NULL) {
+		printf("ata-pci.c: we cannot use a filter here\n");
+		return (EINVAL);
+	}
 	controller->interrupt[unit].function = function;
 	controller->interrupt[unit].argument = argument;
 	*cookiep = controller;


More information about the p4-projects mailing list