]> git.neil.brown.name Git - history.git/commitdiff
[libata sata_promise] provide proper SCSI completion function
authorJeff Garzik <jgarzik@redhat.com>
Mon, 8 Mar 2004 17:33:25 +0000 (12:33 -0500)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 8 Mar 2004 17:33:25 +0000 (12:33 -0500)
Promise driver uses a custom error handling function, so we need
the fix that was applied to the libata core:  the SCSI error
handling thread requires that we complete commands using a special
completion function, since the normal one doesn't work inside
the error handling thread.

drivers/scsi/sata_promise.c

index 5fd1e9da17eed75a896719d14fedba492a524ac7..47761bf507701b26e84946a223280c11fa13694e 100644 (file)
@@ -35,7 +35,7 @@
 #include <asm/io.h>
 
 #define DRV_NAME       "sata_promise"
-#define DRV_VERSION    "0.90"
+#define DRV_VERSION    "0.91"
 
 
 enum {
@@ -1014,6 +1014,14 @@ static void pdc_eng_timeout(struct ata_port *ap)
                goto out;
        }
 
+       /* hack alert!  We cannot use the supplied completion
+        * function from inside the ->eh_strategy_handler() thread.
+        * libata is the only user of ->eh_strategy_handler() in
+        * any kernel, so the default scsi_done() assumes it is
+        * not being called from the SCSI EH.
+        */
+       qc->scsidone = scsi_finish_command;
+
        switch (qc->tf.protocol) {
        case ATA_PROT_DMA_READ:
        case ATA_PROT_DMA_WRITE: