Commit b6c92b7e0af575e2b8b05bdf33633cf9e1661cbf
Committed by
Christoph Hellwig
1 parent
883a030f98
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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
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
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) |