Commit b6c92b7e0af575e2b8b05bdf33633cf9e1661cbf

Authored by Hannes Reinecke
Committed by Christoph Hellwig
1 parent 883a030f98

scsi: correct return values for .eh_abort_handler implementations

The .eh_abort_handler needs to return SUCCESS, FAILED, or
FAST_IO_FAIL. So fixup all callers to adhere to this requirement.

Reviewed-by: Robert Elliott <elliott@hp.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>

Showing 6 changed files with 18 additions and 18 deletions Side-by-side Diff

drivers/scsi/NCR5380.c
... ... @@ -2647,14 +2647,14 @@
2647 2647 *
2648 2648 * Purpose : abort a command
2649 2649 *
2650   - * Inputs : cmd - the Scsi_Cmnd to abort, code - code to set the
2651   - * host byte of the result field to, if zero DID_ABORTED is
  2650 + * Inputs : cmd - the Scsi_Cmnd to abort, code - code to set the
  2651 + * host byte of the result field to, if zero DID_ABORTED is
2652 2652 * used.
2653 2653 *
2654   - * Returns : 0 - success, -1 on failure.
  2654 + * Returns : SUCCESS - success, FAILED on failure.
2655 2655 *
2656   - * XXX - there is no way to abort the command that is currently
2657   - * connected, you have to wait for it to complete. If this is
  2656 + * XXX - there is no way to abort the command that is currently
  2657 + * connected, you have to wait for it to complete. If this is
2658 2658 * a problem, we could implement longjmp() / setjmp(), setjmp()
2659 2659 * called where the loop started in NCR5380_main().
2660 2660 *
... ... @@ -2703,7 +2703,7 @@
2703 2703 * aborted flag and get back into our main loop.
2704 2704 */
2705 2705  
2706   - return 0;
  2706 + return SUCCESS;
2707 2707 }
2708 2708 #endif
2709 2709  
drivers/scsi/aha1740.c
... ... @@ -531,7 +531,7 @@
531 531 * quiet as possible...
532 532 */
533 533  
534   - return 0;
  534 + return SUCCESS;
535 535 }
536 536  
537 537 static struct scsi_host_template aha1740_template = {
drivers/scsi/atari_NCR5380.c
... ... @@ -2607,7 +2607,7 @@
2607 2607 * host byte of the result field to, if zero DID_ABORTED is
2608 2608 * used.
2609 2609 *
2610   - * Returns : 0 - success, -1 on failure.
  2610 + * Returns : SUCCESS - success, FAILED on failure.
2611 2611 *
2612 2612 * XXX - there is no way to abort the command that is currently
2613 2613 * connected, you have to wait for it to complete. If this is
drivers/scsi/esas2r/esas2r_main.c
... ... @@ -1057,7 +1057,7 @@
1057 1057  
1058 1058 cmd->scsi_done(cmd);
1059 1059  
1060   - return 0;
  1060 + return SUCCESS;
1061 1061 }
1062 1062  
1063 1063 spin_lock_irqsave(&a->queue_lock, flags);
drivers/scsi/megaraid.c
... ... @@ -1945,7 +1945,7 @@
1945 1945 cmd->device->id, (u32)cmd->device->lun);
1946 1946  
1947 1947 if(list_empty(&adapter->pending_list))
1948   - return FALSE;
  1948 + return FAILED;
1949 1949  
1950 1950 list_for_each_safe(pos, next, &adapter->pending_list) {
1951 1951  
... ... @@ -1968,7 +1968,7 @@
1968 1968 (aor==SCB_ABORT) ? "ABORTING":"RESET",
1969 1969 scb->idx);
1970 1970  
1971   - return FALSE;
  1971 + return FAILED;
1972 1972 }
1973 1973 else {
1974 1974  
1975 1975  
... ... @@ -1993,12 +1993,12 @@
1993 1993 list_add_tail(SCSI_LIST(cmd),
1994 1994 &adapter->completed_list);
1995 1995  
1996   - return TRUE;
  1996 + return SUCCESS;
1997 1997 }
1998 1998 }
1999 1999 }
2000 2000  
2001   - return FALSE;
  2001 + return FAILED;
2002 2002 }
2003 2003  
2004 2004 static inline int
drivers/scsi/sun3_NCR5380.c
... ... @@ -2590,15 +2590,15 @@
2590 2590 * Purpose : abort a command
2591 2591 *
2592 2592 * Inputs : cmd - the struct scsi_cmnd to abort, code - code to set the
2593   - * host byte of the result field to, if zero DID_ABORTED is
  2593 + * host byte of the result field to, if zero DID_ABORTED is
2594 2594 * used.
2595 2595 *
2596   - * Returns : 0 - success, -1 on failure.
  2596 + * Returns : SUCCESS - success, FAILED on failure.
2597 2597 *
2598   - * XXX - there is no way to abort the command that is currently
2599   - * connected, you have to wait for it to complete. If this is
  2598 + * XXX - there is no way to abort the command that is currently
  2599 + * connected, you have to wait for it to complete. If this is
2600 2600 * a problem, we could implement longjmp() / setjmp(), setjmp()
2601   - * called where the loop started in NCR5380_main().
  2601 + * called where the loop started in NCR5380_main().
2602 2602 */
2603 2603  
2604 2604 static int NCR5380_abort(struct scsi_cmnd *cmd)