]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: garloff@suse.de |
2 | Subject: Introduce own timeout for TEST_UNIT_READY | |
3 | Reference: SUSE41689 | |
4 | ||
5 | In error recovery, a SCSI device may need more than the 10s SENSE_TIMEOUT | |
6 | to respond to TEST_UNIT_READY, as reported in novell bugzilla #56689. | |
7 | The patch introduces an own timeout for TEST_UNIT_READY which is set | |
8 | to 30s and used. | |
9 | ||
10 | Signed-off-by: Kurt Garloff <garloff@suse.de> | |
11 | ||
12 | --- | |
13 | drivers/scsi/scsi_error.c | 3 ++- | |
14 | 1 file changed, 2 insertions(+), 1 deletion(-) | |
15 | ||
16 | --- a/drivers/scsi/scsi_error.c | |
17 | +++ b/drivers/scsi/scsi_error.c | |
18 | @@ -42,6 +42,7 @@ | |
19 | #include "scsi_transport_api.h" | |
20 | ||
21 | #define SENSE_TIMEOUT (10*HZ) | |
22 | +#define TEST_UNIT_READY_TIMEOUT (30*HZ) | |
23 | ||
24 | /* | |
25 | * These should *probably* be handled by the host itself. | |
26 | @@ -938,7 +939,7 @@ static int scsi_eh_tur(struct scsi_cmnd | |
27 | int retry_cnt = 1, rtn; | |
28 | ||
29 | retry_tur: | |
30 | - rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, SENSE_TIMEOUT, 0); | |
31 | + rtn = scsi_send_eh_cmnd(scmd, tur_command, 6, TEST_UNIT_READY_TIMEOUT, 0); | |
32 | ||
33 | SCSI_LOG_ERROR_RECOVERY(3, printk("%s: scmd %p rtn %x\n", | |
34 | __func__, scmd, rtn)); |