.. | .. |
---|
306 | 306 | |
---|
307 | 307 | if (rtn == BLK_EH_DONE) { |
---|
308 | 308 | /* |
---|
309 | | - * Set the command to complete first in order to prevent a real |
---|
310 | | - * completion from releasing the command while error handling |
---|
311 | | - * is using it. If the command was already completed, then the |
---|
312 | | - * lower level driver beat the timeout handler, and it is safe |
---|
313 | | - * to return without escalating error recovery. |
---|
314 | | - * |
---|
315 | | - * If timeout handling lost the race to a real completion, the |
---|
316 | | - * block layer may ignore that due to a fake timeout injection, |
---|
317 | | - * so return RESET_TIMER to allow error handling another shot |
---|
318 | | - * at this command. |
---|
| 309 | + * If scsi_done() has already set SCMD_STATE_COMPLETE, do not |
---|
| 310 | + * modify *scmd. |
---|
319 | 311 | */ |
---|
320 | 312 | if (test_and_set_bit(SCMD_STATE_COMPLETE, &scmd->state)) |
---|
321 | | - return BLK_EH_RESET_TIMER; |
---|
| 313 | + return BLK_EH_DONE; |
---|
322 | 314 | if (scsi_abort_command(scmd) != SUCCESS) { |
---|
323 | 315 | set_host_byte(scmd, DID_TIME_OUT); |
---|
324 | 316 | scsi_eh_scmd_add(scmd); |
---|