]> git.neil.brown.name Git - history.git/commitdiff
[ESP]: Fix abort return values.
authorDavid S. Miller <davem@nuts.ninka.net>
Mon, 28 Oct 2002 16:31:36 +0000 (08:31 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Mon, 28 Oct 2002 16:31:36 +0000 (08:31 -0800)
drivers/scsi/esp.c

index c847c29b8eaa114f26164c2f39e21f6b85e5313f..204ef05915a26738940971c3edd6056496c4184a 100644 (file)
@@ -1955,7 +1955,7 @@ int esp_abort(Scsi_Cmnd *SCptr)
                esp->msgout_ctr = 0;
                esp_cmd(esp, ESP_CMD_SATN);
                spin_unlock_irqrestore(esp->ehost->host_lock, flags);
-               return SCSI_ABORT_PENDING;
+               return SUCCESS;
        }
 
        /* If it is still in the issue queue then we can safely
@@ -1984,7 +1984,7 @@ int esp_abort(Scsi_Cmnd *SCptr)
                                        ESP_INTSON(esp->dregs);
 
                                spin_unlock_irqrestore(esp->ehost->host_lock, flags);
-                               return SCSI_ABORT_SUCCESS;
+                               return SUCCESS;
                        }
                }
        }
@@ -1998,20 +1998,20 @@ int esp_abort(Scsi_Cmnd *SCptr)
                if (don)
                        ESP_INTSON(esp->dregs);
                spin_unlock_irqrestore(esp->ehost->host_lock, flags);
-               return SCSI_ABORT_BUSY;
+               return FAILED;
        }
 
        /* It's disconnected, we have to reconnect to re-establish
         * the nexus and tell the device to abort.  However, we really
-        * cannot 'reconnect' per se, therefore we tell the upper layer
-        * the safest thing we can.  This is, wait a bit, if nothing
-        * happens, we are really hung so reset the bus.
+        * cannot 'reconnect' per se.  Don't try to be fancy, just
+        * indicate failure, which causes our caller to reset the whole
+        * bus.
         */
 
        if (don)
                ESP_INTSON(esp->dregs);
        spin_unlock_irqrestore(esp->ehost->host_lock, flags);
-       return SCSI_ABORT_SNOOZE;
+       return FAILED;
 }
 
 /* We've sent ESP_CMD_RS to the ESP, the interrupt had just